LLVM 22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::AMDGPUDisassembler Class Reference

#include "Target/AMDGPU/Disassembler/AMDGPUDisassembler.h"

Inheritance diagram for llvm::AMDGPUDisassembler:
[legend]

Public Member Functions

 AMDGPUDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx, MCInstrInfo const *MCII)
 
 ~AMDGPUDisassembler () override=default
 
void setABIVersion (unsigned Version) override
 ELF-specific, set the ABI version from the object header.
 
DecodeStatus getInstruction (MCInst &MI, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CS) const override
 Returns the disassembly of a single instruction.
 
const chargetRegClassName (unsigned RegClassID) const
 
MCOperand createRegOperand (unsigned int RegId) const
 
MCOperand createRegOperand (unsigned RegClassID, unsigned Val) const
 
MCOperand createSRegOperand (unsigned SRegClassID, unsigned Val) const
 
MCOperand createVGPR16Operand (unsigned RegIdx, bool IsHi) const
 
MCOperand errOperand (unsigned V, const Twine &ErrMsg) const
 
template<typename InsnType >
DecodeStatus tryDecodeInst (const uint8_t *Table, MCInst &MI, InsnType Inst, uint64_t Address, raw_ostream &Comments) const
 
template<typename InsnType >
DecodeStatus tryDecodeInst (const uint8_t *Table1, const uint8_t *Table2, MCInst &MI, InsnType Inst, uint64_t Address, raw_ostream &Comments) const
 
Expected< boolonSymbolStart (SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address) const override
 Used to perform separate target specific disassembly for a particular symbol.
 
Expected< booldecodeKernelDescriptor (StringRef KdName, ArrayRef< uint8_t > Bytes, uint64_t KdAddress) const
 
Expected< booldecodeKernelDescriptorDirective (DataExtractor::Cursor &Cursor, ArrayRef< uint8_t > Bytes, raw_string_ostream &KdStream) const
 
Expected< booldecodeCOMPUTE_PGM_RSRC1 (uint32_t FourByteBuffer, raw_string_ostream &KdStream) const
 Decode as directives that handle COMPUTE_PGM_RSRC1.
 
Expected< booldecodeCOMPUTE_PGM_RSRC2 (uint32_t FourByteBuffer, raw_string_ostream &KdStream) const
 Decode as directives that handle COMPUTE_PGM_RSRC2.
 
Expected< booldecodeCOMPUTE_PGM_RSRC3 (uint32_t FourByteBuffer, raw_string_ostream &KdStream) const
 Decode as directives that handle COMPUTE_PGM_RSRC3.
 
void convertEXPInst (MCInst &MI) const
 
void convertVINTERPInst (MCInst &MI) const
 
void convertFMAanyK (MCInst &MI) const
 
void convertSDWAInst (MCInst &MI) const
 
void convertMAIInst (MCInst &MI) const
 f8f6f4 instructions have different pseudos depending on the used formats.
 
void convertWMMAInst (MCInst &MI) const
 
void convertDPP8Inst (MCInst &MI) const
 
void convertMIMGInst (MCInst &MI) const
 
void convertVOP3DPPInst (MCInst &MI) const
 
void convertVOP3PDPPInst (MCInst &MI) const
 
void convertVOPCDPPInst (MCInst &MI) const
 
void convertVOPC64DPPInst (MCInst &MI) const
 
void convertMacDPPInst (MCInst &MI) const
 
void convertTrue16OpSel (MCInst &MI) const
 
unsigned getVgprClassId (unsigned Width) const
 
unsigned getAgprClassId (unsigned Width) const
 
unsigned getSgprClassId (unsigned Width) const
 
unsigned getTtmpClassId (unsigned Width) const
 
MCOperand decodeMandatoryLiteralConstant (unsigned Imm) const
 
MCOperand decodeMandatoryLiteral64Constant (uint64_t Imm) const
 
MCOperand decodeLiteralConstant (bool ExtendFP64) const
 
