9#ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
10#define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
51 IsXCOFF(IsXCOFF), HasType(
true) {}
56 assert((P1.IsXCOFF == P2.IsXCOFF && P1.HasType == P2.HasType) &&
57 "The value of IsXCOFF and HasType in P1 and P2 should be the same "
60 if (P1.IsXCOFF && P1.HasType)
61 return std::tie(P1.Addr, P1.Type, P1.Name) <
65 return std::tie(P1.Addr, P1.XCOFFSymInfo, P1.Name) <
70 return std::tie(P1.Addr, MS1, P1.Name, P1.Type) <
116 : Ctx(Ctx), STI(STI) {}
226 void setSymbolizer(std::unique_ptr<MCSymbolizer> Symzer);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void tryAddingPcLoadReferenceComment(uint64_t Address, int Value, const MCDisassembler *Decoder)
tryAddingPcLoadReferenceComment - trys to add a comment as to what is being referenced by a load inst...
static bool tryAddingSymbolicOperand(uint64_t Address, int32_t Value, bool isBranch, uint64_t InstSize, MCInst &MI, const MCDisassembler *Decoder)
tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCIn...
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
Context object for machine code objects.
Superclass for all disassemblers.
MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
virtual DecodeStatus getInstructionBundle(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const
Returns the disassembly of an instruction bundle for VLIW architectures like Hexagon.
virtual void setABIVersion(unsigned Version)
ELF-specific, set the ABI version from the object header.
MCContext & getContext() const
const MCSubtargetInfo & getSubtargetInfo() const
std::unique_ptr< MCSymbolizer > Symbolizer
const MCSubtargetInfo & STI
DecodeStatus
Ternary decode status.
virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const =0
Returns the disassembly of a single instruction.
virtual ~MCDisassembler()
Instances of this class represent a single low-level machine instruction.
Generic base class for all target subtargets.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
std::vector< SymbolInfoTy > SectionSymbolsTy
SymInfo contains information about symbol: it's address and section index which is -1LL for absolute ...
SymbolInfoTy(std::optional< XCOFF::StorageMappingClass > Smc, uint64_t Addr, StringRef Name, std::optional< uint32_t > Idx, bool Label)
SymbolInfoTy(uint64_t Addr, StringRef Name, uint8_t Type, bool IsMappingSymbol=false, bool IsXCOFF=false)
XCOFFSymbolInfoTy XCOFFSymInfo
friend bool operator<(const SymbolInfoTy &P1, const SymbolInfoTy &P2)
LLVM_ABI bool operator<(const XCOFFSymbolInfoTy &SymInfo) const
The function is for symbol sorting when symbols have the same address.
std::optional< uint32_t > Index
std::optional< XCOFF::StorageMappingClass > StorageMappingClass