LLVM  13.0.0git
Public Types | 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:
Inheritance graph
[legend]
Collaboration diagram for llvm::AMDGPUDisassembler:
Collaboration graph
[legend]

Public Types

enum  OpWidthTy {
  OPW32, OPW64, OPW96, OPW128,
  OPW160, OPW256, OPW512, OPW1024,
  OPW16, OPWV216, OPWV232, OPW_LAST_,
  OPW_FIRST_ = OPW32
}
 
- Public Types inherited from llvm::MCDisassembler
enum  DecodeStatus { Fail = 0, SoftFail = 1, Success = 3 }
 Ternary decode status. More...
 

Public Member Functions

 AMDGPUDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx, MCInstrInfo const *MCII)
 
 ~AMDGPUDisassembler () override=default
 
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. More...
 
const char * getRegClassName (unsigned RegClassID) const
 
MCOperand createRegOperand (unsigned int RegId) const
 
MCOperand createRegOperand (unsigned RegClassID, unsigned Val) const
 
MCOperand createSRegOperand (unsigned SRegClassID, unsigned Val) const
 
MCOperand errOperand (unsigned V, const Twine &ErrMsg) const
 
DecodeStatus tryDecodeInst (const uint8_t *Table, MCInst &MI, uint64_t Inst, uint64_t Address) const
 
Optional< DecodeStatusonSymbolStart (SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const override
 Used to perform separate target specific disassembly for a particular symbol. More...
 
DecodeStatus decodeKernelDescriptor (StringRef KdName, ArrayRef< uint8_t > Bytes, uint64_t KdAddress) const
 
DecodeStatus decodeKernelDescriptorDirective (DataExtractor::Cursor &Cursor, ArrayRef< uint8_t > Bytes, raw_string_ostream &KdStream) const
 
DecodeStatus decodeCOMPUTE_PGM_RSRC1 (uint32_t FourByteBuffer, raw_string_ostream &KdStream) const
 Decode as directives that handle COMPUTE_PGM_RSRC1. More...
 
DecodeStatus decodeCOMPUTE_PGM_RSRC2 (uint32_t FourByteBuffer, raw_string_ostream &KdStream) const
 Decode as directives that handle COMPUTE_PGM_RSRC2. More...
 
DecodeStatus convertSDWAInst (MCInst &MI) const
 
DecodeStatus convertDPP8Inst (MCInst &MI) const
 
DecodeStatus convertMIMGInst (MCInst &MI) const
 
MCOperand decodeOperand_VGPR_32 (unsigned Val) const
 
MCOperand decodeOperand_VRegOrLds_32 (unsigned Val) const
 
MCOperand decodeOperand_VS_32 (unsigned Val) const
 
MCOperand decodeOperand_VS_64 (unsigned Val) const
 
MCOperand decodeOperand_VS_128 (unsigned Val) const
 
MCOperand decodeOperand_VSrc16 (unsigned Val) const
 
MCOperand decodeOperand_VSrcV216 (unsigned Val) const
 
MCOperand decodeOperand_VSrcV232 (unsigned Val) const
 
MCOperand decodeOperand_VReg_64 (unsigned Val) const
 
MCOperand decodeOperand_VReg_96 (unsigned Val) const
 
MCOperand decodeOperand_VReg_128 (unsigned Val) const
 
MCOperand decodeOperand_VReg_256 (unsigned Val) const
 
MCOperand decodeOperand_VReg_512 (unsigned Val) const
 
MCOperand decodeOperand_VReg_1024 (unsigned Val) const
 
MCOperand decodeOperand_SReg_32 (unsigned Val) const
 
MCOperand decodeOperand_SReg_32_XM0_XEXEC (unsigned Val) const
 
MCOperand decodeOperand_SReg_32_XEXEC_HI (unsigned Val) const
 
MCOperand decodeOperand_SRegOrLds_32 (unsigned Val) const
 
MCOperand decodeOperand_SReg_64 (unsigned Val) const
 
MCOperand decodeOperand_SReg_64_XEXEC (unsigned Val) const
 
MCOperand decodeOperand_SReg_128 (unsigned Val) const
 
MCOperand decodeOperand_SReg_256 (unsigned Val) const
 
MCOperand decodeOperand_SReg_512 (unsigned Val) const
 
MCOperand decodeOperand_AGPR_32 (unsigned Val) const
 
MCOperand decodeOperand_AReg_64 (unsigned Val) const
 
MCOperand decodeOperand_AReg_128 (unsigned Val) const
 
MCOperand decodeOperand_AReg_256 (unsigned Val) const
 
MCOperand decodeOperand_AReg_512 (unsigned Val) const
 
MCOperand decodeOperand_AReg_1024 (unsigned Val) const
 
MCOperand decodeOperand_AV_32 (unsigned Val) const
 
MCOperand decodeOperand_AV_64 (unsigned Val) const
 
unsigned getVgprClassId (const OpWidthTy Width) const
 
unsigned getAgprClassId (const OpWidthTy Width) const
 
unsigned getSgprClassId (const OpWidthTy Width) const
 
unsigned getTtmpClassId (const OpWidthTy Width) const
 
MCOperand decodeLiteralConstant () const
 
MCOperand decodeSrcOp (const OpWidthTy Width, unsigned Val) const
 
MCOperand decodeDstOp (const OpWidthTy Width, unsigned Val) const
 
MCOperand decodeSpecialReg32 (unsigned Val) const
 
MCOperand decodeSpecialReg64 (unsigned Val) const
 
MCOperand decodeSDWASrc (const OpWidthTy Width, unsigned Val) const
 
MCOperand decodeSDWASrc16 (unsigned Val) const
 
MCOperand decodeSDWASrc32 (unsigned Val) const
 
MCOperand decodeSDWAVopcDst (unsigned Val) const
 
MCOperand decodeBoolReg (unsigned Val) 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 hasArchitectedFlatScratch () const
 
- Public Member Functions inherited from llvm::MCDisassembler
 MCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx)
 
