16 #ifndef LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H 17 #define LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H 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;
89 std::unique_ptr<const MCAsmInfo> &&MAI,
90 std::unique_ptr<const MCRegisterInfo> &&MRI,
91 std::unique_ptr<const MCSubtargetInfo> &&MSI,
92 std::unique_ptr<const MCInstrInfo> &&MII,
93 std::unique_ptr<const llvm::MCContext> &&Ctx,
94 std::unique_ptr<const MCDisassembler> &&DisAsm,
95 std::unique_ptr<MCInstPrinter> &&IP)
96 : TripleName(
std::move(TripleName)), DisInfo(DisInfo), TagType(TagType),
97 GetOpInfo(GetOpInfo), SymbolLookUp(SymbolLookUp), TheTarget(TheTarget),
98 MAI(
std::move(MAI)), MRI(
std::move(MRI)), MSI(
std::move(MSI)),
99 MII(
std::move(MII)), Ctx(
std::move(Ctx)), DisAsm(
std::move(DisAsm)),
100 IP(
std::move(IP)), Options(0), CommentStream(CommentsToEmit) {}
117 void addOptions(uint64_t Options) { this->Options |= Options; }
119 void setCPU(
const char *CPU) { this->CPU = CPU; }
void setIP(MCInstPrinter *NewIP)
This class represents lattice values for constants.
Superclass for all disassemblers.
A raw_ostream that writes to an SmallVector or SmallString.
LLVMSymbolLookupCallback getSymbolLookupCallback() const
LLVMOpInfoCallback getGetOpInfo() const
void * getDisInfo() const
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 MCRegisterInfo * getRegisterInfo() const
raw_svector_ostream CommentStream
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 MCSubtargetInfo * getSubtargetInfo() const
const MCInstrInfo * getInstrInfo() const
const MCAsmInfo * getAsmInfo() const
const Target * getTarget() 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...
uint64_t getOptions() const
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
Generic base class for all target subtargets.
const MCRegisterDesc & get(MCRegister RegNo) const
Provide a get method, equivalent to [], but more useful with a pointer to this object.
void addOptions(uint64_t Options)
void setCPU(const char *CPU)
const std::string & getTripleName() const
StringRef - Represent a constant reference to a string, i.e.
LLVMDisasmContext(std::string TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, const Target *TheTarget, std::unique_ptr< const MCAsmInfo > &&MAI, std::unique_ptr< const MCRegisterInfo > &&MRI, std::unique_ptr< const MCSubtargetInfo > &&MSI, std::unique_ptr< const MCInstrInfo > &&MII, std::unique_ptr< const llvm::MCContext > &&Ctx, std::unique_ptr< const MCDisassembler > &&DisAsm, std::unique_ptr< MCInstPrinter > &&IP)
const MCDisassembler * getDisAsm() const
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
SmallString< 128 > CommentsToEmit