From 4c286ec230ce8d39cc9c4ce4726664e24d13006a Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 3 Nov 2017 18:13:22 -0700 Subject: [PATCH] Fix disassembly of c.li 0 Resolves #152 --- spike_main/disasm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spike_main/disasm.cc b/spike_main/disasm.cc index eedc6b8..1df8810 100644 --- a/spike_main/disasm.cc +++ b/spike_main/disasm.cc @@ -499,7 +499,7 @@ disassembler_t::disassembler_t(int xlen) DEFINE_FXTYPE(fle_d); DISASM_INSN("ebreak", c_add, mask_rd | mask_rvc_rs2, {}); - add_insn(new disasm_insn_t("ret", match_c_li | match_rd_ra, mask_c_li | mask_rd | mask_rvc_imm, {})); + add_insn(new disasm_insn_t("ret", match_c_jr | match_rd_ra, mask_c_jr | mask_rd | mask_rvc_imm, {})); DISASM_INSN("jr", c_jr, mask_rvc_imm, {&rvc_rs1}); DISASM_INSN("jalr", c_jalr, mask_rvc_imm, {&rvc_rs1}); DISASM_INSN("nop", c_addi, mask_rd | mask_rvc_imm, {}); -- 2.30.2