[llvm] [Xtensa] Implement Windowed Register Option. (PR #121118)

Andrei Safronov via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 29 07:10:54 PST 2024


================
@@ -210,6 +211,32 @@ static DecodeStatus decodeImm32n_95Operand(MCInst &Inst, uint64_t Imm,
   return MCDisassembler::Success;
 }
 
+static DecodeStatus decodeImm8n_7Operand(MCInst &Inst, uint64_t Imm,
+                                         int64_t Address, const void *Decoder) {
+  assert(isUInt<4>(Imm) && "Invalid immediate");
+  if (Imm > 7)
+    Inst.addOperand(MCOperand::createImm(Imm - 16));
+  else
+    Inst.addOperand(MCOperand::createImm(Imm));
----------------
andreisfr wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/121118


More information about the llvm-commits mailing list