[sim] cleaned up handling of link register
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Mon, 27 Dec 2010 22:28:45 +0000 (14:28 -0800)
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Mon, 27 Dec 2010 22:28:45 +0000 (14:28 -0800)
riscv/decode.h
riscv/insns/jal.h

index 903eef53b659c3647bbe0b099130bdc73adc53c0..189e1845cd5e18e781c3d5484e7a69677eacc413 100644 (file)
@@ -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]
index 7a7030714119227236c993fbf31909a8bef128db..bca7241ee87a4015f2ed1646e7ac83d21dbdc323 100644 (file)
@@ -1,2 +1,2 @@
-R[1] = npc;
+RA = npc;
 npc = JUMP_TARGET;