diff --git a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp --- a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp +++ b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp @@ -353,10 +353,6 @@ uint64_t Address, const MCDisassembler *Decoder); -static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, unsigned Insn, - uint64_t Address, - const MCDisassembler *Decoder); - static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder); @@ -387,17 +383,6 @@ return MCDisassembler::Success; } -static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, unsigned Insn, - uint64_t Address, - const MCDisassembler *Decoder) { - uint64_t SImm6 = - fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); - DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder); - (void)Result; - assert(Result == MCDisassembler::Success && "Invalid immediate"); - return MCDisassembler::Success; -} - static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder) { diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td @@ -611,7 +611,6 @@ def C_NOP_HINT : RVInst16CI<0b000, 0b01, (outs), (ins simm6nonzero:$imm), "c.nop", "$imm">, Sched<[WriteNop]> { let Inst{6-2} = imm{4-0}; - let DecoderMethod = "decodeRVCInstrSImm"; } def C_ADDI_HINT_IMM_ZERO : RVInst16CI<0b000, 0b01, (outs GPRNoX0:$rd_wb),