aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/c_flwsp.h
blob: 79058c40a37d7b971640fc9877dc4be9ee91303b (plain)
1
2
3
4
5
6
7
8
9
require_extension('C');
if (xlen == 32) {
  require_extension('F');
  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()));
}