Skip to content

Commit 2398e20

Browse files
committed
[RISCV] Remove DecoderMethod from C_NOP_HINT. NFC
This doesn't appear to be needed. Differential Revision: https://reviews.llvm.org/D143367
1 parent 638abc2 commit 2398e20

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,6 @@ static DecodeStatus decodeRVCInstrRdRs1ImmZero(MCInst &Inst, uint32_t Insn,
353353
uint64_t Address,
354354
const MCDisassembler *Decoder);
355355

356-
static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, uint32_t Insn,
357-
uint64_t Address,
358-
const MCDisassembler *Decoder);
359-
360356
static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, uint32_t Insn,
361357
uint64_t Address,
362358
const MCDisassembler *Decoder);
@@ -387,17 +383,6 @@ static DecodeStatus decodeRVCInstrRdRs1ImmZero(MCInst &Inst, uint32_t Insn,
387383
return MCDisassembler::Success;
388384
}
389385

390-
static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, uint32_t Insn,
391-
uint64_t Address,
392-
const MCDisassembler *Decoder) {
393-
uint32_t SImm6 =
394-
fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5);
395-
DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder);
396-
(void)Result;
397-
assert(Result == MCDisassembler::Success && "Invalid immediate");
398-
return MCDisassembler::Success;
399-
}
400-
401386
static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, uint32_t Insn,
402387
uint64_t Address,
403388
const MCDisassembler *Decoder) {

llvm/lib/Target/RISCV/RISCVInstrInfoC.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ let rd = 0 in
611611
def C_NOP_HINT : RVInst16CI<0b000, 0b01, (outs), (ins simm6nonzero:$imm),
612612
"c.nop", "$imm">, Sched<[WriteNop]> {
613613
let Inst{6-2} = imm{4-0};
614-
let DecoderMethod = "decodeRVCInstrSImm";
615614
}
616615

617616
def C_ADDI_HINT_IMM_ZERO : RVInst16CI<0b000, 0b01, (outs GPRNoX0:$rd_wb),

0 commit comments

Comments
 (0)