]> Shamusworld >> Repos - rmac/commitdiff
Fixed regression in RISC JR cc, <label> handling.
authorShamus Hammons <jlhamm@acm.org>
Wed, 13 Feb 2013 03:01:34 +0000 (21:01 -0600)
committerShamus Hammons <jlhamm@acm.org>
Wed, 13 Feb 2013 03:01:34 +0000 (21:01 -0600)
risca.c

diff --git a/risca.c b/risca.c
index 868e1c5c465d934406a32599e5f511e402e0cf16..4d0aa2957564a93421f05b25e086b5d44004bf3a 100644 (file)
--- a/risca.c
+++ b/risca.c
@@ -776,7 +776,7 @@ int GenerateRISCCode(int state)
                                else
                                        reg2 = ((int)(val - (sloc + 2))) / 2;
 #else
                                else
                                        reg2 = ((int)(val - (sloc + 2))) / 2;
 #else
-                               reg2 = ((int)(eval - (orgactive ? orgaddr : sloc) + 2)) / 2;
+                               reg2 = ((int)(eval - ((orgactive ? orgaddr : sloc) + 2))) / 2;
 #endif
 
                                if ((reg2 < -16) || (reg2 > 15))
 #endif
 
                                if ((reg2 < -16) || (reg2 > 15))