================
@@ -239,6 +239,31 @@ static DecodeStatus DecodeTRM4RegisterClass(MCInst &Inst,
uint32_t RegNo,
return MCDisassembler::Success;
}
+static DecodeStatus DecodeYBNDSWImm(MCInst &Inst, uint64_t Imm, int64_t
Address,
+ const MCDisassembler *Decoder) {
+ assert(isUInt<9>(Imm) && "Invalid immediate");
+ uint64_t Result;
+ if (Imm == 0) {
+ // If imm[8:0] == 0, result is 4096.
+ Result = 4096;
+ } else if (Imm <= 255) {
+ // If imm[8] == 0 and imm[7:0] != 0, result is imm[7:0].
+ Result = Imm;
+ } else {
+ uint64_t Imm7To5 = (Imm & 0xFF) >> 5;
----------------
topperc wrote:
(Imm >> 5) & 0x7
https://github.com/llvm/llvm-project/pull/199771
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits