From 9c403e729962054f961ed9d629b3b6a1745d8773 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 18 Oct 1989 11:39:19 +0000 Subject: [PATCH] Added mechanism to make peephole optimizer version bigger (needed for SUN-3) --- lang/cem/cemcom/Makefile | 9 ++++++--- lang/m2/comp/Makefile | 9 +++++++-- lang/pc/comp/Makefile | 9 +++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/lang/cem/cemcom/Makefile b/lang/cem/cemcom/Makefile index 7aeeefe42..210492285 100644 --- a/lang/cem/cemcom/Makefile +++ b/lang/cem/cemcom/Makefile @@ -96,6 +96,10 @@ COBJ = main.o idf.o declarator.o decspecs.o struct.o \ GCSRC = char.c symbol2str.c next.c GOBJ = char.o symbol2str.o next.o +# Extra object for generating peephole-optimizer-code-expander version. +# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH +EXTRA_O = + STRSRC = code.str declar.str decspecs.str def.str expr.str field.str \ estack.str util.str \ idf.str macro.str stack.str stmt.str struct.str switch.str type.str \ @@ -125,8 +129,7 @@ HFILES = $(HSRC) $(GHSRC) $(GHSTRSRC) GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \ print hfiles Cfiles $(GHSRC) $(GSRC) longnames $(LCSRC) -# include files containing ALLOCDEF specifications -OBJ = $(COBJ) $(LOBJ) $(GOBJ) +OBJ = $(COBJ) $(LOBJ) $(GOBJ) $(EXTRA_O) SRC = $(CSRC) $(LCSRC) $(GCSRC) LINT = /usr/bin/lint @@ -151,7 +154,7 @@ Emain: Cfiles Omain: Cfiles rm -f *.o - sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else mach=$(MACH); export mach; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' + sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else mach=$(MACH); export mach; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' @rm -f nmclash.o a.out CEmain: Cfiles diff --git a/lang/m2/comp/Makefile b/lang/m2/comp/Makefile index 8dffda1df..dbc4aae5f 100644 --- a/lang/m2/comp/Makefile +++ b/lang/m2/comp/Makefile @@ -66,7 +66,12 @@ COBJ = LLlex.o LLmessage.o char.o error.o main.o \ code.o tmpvar.o lookup.o Version.o next.o GENC= $(LSRC) symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c next.c SRC = $(CSRC) $(GENC) -OBJ = $(COBJ) $(LOBJ) Lpars.o + +# Extra object for generating peephole-optimizer-code-expander version. +# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH +EXTRA_O = + +OBJ = $(COBJ) $(LOBJ) Lpars.o $(EXTRA_O) GENH = errout.h \ idfsize.h numsize.h strsize.h target_sizes.h bigparam.h bigresult.h \ @@ -88,7 +93,7 @@ all: Cfiles Omain: Cfiles rm -f *.o - sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' + sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' @rm -f nmclash.o a.out CEmain: Cfiles diff --git a/lang/pc/comp/Makefile b/lang/pc/comp/Makefile index efd3fec55..aed9fb63a 100644 --- a/lang/pc/comp/Makefile +++ b/lang/pc/comp/Makefile @@ -65,7 +65,12 @@ COBJ = LLlex.o LLmessage.o body.o casestat.o char.o chk_expr.o code.o\ cstoper.o def.o desig.o enter.o error.o idf.o input.o label.o\ lookup.o main.o misc.o next.o node.o options.o readwrite.o\ scope.o symbol2str.o tmpvar.o tokenname.o type.o typequiv.o progs.o -OBJ = Lpars.o $(COBJ) $(LOBJ) + +# Extra object for generating peephole-optimizer-code-expander version. +# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH +EXTRA_O = + +OBJ = Lpars.o $(COBJ) $(LOBJ) $(EXTRA_O) # Keep the next entries up to date! GENCFILES= $(LSRC) Lpars.c symbol2str.c casestat.c tmpvar.c char.c next.c @@ -89,7 +94,7 @@ all: Cfiles Omain: Cfiles rm -f *.o - sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' + sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi' @rm -f nmclash.o a.out CEmain: Cfiles -- 2.34.1