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

handles AMD OpenCL 2.0 binary format More...

#include <AsmFormats.h>

Inheritance diagram for CLRX::AsmAmdCL2Handler:
CLRX::AsmKcodeHandler CLRX::AsmFormatHandler CLRX::NonCopyableAndNonMovable

Public Member Functions

 AsmAmdCL2Handler (Assembler &assembler)
 constructor
 
 ~AsmAmdCL2Handler ()
 destructor
 
AsmKernelId addKernel (const char *kernelName)
 add/set kernel More...
 
AsmSectionId addSection (const char *sectionName, AsmKernelId kernelId)
 add section More...
 
AsmSectionId getSectionId (const char *sectionName) const
 get section id if exists in current context, otherwise returns ASMSECT_NONE
 
void setCurrentKernel (AsmKernelId kernel)
 set current kernel
 
void setCurrentSection (AsmSectionId sectionId)
 set current section, this method can change current kernel if that required
 
SectionInfo getSectionInfo (AsmSectionId 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 resolveSymbol (const AsmSymbol &symbol, uint64_t &value, AsmSectionId &sectionId)
 resolve symbol if needed (for example that comes from unresolvable sections)
 
bool resolveRelocation (const AsmExpression *expr, uint64_t &value, AsmSectionId &sectionId)
 resolve relocation for specified expression
 
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
 
const AmdCL2InputgetOutput () const
 get output structure pointer
 
bool isCodeSection () const
 return true if current section is code section
 
KernelBasegetKernelBase (AsmKernelId index)
 return KernelBase for kernel index
 
const KernelBasegetKernelBase (AsmKernelId index) const
 return KernelBase for kernel index
 
size_t getKernelsNum () const
 return kernel number
 
void handleLabel (const CString &label)
 handle labels
 
- Public Member Functions inherited from CLRX::AsmFormatHandler
bool isSectionDiffsResolvable () const
 return true if format handler can resolve differences between sections
 
virtual bool prepareSectionDiffsResolving ()
 prepare before section diference resolving
 
virtual void setCodeFlags (Flags codeFlags)
 
- 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
 

Friends

struct AsmAmdCL2PseudoOps
 

Additional Inherited Members

- Protected Member Functions inherited from CLRX::AsmKcodeHandler
 AsmKcodeHandler (Assembler &assembler)
 
void restoreKcodeCurrentAllocRegs ()
 
void saveKcodeCurrentAllocRegs ()
 
void prepareKcodeState ()
 
- Protected Member Functions inherited from CLRX::AsmFormatHandler
 AsmFormatHandler (Assembler &assembler)
 constructor
 
bool resolveLoHiRelocExpression (const AsmExpression *expr, RelocType &relType, AsmSectionId &relSectionId, uint64_t &relValue)
 
- Protected Attributes inherited from CLRX::AsmKcodeHandler
std::vector< AsmKernelIdkcodeSelection
 
std::stack< std::vector< AsmKernelId > > kcodeSelStack
 
AsmKernelId currentKcodeKernel
 
AsmSectionId codeSection
 
- Protected Attributes inherited from CLRX::AsmFormatHandler
Assemblerassembler
 assembler reference
 
bool sectionDiffsResolvable
 

Detailed Description

handles AMD OpenCL 2.0 binary format

Member Function Documentation

AsmKernelId CLRX::AsmAmdCL2Handler::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.

AsmSectionId CLRX::AsmAmdCL2Handler::addSection ( const char *  sectionName,
AsmKernelId  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: