LLVM API Documentation

Functions
Disassembler.cpp File Reference
#include "Disassembler.h"
#include "llvm-c/Disassembler.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCRelocationInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbolizer.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/MemoryObject.h"
#include "llvm/Support/TargetRegistry.h"
Include dependency graph for Disassembler.cpp:

Go to the source code of this file.

Functions

LLVMDisasmContextRef LLVMCreateDisasmCPU (const char *Triple, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
LLVMDisasmContextRef LLVMCreateDisasm (const char *Triple, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
void LLVMDisasmDispose (LLVMDisasmContextRef DCR)
static void emitComments (LLVMDisasmContext *DC, formatted_raw_ostream &FormattedOS)
 Emits the comments that are stored in DC comment stream. Each comment in the comment stream must end with a newline.
static int getItineraryLatency (LLVMDisasmContext *DC, const MCInst &Inst)
 Gets latency information for Inst form the itinerary scheduling model, based on DC information.
static int getLatency (LLVMDisasmContext *DC, const MCInst &Inst)
 Gets latency information for Inst, based on DC information.
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)
int LLVMSetDisasmOptions (LLVMDisasmContextRef DCR, uint64_t Options)

Function Documentation

static void emitComments ( LLVMDisasmContext DC,
formatted_raw_ostream FormattedOS 
) [static]
static 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 239 of file Disassembler.cpp.

References llvm::LLVMDisasmContext::CommentStream, and getLatency().

Referenced by LLVMDisasmInstruction().

static int getItineraryLatency ( LLVMDisasmContext DC,
const MCInst Inst 
) [static]

Gets latency information for Inst form the itinerary scheduling model, based on DC information.

Returns:
The maximum expected latency over all the operands or -1 if no information are available.

Definition at line 177 of file Disassembler.cpp.

References llvm::StringRef::empty(), llvm::MCInstrInfo::get(), llvm::LLVMDisasmContext::getCPU(), llvm::LLVMDisasmContext::getInstrInfo(), llvm::MCSubtargetInfo::getInstrItineraryForCPU(), llvm::MCInst::getNumOperands(), llvm::MCInst::getOpcode(), llvm::InstrItineraryData::getOperandCycle(), llvm::MCInstrDesc::getSchedClass(), and llvm::LLVMDisasmContext::getSubtargetInfo().

Referenced by getLatency().

static int getLatency ( LLVMDisasmContext DC,
const MCInst Inst 
) [static]