virtual ~MCDisassembler ()
 
bool tryAddingSymbolicOperand (MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, 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. More...
 
MCContextgetContext () const
 
const MCSubtargetInfogetSubtargetInfo () const
 

Static Public Member Functions

static MCOperand decodeIntImmed (unsigned Imm)
 
static MCOperand decodeFPImmed (OpWidthTy Width, unsigned Imm)
 

Additional Inherited Members

- 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 34 of file AMDGPUDisassembler.h.

Member Enumeration Documentation

◆ OpWidthTy

Enumerator
OPW32 
OPW64 
OPW96 
OPW128 
OPW160 
OPW256 
OPW512 
OPW1024 
OPW16 
OPWV216 
OPWV232 
OPW_LAST_ 
OPW_FIRST_ 

Definition at line 130 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()

DecodeStatus AMDGPUDisassembler::convertDPP8Inst ( MCInst MI) const

◆ convertMIMGInst()

DecodeStatus AMDGPUDisassembler::convertMIMGInst ( MCInst MI) const

◆ convertSDWAInst()

DecodeStatus AMDGPUDisassembler::convertSDWAInst ( 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 839 of file AMDGPUDisassembler.cpp.

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

◆ createSRegOperand()

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

◆ decodeBoolReg()

MCOperand AMDGPUDisassembler::decodeBoolReg ( unsigned  Val) const

◆ decodeCOMPUTE_PGM_RSRC1()

MCDisassembler::DecodeStatus 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 1474 of file AMDGPUDisassembler.cpp.

References llvm::MCDisassembler::Fail, llvm::AMDGPU::IsaInfo::getSGPREncodingGranule(), llvm::AMDGPU::IsaInfo::getVGPREncodingGranule(), hasArchitectedFlatScratch(), isGFX10Plus(), PRINT_DIRECTIVE, llvm::MCDisassembler::STI, and llvm::MCDisassembler::Success.

Referenced by decodeKernelDescriptorDirective().

◆ decodeCOMPUTE_PGM_RSRC2()

MCDisassembler::DecodeStatus 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 1571 of file AMDGPUDisassembler.cpp.

References llvm::MCDisassembler::Fail, hasArchitectedFlatScratch(), PRINT_DIRECTIVE, and llvm::MCDisassembler::Success.

Referenced by decodeKernelDescriptorDirective().

◆ decodeDstOp()

MCOperand AMDGPUDisassembler::decodeDstOp ( const OpWidthTy  Width,
unsigned  Val 
) const

◆ decodeFPImmed()

MCOperand AMDGPUDisassembler::decodeFPImmed ( OpWidthTy  Width,
unsigned  Imm 
)
static

◆ decodeIntImmed()

MCOperand AMDGPUDisassembler::decodeIntImmed ( unsigned  Imm)
static

◆ decodeKernelDescriptor()

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

◆ decodeKernelDescriptorDirective()

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

◆ decodeLiteralConstant()

MCOperand AMDGPUDisassembler::decodeLiteralConstant ( ) const

◆ decodeOperand_AGPR_32()

MCOperand AMDGPUDisassembler::decodeOperand_AGPR_32 ( unsigned  Val) const

Definition at line 925 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AReg_1024()

MCOperand AMDGPUDisassembler::decodeOperand_AReg_1024 ( unsigned  Val) const

Definition at line 945 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AReg_128()

MCOperand AMDGPUDisassembler::decodeOperand_AReg_128 ( unsigned  Val) const

Definition at line 933 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AReg_256()

MCOperand AMDGPUDisassembler::decodeOperand_AReg_256 ( unsigned  Val) const

Definition at line 937 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AReg_512()

MCOperand AMDGPUDisassembler::decodeOperand_AReg_512 ( unsigned  Val) const

Definition at line 941 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AReg_64()

MCOperand AMDGPUDisassembler::decodeOperand_AReg_64 ( unsigned  Val) const

Definition at line 929 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_AV_32()

MCOperand AMDGPUDisassembler::decodeOperand_AV_32 ( unsigned  Val) const

Definition at line 949 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW32.

◆ decodeOperand_AV_64()

MCOperand AMDGPUDisassembler::decodeOperand_AV_64 ( unsigned  Val) const

Definition at line 953 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW64.

◆ decodeOperand_SReg_128()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_128 ( unsigned  Val) const

Definition at line 1015 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW128.

◆ decodeOperand_SReg_256()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_256 ( unsigned  Val) const

Definition at line 1019 of file AMDGPUDisassembler.cpp.

References decodeDstOp(), and OPW256.

◆ decodeOperand_SReg_32()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_32 ( unsigned  Val) const

◆ decodeOperand_SReg_32_XEXEC_HI()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_32_XEXEC_HI ( unsigned  Val) const

Definition at line 994 of file AMDGPUDisassembler.cpp.

References decodeOperand_SReg_32().

◆ decodeOperand_SReg_32_XM0_XEXEC()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_32_XM0_XEXEC ( unsigned  Val) const

Definition at line 988 of file AMDGPUDisassembler.cpp.

References decodeOperand_SReg_32().

◆ decodeOperand_SReg_512()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_512 ( unsigned  Val) const

Definition at line 1023 of file AMDGPUDisassembler.cpp.

References decodeDstOp(), and OPW512.

◆ decodeOperand_SReg_64()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_64 ( unsigned  Val) const

Definition at line 1007 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW64.

Referenced by decodeBoolReg().

◆ decodeOperand_SReg_64_XEXEC()

MCOperand AMDGPUDisassembler::decodeOperand_SReg_64_XEXEC ( unsigned  Val) const

Definition at line 1011 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW64.

◆ decodeOperand_SRegOrLds_32()

MCOperand AMDGPUDisassembler::decodeOperand_SRegOrLds_32 ( unsigned  Val) const

Definition at line 1000 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW32.

◆ decodeOperand_VGPR_32()

MCOperand AMDGPUDisassembler::decodeOperand_VGPR_32 ( unsigned  Val) const

Definition at line 912 of file AMDGPUDisassembler.cpp.

References createRegOperand().

Referenced by getInstruction().

◆ decodeOperand_VReg_1024()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_1024 ( unsigned  Val) const

Definition at line 977 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VReg_128()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_128 ( unsigned  Val) const

Definition at line 965 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VReg_256()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_256 ( unsigned  Val) const

Definition at line 969 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VReg_512()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_512 ( unsigned  Val) const

Definition at line 973 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VReg_64()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_64 ( unsigned  Val) const

Definition at line 957 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VReg_96()

MCOperand AMDGPUDisassembler::decodeOperand_VReg_96 ( unsigned  Val) const

Definition at line 961 of file AMDGPUDisassembler.cpp.

References createRegOperand().

◆ decodeOperand_VRegOrLds_32()

MCOperand AMDGPUDisassembler::decodeOperand_VRegOrLds_32 ( unsigned  Val) const

Definition at line 921 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW32.

◆ decodeOperand_VS_128()

MCOperand AMDGPUDisassembler::decodeOperand_VS_128 ( unsigned  Val) const

Definition at line 896 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW128.

◆ decodeOperand_VS_32()

MCOperand AMDGPUDisassembler::decodeOperand_VS_32 ( unsigned  Val) const

Definition at line 888 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW32.

◆ decodeOperand_VS_64()

MCOperand AMDGPUDisassembler::decodeOperand_VS_64 ( unsigned  Val) const

Definition at line 892 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW64.

◆ decodeOperand_VSrc16()

MCOperand AMDGPUDisassembler::decodeOperand_VSrc16 ( unsigned  Val) const

Definition at line 900 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPW16.

◆ decodeOperand_VSrcV216()

MCOperand AMDGPUDisassembler::decodeOperand_VSrcV216 ( unsigned  Val) const

Definition at line 904 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPWV216.

◆ decodeOperand_VSrcV232()

MCOperand AMDGPUDisassembler::decodeOperand_VSrcV232 ( unsigned  Val) const

Definition at line 908 of file AMDGPUDisassembler.cpp.

References decodeSrcOp(), and OPWV232.

◆ decodeSDWASrc()

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

◆ decodeSDWASrc16()

MCOperand AMDGPUDisassembler::decodeSDWASrc16 ( unsigned  Val) const

Definition at line 1402 of file AMDGPUDisassembler.cpp.

References decodeSDWASrc(), and OPW16.

◆ decodeSDWASrc32()

MCOperand AMDGPUDisassembler::decodeSDWASrc32 ( unsigned  Val) const

Definition at line 1406 of file AMDGPUDisassembler.cpp.

References decodeSDWASrc(), and OPW32.

◆ decodeSDWAVopcDst()

MCOperand AMDGPUDisassembler::decodeSDWAVopcDst ( unsigned  Val) const

◆ decodeSpecialReg32()

MCOperand AMDGPUDisassembler::decodeSpecialReg32 ( unsigned  Val) const

Definition at line 1305 of file AMDGPUDisassembler.cpp.

References createRegOperand(), errOperand(), and llvm::M0().

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

◆ decodeSpecialReg64()

MCOperand AMDGPUDisassembler::decodeSpecialReg64 ( unsigned  Val) const

Definition at line 1337 of file AMDGPUDisassembler.cpp.

References createRegOperand(), and errOperand().

Referenced by decodeSDWAVopcDst(), and decodeSrcOp().

◆ decodeSrcOp()

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

◆ errOperand()

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

◆ getAgprClassId()

unsigned AMDGPUDisassembler::getAgprClassId ( const OpWidthTy  Width) const

Definition at line 1171 of file AMDGPUDisassembler.cpp.

References assert(), OPW1024, OPW128, OPW16, OPW160, OPW256, OPW32, OPW512, OPW64, OPW96, OPW_FIRST_, OPW_LAST_, OPWV216, and OPWV232.

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 414 of file AMDGPUDisassembler.cpp.

References llvm::Address, llvm::MCDisassembler::CommentStream, convertDPP8Inst(), convertMIMGInst(), convertSDWAInst(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), decodeOperand_VGPR_32(), llvm::MCDisassembler::Fail, llvm::SIInstrFlags::FLAT, llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::getNamedOperandIdx(), llvm::AMDGPU::CPol::GLC, i, insertNamedMCOperand(), llvm::SIInstrFlags::IsAtomicRet, MI, llvm::SIInstrFlags::MIMG, llvm::min(), llvm::SIInstrFlags::MTBUF, llvm::SIInstrFlags::MUBUF, llvm::Check::Size, llvm::ArrayRef< T >::size(), llvm::ArrayRef< T >::slice(), llvm::SIInstrFlags::SMRD, llvm::MCDisassembler::STI, llvm::MCDisassembler::Success, llvm::MCOI::TIED_TO, and tryDecodeInst().

◆ getMCII()

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

Definition at line 169 of file AMDGPUDisassembler.h.

References llvm::MCInstrInfo::get().

◆ getRegClassName()

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

◆ getSgprClassId()

unsigned AMDGPUDisassembler::getSgprClassId ( const OpWidthTy  Width) const

◆ getTtmpClassId()

unsigned AMDGPUDisassembler::getTtmpClassId ( const OpWidthTy  Width) const

◆ getTTmpIdx()

int AMDGPUDisassembler::getTTmpIdx ( unsigned  Val) const

◆ getVgprClassId()

unsigned AMDGPUDisassembler::getVgprClassId ( const OpWidthTy  Width) const

◆ hasArchitectedFlatScratch()

bool AMDGPUDisassembler::hasArchitectedFlatScratch ( ) const

◆ isGFX10()

bool AMDGPUDisassembler::isGFX10 ( ) const

Definition at line 1454 of file AMDGPUDisassembler.cpp.

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

◆ isGFX10Plus()

bool AMDGPUDisassembler::isGFX10Plus ( ) const

◆ isGFX9()

bool AMDGPUDisassembler::isGFX9 ( ) const

◆ isGFX90A()

bool AMDGPUDisassembler::isGFX90A ( ) const

◆ isGFX9Plus()

bool AMDGPUDisassembler::isGFX9Plus ( ) const

Definition at line 1452 of file AMDGPUDisassembler.cpp.

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

Referenced by getTTmpIdx().

◆ isVI()

bool AMDGPUDisassembler::isVI ( ) const

◆ onSymbolStart()

Optional< MCDisassembler::DecodeStatus > AMDGPUDisassembler::onSymbolStart ( SymbolInfoTy Symbol,
uint64_t &  Size,
ArrayRef< uint8_t >  Bytes,
uint64_t  Address,
raw_ostream CStream 
) 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 None. So all targets by default ignore 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.
CStream- The stream to print comments and annotations on.
Returns
- MCDisassembler::Success if bytes are decoded successfully. Size must hold the number of bytes that were decoded.
  • MCDisassembler::Fail if the bytes are invalid. Size must hold the number of bytes that were decoded before failing. The target must print nothing. This can be done by buffering the output if needed.
  • None if the target doesn't want to handle the symbol separately. Value of Size is ignored in this case.

Reimplemented from llvm::MCDisassembler.

Definition at line 1797 of file AMDGPUDisassembler.cpp.

References llvm::Address, decodeKernelDescriptor(), llvm::MCDisassembler::Fail, llvm::None, llvm::Check::Size, llvm::ELF::STT_AMDGPU_HSA_KERNEL, llvm::ELF::STT_OBJECT, and llvm::ARMBuildAttrs::Symbol.

◆ tryDecodeInst()

DecodeStatus AMDGPUDisassembler::tryDecodeInst ( const uint8_t *  Table,
MCInst MI,
uint64_t  Inst,
uint64_t  Address 
) const

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