MCOperand decodeLiteral64Constant () const
 
MCOperand decodeSrcOp (unsigned Width, unsigned Val) const
 
MCOperand decodeNonVGPRSrcOp (unsigned Width, unsigned Val) const
 
MCOperand decodeVOPDDstYOp (MCInst &Inst, unsigned Val) const
 
MCOperand decodeSpecialReg32 (unsigned Val) const
 
MCOperand decodeSpecialReg64 (unsigned Val) const
 
MCOperand decodeSpecialReg96Plus (unsigned Val) const
 
MCOperand decodeSDWASrc (unsigned Width, unsigned Val) const
 
MCOperand decodeSDWASrc16 (unsigned Val) const
 
MCOperand decodeSDWASrc32 (unsigned Val) const
 
MCOperand decodeSDWAVopcDst (unsigned Val) const
 
MCOperand decodeBoolReg (unsigned Val) const
 
MCOperand decodeSplitBarrier (unsigned Val) const
 
MCOperand decodeDpp8FI (unsigned Val) const
 
MCOperand decodeVersionImm (unsigned Imm) const
 
int getTTmpIdx (unsigned Val) const
 
const MCInstrInfogetMCII () const
 
bool isVI () const
 
bool isGFX9 () const
 
bool isGFX90A () const
 
bool isGFX9Plus () const
 
bool isGFX10 () const
 
bool isGFX10Plus () const
 
bool isGFX11 () const
 
bool isGFX11Plus () const
 
bool isGFX12 () const
 
bool isGFX12Plus () const
 
bool isGFX1250 () const
 
bool hasArchitectedFlatScratch () const
 
bool hasKernargPreload () const
 
bool isMacDPP (MCInst &MI) const
 
- Public Member Functions inherited from llvm::MCDisassembler
 MCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx)
 
virtual ~MCDisassembler ()
 
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 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 Expected< boolonSymbolStart (SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address) const
 Used to perform separate target specific disassembly for a particular symbol.
 
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 instruction.
 
bool tryAddingSymbolicOperand (MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t OpSize, uint64_t InstSize) const
 
void tryAddingPcLoadReferenceComment (int64_t Value, uint64_t Address) const
 
void setSymbolizer (std::unique_ptr< MCSymbolizer > Symzer)
 Set Symzer as the current symbolizer.
 
MCContextgetContext () const
 
const MCSubtargetInfogetSubtargetInfo () const
 
virtual void setABIVersion (unsigned Version)
 ELF-specific, set the ABI version from the object header.
 

Static Public Member Functions

static MCOperand decodeIntImmed (unsigned Imm)
 

Additional Inherited Members

- Public Types inherited from llvm::MCDisassembler
enum  DecodeStatus { Fail = 0 , SoftFail = 1 , Success = 3 }
 Ternary decode status. More...
 
- Public Attributes inherited from llvm::MCDisassembler
raw_ostreamCommentStream = nullptr
 
- Protected Attributes inherited from llvm::MCDisassembler
const MCSubtargetInfoSTI
 
std::unique_ptr< MCSymbolizerSymbolizer
 

Detailed Description

Definition at line 77 of file AMDGPUDisassembler.h.

Constructor & Destructor Documentation

◆ AMDGPUDisassembler()

AMDGPUDisassembler::AMDGPUDisassembler ( const MCSubtargetInfo STI,
MCContext Ctx,
MCInstrInfo const MCII 
)

◆ ~AMDGPUDisassembler()

llvm::AMDGPUDisassembler::~AMDGPUDisassembler ( )
overridedefault

Member Function Documentation

◆ convertDPP8Inst()

void AMDGPUDisassembler::convertDPP8Inst ( MCInst MI) const

◆ convertEXPInst()

void AMDGPUDisassembler::convertEXPInst ( MCInst MI) const

◆ convertFMAanyK()

void AMDGPUDisassembler::convertFMAanyK ( MCInst MI) const

Definition at line 1433 of file AMDGPUDisassembler.cpp.

