diff options
author | YenHaoChen <howard25336284@gmail.com> | 2024-02-16 10:32:52 +0800 |
---|---|---|
committer | YenHaoChen <howard25336284@gmail.com> | 2024-02-16 10:32:55 +0800 |
commit | d16f8b06dd000d243c9ff29c374abc17124ae5a1 (patch) | |
tree | c4e6484098344f8081d4c18ae88de2b3b432de54 /riscv/insns | |
parent | 7c890632ec91104fe6ccd9f16f70842c4412a1fd (diff) | |
download | riscv-isa-sim-d16f8b06dd000d243c9ff29c374abc17124ae5a1.zip riscv-isa-sim-d16f8b06dd000d243c9ff29c374abc17124ae5a1.tar.gz riscv-isa-sim-d16f8b06dd000d243c9ff29c374abc17124ae5a1.tar.bz2 |
Fix c.mop.N decoding
The c.mop.N only accepts rd={x1, x3, x5, x7, x9, x11, x13, x15}. The
previous implemention incorrectly accepts additional rd={x17, x19, x21,
x23, x25, x27, x29, x31}.
Diffstat (limited to 'riscv/insns')
-rw-r--r-- | riscv/insns/c_lui.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/c_lui.h b/riscv/insns/c_lui.h index 3e0e02f..7a82c13 100644 --- a/riscv/insns/c_lui.h +++ b/riscv/insns/c_lui.h @@ -4,7 +4,7 @@ if (insn.rvc_rd() == 2) { // c.addi16sp WRITE_REG(X_SP, sext_xlen(RVC_SP + insn.rvc_addi16sp_imm())); } else if (insn.rvc_imm() != 0) { // c.lui WRITE_RD(insn.rvc_imm() << 12); -} else if ((insn.rvc_rd() & 1) != 0) { // c.mop.N +} else if ((insn.rvc_rd() & 0x11) == 1) { // c.mop.N #include "c_mop_N.h" } else { require(false); |