rocm.bindings.llvm.c.disassembler#
2026-09-24
7 min read time
Advanced Micro Devices, Inc.
Functions#
|
|
|
Create a disassembler for the TripleName. |
|
Create a disassembler for the TripleName and a specific CPU. |
|
Create a disassembler for the TripleName, a specific CPU and specific feature |
|
Set the disassembler's options. |
Dispose of a disassembler context. |
|
|
Disassemble a single instruction using the disassembler context specified in |
Module Contents#
- rocm.bindings.llvm.c.disassembler.LLVMCreateDisasm(TripleName, DisInfo, TagType, GetOpInfo, SymbolLookUp)#
Create a disassembler for the TripleName.
Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty CPU name and feature set.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMDisasmContextRef LLVMCreateDisasm(const char * TripleName, void * DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
- rocm.bindings.llvm.c.disassembler.LLVMCreateDisasmCPU(Triple, CPU, DisInfo, TagType, GetOpInfo, SymbolLookUp)#
Create a disassembler for the TripleName and a specific CPU.
Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty feature set.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMDisasmContextRef LLVMCreateDisasmCPU(const char * Triple, const char * CPU, void * DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
- rocm.bindings.llvm.c.disassembler.LLVMCreateDisasmCPUFeatures(Triple, CPU, Features, DisInfo, TagType, GetOpInfo, SymbolLookUp)#
Create a disassembler for the TripleName, a specific CPU and specific feature string.
Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMDisasmContextRef LLVMCreateDisasmCPUFeatures(const char * Triple, const char * CPU, const char * Features, void * DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
- rocm.bindings.llvm.c.disassembler.LLVMSetDisasmOptions(DC, Options)#
Set the disassembler’s options.
Returns 1 if it can set the Options and 0 otherwise.
C signature
int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options)
- rocm.bindings.llvm.c.disassembler.LLVMDisasmDispose(DC)#
Dispose of a disassembler context.
C signature
void LLVMDisasmDispose(LLVMDisasmContextRef DC)
- rocm.bindings.llvm.c.disassembler.LLVMDisasmInstruction(DC, Bytes, BytesSize, PC, OutString, OutStringSize)#
Disassemble a single instruction using the disassembler context specified in the parameter DC.
The bytes of the instruction are specified in the parameter Bytes, and contains at least BytesSize number of bytes. The instruction is at the address specified by the PC parameter. If a valid instruction can be disassembled, its string is returned indirectly in OutString whose size is specified in the parameter OutStringSize. This function returns the number of bytes in the instruction or zero if there was no valid instruction.
- Args:
- Returns:
int: (undocumented)
C signature
size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t * Bytes, uint64_t BytesSize, uint64_t PC, char * OutString, size_t OutStringSize)