CLRX  1
An unofficial OpenCL extensions designed for Radeon GPUs
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CLRX::AsmFormatHandler Class Referenceabstract

assembler format handler More...

#include <AsmFormats.h>

Inheritance diagram for CLRX::AsmFormatHandler:
CLRX::NonCopyableAndNonMovable CLRX::AsmAmdHandler CLRX::AsmKcodeHandler CLRX::AsmRawCodeHandler CLRX::AsmAmdCL2Handler CLRX::AsmGalliumHandler CLRX::AsmROCmHandler

Classes

struct  KernelBase
 
struct  SectionInfo
 section information More...
 

Public Member Functions

bool isSectionDiffsResolvable () const
 return true if format handler can resolve differences between sections
 
virtual AsmKernelId addKernel (const char *kernelName)=0
 add/set kernel More...
 
virtual AsmSectionId addSection (const char *sectionName, AsmKernelId kernelId)=0
 add section More...
 
virtual AsmSectionId getSectionId (const char *sectionName) const =0
 get section id if exists in current context, otherwise returns ASMSECT_NONE
 
virtual void setCurrentKernel (AsmKernelId kernel)=0
 set current kernel
 
virtual void setCurrentSection (AsmSectionId sectionId)=0
 set current section, this method can change current kernel if that required
 
virtual SectionInfo getSectionInfo (AsmSectionId sectionId) const =0
 get current section flags and type
 
virtual bool parsePseudoOp (const CString &firstName, const char *stmtPlace, const char *linePtr)=0
 parse pseudo-op (return true if recognized pseudo-op)
 
virtual void handleLabel (const CString &label)
 handle labels
 
virtual bool resolveSymbol (const AsmSymbol &symbol, uint64_t &value, AsmSectionId &sectionId)
 resolve symbol if needed (for example that comes from unresolvable sections)
 
virtual bool resolveRelocation (const AsmExpression *expr, uint64_t &value, AsmSectionId &sectionId)
 resolve relocation for specified expression
 
virtual bool prepareBinary ()=0
 prepare binary for use
 
virtual void writeBinary (std::ostream &os) const =0
 write binary to output stream
 
virtual void writeBinary (Array< cxbyte > &array) const =0
 write binary to array
 
virtual bool prepareSectionDiffsResolving ()
 prepare before section diference resolving
 
- Public Member Functions inherited from CLRX::NonCopyableAndNonMovable
 NonCopyableAndNonMovable ()
 constructor
 
 NonCopyableAndNonMovable (const NonCopyableAndNonMovable &)=delete
 copy-constructor
 
 NonCopyableAndNonMovable (NonCopyableAndNonMovable &&)=delete
 move-constructor
 
NonCopyableAndNonMovableoperator= (const NonCopyableAndNonMovable &)=delete
 copy-assignment
 
NonCopyableAndNonMovableoperator= (NonCopyableAndNonMovable &&)=delete
 move-asignment
 

Protected Member Functions

 AsmFormatHandler (Assembler &assembler)
 constructor
 
bool resolveLoHiRelocExpression (const AsmExpression *expr, RelocType &relType, AsmSectionId &relSectionId, uint64_t &relValue)
 

Protected Attributes

Assemblerassembler
 assembler reference
 
bool sectionDiffsResolvable
 

Detailed Description

assembler format handler

Member Function Documentation

virtual AsmKernelId CLRX::AsmFormatHandler::addKernel ( const char *  kernelName)
pure virtual

add/set kernel

adds new kernel. throw AsmFormatException when addition failed. Method should handles any constraint that doesn't allow to add kernel except duplicate of name.

Parameters
kernelNamekernel name
Returns
kernel id

Implemented in CLRX::AsmROCmHandler, CLRX::AsmGalliumHandler, CLRX::AsmAmdCL2Handler, CLRX::AsmAmdHandler, and CLRX::AsmRawCodeHandler.

virtual AsmSectionId CLRX::AsmFormatHandler::addSection ( const char *  sectionName,
AsmKernelId  kernelId 
)
pure virtual

add section

adds new section . throw AsmFormatException when addition failed. Method should handles any constraint that doesn't allow to add section except duplicate of name.

Parameters
sectionNamesection name
kernelIdkernel id (may ASMKERN_GLOBAL)
Returns
section id

Implemented in CLRX::AsmROCmHandler, CLRX::AsmGalliumHandler, CLRX::AsmAmdCL2Handler, CLRX::AsmAmdHandler, and CLRX::AsmRawCodeHandler.


The documentation for this class was generated from the following file: