diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-10-05 21:24:01 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-10-05 21:24:01 -0700 |
commit | b0f3ed6e3bc78f11371864a0587d918c547b8022 (patch) | |
tree | 099ef5a8fa6eec84fcdb5eac73c428c0294d5c93 /spike_main | |
parent | 3fddbcc0a5b2fc6a446967405e58a92be5db9f5f (diff) | |
download | spike-b0f3ed6e3bc78f11371864a0587d918c547b8022.zip spike-b0f3ed6e3bc78f11371864a0587d918c547b8022.tar.gz spike-b0f3ed6e3bc78f11371864a0587d918c547b8022.tar.bz2 |
more work towards RVC 1.8
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/disasm.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/spike_main/disasm.cc b/spike_main/disasm.cc index 2bd9b6a..974d70e 100644 --- a/spike_main/disasm.cc +++ b/spike_main/disasm.cc @@ -22,7 +22,7 @@ struct : public arg_t { struct : public arg_t { std::string to_string(insn_t insn) const { - return std::string("0(") + xpr_name[insn.rs1()] + ')'; + return std::string("(") + xpr_name[insn.rs1()] + ')'; } } amo_address; @@ -214,12 +214,6 @@ struct : public arg_t { struct : public arg_t { std::string to_string(insn_t insn) const { - return std::to_string((int)insn.rvc_lb_imm()) + '(' + xpr_name[insn.rvc_rs1s()] + ')'; - } -} rvc_lb_address; - -struct : public arg_t { - std::string to_string(insn_t insn) const { return std::to_string((int)insn.rvc_lw_imm()) + '(' + xpr_name[insn.rvc_rs1s()] + ')'; } } rvc_lw_address; @@ -503,7 +497,7 @@ disassembler_t::disassembler_t() DISASM_INSN("jr", c_li, mask_rvc_imm, {&rvc_rs1}); DISASM_INSN("jalr", c_lui, mask_rvc_imm, {&rvc_rs1}); DISASM_INSN("nop", c_addi, mask_rd | mask_rvc_imm, {}); - DISASM_INSN("addi", c_addi, mask_rd, {&rvc_sp, &rvc_sp, &rvc_addi16sp_imm}); + DISASM_INSN("addi", c_addi16sp, mask_rd, {&rvc_sp, &rvc_sp, &rvc_addi16sp_imm}); DISASM_INSN("addi", c_addi4spn, 0, {&rvc_rs1s, &rvc_sp, &rvc_addi4spn_imm}); DISASM_INSN("li", c_li, 0, {&xrd, &rvc_imm}); DISASM_INSN("lui", c_lui, 0, {&xrd, &rvc_uimm}); @@ -524,7 +518,6 @@ disassembler_t::disassembler_t() DISASM_INSN("flw", c_flwsp, 0, {&xrd, &rvc_lwsp_address}); DISASM_INSN("sw", c_swsp, 0, {&rvc_rs2, &rvc_swsp_address}); DISASM_INSN("fsw", c_fswsp, 0, {&rvc_rs2, &rvc_swsp_address}); - DISASM_INSN("lbu", c_lbu, 0, {&rvc_rs2s, &rvc_lb_address}); DISASM_INSN("lw", c_lw, 0, {&rvc_rs2s, &rvc_lw_address}); DISASM_INSN("flw", c_flw, 0, {&rvc_rs2s, &rvc_lw_address}); DISASM_INSN("sw", c_sw, 0, {&rvc_rs2s, &rvc_lw_address}); |