23 #ifndef __CLRX_ASSEMBLER_H__ 24 #define __CLRX_ASSEMBLER_H__ 37 #include <unordered_set> 38 #include <unordered_map> 54 ASM_POLICY_UNIFIED_SGPR_COUNT = CLRX_POLICY_UNIFIED_SGPR_COUNT
100 std::vector<RegVarUsageInt> items;
103 std::vector<Chunk> chunks;
117 {
return readPos.chunkPos < chunks.size() && (readPos.chunkPos+1 != chunks.size() ||
118 readPos.itemPos < chunks.back().items.size());; }
122 ReadPos findPositionByOffset(
size_t offset)
const;
126 cxbyte* linearDeps)
const = 0;
133 std::vector<AsmRegVarLinearDep> regVarLinDeps;
140 { regVarLinDeps.push_back(linearDep); }
143 {
return regVarLinDeps.size(); }
146 {
return regVarLinDeps[pos]; }
148 size_t findPositionByOffset(
size_t offset)
const;
166 cxbyte* linearDeps)
const;
185 std::vector<AsmDelayedOp> delayedOps;
186 std::vector<AsmWaitInstr> waitInstrs;
193 { delayedOps.push_back(delOp); }
196 { waitInstrs.push_back(waitInstr); }
199 {
return readPos.delOpPos < delayedOps.size() ||
200 readPos.waitInstrPos < waitInstrs.size(); }
204 ReadPos findPositionByOffset(
size_t offset)
const;
216 void printWarning(
const char* linePtr,
const char* message);
218 void printError(
const char* linePtr,
const char* message);
220 void printWarning(
const AsmSourcePos& sourcePos,
const char* message);
222 void printError(
const AsmSourcePos& sourcePos,
const char* message);
225 cxbyte signess = WS_BOTH);
236 virtual void assemble(
const CString& mnemonic,
const char* mnemPlace,
237 const char* linePtr,
const char* lineEnd, std::vector<cxbyte>& output,
244 virtual bool checkMnemonic(
const CString& mnemonic)
const = 0;
246 virtual void setAllocatedRegisters(
const cxuint* regs =
nullptr,
247 Flags regFlags = 0) = 0;
249 virtual const cxuint* getAllocatedRegisters(
size_t& regTypesNum,
250 Flags& regFlags)
const = 0;
252 virtual void getMaxRegistersNum(
size_t& regTypesNum,
cxuint* maxRegs)
const = 0;
254 virtual void getRegisterRanges(
size_t& regTypesNum,
cxuint* regRanges)
const = 0;
256 virtual void fillAlignment(
size_t size,
cxbyte* output) = 0;
258 virtual bool parseRegisterRange(
const char*& linePtr,
cxuint& regStart,
263 virtual bool parseRegisterType(
const char*& linePtr,
264 const char* end,
cxuint& type) = 0;
266 virtual size_t getInstructionSize(
size_t codeSize,
const cxbyte* code)
const = 0;
281 friend struct GCNAsmUtils;
293 void resetInstrRVUs()
297 rvu.useRegMode =
false;
298 rvu.regField = ASMFIELD_NONE;
301 void resetWaitInstrs()
303 hasWaitInstr =
false;
305 op.delayedOpType = op.delayedOpType2 = ASMDELOP_NONE;
308 void setCurrentRVU(
cxbyte idx)
309 { currentRVUIndex = idx; }
316 if (rvu.regField != ASMFIELD_NONE)
322 if (op.delayedOpType != ASMDELOP_NONE)
337 void assemble(
const CString& mnemonic,
const char* mnemPlace,
const char* linePtr,
338 const char* lineEnd, std::vector<cxbyte>& output,
343 bool checkMnemonic(
const CString& mnemonic)
const;
344 void setAllocatedRegisters(
const cxuint* regs,
Flags regFlags);
345 const cxuint* getAllocatedRegisters(
size_t& regTypesNum,
Flags& regFlags)
const;
346 void getMaxRegistersNum(
size_t& regTypesNum,
cxuint* maxRegs)
const;
347 void getRegisterRanges(
size_t& regTypesNum,
cxuint* regRanges)
const;
348 void fillAlignment(
size_t size,
cxbyte* output);
349 bool parseRegisterRange(
const char*& linePtr,
cxuint& regStart,
cxuint& regEnd,
352 bool parseRegisterType(
const char*& linePtr,
const char* end,
cxuint& type);
353 size_t getInstructionSize(
size_t codeSize,
const cxbyte* code)
const;
375 SSAInfo(
size_t _bssaId = SIZE_MAX,
size_t _ssaIdF = SIZE_MAX,
376 size_t _ssaId = SIZE_MAX,
size_t _ssaIdL = SIZE_MAX,
377 size_t _ssaIdChange = 0,
bool _readBeforeWrite =
false)
378 : ssaIdBefore(_bssaId), ssaIdFirst(_ssaIdF), ssaId(_ssaId),
379 ssaIdLast(_ssaIdL), ssaIdChange(_ssaIdChange),
380 readBeforeWrite(_readBeforeWrite)
403 typedef std::pair<size_t, size_t> SSAReplace;
404 typedef std::unordered_map<AsmSingleVReg, VectorSet<SSAReplace> > SSAReplacesMap;
407 typedef std::unordered_map<AsmSingleVReg, std::vector<size_t> > VarIndexMap;
421 std::vector<CodeBlock> codeBlocks;
422 SSAReplacesMap ssaReplacesMap;
426 size_t graphVregsCounts[MAX_REGTYPES_NUM];
427 VarIndexMap vregIndexMaps[MAX_REGTYPES_NUM];
428 InterGraph interGraphs[MAX_REGTYPES_NUM];
430 std::unordered_map<size_t, LinearDep> linearDepMaps[MAX_REGTYPES_NUM];
432 std::unordered_map<size_t, VIdxSetEntry> vidxRoutineMap;
434 std::unordered_map<size_t, VIdxSetEntry> vidxCallMap;
440 const SSAReplacesMap& ssaReplacesMap);
442 void createCodeStructure(
const std::vector<AsmCodeFlowEntry>& codeFlow,
443 size_t codeSize,
const cxbyte* code);
446 void applySSAReplaces();
449 void createInterferenceGraph();
450 void colorInterferenceGraph();
454 const std::vector<CodeBlock>& getCodeBlocks()
const 455 {
return codeBlocks; }
456 const SSAReplacesMap& getSSAReplacesMap()
const 457 {
return ssaReplacesMap; }
459 {
return outLivenesses; }
461 const std::unordered_map<size_t, LinearDep>* getLinearDepMaps()
const 462 {
return linearDepMaps; }
464 const VarIndexMap* getVregIndexMaps()
const 465 {
return vregIndexMaps; }
467 const std::unordered_map<size_t, VIdxSetEntry>& getVIdxRoutineMap()
const 468 {
return vidxRoutineMap; }
469 const std::unordered_map<size_t, VIdxSetEntry>& getVIdxCallMap()
const 470 {
return vidxCallMap; }
479 const std::vector<AsmRegAllocator::CodeBlock>& codeBlocks;
480 const AsmRegAllocator::VarIndexMap* vregIndexMaps;
483 std::vector<AsmWaitInstr> neededWaitInstrs;
486 const std::vector<AsmRegAllocator::CodeBlock>& codeBlocks,
487 const AsmRegAllocator::VarIndexMap* vregIndexMaps,
492 const std::vector<AsmWaitInstr>& getNeededWaitInstrs()
const 493 {
return neededWaitInstrs; }
520 typedef std::pair<CString, uint64_t>
DefSym;
522 typedef std::unordered_map<CString, AsmKernelId>
KernelMap;
539 friend struct AsmParseUtils;
540 friend struct AsmPseudoOps;
541 friend struct AsmKcodePseudoOps;
542 friend struct AsmGalliumPseudoOps;
543 friend struct AsmAmdPseudoOps;
544 friend struct AsmAmdCL2PseudoOps;
545 friend struct AsmROCmPseudoOps;
546 friend struct GCNAsmUtils;
551 uint32_t driverVersion;
552 uint32_t llvmVersion;
554 bool newROCmBinFormat;
556 bool resolvingRelocs;
557 bool doNotRemoveFromSymbolClones;
560 std::vector<DefSym> defSyms;
561 std::vector<CString> includeDirs;
562 std::vector<AsmSection> sections;
563 std::vector<Array<AsmSectionId> > relSpacesSections;
564 std::unordered_set<AsmSymbolEntry*> symbolSnapshots;
565 std::unordered_set<AsmSymbolEntry*> symbolClones;
566 std::vector<AsmExpression*> unevalExpressions;
567 std::vector<AsmRelocation> relocations;
568 std::unordered_map<const AsmRegVar*, AsmRegVarLinears> regVarLinearsMap;
571 std::stack<AsmScope*> scopeStack;
572 std::vector<AsmScope*> abandonedScopes;
575 std::vector<AsmKernel> kernels;
587 bool lineAlreadyRead;
592 bool sectionDiffsPrepared;
593 bool collectSourcePoses;
596 std::stack<AsmInputFilter*> asmInputFilters;
599 std::ostream& messageStream;
600 std::ostream& printStream;
604 std::stack<AsmClause> clauses;
608 uint64_t& currentOutPos;
610 bool withSectionDiffs()
const 622 {
return getSourcePos(linePtr-line); }
624 void printWarning(
const AsmSourcePos& pos,
const char* message);
625 void printError(
const AsmSourcePos& pos,
const char* message);
627 void printWarning(
const char* linePtr,
const char* message)
628 { printWarning(getSourcePos(linePtr), message); }
629 void printError(
const char* linePtr,
const char* message)
630 { printError(getSourcePos(linePtr), message); }
632 void printWarning(
LineCol lineCol,
const char* message)
633 { printWarning(getSourcePos(lineCol), message); }
634 void printError(
LineCol lineCol,
const char* message)
635 { printError(getSourcePos(lineCol), message); }
637 LineCol translatePos(
const char* linePtr)
const 638 {
return currentInputFilter->
translatePos(linePtr-line); }
639 LineCol translatePos(
size_t pos)
const 642 bool parseLiteral(uint64_t& value,
const char*& linePtr);
643 bool parseLiteralNoError(uint64_t& value,
const char*& linePtr);
644 bool parseString(std::string& outString,
const char*& linePtr);
646 enum class ParseState
656 ParseState parseSymbol(
const char*& linePtr,
AsmSymbolEntry*& entry,
657 bool localLabel =
true,
bool dontCreateSymbol =
false);
658 bool skipSymbol(
const char*& linePtr);
662 bool assignSymbol(
const CString& symbolName,
const char* symbolPlace,
663 const char* linePtr,
bool reassign =
true,
bool baseExpr =
false);
665 bool assignOutputCounter(
const char* symbolPlace, uint64_t value,
668 void parsePseudoOps(
const CString& firstName,
const char* stmtPlace,
669 const char* linePtr);
672 bool skipClauses(
bool exitm =
false);
674 bool putRepetitionContent(
AsmRepeat& repeat);
676 void initializeOutputFormat();
678 bool pushClause(
const char*
string,
AsmClauseType clauseType)
681 return pushClause(
string, clauseType,
true, included);
683 bool pushClause(
const char*
string,
AsmClauseType clauseType,
684 bool satisfied,
bool& included);
686 bool popClause(
const char*
string,
AsmClauseType clauseType);
690 std::unordered_set<AsmScope*>& scopeSet);
692 AsmScope* getRecurScope(
const CString& scopePlace,
bool ignoreLast =
false,
693 const char** lastStep =
nullptr);
697 std::unordered_set<AsmScope*>& scopeSet);
700 CString& sameSymName,
bool insertMode =
false);
702 std::pair<AsmSymbolEntry*, bool> insertSymbolInScope(
const CString& symName,
707 std::unordered_set<AsmScope*>& scopeSet);
710 CString& sameRvName,
bool insertMode =
false);
712 std::pair<AsmRegVarEntry*, bool> insertRegVarInScope(
const CString& rvName,
718 bool pushScope(
const CString& scopeName);
722 bool includeFile(
const char* pseudoOpPlace,
const std::string& filename);
724 ParseState makeMacroSubstitution(
const char*
string);
726 bool parseMacroArgValue(
const char*& linePtr, std::string& outStr);
728 void putData(
size_t size,
const cxbyte* data)
730 AsmSection& section = sections[currentSection];
732 currentOutPos += size;
737 void goToMain(
const char* pseudoOpPlace);
738 void goToKernel(
const char* pseudoOpPlace,
const char* kernelName);
739 void goToSection(
const char* pseudoOpPlace,
const char* sectionName, uint64_t align=0);
740 void goToSection(
const char* pseudoOpPlace,
const char* sectionName,
742 void goToSection(
const char* pseudoOpPlace,
AsmSectionId sectionId, uint64_t align=0);
745 cxbyte signess = WS_BOTH);
747 bool isAddressableSection()
const 750 (sections[currentSection].flags & ASMSECT_ADDRESSABLE) != 0;
752 bool isWriteableSection()
const 755 (sections[currentSection].flags & ASMSECT_WRITEABLE) != 0;
757 bool isResolvableSection()
const 769 void handleRegionsOnKernels(
const std::vector<AsmKernelId>& newKernels,
770 const std::vector<AsmKernelId>& oldKernels,
AsmSectionId codeSection);
773 void tryToResolveSymbols(
AsmScope* scope);
774 void printUnresolvedSymbols(
AsmScope* scope);
776 bool resolveExprTarget(
const AsmExpression* expr, uint64_t value,
800 std::ostream& msgStream = std::cerr, std::ostream& printStream = std::cout);
814 std::ostream& msgStream = std::cerr, std::ostream& printStream = std::cout);
822 void writeBinary(
const char* filename)
const;
824 void writeBinary(std::ostream& outStream)
const;
830 {
return driverVersion; }
833 { this->driverVersion = driverVersion; }
837 {
return llvmVersion; }
840 { this->llvmVersion = llvmVersion; }
844 {
return deviceType; }
847 { this->deviceType = deviceType; }
853 { format = binFormat; }
859 { _64bit = this64Bit; }
862 {
return newROCmBinFormat; }
865 { newROCmBinFormat = newFmt; }
868 {
return policyVersion; }
871 { policyVersion = pv; }
877 { this->flags = flags; }
880 {
return alternateMacro; }
883 {
return macroCase; }
886 {
return oldModParam; }
889 {
return buggyFPLit; }
892 {
return includeDirs; }
894 void addIncludeDir(
const CString& includeDir);
902 const std::vector<Array<AsmSectionId> >& getRelSpacesSections()
const 903 {
return relSpacesSections; }
906 {
return kernelMap; }
915 {
return insertRegVarInScope(name, var).second; }
921 {
return globalScope; }
924 bool isAbsoluteSymbol(
const AsmSymbol& symbol)
const;
927 void addInitialDefSym(
const CString& symName, uint64_t value);
931 {
return formatHandler; }
934 {
return isaAssembler; }
938 { assembler.printWarning(linePtr, message); }
941 { assembler.printError(linePtr, message); }
945 { assembler.printWarningForRange(bits, value, pos, signess); }
948 { assembler.printWarning(sourcePos, message); }
951 { assembler.printError(sourcePos, message); }
953 inline void ISAAssembler::addCodeFlowEntry(
AsmSectionId sectionId,
955 { assembler.sections[sectionId].addCodeFlowEntry(entry); }
AsmRepeatInputFilter or AsmIRPInputFilter.
bool is64Bit() const
get bitness (true if 64-bit)
Definition: Assembler.h:855
void set64Bit(bool this64Bit)
set bitness (true if 64-bit)
Definition: Assembler.h:858
AsmRegVarMap regVarMap
regvar map
Definition: AsmDefs.h:652
common definitions for assembler and disassembler
Definition: Assembler.h:360
main class of assembler
Definition: Assembler.h:516
bool haveReturn
code have return from routine
Definition: Assembler.h:393
AsmRegField regField
place in instruction
Definition: Assembler.h:90
non copyable and non movable base structure (class)
Definition: Utilities.h:46
assembler expression class
Definition: AsmDefs.h:286
uint16_t rstart
register start
Definition: Assembler.h:88
uint32_t Flags
type for declaring various flags
Definition: Utilities.h:100
Flags getFlags() const
get flags
Definition: Assembler.h:873
std::unordered_map< CString, AsmRegVar > AsmRegVarMap
regvar map
Definition: AsmDefs.h:535
assembler repeat
Definition: AsmSource.h:236
virtual ~ISAUsageHandler()
destructor
size_t ssaIdChange
number of SSA id changes
Definition: Assembler.h:371
GPUDeviceType getDeviceType() const
get GPU device type
Definition: Assembler.h:843
AsmRegVarMap::value_type AsmRegVarEntry
regvar entry
Definition: AsmDefs.h:537
BinaryFormat
binary format for Assembler/Disassembler
Definition: Commons.h:38
const std::vector< AsmSection > & getSections() const
get sections
Definition: Assembler.h:899
ColNo colNo
column number, for macro substitution and IRP points to column preprocessed line
Definition: AsmSource.h:50
void setDriverVersion(uint32_t driverVersion)
set AMD driver version
Definition: Assembler.h:832
reference pointer based on Glibmm refptr
Definition: Utilities.h:860
uint16_t GPUArchMask
GPU architecture mask (one bit represents single GPU architecture)
Definition: GPUId.h:105
AsmClauseType
type of clause
Definition: Assembler.h:497
Assembler & assembler
assembler
Definition: Assembler.h:213
const AsmRegVarMap & getRegVarMap() const
get regvar map
Definition: Assembler.h:911
delayed result for register for instruction with delayed results
Definition: AsmDefs.h:600
assembler section
Definition: AsmDefs.h:692
DTree container (kind of B-Tree)
std::pair< CString, uint64_t > DefSym
defined symbol entry
Definition: Assembler.h:520
bool isBuggyFPLit() const
get true if buggyFPLit enabled
Definition: Assembler.h:888
AsmRegVarUsage nextUsage(ReadPos &readPos)
get next usage
handles raw code format
Definition: AsmFormats.h:247
Definition: Assembler.h:415
assembler scope for symbol, macros, regvars
Definition: AsmDefs.h:648
bool isNewROCmBinFormat() const
is new ROCm binary format
Definition: Assembler.h:861
Regvar info structure.
Definition: AsmDefs.h:510
void pushLinearDep(const AsmRegVarLinearDep &linearDep)
push linear dependency
Definition: Assembler.h:139
void printError(const char *linePtr, const char *message)
print error for position pointed by line pointer
Definition: Assembler.h:940
bool hasNext(const ReadPos &readPos) const
return true if has next instruction
Definition: Assembler.h:198
void printWarning(const char *linePtr, const char *message)
print warning for position pointed by line pointer
Definition: Assembler.h:937
cxuint sgprsNum
SGPRs number.
Definition: Assembler.h:276
virtual ISAUsageHandler * copy() const =0
copy this usage handler
an array class
Definition: Containers.h:41
std::vector< NextBlock > nexts
nexts blocks, if empty then direct next block
Definition: Assembler.h:391
Flags regFlags
define what extra register must be included
Definition: Assembler.h:278
void pushUsage(const AsmRegVarUsage &rvu)
push regvar or register usage
cxuint AsmSectionId
type for Asm section id (index)
Definition: Commons.h:35
handles ROCM binary format
Definition: AsmFormats.h:556
size_t firstPos
first position in code block (section offset)
Definition: Assembler.h:372
Assembler Wait scheduler.
Definition: Assembler.h:474
size_t ssaId
original SSA id
Definition: Assembler.h:369
line and column
Definition: AsmSource.h:45
std::unordered_map< CString, AsmSymbol > AsmSymbolMap
assembler symbol map
Definition: AsmDefs.h:206
internal structure for regvar linear dependencies
Definition: AsmDefs.h:562
virtual void getUsageDependencies(cxuint rvusNum, const AsmRegVarUsage *rvus, cxbyte *linearDeps) const =0
get usage dependencies around single instruction
void setFlags(Flags flags)
set flags
Definition: Assembler.h:876
void pushWaitInstr(const AsmWaitInstr &waitInstr)
wait instruction
Definition: Assembler.h:195
all flags
Definition: Assembler.h:67
AsmSourcePos sourcePos
position in source code
Definition: Assembler.h:510
Definition: Assembler.h:179
cxuint getPolicyVersion() const
get policy version
Definition: Assembler.h:867
#define CLRX_VERSION_NUMBER
CLRadeonExtender version number.
Definition: Config.h:39
wait handler
Definition: Assembler.h:176
if failed now, no later trial
AsmSectionType
assembler section type
Definition: AsmFormats.h:47
void setPolicyVersion(cxuint pv)
set policy version
Definition: Assembler.h:870
enable altmacro mode
Definition: Assembler.h:61
unsigned char cxbyte
unsigned byte
Definition: Config.h:229
enable resolving symbols if ASM_TESTRUN enabled
Definition: Assembler.h:65
const std::vector< CString > & getIncludeDirs() const
get include directory list
Definition: Assembler.h:891
cxuint vgprsNum
VGPRs number.
Definition: Assembler.h:277
std::unordered_map< CString, RefPtr< const AsmMacro > > AsmMacroMap
assembler macro map
Definition: AsmDefs.h:640
AsmSourcePos prevIfPos
position of previous if-clause
Definition: Assembler.h:512
size_t ssaIdLast
last SSA id in last
Definition: Assembler.h:370
main namespace
Definition: AsmDefs.h:38
const AsmRegVar * regVar
if null, then usage of called register
Definition: Assembler.h:87
size_t lastPos
last position in code block (section offset)
Definition: Assembler.h:373
void setNewROCmBinFormat(bool newFmt)
set new ROCm binary format
Definition: Assembler.h:864
bool isAltMacro() const
get true if altMacro enabled
Definition: Assembler.h:879
bool isMacroCase() const
get true if macroCase enabled
Definition: Assembler.h:882
AsmClauseType type
type of clause
Definition: Assembler.h:509
Definition: Assembler.h:357
format handler with Kcode (kernel-code) handling
Definition: AsmFormats.h:219
unsigned int cxuint
unsigned int
Definition: Config.h:237
const KernelMap & getKernelMap() const
get kernel map
Definition: Assembler.h:905
Definition: Assembler.h:97
BinaryFormat getBinaryFormat() const
get binary format
Definition: Assembler.h:849
buggy handling of fpliterals (including fp constants)
Definition: Assembler.h:62
const AsmSymbolMap & getSymbolMap() const
get symbols map
Definition: Assembler.h:896
std::unordered_map< CString, AsmKernelId > KernelMap
kernel map type
Definition: Assembler.h:522
cxbyte AsmExprTargetType
expression target type (one byte)
Definition: AsmDefs.h:59
std::vector< cxbyte > content
content of section
Definition: AsmDefs.h:702
AsmSymbolMap::value_type AsmSymbolEntry
assembler symbol entry
Definition: AsmDefs.h:208
cxuint AsmKernelId
type for Asm kernel id (index)
Definition: Commons.h:33
Definition: Assembler.h:408
GCN (register and regvar) Usage handler.
Definition: Assembler.h:154
AsmRegVarLinearDep getLinearDep(size_t pos) const
get next linear dependency
Definition: Assembler.h:145
GPUDeviceType
type of GPU device
Definition: GPUId.h:51
bool hasNext(const ReadPos &readPos) const
has next regvar usage
Definition: Assembler.h:116
size_t size() const
return true if has next
Definition: Assembler.h:142
only for running tests
Definition: Assembler.h:66
enable all warnings for assembler
Definition: Assembler.h:59
void setDeviceType(const GPUDeviceType deviceType)
set GPU device type
Definition: Assembler.h:846
utilities for other libraries and programs
bool haveCalls
code have calls at its end
Definition: Assembler.h:392
bool readBeforeWrite
have read before write
Definition: Assembler.h:374
disable case-insensitive naming (default)
Definition: Assembler.h:64
GCN arch assembler.
Definition: Assembler.h:271
size_t ssaIdBefore
SSA id before first SSA in block.
Definition: Assembler.h:367
AsmSymbolMap symbolMap
symbol map
Definition: AsmDefs.h:651
register pool numbers
Definition: Assembler.h:275
Definition: Assembler.h:85
uint32_t getLLVMVersion() const
get LLVM version
Definition: Assembler.h:836
assembler's clause (if,else,macro,rept)
Definition: Assembler.h:507
regvar usage in code
Definition: AsmDefs.h:549
Definition: Assembler.h:365
GPU identification utilities.
LineNo lineNo
line number
Definition: AsmSource.h:47
bool addRegVar(const CString &name, const AsmRegVar &var)
add regvar
Definition: Assembler.h:914
const ISAAssembler * getISAAssembler() const
get ISA assembler
Definition: Assembler.h:933
stgructure that hold read position to store later
Definition: Assembler.h:78
section is unresolvable
Definition: AsmFormats.h:101
code flow entry
Definition: AsmDefs.h:632
uint32_t getDriverVersion() const
get AMD driver version
Definition: Assembler.h:829
const AsmFormatHandler * getFormatHandler() const
get format handler
Definition: Assembler.h:930
description of the WAIT instruction (for waiting for results)
Definition: AsmDefs.h:614
bool haveEnd
code have end
Definition: Assembler.h:394
ISAUsageHandler()
constructor
void printWarningForRange(cxuint bits, uint64_t value, const AsmSourcePos &pos, cxbyte signess=WS_BOTH)
print warning about integer out of range
Definition: Assembler.h:943
handles GalliumCompute format
Definition: AsmFormats.h:470
const AsmScope & getGlobalScope() const
get global scope
Definition: Assembler.h:920
void pushDelayedOp(const AsmDelayedOp &delOp)
push delayed result
Definition: Assembler.h:192
absolute section id
Definition: AsmFormats.h:86
an assembler sources handling
void setLLVMVersion(uint32_t llvmVersion)
set LLVM version
Definition: Assembler.h:839
assembler symbol structure
Definition: AsmDefs.h:143
asm wait system configuration
Definition: AsmDefs.h:586
bool isOldModParam() const
get true if oldModParam enabled (old modifier parametrization)
Definition: Assembler.h:885
cxbyte AsmRegField
type of register field
Definition: AsmDefs.h:500
ISA regvar linear handler.
Definition: Assembler.h:130
force add symbols to binary
Definition: Assembler.h:60
ISA (register and regvar) Usage handler.
Definition: Assembler.h:74
handles AMD Catalyst format
Definition: AsmFormats.h:273
handles AMD OpenCL 2.0 binary format
Definition: AsmFormats.h:367
Definition: Assembler.h:383
ISA assembler class.
Definition: Assembler.h:210
simple C-string container
Definition: CString.h:38
an assembler for Radeon GPU's
containers and other utils for other libraries and programs
void setBinaryFormat(BinaryFormat binFormat)
set binary format
Definition: Assembler.h:852
uint16_t rend
register end
Definition: Assembler.h:89
bool condSatisfied
if conditional clause has already been satisfied
Definition: Assembler.h:511
const std::vector< AsmKernel > & getKernels() const
get kernels
Definition: Assembler.h:908
assembler source position
Definition: AsmSource.h:150