aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/c_ldsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/insns/c_ldsp.h')
-rw-r--r--riscv/insns/c_ldsp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/riscv/insns/c_ldsp.h b/riscv/insns/c_ldsp.h
new file mode 100644
index 0000000..f196040
--- /dev/null
+++ b/riscv/insns/c_ldsp.h
@@ -0,0 +1,3 @@
+require_extension(EXT_ZCA);
+require(insn.rvc_rd() != 0);
+WRITE_RD(MMU.load<int64_t>(RVC_SP + insn.rvc_ldsp_imm()));