Go to the documentation of this file.
9 #ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
10 #define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
41 std::optional<XCOFF::StorageMappingClass> Smc,
42 std::optional<uint32_t> Idx,
bool Label)
44 IsXCOFF(
true), HasType(
false) {}
52 assert((P1.IsXCOFF ==
P2.IsXCOFF && P1.HasType ==
P2.HasType) &&
53 "The value of IsXCOFF and HasType in P1 and P2 should be the same "
56 if (P1.IsXCOFF && P1.HasType)
58 std::tie(
P2.Addr,
P2.Type,
P2.Name);
62 std::tie(
P2.Addr,
P2.XCOFFSymInfo,
P2.Name);
65 std::tie(
P2.Addr,
P2.Name,
P2.Type);
71 template <
typename T>
class ArrayRef;
157 virtual std::optional<DecodeStatus>
223 #endif // LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
This is an optimization pass for GlobalISel generic memory operations.
Context object for machine code objects.
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t OpSize, uint64_t InstSize) const
The instances of the Type class are immutable: once they are created, they are never changed.
Instances of this class represent a single low-level machine instruction.
MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
This might compile to this xmm1 xorps xmm0 movss xmm0 ret Now consider if the code caused xmm1 to get spilled This might produce this xmm1 movaps xmm0 movaps xmm1 movss xmm0 ret since the reload is only used by these we could fold it into the producing something like xmm1 movaps xmm0 ret saving two instructions The basic idea is that a reload from a spill if only one byte chunk is bring in zeros the one element instead of elements This can be used to simplify a variety of shuffle where the elements are fixed zeros This code generates ugly probably due to costs being off or< 4 x float > * P2
raw_ostream * CommentStream
This class implements an extremely fast bulk output stream that can only output to a stream.
std::vector< SymbolInfoTy > SectionSymbolsTy
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.
DecodeStatus
Ternary decode status.
void setSymbolizer(std::unique_ptr< MCSymbolizer > Symzer)
Set Symzer as the current symbolizer.
const MCSubtargetInfo & STI
bool operator<(const XCOFFSymbolInfoTy &SymInfo) const
The function is for symbol sorting when symbols have the same address.
virtual ~MCDisassembler()
void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const
Superclass for all disassemblers.
XCOFFSymbolInfoTy XCOFFSymInfo
friend bool operator<(const SymbolInfoTy &P1, const SymbolInfoTy &P2)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCDisassembler::DecodeStatus DecodeStatus
virtual std::optional< DecodeStatus > onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const
Used to perform separate target specific disassembly for a particular symbol.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
SymbolInfoTy(uint64_t Addr, StringRef Name, std::optional< XCOFF::StorageMappingClass > Smc, std::optional< uint32_t > Idx, bool Label)
virtual uint64_t suggestBytesToSkip(ArrayRef< uint8_t > Bytes, uint64_t Address) const
Suggest a distance to skip in a buffer of data to find the next place to look for the start of an ins...
std::optional< XCOFF::StorageMappingClass > StorageMappingClass
MCContext & getContext() const
std::optional< uint32_t > Index
SymbolInfoTy(uint64_t Addr, StringRef Name, uint8_t Type, bool IsXCOFF=false)
const MCSubtargetInfo & getSubtargetInfo() const
SymInfo contains information about symbol: it's address and section index which is -1LL for absolute ...
Generic base class for all target subtargets.
LLVM Value Representation.
std::unique_ptr< MCSymbolizer > Symbolizer