[llvm] [AVR] Remove some custom decoder functions (NFCI) (PR #156852)
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 21:00:40 PDT 2025
================
@@ -141,18 +106,25 @@ static DecodeStatus decodeCallTarget(MCInst &Inst, unsigned Field,
return MCDisassembler::Success;
}
-static DecodeStatus decodeFRd(MCInst &Inst, unsigned Insn, uint64_t Address,
- const MCDisassembler *Decoder) {
- unsigned d = fieldFromInstruction(Insn, 4, 5);
- if (DecodeGPR8RegisterClass(Inst, d, Address, Decoder) ==
- MCDisassembler::Fail)
- return MCDisassembler::Fail;
+static DecodeStatus decodeRelCondBrTarget7(MCInst &Inst, unsigned Field,
+ uint64_t Address,
+ const MCDisassembler *Decoder) {
+ Inst.addOperand(MCOperand::createImm(SignExtend32(Field, 7) << 1));
+ return MCDisassembler::Success;
+}
+
+static DecodeStatus decodeRelCondBrTarget13(MCInst &Inst, unsigned Field,
+ uint64_t Address,
+ const MCDisassembler *Decoder) {
+ Inst.addOperand(MCOperand::createImm(SignExtend32(Field, 12) << 1));
----------------
benshi001 wrote:
It would be better to commnet `The legal range is [-4096, 4094]`.
https://github.com/llvm/llvm-project/pull/156852
More information about the llvm-commits
mailing list