References assert(), llvm::MCOperand::createImm(), insertNamedMCOperand(), and MI.

Referenced by getInstruction().

◆ convertMacDPPInst()

void AMDGPUDisassembler::convertMacDPPInst ( MCInst MI) const

◆ convertMAIInst()

void AMDGPUDisassembler::convertMAIInst ( MCInst MI) const

f8f6f4 instructions have different pseudos depending on the used formats.

In the disassembler table, we only have the variants with the largest register classes which assume using an fp8/bf8 format for both operands. The actual register class depends on the format in blgp and cbsz operands. Adjust the register classes depending on the used format.

Definition at line 1013 of file AMDGPUDisassembler.cpp.

References adjustMFMA_F8F6F4OpRegClass(), llvm::AMDGPU::getMFMA_F8F6F4_WithFormatArgs(), MI, llvm::AMDGPU::MFMA_F8F6F4_Info::NumRegsSrcA, llvm::AMDGPU::MFMA_F8F6F4_Info::NumRegsSrcB, and llvm::AMDGPU::MFMA_F8F6F4_Info::Opcode.

Referenced by getInstruction().

◆ convertMIMGInst()

void AMDGPUDisassembler::convertMIMGInst ( MCInst MI) const

◆ convertSDWAInst()

void AMDGPUDisassembler::convertSDWAInst ( MCInst MI) const

◆ convertTrue16OpSel()

void AMDGPUDisassembler::convertTrue16OpSel ( MCInst MI) const

◆ convertVINTERPInst()

void AMDGPUDisassembler::convertVINTERPInst ( MCInst MI) const

◆ convertVOP3DPPInst()

void AMDGPUDisassembler::convertVOP3DPPInst ( MCInst MI) const

◆ convertVOP3PDPPInst()

void AMDGPUDisassembler::convertVOP3PDPPInst ( MCInst MI) const

◆ convertVOPC64DPPInst()

void AMDGPUDisassembler::convertVOPC64DPPInst ( MCInst MI) const

◆ convertVOPCDPPInst()

void AMDGPUDisassembler::convertVOPCDPPInst ( MCInst MI) const

◆ convertWMMAInst()

void AMDGPUDisassembler::convertWMMAInst ( MCInst MI) const

◆ createRegOperand() [1/2]

MCOperand AMDGPUDisassembler::createRegOperand ( unsigned int  RegId) const
inline

◆ createRegOperand() [2/2]

MCOperand AMDGPUDisassembler::createRegOperand ( unsigned  RegClassID,
unsigned  Val 
) const
inline

Definition at line 1459 of file AMDGPUDisassembler.cpp.

References createRegOperand(), errOperand(), and getRegClassName().

◆ createSRegOperand()

MCOperand AMDGPUDisassembler::createSRegOperand ( unsigned  SRegClassID,
unsigned  Val 
) const
inline

◆ createVGPR16Operand()

MCOperand AMDGPUDisassembler::createVGPR16Operand ( unsigned  RegIdx,
bool  IsHi 
) const

Definition at line 1518 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeBoolReg()

MCOperand AMDGPUDisassembler::decodeBoolReg ( unsigned  Val) const

◆ decodeCOMPUTE_PGM_RSRC1()

Expected< bool > AMDGPUDisassembler::decodeCOMPUTE_PGM_RSRC1 ( uint32_t  FourByteBuffer,
raw_string_ostream KdStream 
) const

Decode as directives that handle COMPUTE_PGM_RSRC1.

Parameters
FourByteBuffer- Bytes holding contents of COMPUTE_PGM_RSRC1.
KdStream- Stream to write the disassembled directives to.

Definition at line 2207 of file AMDGPUDisassembler.cpp.

