]> Shamusworld >> Repos - rmac/commitdiff
Added optimization flags to makefile (how long was THAT missing?)
authorShamus Hammons <jlhamm@acm.org>
Thu, 14 Feb 2013 19:22:54 +0000 (13:22 -0600)
committerShamus Hammons <jlhamm@acm.org>
Thu, 14 Feb 2013 19:22:54 +0000 (13:22 -0600)
makefile
risca.c

index e817900a498eacfda3d2dcea50a5500b60f85870..5e377d3fd4d6d77ad7d6d4d2ea08cfe2834061b8 100644 (file)
--- a/makefile
+++ b/makefile
@@ -9,7 +9,7 @@ rm = /bin/rm -f
 CC = $(CROSS)gcc
 HOSTCC = gcc
 
-CFLAGS = -g -D__GCCUNIX__ -I. 
+CFLAGS = -g -D__GCCUNIX__ -I. -O2
 
 SRCS = amode.c debug.c direct.c eagen.c error.c expr.c listing.c mach.c macro.c mark.c object.c procln.c risca.c rmac.c sect.c symbol.c token.c 
 
diff --git a/risca.c b/risca.c
index 4d0aa2957564a93421f05b25e086b5d44004bf3a..f5821f5849fed3064db363f88626efee395d1982 100644 (file)
--- a/risca.c
+++ b/risca.c
@@ -768,16 +768,7 @@ int GenerateRISCCode(int state)
                        }
                        else
                        {
-#if 0
-                               val = eval;
-
-                               if (orgactive)
-                                       reg2 = ((int)(val - (orgaddr + 2))) / 2;
-                               else
-                                       reg2 = ((int)(val - (sloc + 2))) / 2;
-#else
                                reg2 = ((int)(eval - ((orgactive ? orgaddr : sloc) + 2))) / 2;
-#endif
 
                                if ((reg2 < -16) || (reg2 > 15))
                                        error("PC relative overflow");