diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h index 444312473a5f..7e233dcb54ea 100644 --- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h +++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h @@ -97,6 +97,7 @@ private: const unsigned TargetMaxInstBytes; mutable ArrayRef<uint8_t> Bytes; mutable uint32_t Literal; + mutable uint64_t Literal64; mutable bool HasLiteral; mutable std::optional<bool> EnableWavefrontSize32; @@ -114,6 +115,7 @@ public: 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; @@ -144,6 +146,17 @@ public: return MCDisassembler::Fail; } + template <typename InsnType> + DecodeStatus tryDecodeInst(const uint8_t *Table1, const uint8_t *Table2, + MCInst &MI, InsnType Inst, uint64_t Address, + raw_ostream &Comments) const { + for (const uint8_t *T : {Table1, Table2}) { + if (DecodeStatus Res = tryDecodeInst(T, MI, Inst, Address, Comments)) + return Res; + } + return MCDisassembler::Fail; + } + std::optional<DecodeStatus> onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, raw_ostream &CStream) const override; @@ -217,11 +230,15 @@ public: static MCOperand decodeFPImmed(unsigned ImmWidth, unsigned Imm); MCOperand decodeMandatoryLiteralConstant(unsigned Imm) const; - MCOperand decodeLiteralConstant() const; + MCOperand decodeLiteralConstant(bool ExtendFP64) const; MCOperand decodeSrcOp(const OpWidthTy Width, unsigned Val, - bool MandatoryLiteral = false, - unsigned ImmWidth = 0) const; + bool MandatoryLiteral = false, unsigned ImmWidth = 0, + bool IsFP = false) const; + + MCOperand decodeNonVGPRSrcOp(const OpWidthTy Width, unsigned Val, + bool MandatoryLiteral = false, + unsigned ImmWidth = 0, bool IsFP = false) const; MCOperand decodeVOPDDstYOp(MCInst &Inst, unsigned Val) const; MCOperand decodeSpecialReg32(unsigned Val) const; @@ -247,8 +264,10 @@ public: bool isGFX10Plus() const; bool isGFX11() const; bool isGFX11Plus() const; + bool isGFX12Plus() const; bool hasArchitectedFlatScratch() const; + bool hasKernargPreload() const; bool isMacDPP(MCInst &MI) const; }; |