References CHECK_RESERVED_BITS, CHECK_RESERVED_BITS_DESC, CHECK_RESERVED_BITS_DESC_MSG, CHECK_RESERVED_BITS_MSG, GET_FIELD, llvm::AMDGPU::IsaInfo::getSGPREncodingGranule(), llvm::AMDGPU::IsaInfo::getVGPREncodingGranule(), hasArchitectedFlatScratch(), isGFX10Plus(), isGFX1250(), isGFX12Plus(), isGFX9Plus(), PRINT_DIRECTIVE, PRINT_PSEUDO_DIRECTIVE_COMMENT, and llvm::MCDisassembler::STI.

Referenced by decodeKernelDescriptorDirective().

◆ decodeCOMPUTE_PGM_RSRC2()

Expected< bool > AMDGPUDisassembler::decodeCOMPUTE_PGM_RSRC2 ( uint32_t  FourByteBuffer,
raw_string_ostream KdStream 
) const

Decode as directives that handle COMPUTE_PGM_RSRC2.

Parameters
FourByteBuffer- Bytes holding contents of COMPUTE_PGM_RSRC2.
KdStream- Stream to write the disassembled directives to.

Definition at line 2329 of file AMDGPUDisassembler.cpp.

References CHECK_RESERVED_BITS, CHECK_RESERVED_BITS_DESC, hasArchitectedFlatScratch(), and PRINT_DIRECTIVE.

Referenced by decodeKernelDescriptorDirective().

◆ decodeCOMPUTE_PGM_RSRC3()

Expected< bool > AMDGPUDisassembler::decodeCOMPUTE_PGM_RSRC3 ( uint32_t  FourByteBuffer,
raw_string_ostream KdStream 
) const

Decode as directives that handle COMPUTE_PGM_RSRC3.

Parameters
FourByteBuffer- Bytes holding contents of COMPUTE_PGM_RSRC3.
KdStream- Stream to write the disassembled directives to.

Definition at line 2377 of file AMDGPUDisassembler.cpp.

References CHECK_RESERVED_BITS_DESC_MSG, llvm::createStringError(), GET_FIELD, isGFX10Plus(), isGFX11(), isGFX11Plus(), isGFX1250(), isGFX12Plus(), isGFX90A(), PRINT_DIRECTIVE, and PRINT_PSEUDO_DIRECTIVE_COMMENT.

Referenced by decodeKernelDescriptorDirective().

◆ decodeDpp8FI()

MCOperand AMDGPUDisassembler::decodeDpp8FI ( unsigned  Val) const

◆ decodeIntImmed()

MCOperand AMDGPUDisassembler::decodeIntImmed ( unsigned  Imm)
static

Definition at line 1581 of file AMDGPUDisassembler.cpp.

References assert(), and llvm::MCOperand::createImm().

◆ decodeKernelDescriptor()

Expected< bool > AMDGPUDisassembler::decodeKernelDescriptor ( StringRef  KdName,
ArrayRef< uint8_t Bytes,
uint64_t  KdAddress 
) const

◆ decodeKernelDescriptorDirective()

Expected< bool > AMDGPUDisassembler::decodeKernelDescriptorDirective ( DataExtractor::Cursor Cursor,
ArrayRef< uint8_t Bytes,
raw_string_ostream KdStream 
) const

◆ decodeLiteral64Constant()

MCOperand AMDGPUDisassembler::decodeLiteral64Constant ( ) const

◆ decodeLiteralConstant()

MCOperand AMDGPUDisassembler::decodeLiteralConstant ( bool  ExtendFP64) const

◆ decodeMandatoryLiteral64Constant()

MCOperand AMDGPUDisassembler::decodeMandatoryLiteral64Constant ( uint64_t  Imm) const

Definition at line 1540 of file AMDGPUDisassembler.cpp.

References llvm::MCOperand::createImm(), and errOperand().

◆ decodeMandatoryLiteralConstant()

MCOperand AMDGPUDisassembler::decodeMandatoryLiteralConstant ( unsigned  Imm) const

◆ decodeNonVGPRSrcOp()

MCOperand AMDGPUDisassembler::decodeNonVGPRSrcOp ( unsigned  Width,
unsigned  Val 
) const

