Fix bug where xs2 was not being properly respected.
authorStephen Twigg <sdtwigg@eecs.berkeley.edu>
Tue, 15 Oct 2013 07:21:00 +0000 (00:21 -0700)
committerStephen Twigg <sdtwigg@eecs.berkeley.edu>
Tue, 15 Oct 2013 07:21:00 +0000 (00:21 -0700)
riscv/rocc.cc

index a4766d4c8d41e628429017f2aee4c5817bde0b8d..2354f9fdda4ed76ac6b5d82691a2408321e95468 100644 (file)
@@ -15,7 +15,7 @@ union rocc_insn_union_t
     rocc_insn_union_t u; \
     u.i = insn; \
     reg_t xs1 = u.r.xs1 ? RS1 : -1; \
-    reg_t xs2 = u.r.xs1 ? RS2 : -1; \
+    reg_t xs2 = u.r.xs2 ? RS2 : -1; \
     reg_t xd = rocc->custom##n(u.r, xs1, xs2); \
     if (u.r.xd) \
       WRITE_RD(xd); \