diff options
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/insns/c_flwsp.h | 1 | ||||
-rw-r--r-- | riscv/insns/c_lwsp.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/riscv/insns/c_flwsp.h b/riscv/insns/c_flwsp.h index d1e14fe..79058c4 100644 --- a/riscv/insns/c_flwsp.h +++ b/riscv/insns/c_flwsp.h @@ -4,5 +4,6 @@ if (xlen == 32) { require_fp; WRITE_FRD(f32(MMU.load_uint32(RVC_SP + insn.rvc_lwsp_imm()))); } else { // c.ldsp + require(insn.rvc_rd() != 0); WRITE_RD(MMU.load_int64(RVC_SP + insn.rvc_ldsp_imm())); } diff --git a/riscv/insns/c_lwsp.h b/riscv/insns/c_lwsp.h index ed4dcf3..b3d74db 100644 --- a/riscv/insns/c_lwsp.h +++ b/riscv/insns/c_lwsp.h @@ -1,2 +1,3 @@ require_extension('C'); +require(insn.rvc_rd() != 0); WRITE_RD(MMU.load_int32(RVC_SP + insn.rvc_lwsp_imm())); |