◆ decodeSDWASrc()

MCOperand AMDGPUDisassembler::decodeSDWASrc ( unsigned  Width,
unsigned  Val 
) const

◆ decodeSDWASrc16()

MCOperand AMDGPUDisassembler::decodeSDWASrc16 ( unsigned  Val) const

Definition at line 2024 of file AMDGPUDisassembler.cpp.

References decodeSDWASrc().

◆ decodeSDWASrc32()

MCOperand AMDGPUDisassembler::decodeSDWASrc32 ( unsigned  Val) const

Definition at line 2028 of file AMDGPUDisassembler.cpp.

References decodeSDWASrc().

◆ decodeSDWAVopcDst()

MCOperand AMDGPUDisassembler::decodeSDWAVopcDst ( unsigned  Val) const

◆ decodeSpecialReg32()

MCOperand AMDGPUDisassembler::decodeSpecialReg32 ( unsigned  Val) const

◆ decodeSpecialReg64()

MCOperand AMDGPUDisassembler::decodeSpecialReg64 ( unsigned  Val) const

Definition at line 1935 of file AMDGPUDisassembler.cpp.

References createRegOperand(), errOperand(), and isGFX11Plus().

Referenced by decodeNonVGPRSrcOp(), and decodeSDWAVopcDst().

◆ decodeSpecialReg96Plus()

MCOperand AMDGPUDisassembler::decodeSpecialReg96Plus ( unsigned  Val) const

Definition at line 1967 of file AMDGPUDisassembler.cpp.

References createRegOperand(), errOperand(), and isGFX11Plus().

Referenced by decodeNonVGPRSrcOp().

◆ decodeSplitBarrier()

MCOperand AMDGPUDisassembler::decodeSplitBarrier ( unsigned  Val) const

Definition at line 2062 of file AMDGPUDisassembler.cpp.

References decodeSrcOp().

◆ decodeSrcOp()

MCOperand AMDGPUDisassembler::decodeSrcOp ( unsigned  Width,
unsigned  Val 
) const

◆ decodeVersionImm()

MCOperand AMDGPUDisassembler::decodeVersionImm ( unsigned  Imm) const

◆ decodeVOPDDstYOp()

MCOperand AMDGPUDisassembler::decodeVOPDDstYOp ( MCInst Inst,
unsigned  Val 
) const

◆ errOperand()

MCOperand AMDGPUDisassembler::errOperand ( unsigned  V,
const Twine ErrMsg 
) const
inline

◆ getAgprClassId()

unsigned AMDGPUDisassembler::getAgprClassId ( unsigned  Width) const

Definition at line 1726 of file AMDGPUDisassembler.cpp.

References llvm_unreachable.

Referenced by decodeSrcOp().

◆ getInstruction()

DecodeStatus AMDGPUDisassembler::getInstruction ( MCInst Instr,
uint64_t Size,
ArrayRef< uint8_t Bytes,
uint64_t  Address,
raw_ostream CStream 
) const
overridevirtual

Returns the disassembly of a single instruction.

Parameters
Instr- An MCInst to populate with the contents of the instruction.
Size- A value to populate with the size of the instruction, or the number of bytes consumed while attempting to decode an invalid instruction.
Address- The address, in the memory space of region, of the first byte of the instruction.
Bytes- A reference to the actual bytes of the instruction.
CStream- The stream to print comments and annotations on.
Returns
- MCDisassembler::Success if the instruction is valid, MCDisassembler::SoftFail if the instruction was disassemblable but invalid, MCDisassembler::Fail if the instruction was invalid.

Implements llvm::MCDisassembler.

Definition at line 585 of file AMDGPUDisassembler.cpp.

