diff --git a/riscv/decode.h b/riscv/decode.h index 903eef53..189e1845 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -173,6 +173,7 @@ private: #define RS1 R[insn.rtype.rs1] #define RS2 R[insn.rtype.rs2] #define RD do_writeback(R,insn.rtype.rd) +#define RA do_writeback(R,1) #define FRS1 FR[insn.ftype.rs1] #define FRS2 FR[insn.ftype.rs2] #define FRS3 FR[insn.ftype.rs3] diff --git a/riscv/insns/jal.h b/riscv/insns/jal.h index 7a703071..bca7241e 100644 --- a/riscv/insns/jal.h +++ b/riscv/insns/jal.h @@ -1,2 +1,2 @@ -R[1] = npc; +RA = npc; npc = JUMP_TARGET;