CLRX
1
An unofficial OpenCL extensions designed for Radeon GPUs
|
assembler format handler More...
#include <AsmFormats.h>
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 §ionId) |
resolve symbol if needed (for example that comes from unresolvable sections) | |
virtual bool | resolveRelocation (const AsmExpression *expr, uint64_t &value, AsmSectionId §ionId) |
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 | |
virtual void | setCodeFlags (Flags codeFlags) |
![]() | |
NonCopyableAndNonMovable () | |
constructor | |
NonCopyableAndNonMovable (const NonCopyableAndNonMovable &)=delete | |
copy-constructor | |
NonCopyableAndNonMovable (NonCopyableAndNonMovable &&)=delete | |
move-constructor | |
NonCopyableAndNonMovable & | operator= (const NonCopyableAndNonMovable &)=delete |
copy-assignment | |
NonCopyableAndNonMovable & | operator= (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 | |
Assembler & | assembler |
assembler reference | |
bool | sectionDiffsResolvable |
assembler format handler
|
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.
kernelName | kernel name |
Implemented in CLRX::AsmROCmHandler, CLRX::AsmGalliumHandler, CLRX::AsmAmdCL2Handler, CLRX::AsmAmdHandler, and CLRX::AsmRawCodeHandler.
|
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.
sectionName | section name |
kernelId | kernel id (may ASMKERN_GLOBAL) |
Implemented in CLRX::AsmROCmHandler, CLRX::AsmGalliumHandler, CLRX::AsmAmdCL2Handler, CLRX::AsmAmdHandler, and CLRX::AsmRawCodeHandler.