References llvm::Address, convertDPP8Inst(), convertEXPInst(), convertFMAanyK(), convertMacDPPInst(), convertMAIInst(), convertMIMGInst(), convertSDWAInst(), convertTrue16OpSel(), convertVINTERPInst(), convertVOP3DPPInst(), convertVOP3PDPPInst(), convertVOPC64DPPInst(), convertVOPCDPPInst(), convertWMMAInst(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), createRegOperand(), llvm::SIInstrFlags::DPP, llvm::SIInstrFlags::DS, eat12Bytes(), eat16Bytes(), llvm::SIInstrFlags::EXP, llvm::MCDisassembler::Fail, llvm::SIInstrFlags::FLAT, llvm::MCInstrInfo::get(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCInstrDesc::getOperandConstraint(), llvm::AMDGPU::CPol::GLC, llvm::MCSubtargetInfo::hasFeature(), llvm::AMDGPU::hasGDS(), llvm::MCInstrDesc::hasImplicitDefOfPhysReg(), llvm::AMDGPU::hasNamedOperand(), insertNamedMCOperand(), llvm::SIInstrFlags::IsAtomicRet, isGFX10(), isGFX11(), isGFX11Plus(), isGFX12(), isGFX1250(), isGFX9(), llvm::AMDGPU::isMAC(), isMacDPP(), llvm::SIInstrFlags::IsMAI, isVI(), llvm::AMDGPU::isVOPC64DPP(), llvm::SIInstrFlags::IsWMMA, MI, llvm::SIInstrFlags::MIMG, llvm::SIInstrFlags::MTBUF, llvm::SIInstrFlags::MUBUF, llvm::SIInstrFlags::SDWA, llvm::ArrayRef< T >::size(), Size, llvm::ArrayRef< T >::slice(), llvm::SIInstrFlags::SMRD, llvm::MCDisassembler::SoftFail, llvm::SIInstrFlags::SOPK, llvm::MCDisassembler::STI, llvm::MCDisassembler::Success, llvm::MCOI::TIED_TO, tryDecodeInst(), llvm::MCInstrDesc::TSFlags, llvm::SIInstrFlags::VIMAGE, llvm::SIInstrFlags::VINTERP, llvm::SIInstrFlags::VOP3, llvm::SIInstrFlags::VOP3P, llvm::SIInstrFlags::VOPC, and llvm::SIInstrFlags::VSAMPLE.

◆ getMCII()

const MCInstrInfo * llvm::AMDGPUDisassembler::getMCII ( ) const
inline

Definition at line 208 of file AMDGPUDisassembler.h.

References llvm::MCInstrInfo::get().

◆ getRegClassName()

const char * AMDGPUDisassembler::getRegClassName ( unsigned  RegClassID) const

◆ getSgprClassId()

unsigned AMDGPUDisassembler::getSgprClassId ( unsigned  Width) const

Definition at line 1759 of file AMDGPUDisassembler.cpp.

References llvm_unreachable.

Referenced by decodeNonVGPRSrcOp(), decodeSDWASrc(), and decodeSDWAVopcDst().

◆ getTtmpClassId()

unsigned AMDGPUDisassembler::getTtmpClassId ( unsigned  Width) const

Definition at line 1790 of file AMDGPUDisassembler.cpp.

References llvm_unreachable.

Referenced by decodeNonVGPRSrcOp(), decodeSDWASrc(), and decodeSDWAVopcDst().

◆ getTTmpIdx()

int AMDGPUDisassembler::getTTmpIdx ( unsigned  Val) const

Definition at line 1817 of file AMDGPUDisassembler.cpp.

References isGFX9Plus().

Referenced by decodeNonVGPRSrcOp(), and decodeSDWAVopcDst().

◆ getVgprClassId()

unsigned AMDGPUDisassembler::getVgprClassId ( unsigned  Width) const

Definition at line 1691 of file AMDGPUDisassembler.cpp.

References llvm_unreachable.

Referenced by decodeSDWASrc(), decodeSrcOp(), and decodeVOPDDstYOp().

◆ hasArchitectedFlatScratch()

bool AMDGPUDisassembler::hasArchitectedFlatScratch ( ) const

◆ hasKernargPreload()

bool AMDGPUDisassembler::hasKernargPreload ( ) const

◆ isGFX10()

bool AMDGPUDisassembler::isGFX10 ( ) const

Definition at line 2119 of file AMDGPUDisassembler.cpp.

References llvm::AMDGPU::isGFX10(), and llvm::MCDisassembler::STI.

Referenced by getInstruction().

◆ isGFX10Plus()

bool AMDGPUDisassembler::isGFX10Plus ( ) const

◆ isGFX11()

bool AMDGPUDisassembler::isGFX11 ( ) const

◆ isGFX11Plus()

bool AMDGPUDisassembler::isGFX11Plus ( ) const

◆ isGFX12()

bool AMDGPUDisassembler::isGFX12 ( ) const

◆ isGFX1250()

bool AMDGPUDisassembler::isGFX1250 ( ) const

◆ isGFX12Plus()

bool AMDGPUDisassembler::isGFX12Plus ( ) const

◆ isGFX9()

bool AMDGPUDisassembler::isGFX9 ( ) const

◆ isGFX90A()

bool AMDGPUDisassembler::isGFX90A ( ) const

◆ isGFX9Plus()

bool AMDGPUDisassembler::isGFX9Plus ( ) const

◆ isMacDPP()

bool AMDGPUDisassembler::isMacDPP ( MCInst MI) const

◆ isVI()

bool AMDGPUDisassembler::isVI ( ) const

◆ onSymbolStart()

Expected< bool > AMDGPUDisassembler::onSymbolStart ( SymbolInfoTy Symbol,
uint64_t Size,
ArrayRef< uint8_t Bytes,
uint64_t  Address 
) const
overridevirtual

Used to perform separate target specific disassembly for a particular symbol.

May parse any prelude that precedes instructions after the start of a symbol, or the entire symbol. This is used for example by WebAssembly to decode preludes.

Base implementation returns false. So all targets by default decline to treat symbols separately.

Parameters
Symbol- The symbol.
Size- The number of bytes consumed.
Address- The address, in the memory space of region, of the first byte of the symbol.
Bytes- A reference to the actual bytes at the symbol location.
Returns
- True if this symbol triggered some target specific disassembly for this symbol. Size must be set with the number of bytes consumed.
  • Error if this symbol triggered some target specific disassembly for this symbol, but an error was found with it. Size must be set with the number of bytes consumed.
  • False if the target doesn't want to handle the symbol separately. The value of Size is ignored in this case, and Err must not be set.

Reimplemented from llvm::MCDisassembler.

Definition at line 2702 of file AMDGPUDisassembler.cpp.

References llvm::Address, llvm::createStringError(), decodeKernelDescriptor(), Name, Size, llvm::ELF::STT_AMDGPU_HSA_KERNEL, and llvm::ELF::STT_OBJECT.

◆ setABIVersion()

void AMDGPUDisassembler::setABIVersion ( unsigned  Version)
overridevirtual

ELF-specific, set the ABI version from the object header.

Reimplemented from llvm::MCDisassembler.

Definition at line 72 of file AMDGPUDisassembler.cpp.

References llvm::AMDGPU::getAMDHSACodeObjectVersion(), and llvm::Version.

◆ tryDecodeInst() [1/2]

template<typename InsnType >
DecodeStatus AMDGPUDisassembler::tryDecodeInst ( const uint8_t Table,
MCInst MI,
InsnType  Inst,
uint64_t  Address,
raw_ostream Comments 
) const

◆ tryDecodeInst() [2/2]

template<typename InsnType >
DecodeStatus AMDGPUDisassembler::tryDecodeInst ( const uint8_t Table1,
const uint8_t Table2,
MCInst MI,
InsnType  Inst,
uint64_t  Address,
raw_ostream Comments 
) const

Definition at line 483 of file AMDGPUDisassembler.cpp.

References llvm::Address, llvm::MCDisassembler::Fail, MI, and tryDecodeInst().


The documentation for this class was generated from the following files: