aboutsummaryrefslogtreecommitdiff
path: root/disasm
diff options
context:
space:
mode:
authorWeiwei Li <liweiwei@iscas.ac.cn>2023-06-02 23:41:49 +0800
committerWeiwei Li <liweiwei@iscas.ac.cn>2023-06-02 23:45:03 +0800
commit047491581cd6437620a19b51594a35c158a53466 (patch)
treea06da7cc376938b0118fdd8307e499c51494ba2a /disasm
parent740e6353a166ec3ba936b200482d6fc381b8082b (diff)
downloadriscv-isa-sim-047491581cd6437620a19b51594a35c158a53466.zip
riscv-isa-sim-047491581cd6437620a19b51594a35c158a53466.tar.gz
riscv-isa-sim-047491581cd6437620a19b51594a35c158a53466.tar.bz2
Fix bugs in disassembling code for cm.mva01s/mvsa01 instructions. (Resolved issue #1370)
Diffstat (limited to 'disasm')
-rw-r--r--disasm/disasm.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/disasm/disasm.cc b/disasm/disasm.cc
index fef9fac..2fce1a1 100644
--- a/disasm/disasm.cc
+++ b/disasm/disasm.cc
@@ -238,6 +238,18 @@ struct : public arg_t {
struct : public arg_t {
std::string to_string(insn_t insn) const {
+ return xpr_name[RVC_R1S];
+ }
+} rvc_r1s;
+
+struct : public arg_t {
+ std::string to_string(insn_t insn) const {
+ return xpr_name[RVC_R2S];
+ }
+} rvc_r2s;
+
+struct : public arg_t {
+ std::string to_string(insn_t insn) const {
return fpr_name[insn.rvc_rs2s()];
}
} rvc_fp_rs2s;
@@ -1347,8 +1359,8 @@ void disassembler_t::add_instructions(const isa_parser_t* isa)
DISASM_INSN("cm.popretz", cm_popretz, 0, {&rvcm_pushpop_rlist, &rvcm_pop_stack_adj_64});
}
- DISASM_INSN("cm.mva01s", cm_mva01s, 0, {&rvc_rs1s, &rvc_rs2s});
- DISASM_INSN("cm.mvsa01", cm_mvsa01, 0, {&rvc_rs1s, &rvc_rs2s});
+ DISASM_INSN("cm.mva01s", cm_mva01s, 0, {&rvc_r1s, &rvc_r2s});
+ DISASM_INSN("cm.mvsa01", cm_mvsa01, 0, {&rvc_r1s, &rvc_r2s});
}
if (isa->extension_enabled(EXT_ZCMT)) {