CLRX  1
An unofficial OpenCL extensions designed for Radeon GPUs
Public Member Functions | List of all members
CLRX::AsmRawCodeHandler Class Reference

handles raw code format More...

#include <AsmFormats.h>

Inheritance diagram for CLRX::AsmRawCodeHandler:
CLRX::AsmFormatHandler CLRX::NonCopyableAndNonMovable

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from CLRX::AsmFormatHandler
 AsmFormatHandler (Assembler &assembler)
 constructor
 
bool resolveLoHiRelocExpression (const AsmExpression *expr, RelocType &relType, cxuint &relSectionId, uint64_t &relValue)
 
- Protected Attributes inherited from CLRX::AsmFormatHandler
Assemblerassembler
 assembler reference
 
bool sectionDiffsResolvable
 

Detailed Description

handles raw code format

Member Function Documentation

cxuint CLRX::AsmRawCodeHandler::addKernel ( const char *  kernelName)
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

Implements CLRX::AsmFormatHandler.

cxuint CLRX::AsmRawCodeHandler::addSection ( const char *  sectionName,
cxuint  kernelId 
)
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

Implements CLRX::AsmFormatHandler.


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