LLVM 22.0.0git
Disassembler.cpp File Reference

Go to the source code of this file.

Functions

LLVMDisasmContextRef LLVMCreateDisasmCPUFeatures (const char *TT, const char *CPU, const char *Features, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
 Create a disassembler for the TripleName, a specific CPU and specific feature string.
LLVMDisasmContextRef LLVMCreateDisasmCPU (const char *TT, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
 Create a disassembler for the TripleName and a specific CPU.
LLVMDisasmContextRef LLVMCreateDisasm (const char *TT, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
 Create a disassembler for the TripleName.
void LLVMDisasmDispose (LLVMDisasmContextRef DCR)
 Dispose of a disassembler context.
static void emitComments (LLVMDisasmContext *DC, formatted_raw_ostream &FormattedOS)
 Emits the comments that are stored in DC comment stream.
static void emitLatency (LLVMDisasmContext *DC, const MCInst &Inst)
 Emits latency information in DC->CommentStream for Inst, based on the information available in DC.
size_t LLVMDisasmInstruction (LLVMDisasmContextRef DCR, uint8_t *Bytes, uint64_t BytesSize, uint64_t PC, char *OutString, size_t OutStringSize)
 Disassemble a single instruction using the disassembler context specified in the parameter DC.
int LLVMSetDisasmOptions (LLVMDisasmContextRef DCR, uint64_t Options)
 Set the disassembler's options.

Function Documentation

◆ emitComments()

◆ emitLatency()

void emitLatency ( LLVMDisasmContext * DC,
const MCInst & Inst )
static

Emits latency information in DC->CommentStream for Inst, based on the information available in DC.

Definition at line 169 of file Disassembler.cpp.

References llvm::LLVMDisasmContext::CommentStream, llvm::MCSchedModel::computeInstrLatency(), llvm::LLVMDisasmContext::getInstrInfo(), llvm::MCSubtargetInfo::getSchedModel(), llvm::LLVMDisasmContext::getSubtargetInfo(), and llvm::Latency.

Referenced by LLVMDisasmInstruction().