17 #ifndef LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H
18 #define LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H
32 class MCSubtargetInfo;
44 std::string TripleName;
62 std::unique_ptr<const llvm::MCAsmInfo> MAI;
64 std::unique_ptr<const llvm::MCRegisterInfo> MRI;
66 std::unique_ptr<const llvm::MCSubtargetInfo> MSI;
68 std::unique_ptr<const llvm::MCInstrInfo> MII;
70 std::unique_ptr<const llvm::MCContext> Ctx;
72 std::unique_ptr<const llvm::MCDisassembler> DisAsm;
74 std::unique_ptr<llvm::MCInstPrinter> IP;
94 DisInfo(disInfo), TagType(tagType), GetOpInfo(getOpInfo),
95 SymbolLookUp(symbolLookUp), TheTarget(theTarget),
103 DisAsm.reset(disAsm);
122 void addOptions(uint64_t Options) { this->Options |= Options; }
124 void setCPU(
const char *CPU) { this->CPU = CPU; }
void setIP(MCInstPrinter *NewIP)
const MCAsmInfo * getAsmInfo() const
const MCRegisterInfo * getRegisterInfo() const
Superclass for all disassemblers.
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
LLVMOpInfoCallback getGetOpInfo() const
A raw_ostream that writes to an SmallVector or SmallString.
const std::string & getTripleName() const
uint64_t getOptions() const
LLVMSymbolLookupCallback getSymbolLookupCallback() const
const MCDisassembler * getDisAsm() const
const MCSubtargetInfo * getSubtargetInfo() const
LLVMDisasmContext(std::string tripleName, void *disInfo, int tagType, LLVMOpInfoCallback getOpInfo, LLVMSymbolLookupCallback symbolLookUp, const Target *theTarget, const MCAsmInfo *mAI, const MCRegisterInfo *mRI, const MCSubtargetInfo *mSI, const MCInstrInfo *mII, llvm::MCContext *ctx, const MCDisassembler *disAsm, MCInstPrinter *iP)
Context object for machine code objects.
raw_svector_ostream CommentStream
void * getDisInfo() const
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This class is intended to be used as a base class for asm properties and features specific to the tar...
Interface to description of machine instruction set.
const MCInstrInfo * getInstrInfo() const
Target - Wrapper for Target specific information.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
MCSubtargetInfo - Generic base class for all target subtargets.
void addOptions(uint64_t Options)
void setCPU(const char *CPU)
StringRef - Represent a constant reference to a string, i.e.
SmallString< 128 > CommentsToEmit
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t Size, int TagType, void *TagBuf)
The type for the operand information call back function.
const Target * getTarget() const