[llvm] [AMDGPU][True16][MC] VINTERP instructions supporting true16/fake16 (PR #113634)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 11:59:10 PST 2024
================
@@ -363,6 +363,21 @@ static DecodeStatus decodeOperand_VSrcT16(MCInst &Inst, unsigned Imm,
(AMDGPU::OperandSemantics)OperandSemantics));
}
+static DecodeStatus decodeOperand_VGPR_16(MCInst &Inst, unsigned Imm,
+ uint64_t /*Addr*/,
+ const MCDisassembler *Decoder) {
+ assert(isUInt<10>(Imm) && "10-bit encoding expected");
+
+ const auto *DAsm = static_cast<const AMDGPUDisassembler *>(Decoder);
+ if (Imm & AMDGPU::EncValues::IS_VGPR) {
+ bool IsHi = Imm & (1 << 9);
+ unsigned RegIdx = Imm & 0xff;
+ return addOperand(Inst, DAsm->createVGPR16Operand(RegIdx, IsHi));
+ }
+ return addOperand(Inst, DAsm->decodeNonVGPRSrcOp(AMDGPUDisassembler::OPW16,
----------------
Sisyph wrote:
Yes, please assert (Imm & AMDGPU::EncValues::IS_VGPR)
https://github.com/llvm/llvm-project/pull/113634
More information about the llvm-commits
mailing list