diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-09-04 13:39:42 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-09-04 13:39:42 -0700 |
commit | 784e9891af88db221b57bdffbea74d1c6bf99971 (patch) | |
tree | 3124895bbb1ed876d9951415696c7dd1bb06b208 /riscv/insns/c_lui.h | |
parent | 84b15dac7035f7e23fa821091ce97ae30ce2b0d8 (diff) | |
download | spike-784e9891af88db221b57bdffbea74d1c6bf99971.zip spike-784e9891af88db221b57bdffbea74d1c6bf99971.tar.gz spike-784e9891af88db221b57bdffbea74d1c6bf99971.tar.bz2 |
Move towards RVC v1.8
Diffstat (limited to 'riscv/insns/c_lui.h')
-rw-r--r-- | riscv/insns/c_lui.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/riscv/insns/c_lui.h b/riscv/insns/c_lui.h index 040d7ec..cb76c61 100644 --- a/riscv/insns/c_lui.h +++ b/riscv/insns/c_lui.h @@ -1,9 +1,6 @@ require_extension('C'); -require(insn.rvc_rd() != 0); -if (insn.rvc_imm() == 0) { // c.jalr - reg_t tmp = npc; - set_pc(RVC_RS1 & ~reg_t(1)); - WRITE_REG(X_RA, tmp); +if (insn.rvc_rd() == 0) { // c.addi16sp + WRITE_REG(X_SP, sext_xlen(RVC_SP + insn.rvc_addi16sp_imm())); } else { WRITE_RD(insn.rvc_imm() << 12); } |