diff --git a/mach/6500/libbc/.distr b/mach/6500/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/6500/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/6500/libbc/Makefile b/mach/6500/libbc/Makefile deleted file mode 100644 index 6bc856bb5..000000000 --- a/mach/6500/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=6500" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/6500/libbc/compmodule b/mach/6500/libbc/compmodule deleted file mode 100755 index 881f78da9..000000000 --- a/mach/6500/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/6500/libcc/.distr b/mach/6500/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/6500/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/6500/libcc/Makefile b/mach/6500/libcc/Makefile deleted file mode 100644 index df0b2b353..000000000 --- a/mach/6500/libcc/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=6500" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" - -install: cpstdio cpgen cpmon - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/6500/libcc/compmodule b/mach/6500/libcc/compmodule deleted file mode 100755 index 881f78da9..000000000 --- a/mach/6500/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/6500/libm2/.distr b/mach/6500/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/6500/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/6500/libm2/Makefile b/mach/6500/libm2/Makefile deleted file mode 100644 index 45da9bace..000000000 --- a/mach/6500/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=s -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=6500" "SUF=$(SUF)" "ASAR=arch" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/6500/libm2/compmodule b/mach/6500/libm2/compmodule deleted file mode 100755 index 881f78da9..000000000 --- a/mach/6500/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/6500/liboc/.distr b/mach/6500/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/6500/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/6500/liboc/Makefile b/mach/6500/liboc/Makefile deleted file mode 100644 index 54288d34f..000000000 --- a/mach/6500/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=6500" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/6500/liboc/compmodule b/mach/6500/liboc/compmodule deleted file mode 100755 index 8dba8a441..000000000 --- a/mach/6500/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.s -else - exit 1 -fi diff --git a/mach/6500/libpc/.distr b/mach/6500/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/6500/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/6500/libpc/Makefile b/mach/6500/libpc/Makefile deleted file mode 100644 index af1866ee1..000000000 --- a/mach/6500/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=6500" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/6500/libpc/compmodule b/mach/6500/libpc/compmodule deleted file mode 100755 index 881f78da9..000000000 --- a/mach/6500/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/arm/libbc/.distr b/mach/arm/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/arm/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/arm/libbc/Makefile b/mach/arm/libbc/Makefile deleted file mode 100644 index e3767a118..000000000 --- a/mach/arm/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=so -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=arm" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/arm/libbc/compmodule b/mach/arm/libbc/compmodule deleted file mode 100755 index e83203742..000000000 --- a/mach/arm/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.so -else exit 1 -fi diff --git a/mach/arm/libcc/.distr b/mach/arm/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/arm/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/arm/libcc/Makefile b/mach/arm/libcc/Makefile deleted file mode 100644 index 354f57353..000000000 --- a/mach/arm/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=so -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=arm" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cpmon cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/arm/libcc/compmodule b/mach/arm/libcc/compmodule deleted file mode 100755 index ef488b788..000000000 --- a/mach/arm/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.so -else - exit 1 -fi diff --git a/mach/arm/libm2/.distr b/mach/arm/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/arm/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/arm/libm2/Makefile b/mach/arm/libm2/Makefile deleted file mode 100644 index c2477dec7..000000000 --- a/mach/arm/libm2/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -SUF=so -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=arm" "SUF=$(SUF)" -PCDEF="PREF=m2" "SUB=" "SRC=lang/m2/libm2" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_m2 - -../../compare tail_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/arm/libm2/compmodule b/mach/arm/libm2/compmodule deleted file mode 100755 index e83203742..000000000 --- a/mach/arm/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.so -else exit 1 -fi diff --git a/mach/arm/liboc/.distr b/mach/arm/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/arm/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/arm/liboc/Makefile b/mach/arm/liboc/Makefile deleted file mode 100644 index a95885bd1..000000000 --- a/mach/arm/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=so -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=arm" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/arm/liboc/compmodule b/mach/arm/liboc/compmodule deleted file mode 100755 index ef488b788..000000000 --- a/mach/arm/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.so -else - exit 1 -fi diff --git a/mach/arm/libpc/.distr b/mach/arm/libpc/.distr deleted file mode 100644 index abea6f095..000000000 --- a/mach/arm/libpc/.distr +++ /dev/null @@ -1,3 +0,0 @@ -LOCAL_FILES -Makefile -compmodule diff --git a/mach/arm/libpc/Makefile b/mach/arm/libpc/Makefile deleted file mode 100644 index bb50aaebb..000000000 --- a/mach/arm/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=so -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=arm" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/arm/libpc/compmodule b/mach/arm/libpc/compmodule deleted file mode 100755 index e83203742..000000000 --- a/mach/arm/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.so -else exit 1 -fi diff --git a/mach/em22/libbc/.distr b/mach/em22/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em22/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em22/libbc/Makefile b/mach/em22/libbc/Makefile deleted file mode 100644 index 80f08da67..000000000 --- a/mach/em22/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em22" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em22/libbc/compmodule b/mach/em22/libbc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em22/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em22/libcc/.distr b/mach/em22/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em22/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em22/libcc/Makefile b/mach/em22/libcc/Makefile deleted file mode 100644 index 894705ae0..000000000 --- a/mach/em22/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em22" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen cpmon cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em22/libcc/compmodule b/mach/em22/libcc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em22/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em22/libm2/.distr b/mach/em22/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em22/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em22/libm2/Makefile b/mach/em22/libm2/Makefile deleted file mode 100644 index 6bddbfd94..000000000 --- a/mach/em22/libm2/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em22" "SUF=$(SUF)" -M2DEF="PREF=m2" "SUB=" "SRC=lang/m2/libm2" - -all: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -install: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em22/libm2/compmodule b/mach/em22/libm2/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em22/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em22/liboc/.distr b/mach/em22/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em22/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em22/liboc/Makefile b/mach/em22/liboc/Makefile deleted file mode 100644 index b62a2bd21..000000000 --- a/mach/em22/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em22" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em22/liboc/compmodule b/mach/em22/liboc/compmodule deleted file mode 100755 index 8b30d1fdf..000000000 --- a/mach/em22/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.m -else - exit 1 -fi diff --git a/mach/em22/libpc/.distr b/mach/em22/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em22/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em22/libpc/Makefile b/mach/em22/libpc/Makefile deleted file mode 100644 index fb83f305b..000000000 --- a/mach/em22/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em22" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em22/libpc/compmodule b/mach/em22/libpc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em22/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em24/libbc/.distr b/mach/em24/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em24/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em24/libbc/Makefile b/mach/em24/libbc/Makefile deleted file mode 100644 index 176780b78..000000000 --- a/mach/em24/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em24" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em24/libbc/compmodule b/mach/em24/libbc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em24/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em24/libcc/.distr b/mach/em24/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em24/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em24/libcc/Makefile b/mach/em24/libcc/Makefile deleted file mode 100644 index 330d461cf..000000000 --- a/mach/em24/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em24" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen cpmon cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em24/libcc/compmodule b/mach/em24/libcc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em24/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em24/libm2/.distr b/mach/em24/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em24/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em24/libm2/Makefile b/mach/em24/libm2/Makefile deleted file mode 100644 index 170f35230..000000000 --- a/mach/em24/libm2/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em24" "SUF=$(SUF)" -M2DEF="PREF=m2" "SUB=" "SRC=lang/m2/libm2" - -all: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -install: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em24/libm2/compmodule b/mach/em24/libm2/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em24/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em24/liboc/.distr b/mach/em24/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em24/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em24/liboc/Makefile b/mach/em24/liboc/Makefile deleted file mode 100644 index b66afc7ab..000000000 --- a/mach/em24/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em24" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em24/liboc/compmodule b/mach/em24/liboc/compmodule deleted file mode 100755 index 8b30d1fdf..000000000 --- a/mach/em24/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.m -else - exit 1 -fi diff --git a/mach/em24/libpc/.distr b/mach/em24/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em24/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em24/libpc/Makefile b/mach/em24/libpc/Makefile deleted file mode 100644 index 2821c8520..000000000 --- a/mach/em24/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em24" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em24/libpc/compmodule b/mach/em24/libpc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em24/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em44/libbc/.distr b/mach/em44/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em44/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em44/libbc/Makefile b/mach/em44/libbc/Makefile deleted file mode 100644 index 716ff1f2e..000000000 --- a/mach/em44/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em44" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em44/libbc/compmodule b/mach/em44/libbc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em44/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em44/libcc/.distr b/mach/em44/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em44/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em44/libcc/Makefile b/mach/em44/libcc/Makefile deleted file mode 100644 index d2fdff0e2..000000000 --- a/mach/em44/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em44" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen cpmon cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em44/libcc/compmodule b/mach/em44/libcc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em44/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em44/libm2/.distr b/mach/em44/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em44/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em44/libm2/Makefile b/mach/em44/libm2/Makefile deleted file mode 100644 index 29db1d24e..000000000 --- a/mach/em44/libm2/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em44" "SUF=$(SUF)" -M2DEF="PREF=m2" "SUB=" "SRC=lang/m2/libm2" - -all: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -install: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(M2DEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em44/libm2/compmodule b/mach/em44/libm2/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em44/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/em44/liboc/.distr b/mach/em44/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em44/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em44/liboc/Makefile b/mach/em44/liboc/Makefile deleted file mode 100644 index 74ed9208b..000000000 --- a/mach/em44/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em44" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em44/liboc/compmodule b/mach/em44/liboc/compmodule deleted file mode 100755 index 8b30d1fdf..000000000 --- a/mach/em44/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.m -else - exit 1 -fi diff --git a/mach/em44/libpc/.distr b/mach/em44/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/em44/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/em44/libpc/Makefile b/mach/em44/libpc/Makefile deleted file mode 100644 index 07a2cd038..000000000 --- a/mach/em44/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=m -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=em44" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/em44/libpc/compmodule b/mach/em44/libpc/compmodule deleted file mode 100755 index 08ea80fe9..000000000 --- a/mach/em44/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.m -else exit 1 -fi diff --git a/mach/i386/libbc/.distr b/mach/i386/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i386/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i386/libbc/Makefile b/mach/i386/libbc/Makefile deleted file mode 100644 index 6885739d3..000000000 --- a/mach/i386/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i386" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i386/libbc/compmodule b/mach/i386/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i386/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i386/libcc/.distr b/mach/i386/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i386/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i386/libcc/Makefile b/mach/i386/libcc/Makefile deleted file mode 100644 index 350b2d57d..000000000 --- a/mach/i386/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i386" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cpmath - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cpmath: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmath - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmpmath: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i386/libcc/compmodule b/mach/i386/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i386/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i386/libm2/.distr b/mach/i386/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i386/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i386/libm2/Makefile b/mach/i386/libm2/Makefile deleted file mode 100644 index 472ea9ebc..000000000 --- a/mach/i386/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=i386" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i386/libm2/compmodule b/mach/i386/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/i386/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i386/liboc/.distr b/mach/i386/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i386/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i386/liboc/Makefile b/mach/i386/liboc/Makefile deleted file mode 100644 index 7f7e63ae6..000000000 --- a/mach/i386/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i386" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i386/liboc/compmodule b/mach/i386/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i386/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i386/libpc/.distr b/mach/i386/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i386/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i386/libpc/Makefile b/mach/i386/libpc/Makefile deleted file mode 100644 index f8f1e5e9c..000000000 --- a/mach/i386/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i386" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i386/libpc/compmodule b/mach/i386/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i386/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i80/libbc/.distr b/mach/i80/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i80/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i80/libbc/Makefile b/mach/i80/libbc/Makefile deleted file mode 100644 index 4dd52b755..000000000 --- a/mach/i80/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i80" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i80/libbc/compmodule b/mach/i80/libbc/compmodule deleted file mode 100755 index 17151513e..000000000 --- a/mach/i80/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -DCPM -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i80/libcc/.distr b/mach/i80/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i80/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i80/libcc/Makefile b/mach/i80/libcc/Makefile deleted file mode 100644 index aa42dea46..000000000 --- a/mach/i80/libcc/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i80" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" - -install: cpstdio cpgen cpmon - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i80/libcc/compmodule b/mach/i80/libcc/compmodule deleted file mode 100755 index 17151513e..000000000 --- a/mach/i80/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -DCPM -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i80/libm2/.distr b/mach/i80/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i80/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i80/libm2/Makefile b/mach/i80/libm2/Makefile deleted file mode 100644 index 07af6ab24..000000000 --- a/mach/i80/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=i80" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i80/libm2/compmodule b/mach/i80/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/i80/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i80/liboc/.distr b/mach/i80/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i80/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i80/liboc/Makefile b/mach/i80/liboc/Makefile deleted file mode 100644 index 68eb6a2c4..000000000 --- a/mach/i80/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i80" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i80/liboc/compmodule b/mach/i80/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i80/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i80/libpc/.distr b/mach/i80/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i80/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i80/libpc/Makefile b/mach/i80/libpc/Makefile deleted file mode 100644 index 1c55242da..000000000 --- a/mach/i80/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i80" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i80/libpc/compmodule b/mach/i80/libpc/compmodule deleted file mode 100755 index 17151513e..000000000 --- a/mach/i80/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -DCPM -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i86/cg/.distr b/mach/i86/cg/.distr deleted file mode 100644 index 10c4617eb..000000000 --- a/mach/i86/cg/.distr +++ /dev/null @@ -1,4 +0,0 @@ -Makefile -mach.c -mach.h -table diff --git a/mach/i86/cg/mach.c b/mach/i86/cg/mach.c deleted file mode 100644 index e6712d2a5..000000000 --- a/mach/i86/cg/mach.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - * - */ - -#ifndef NORCSID -static char rcs_m[]= "$Header$" ; -static char rcs_mh[]= ID_MH ; -#endif - -/* - * machine dependent back end routines for the Intel 8086 - */ - -con_part(sz,w) register sz; word w; { - - while (part_size % sz) - part_size++; - if (part_size == TEM_WSIZE) - part_flush(); - if (sz == 1) { - w &= 0xFF; - if (part_size) - w <<= 8; - part_word |= w; - } else { - assert(sz == 2); - part_word = w; - } - part_size += sz; -} - -con_mult(sz) word sz; { - long l; - - if (sz != 4) - fatal("bad icon/ucon size"); - l = atol(str); - fprintf(codefile,"\t.data2 %d,%d\n", - (int)l&0xFFFF,(int)(l>>16)&0xFFFF); -} - -#define CODE_GENERATOR -#define IEEEFLOAT -#define FL_MSL_AT_LOW_ADDRESS 0 -#define FL_MSW_AT_LOW_ADDRESS 0 -#define FL_MSB_AT_LOW_ADDRESS 0 -#include - -/* - -string holstr(n) word n; { - - sprintf(str,hol_off,n,holno); - return(mystrcpy(str)); -} -*/ - -prolog(nlocals) full nlocals; { - - fputs("\tpush\tbp\n\tmov\tbp,sp\n", codefile); - switch (nlocals) { - case 4: fputs("\tpush\tax\n", codefile); - case 2: fputs("\tpush\tax\n", codefile); - case 0: break; - default: - fprintf(codefile, "\tsub\tsp,%d\n",nlocals); break; - } -} - -#ifdef REGVARS -long si_off; -long di_off; -int firstreg; - -regscore(off, size, typ, score, totyp) - long off; -{ - if (size != 2) return -1; - score -= 1; - score += score; - if (typ == reg_pointer || typ == reg_loop) score += (score >> 2); - score -= 2; /* cost of saving */ - if (off >= 0) score -= 3; - return score; -} - -i_regsave() -{ - si_off = -1; - di_off = -1; - firstreg = 0; -} - -f_regsave() -{ -} - -regsave(regstr, off, size) - char *regstr; - long off; -{ - if (strcmp(regstr, "si") == 0) { - if (! firstreg) firstreg = -1; - si_off = off; - fputs("push si\n", codefile); - if (off >= 0) - fprintf(codefile, "mov si,%ld(bp)\n", off); - } - else { - if (! firstreg) firstreg = 1; - di_off = off; - fputs("push di\n", codefile); - if (off >= 0) - fprintf(codefile, "mov di,%ld(bp)\n", off); - } -} - -regreturn() -{ - if (firstreg == 1) { - if (si_off != -1) fputs("jmp .sdret\n", codefile); - else fputs("jmp .dret\n", codefile); - } - else if (firstreg == -1) { - if (di_off != -1) fputs("jmp .dsret\n", codefile); - else fputs("jmp .sret\n", codefile); - } - else fputs("jmp .cret\n", codefile); -} -#endif REGVARS - -mes(type) word type ; { - int argt ; - - switch ( (int)type ) { - case ms_ext : - for (;;) { - switch ( argt=getarg( - ptyp(sp_cend)|ptyp(sp_pnam)|sym_ptyp) ) { - case sp_cend : - return ; - default: - strarg(argt) ; - fprintf(codefile, ".define %s\n",argstr) ; - break ; - } - } - default : - while ( getarg(any_ptyp) != sp_cend ) ; - break ; - } -} - -char *segname[] = { - ".sect .text", /* SEGTXT */ - ".sect .data", /* SEGCON */ - ".sect .rom", /* SEGROM */ - ".sect .bss" /* SEGBSS */ -}; diff --git a/mach/i86/cg/mach.h b/mach/i86/cg/mach.h deleted file mode 100644 index f420abab3..000000000 --- a/mach/i86/cg/mach.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - */ -#ifndef NORCSID -#define ID_MH "$Header$" -#endif - -#define ex_ap(y) fprintf(codefile,".extern %s\n",y) -#define in_ap(y) /* nothing */ - -#define newilb(x) fprintf(codefile,"%s:\n",x) -#define newdlb(x) fprintf(codefile,"%s:\n",x) -#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y) -#define newlbss(l,x) fprintf(codefile,"%s: .space\t%d\n",l,x); - -#define cst_fmt "%d" -#define off_fmt "%d" -#define ilb_fmt "I%x_%d" -#define dlb_fmt "I_%d" -#define hol_fmt "hol%d" - -#define loc_off "%d(bp)" -#define arg_off "4+%d(bp)" -#define hol_off "%ld+hol%d" - -#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) -#define con_ilb(x) fprintf(codefile,".data2\t%s\n",x) -#define con_dlb(x) fprintf(codefile,".data2\t%s\n",x) - -#define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n" - -#define fmt_id(fr,to) sprintf(to, "_%s", fr) - -#define BSS_INIT 0 diff --git a/mach/i86/cg/table b/mach/i86/cg/table deleted file mode 100644 index a4b4796f2..000000000 --- a/mach/i86/cg/table +++ /dev/null @@ -1,2895 +0,0 @@ -"$Header$" -/* - * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands. - * - * This product is part of the Amsterdam Compiler Kit. - * - * Permission to use, sell, duplicate or disclose this software must be - * obtained in writing. Requests for such permissions may be sent to - * - * Dr. Andrew S. Tanenbaum - * Wiskundig Seminarium - * Vrije Universiteit - * Postbox 7161 - * 1007 MC Amsterdam - * The Netherlands - * - */ - -#define SL 4 -#define SSL "4" - -#define REGVARS - -/******************************************************** - * Back end tables for Intel 8086 * - * Author : Ed Keizer * - * Added register variables: Ceriel Jacobs - * * - * wordsize = 2 bytes, pointersize = 2 bytes. * - * * - * Register bp is used as LB, sp is used for SP. * - * Some global variables are used: * - * - .reghp : the heap pointer * - * - .ignmask : trap ignore mask * - * - .trppc : address of user defined trap handler * - * * - * Floating point arithmetic and constants are not * - * implemented. - * * - ********************************************************/ - -/* #define DEEPER 1 -/* When DEEPER is disabled, the table contains some - heuristics based on the assumption that look-ahead will - be minimal. - Example: Addition of constants to registers will no take - place via ax, but in an address register, in the rules for ads. - Thereby assuming that the resulting register will be used - to access memory. - When DEEPER is enabled these heuristics are disabled - thereby allowing the code-generator too see for itself - which code will be shorter. -*/ - -#define SPEED 1 -/* This definition produces a slightly different table, - producing slightly less efficient code with greater speed -*/ - -#ifdef SPEED - -#define NO nocoercions : - -#else - -#define NO - -#endif - -EM_WSIZE=2 -EM_PSIZE=2 -EM_BSIZE=SL - -SIZEFACTOR=5 - -REGISTERS: - -al = ("al", 2), REG1, ACC1. -ah = ("ah", 2), REG1. -bl = ("bl", 2), REG1. -bh = ("bh", 2), REG1. -cl = ("cl", 2), REG1, SHIFT_CREG. -ch = ("ch", 2), REG1. -dl = ("dl", 2), REG1. -dh = ("dh", 2), REG1. -ax = ("ax", 2, al, ah), REG, GENREG, ACC. -cx = ("cx", 2, cl, ch), REG, GENREG, CXREG, SHIFT_CREG. -dx = ("dx", 2, dl, dh), REG, GENREG, DXREG. -bx = ("bx", 2, bl, bh), REG, GENREG, BREG, BXREG, ADDREG. -#ifdef REGVARS -si = ("si", 2) regvar, RREG, RADDREG. -di = ("di", 2) regvar, RREG, RADDREG. -#else -si = ("si", 2), REG, IREG, SIREG, ADDREG. -di = ("di", 2), REG, IREG, DIREG, ADDREG. -#endif -bp = ("bp", 2), BREG. - -TOKENS: - -/******************************** - * Types on the EM-machine * - ********************************/ - -ANYCON = { INT val ; } 2 cost=(2, 1) "%[val]" -ADDR_EXTERN = { STRING off ; } 2 cost=(2, 1) "%[off]" -EXTERN1 = { STRING off ; } 2 cost=(2,12) "(%[off])" -EXTERN2 = { STRING off ; } 2 cost=(2,12) "(%[off])" -ADDR_LOCAL = { INT ind ; } 2 cost=(1, 9) "%[ind](bp)" -LOCAL2 = { INT ind, size ; } 2 cost=(1,15) "%[ind](bp)" -LOCAL1 = { INT ind, size ; } 2 cost=(1,15) "%[ind](bp)" - - -/******************************************************** - * Now mostly addressing modes of target machine * - ********************************************************/ - - -/***************************************** - * 'Half modes' consisting of summations * - * of constant and or register(s) * - *****************************************/ - -Xreg_off = { REGISTER reg; STRING off; } 2 cost=(1, 9) "%[off](%[reg])" -Xbpreg_off = { REGISTER reg; INT ind; } 2 cost=(1,11) "%[ind](bp)(%[reg])" -Rreg_off = { REGISTER reg; STRING off; } 2 cost=(1, 9) "%[off](%[reg])" -Rbpreg_off = { REGISTER reg; INT ind; } 2 cost=(1,11) "%[ind](bp)(%[reg])" - -/************************************************** - * Indirect through registers and the modes above * - * Token names ending on digits are indirect * - **************************************************/ - - -ind_reg2 = { REGISTER reg; } 2 cost=(0,11) "(%[reg])" -ind_regoff2 = { REGISTER reg; STRING off; } 2 cost=(1,15) "%[off](%[reg])" -ind_bpregoff2 = { REGISTER reg; INT ind; } 2 cost=(1,18) - "%[ind](bp)(%[reg])" - -ind_reg1 = { REGISTER reg; } 2 cost=(0,11) "(%[reg])" -ind_regoff1 = { REGISTER reg; STRING off; } 2 cost=(1,15) "%[off](%[reg])" -ind_bpregoff1 = { REGISTER reg; INT ind; } 2 cost=(1,18) - "%[ind](bp)(%[reg])" - -TOKENEXPRESSIONS: - -/* SCRATCH REGISTERS */ -X_ACC = ACC*SCRATCH -X_ACC1 = ACC1*SCRATCH -X_REG = REG*SCRATCH -X_BXREG = BXREG*SCRATCH -X_DXREG = DXREG*SCRATCH -X_CXREG = CXREG*SCRATCH -#ifndef REGVARS -X_SIREG = SIREG*SCRATCH -X_DIREG = DIREG*SCRATCH -#endif -X_ADDREG = ADDREG*SCRATCH - -#ifdef REGVARS -IREG = RREG -#endif - -/* Mode refering to a word in memory */ -memory2 = EXTERN2 + ind_reg2 + ind_regoff2 + ind_bpregoff2 + LOCAL2 - -/* Mode refering to a byte in memory */ -memory1 = EXTERN1 + ind_reg1 + ind_regoff1 + ind_bpregoff1 + LOCAL1 - -/* Modes allowed in instructions */ -const = ANYCON + ADDR_EXTERN -register = REG -#ifdef REGVARS - + RREG -#endif -anyreg = register + BREG -addreg = ADDREG -#ifdef REGVARS - + RADDREG -#endif -rm = anyreg + memory2 -rmnoacc = RREG + BREG + CXREG + memory2 -rmorconst = const + rm -noregvar = const + REG + BREG + memory2 -regorconst = const + anyreg -#ifdef REGVARS -/* Needed because there is a shortage of ADDREG-registers. - This is the main penalty for having register variables. -*/ -regorconstnoaddr = const + RREG + ACC + CXREG + DXREG -#else -regorconstnoaddr = regorconst -#endif -dest = register + memory2 - -rm1 = REG1 + memory1 -rmorconst1 = const + rm1 -regorconst12 = REG1 + GENREG + const -dest1 = REG1 + memory1 - -/* Modes used to indicate tokens to be removed from the fakestack */ -reg_indexed = ind_reg2 + ind_regoff2 + ind_reg1 + ind_regoff1 -lb_indexed = ind_bpregoff2 + ind_bpregoff1 -indexed = reg_indexed + lb_indexed -externals = EXTERN2 + EXTERN1 -locals = LOCAL2 + LOCAL1 -all_locals = locals + lb_indexed -indirects = externals + reg_indexed -referals = indirects + locals - -/* Miscellaneous */ -reg_off = Xreg_off + Rreg_off -bpreg_off = Xbpreg_off + Rbpreg_off -halfindir = reg_off + bpreg_off + ADDR_LOCAL -a_word = rmorconst + rm1 + halfindir -no_reg_off = rmorconst + rm1 + ADDR_LOCAL -#ifdef REGVARS -uses_bx = ADDREG + Xreg_off + Xbpreg_off -#endif - -CODE: - -/******************************************************** - * Group 1 : load instructions. * - * * - * For most load instructions no code is generated. * - * Action : put something on the fake-stack. * - ********************************************************/ - -loc | | | {ANYCON, $1} | | -ldc | | | {ANYCON, highw(1)} {ANYCON, loww(1)} | | -#ifdef REGVARS -lol inreg($1)==2 | | | regvar($1) | | -#endif -lol | | | {LOCAL2, $1, 2} | | -loe | | | {EXTERN2, $1} | | -loe loe $1==$2 | | allocate(REG={EXTERN2, $1}) | %[a] %[a] | | -#ifdef REGVARS -lol lol $1==$2 && inreg($1)!=2 - | | allocate(REG={LOCAL2, $1, 2})| %[a] %[a] | | -#else -lol lol $1==$2 | | allocate(REG={LOCAL2, $1, 2})| %[a] %[a] | | -#endif -#ifdef REGVARS -lil inreg($1)==2 | | | {ind_reg2, regvar($1)} | | -#endif -lil | | allocate(ADDREG={ind_regoff2, bp, tostring($1)}) - | {ind_reg2, %[a]} | | -lof | nocoercions : reg_off | - | {ind_regoff2, %[1.reg], - %[1.off]+"+"+tostring($1)} | | -... | addreg | | {ind_regoff2,%[1],tostring($1)} | | -... | nocoercions : bpreg_off | - | {ind_bpregoff2,%[1.reg], %[1.ind]+$1} | | -... | nocoercions : ADDR_EXTERN| - | {EXTERN2,%[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_LOCAL | - | {LOCAL2, %[1.ind] + $1,2} | | -lal | | | {ADDR_LOCAL, $1} | | -lae | | | {ADDR_EXTERN, $1} | | -lpb | | | | adp SL | -lxl $1==0 | | | {ADDR_LOCAL, 0} | | -lxl $1==1 | | | {LOCAL2 ,SL, 2} | | -lxl $1==2 | | allocate(ADDREG={ind_regoff2, bp, SSL}) - | {ind_regoff2,%[a], SSL} | | -lxl $1>2 | | allocate(ADDREG={ind_regoff2, bp, SSL}, - CXREG={ANYCON,$1-1}) - "1:\tmov %[a],4(%[a])" - "loop 1b" - samecc erase(%[a]) erase(%[b]) - | %[a] | | -lxa $1==0 | | | {ADDR_LOCAL, SL} | | -lxa $1==1 | | allocate(ADDREG={ind_regoff2, bp, SSL }) - | {Xreg_off, %[a], SSL } | | -lxa $1==2 | | allocate(ADDREG={ind_regoff2, bp, SSL }) - move({ind_regoff2, %[a], SSL }, %[a]) - | {Xreg_off, %[a], SSL } | | -lxa $1 > 2 | | allocate(ADDREG={ind_regoff2,bp,SSL}, - CXREG={ANYCON,$1-1}) - "1:\tmov %[a],4(%[a])" - "loop 1b" - samecc erase(%[a]) erase(%[b]) - | {Xreg_off, %[a], SSL } | | -dch | | | | loi 2 | -loi $1==2 | addreg | | {ind_reg2, %[1]} | | -... | nocoercions : reg_off | - | {ind_regoff2, %[1.reg], %[1.off]} | | -... | nocoercions : bpreg_off | - | {ind_bpregoff2, %[1.reg], %[1.ind]} | | -... | nocoercions : ADDR_EXTERN| - | {EXTERN2, %[1.off]} | | -... | nocoercions : ADDR_LOCAL | - | {LOCAL2, %[1.ind],2} | | -loi $1==1 | addreg | | {ind_reg1, %[1]} | | -... | nocoercions : reg_off | - | {ind_regoff1, %[1.reg], %[1.off]} | | -... | nocoercions : bpreg_off | - | {ind_bpregoff1, %[1.reg], %[1.ind]} | | -... | nocoercions : ADDR_EXTERN | - | {EXTERN1, %[1.off]} | | -... | nocoercions : ADDR_LOCAL | - | {LOCAL1, %[1.ind],1} | | -loi $1==4 | addreg | | {ind_regoff2,%[1],"2"} {ind_reg2,%[1]}| | -... | nocoercions : reg_off | - | {ind_regoff2,%[1.reg], %[1.off]+"+2"} - {ind_regoff2,%[1.reg], %[1.off]} | | -... | nocoercions : bpreg_off | - | {ind_bpregoff2, %[1.reg], %[1.ind]+2} - {ind_bpregoff2, %[1.reg], %[1.ind]} | | -... | nocoercions : ADDR_LOCAL | | - {LOCAL2,%[1.ind]+2,2} {LOCAL2,%[1.ind],2} | | -... | nocoercions : ADDR_EXTERN| | {EXTERN2, %[1.off]+"+2"} - {EXTERN2, %[1.off]} | | -/* -loi $1>4 | noregvar | - remove(ALL) - allocate(CXREG={ANYCON,$1/2}) - "mov ax,si" - "mov bx,di" - "mov si,%[1]" - "sub sp,%($1%)" - "mov di,sp" - "rep movs" - "mov si,ax" - "mov di,bx" - erase(%[a]) | | | (16,16+$1*9) -WRONG! */ -loi $1>4 | X_BXREG | - remove(ALL) - allocate(CXREG={ANYCON,$1}) - "call .loi" - erase(%[a]) erase(%[1]) | | | (3,40+$1*9) -los $1==2 | X_CXREG X_BXREG | - remove(ALL) - "call .los" - erase(%[1]) erase(%[2]) | | | -los !defined($1)| rm X_CXREG X_BXREG | - remove(ALL) - "cmp %[1],2" - "jne .unknown" - "call .los" - erase(%[2]) erase(%[3]) | | | -ldl | | | {LOCAL2, $1+2,2} {LOCAL2, $1,2} | | -lde | | | {EXTERN2, $1+"+2"} {EXTERN2, $1} | | -ldf | nocoercions : reg_off | - | {ind_regoff2, %[1.reg], - %[1.off]+"+2+"+tostring($1)} - {ind_regoff2, %[1.reg], - %[1.off]+"+"+tostring($1)} | | -... | addreg | - | {ind_regoff2, %[1], tostring($1+2)} - {ind_regoff2, %[1], tostring($1)} | | -... | nocoercions : bpreg_off | - | {ind_bpregoff2,%[1.reg], %[1.ind]+2+$1} - {ind_bpregoff2,%[1.reg], %[1.ind]+$1} | | -... | nocoercions : ADDR_EXTERN | - | {EXTERN2,%[1.off]+"+2+"+tostring($1)} - {EXTERN2,%[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_LOCAL | - | {LOCAL2, %[1.ind] + $1 + 2, 2} - {LOCAL2, %[1.ind] + $1, 2} | | -lpi | | | {ADDR_EXTERN, $1} | | -/* This code sequence is generated by the C-compiler to tackle - char parameters, on the 8086 it reduces to nil */ -lol lal sti $1==$2 && $3<=2 | | | | | - -/**************************************************************** - * Group 2 : Store instructions. * - * * - * These instructions are likely to ruin the fake-stack. * - * We don't expect many items on the fake-stack anyway * - * because we seem to have evaluated an expression just now. * - ****************************************************************/ - -#ifdef REGVARS -stl inreg($1)==2 - | rmorconst | - remove(regvar($1)) - move(%[1], regvar($1)) | | | -... | nocoercions : STACK | - remove(regvar($1)) - "pop %(regvar($1)%)" samecc | | |(1,8) -#endif -stl | regorconst | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - move(%[1],{ind_regoff2,bp,tostring($1)})| | | -... | nocoercions : STACK | - "pop $1(bp)" samecc | | |(2,26) -ste | regorconst | - remove(indirects) - move(%[1], {EXTERN2, $1 }) | | | -... | nocoercions : STACK | "pop ($1)" samecc | | | -#ifdef REGVARS -sil inreg($1)==2| regorconst | - remove(referals) - move(%[1],{ind_reg2, regvar($1)}) | | | -... | nocoercions : STACK | - "pop (%(regvar($1)%))" samecc | | |(2,26) -#endif -sil | regorconstnoaddr | - allocate(ADDREG={ind_regoff2, bp, tostring($1)}) - remove(referals) - move(%[1], {ind_reg2, %[a]}) | | | -... | STACK | - allocate(ADDREG={ind_regoff2, bp, tostring($1)}) - remove(referals) - "pop (%[a])" samecc | | | (2,26) -stf | addreg regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1],tostring($1)})| | | -... | nocoercions : addreg STACK | - remove(referals) - "pop $1(%[1])" samecc | | | -... | reg_off regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1.reg], - %[1.off]+"+"+tostring($1)}) | | | -... | nocoercions : halfindir STACK | - remove(referals) - "pop $1+%[1]" samecc | | | -... | nocoercions : ADDR_LOCAL | | | stl %[1.ind]+$1 | -... | bpreg_off regorconst | - remove(all_locals) - remove(indexed) - move(%[2],{ind_bpregoff2,%[1.reg], - %[1.ind]+$1}) | | | -/* -... | ADDR_EXTERN regorconst | - remove(indirects) - move(%[2],{EXTERN2,%[1.off]+"+"+tostring($1)})| | | -*/ -sti $1==2 | addreg regorconst | - remove(referals) - move(%[2],{ind_reg2,%[1]}) | | | -... | nocoercions : addreg STACK | - remove(referals) - "pop (%[1])" samecc | | | -... | reg_off regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1.reg],%[1.off]}) | | | -... | nocoercions : reg_off STACK | - remove(referals) - "pop %[1]" samecc | | | -... | nocoercions : ADDR_LOCAL | | | stl %[1.ind] | -... | bpreg_off regorconst | - remove(all_locals) - remove(indexed) - move(%[2],{ind_bpregoff2,%[1.reg], %[1.ind]}) | | | -... | nocoercions : bpreg_off STACK | - remove(all_locals) - remove(indexed) - "pop %[1]" samecc | | | -... | ADDR_EXTERN regorconst | - remove(indirects) - move(%[2],{EXTERN2,%[1.off]}) | | | -... | nocoercions : ADDR_EXTERN STACK | - remove(indirects) - "pop (%[1])" samecc | | | -sti $1==1 | addreg regorconst12 | - remove(referals) - move(%[2],{ind_reg1,%[1]}) | | | -... | reg_off regorconst12 | - remove(referals) - move(%[2],{ind_regoff1,%[1.reg],%[1.off]}) | | | -... | bpreg_off regorconst12 | - remove(all_locals) - remove(indexed) - move(%[2],{ind_bpregoff1,%[1.reg], %[1.ind]}) | | | -... | ADDR_EXTERN regorconst12 | - remove(indirects) - move(%[2],{EXTERN1,%[1.off]}) | | | -... | ADDR_LOCAL regorconst12 | - remove(indexed) - remove(locals, - %[ind]<=%[1.ind] && %[ind]+%[size]>%[1.ind] ) - move(%[2],{LOCAL1, %[1.ind], 1}) - | | | -sti $1==4 | addreg regorconst regorconst | - remove(referals) - move(%[2],{ind_reg2,%[1]}) - move(%[3],{ind_regoff2,%[1],"2"}) | | | -... | reg_off regorconst regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1.reg],%[1.off]}) - move(%[3],{ind_regoff2,%[1.reg],%[1.off]+"+2"})| | | -... | bpreg_off regorconst regorconst | - remove(all_locals) - remove(indexed) - move(%[2],{ind_bpregoff2,%[1.reg], %[1.ind]}) - move(%[3],{ind_bpregoff2,%[1.reg], %[1.ind]+2})| | | -... | ADDR_EXTERN regorconst regorconst | - remove(indirects) - move(%[2],{EXTERN2,%[1.off]}) - move(%[3],{EXTERN2,%[1.off]+"+2"}) | | | -... | ADDR_LOCAL regorconst regorconst | - remove(indexed) - remove(locals, %[ind]>=%[1.ind] && %[ind]<%[1.ind]+4 ) - move(%[2],{ind_regoff2, bp, tostring(%[1.ind])}) - move(%[3],{ind_regoff2, bp, - tostring(%[1.ind]+2)})| | | -/* -sti $1>4 | noregvar | - remove(ALL) - allocate(CXREG={ANYCON,$1/2}) - "mov ax,si" - "mov bx,di" - "mov si,sp" - "mov di,%[1]" - "rep movs" - "mov sp,si" - "mov si,ax" - "mov di,bx" - erase(%[a]) | | | (14,12+$1*8) -WRONG! */ -sti $1>4 | X_BXREG | - remove(ALL) - allocate(CXREG={ANYCON,$1}) - "call .sti" - erase(%[a]) erase(%[1]) | | | (3,40+$1*9) -/* This sort of construction gives problems in the codegenerator - because of the potential verly large lookahead -... | X_ADDREG | - remove(ALL) - "pop (%[1])" - "add %[1],2" - erase(%[1]) | %[1] | sti $1-2 | (5,30) -*/ -sts $1==2 | X_CXREG X_BXREG | - remove(ALL) - "call .sts" - erase(%[1]) erase(%[2]) | | | -sdl | regorconst regorconst | | %[2] %[1] | stl $1 stl $1+2 | -... | nocoercions: STACK | | | stl $1 stl $1+2 | -sde | regorconst regorconst | | %[2] %[1] | ste $1 ste $1+"+2" | -... | nocoercions: STACK | | | ste $1 ste $1+"+2" | -sdf | addreg regorconst regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1],tostring($1)}) - move(%[3],{ind_regoff2,%[1],tostring($1+2)})| | | -... | nocoercions : addreg STACK | - remove(referals) - "pop $1(%[1])" - "pop %($1+2%)(%[1])" samecc | | | -... | reg_off regorconst regorconst | - remove(referals) - move(%[2],{ind_regoff2,%[1.reg], - %[1.off]+"+"+tostring($1)}) - move(%[3],{ind_regoff2,%[1.reg], - %[1.off]+"+"+tostring($1+2)}) | | | -... | nocoercions : halfindir STACK | - remove(referals) - "pop $1+%[1]" - "pop %($1+2%)+%[1]" samecc | | | - /* Funny things happen when the sign changes in the stl parameters */ -... | nocoercions: ADDR_LOCAL | | | stl %[1.ind]+$1 stl %[1.ind]+$1+2 | -... | bpreg_off regorconst regorconst | - remove(all_locals) - remove(indexed) - move(%[2],{ind_bpregoff2,%[1.reg], - %[1.ind]+$1}) - move(%[3],{ind_bpregoff2,%[1.reg], - %[1.ind]+$1+2}) | | | -... | halfindir regorconst | - remove(referals) - "mov %[1],%[2]" - samecc | %[1] | stf $1+2 | (0,12)+%[1]+%[2]+%[1] - -/**************************************************************** - * Group 3 : Integer arithmetic. * - * * - * Implemented (sometimes with the use of subroutines) : * - * all 2 and 4 byte arithmetic. * - ****************************************************************/ - -adi $1==2 | NO X_REG rmorconst | - "add %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | rmorconst X_REG | - "add %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "add %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "add %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -adi $1==4 | NO X_REG X_REG rmorconst rmorconst | - "add %[1],%[3]" - "adc %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(4,6)+%[4]+%[3] -... | nocoercions: X_ACC X_REG const rmorconst | - "add %[1],%[3]" - "adc %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(5,7)+%[4] -... | rmorconst rmorconst X_REG X_REG | - "add %[3],%[1]" - "adc %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(4,6)+%[1]+%[2] -... | nocoercions: const rmorconst X_ACC X_REG | - "add %[3],%[1]" - "adc %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(5,7)+%[2] -adi !defined($1)| X_CXREG X_ACC | - remove(ALL) - "call .adi" - erase(%[1]) erase(%[2]) | ax | | -sbi $1==2 | rmorconst X_REG | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | const X_ACC | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -... | NO X_REG rmorconst | - "sub %[1],%[2]" - "neg %[1]" - erase(%[1]) setcc(%[1]) | %[1] | | (4,6) + %[2] -... | NO X_ACC const | - "sub %[1],%[2]" - "neg %[1]" - erase(%[1]) setcc(%[1]) | %[1] | | (5,7) -sbi $1==4 | rmorconst rmorconst X_REG X_REG | - "sub %[3],%[1]" - "sbb %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(4,6)+%[1]+%[2] -... | nocoercions: const rmorconst-ACC X_ACC X_REG | - "sub %[3],%[1]" - "sbb %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(5,7)+%[2] -sbi !defined($1)| X_CXREG X_ACC | - remove(ALL) - "call .sbi" - erase(%[1]) erase(%[2]) | ax | | -mli $1==2 | X_ACC rm | - allocate(%[2],DXREG) - "mul %[2]" - /* mul and imul have same low order result - but mul is faster - */ - nocc erase(%[1]) | %[1] | |(2,118)+%[2] -... | rmnoacc rmorconst | - allocate(%[2],ACC=%[2],DXREG) - "mul %[1]" - nocc erase(%[a]) | ax | |(2,118)+%[1] -mli $1==4 | X_ACC X_DXREG | - remove(ALL) - "call .mli4" - erase(ax) erase(dx) setcc(dx) | dx ax | | -/* Not now, -mli !defined($1)| X_ACC | - remove(ALL) - "call .mli" | | | -*/ -dvi $1==2 | rmnoacc rmorconst | - allocate(%[2], ACC=%[2], DXREG) - "cwd" - "idiv %[1]" - erase(%[a]) | ax | |(3,176)+%[1] -dvi $1==4 | | remove(ALL) - "call .dvi4" | dx ax | | -/* -dvi !defined($1)| X_ACC | - remove(ALL) - "call .dvi" erase(%[1]) | | | -*/ -rmi $1==2 | rmnoacc rmorconst | - allocate(%[2], ACC=%[2], DXREG) - "cwd" - "idiv %[1]" - erase(%[a]) | dx | |(3,176)+%[1] -rmi $1==4 | | remove(ALL) - "call .rmi4" | dx ax | | -/* -rmi !defined($1)| X_ACC | - remove(ALL) - "call .rmi" erase(%[1]) | | | -*/ -ngi $1==2 | X_REG | - "neg %[1]" - setcc(%[1]) erase(%[1]) | %[1] | |(2,3) -ngi $1==4 | X_REG X_REG | - "neg %[2]" - "neg %[1]" - "sbb %[2],0" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | | (8,10) -/* -ngi !defined($1)| X_ACC | - remove(ALL) - "call .ngi" | | | -*/ -loc sli $1==1 && $2==2 | X_REG | - "sal %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | | (2,2) -loc sli $1==1 && $2==4 | X_REG X_REG | - "sal %[1],1" - "rcl %[2],1" - erase(%[1]) erase(%[2]) | %[2] %[1] | | -loc sli $1==16 && $2==4 | rmorconst rmorconst | | %[1] {ANYCON, 0} | | -sli $1==2 | SHIFT_CREG X_REG | - "sal %[2],cl" - setcc(%[2]) erase(%[2]) | %[2] | | (2,8) -sli $1==4 | X_CXREG X_REG X_REG | - "jcxz 1f" - "2: sal %[2],1" - "rcl %[3],1" - "loop 2b\n1:" - erase(%[1]) erase(%[2]) erase(%[3]) - | %[3] %[2] | | -/* -sli !defined($1)| X_ACC | - remove(ALL) - "call .sli" | | | -*/ -loc sri $1==1 && $2==2 | X_REG | - "sar %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | | (2,2) -loc sri $1==1 && $2==4 | X_REG X_REG | - "sar %[2],1" - "rcr %[1],1" - erase(%[1]) erase(%[2]) | %[2] %[1] | | -sri $1==2 | SHIFT_CREG X_REG | - "sar %[2],cl" - setcc(%[2]) erase(%[2]) | %[2] | | (2,8) -sri $1==4 | X_CXREG X_REG X_REG | - "jcxz 1f" - "2: sar %[3],1" - "rcr %[2],1" - "loop 2b\n1:" - erase(%[1]) erase(%[2]) erase(%[3]) - | %[3] %[2] | | -/* -sri !defined($1)| X_ACC | - remove(ALL) - "call .sri" | | | -*/ - - -/************************************************ - * Group 4 : unsigned arithmetic * - * * - * adu = adi * - * sbu = sbi * - * slu = sli * - * mlu = mli * - * * - * Supported : 2- and 4 byte arithmetic. * - ************************************************/ - -adu | | | | adi $1 | -sbu | | | | sbi $1 | -mlu | | | | mli $1 | -dvu $1==2 | rmnoacc rmorconst | - allocate(%[2],ACC=%[2],DXREG={ANYCON,0}) - "div %[1]" - erase(%[b]) erase(%[a]) | ax | |(2,149)+%[1] -dvu $1==4 | | remove(ALL) - "call .dvu4" | dx ax | | -/* -dvu !defined($1)| X_ACC | - remove(ALL) - "call .dvu" erase(%[1]) | | | -*/ -rmu $1==2 | rmnoacc rmorconst | - allocate(%[2],ACC=%[2],DXREG={ANYCON,0}) - "div %[1]" - erase(%[b]) erase(%[a]) | dx | |(3,149)+%[1] -rmu $1==4 | | remove(ALL) - "call .rmu4" | dx ax | | -/* -rmu !defined($1)| X_ACC | - remove(ALL) - "call .rmu" erase(%[1]) | | | -*/ -slu | | | | sli $1 | -loc slu | | | | loc $1 sli $2 | -lol loc slu | | | | lol $1 loc $2 sli $3 | -loc sru $1==1 && $2==2 | X_REG | - "shr %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | | (2,2) -loc sru $1==16 && $2==4 | rmorconst rmorconst | | {ANYCON, 0} %[2] | | -sru $1==2 | SHIFT_CREG X_REG | - "shr %[2],cl" - setcc(%[2]) erase(%[2]) | %[2] | | (2,8) -sru $1==4 | X_CXREG X_REG X_REG | - "jcxz 1f" /* result => samecc */ - "2: shr %[3],1" - "rcr %[2],1" - "loop 2b\n1:" - erase(%[1]) erase(%[2]) erase(%[3]) - | %[3] %[2] | | -/* -sru !defined($1)| X_ACC | - remove(ALL) - "call .sru" | | | -*/ - -/************************************************ - * Group 5 : Floating point arithmetic * - * * - ************************************************/ - -/* Floating point stuff - * Arithmetic instructions - */ - -adf $1==4 | | | | cal ".adf4" asp 4 | -adf $1==8 | | | | cal ".adf8" asp 8 | -sbf $1==4 | | | | cal ".sbf4" asp 4 | -sbf $1==8 | | | | cal ".sbf8" asp 8 | -mlf $1==4 | | | | cal ".mlf4" asp 4 | -mlf $1==8 | | | | cal ".mlf8" asp 8 | -dvf $1==4 | | | | cal ".dvf4" asp 4 | -dvf $1==8 | | | | cal ".dvf8" asp 8 | -ngf $1==4 | | | | cal ".ngf4" | -ngf $1==8 | | | | cal ".ngf8" | -fif $1==4 | | | | lor 1 cal ".fif4" asp 2 | -fif $1==8 | | | | lor 1 cal ".fif8" asp 2 | -fef $1==4 | | | | lor 1 adp 0-2 cal ".fef4" | -fef $1==8 | | | | lor 1 adp 0-2 cal ".fef8" | - -/**************************************** - * Group 6 : pointer arithmetic. * - * * - * Pointers have size 2 bytes. * - ****************************************/ - -adp $1==1 | nocoercions : Xreg_off | | - {Xreg_off, %[1.reg],%[1.off]+"+"+tostring($1)} | | -... | nocoercions : Rreg_off | | - {Rreg_off, %[1.reg],%[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_EXTERN | | - {ADDR_EXTERN, %[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_LOCAL | | - {ADDR_LOCAL, %[1.ind]+$1 } | | -... | nocoercions : Xbpreg_off | | - {Xbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | nocoercions : Rbpreg_off | | - {Rbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | X_REG | - "inc %[1]" - erase(%[1]) setcc(%[1]) | %[1] | | (1,2) -... | X_ADDREG | | {Xreg_off, %[1], tostring($1)} | | -... | nocoercions : RADDREG | | {Rreg_off, %[1], tostring($1)} | | -adp $1 == 0-1 | nocoercions : Xreg_off | | - {Xreg_off, %[1.reg],%[1.off]+tostring($1)} | | -... | nocoercions : Rreg_off | | - {Rreg_off, %[1.reg],%[1.off]+tostring($1)} | | -... | nocoercions : ADDR_EXTERN | | - {ADDR_EXTERN, %[1.off]+tostring($1)} | | -... | nocoercions : ADDR_LOCAL| |{ADDR_LOCAL, %[1.ind]+$1 } | | -... | nocoercions : Xbpreg_off | | - {Xbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | nocoercions : Rbpreg_off | | - {Rbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | X_REG | - "dec %[1]" - erase(%[1]) setcc(%[1]) | %[1] | | (1,2) -... | X_ADDREG | | {Xreg_off, %[1], tostring($1)} | | -... | nocoercions : RADDREG | | {Rreg_off, %[1], tostring($1)} | | -adp | nocoercions : Xreg_off | | - {Xreg_off, %[1.reg],%[1.off]+"+"+tostring($1)} | | -... | nocoercions : Rreg_off | | - {Rreg_off, %[1.reg],%[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_EXTERN | | - {ADDR_EXTERN, %[1.off]+"+"+tostring($1)} | | -... | nocoercions : ADDR_LOCAL | | - {ADDR_LOCAL, %[1.ind]+$1 } | | -... | nocoercions : Xbpreg_off | | - {Xbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | nocoercions : Rbpreg_off | | - {Rbpreg_off, %[1.reg], %[1.ind]+$1} | | -... | X_ADDREG | | {Xreg_off, %[1], tostring($1)} | | -... | nocoercions : RADDREG | | {Rreg_off, %[1], tostring($1)} | | -... | X_REG | - "add %[1],$1" - erase(%[1]) setcc(%[1]) | %[1] | | (4,4) -ads $1==2 | nocoercions : ANYCON Rreg_off | | - {Rreg_off, %[2.reg], - %[2.off]+"+"+tostring(%[1.val])} | | -... | nocoercions : ADDR_EXTERN Rreg_off | | - {Rreg_off, %[2.reg], %[2.off]+"+"+%[1.off]} | | -... | nocoercions : ANYCON Xreg_off | | - {Xreg_off, %[2.reg], - %[2.off]+"+"+tostring(%[1.val])} | | -... | nocoercions : ADDR_EXTERN Xreg_off | | - {Xreg_off, %[2.reg], %[2.off]+"+"+%[1.off]} | | -... | rm Xreg_off | - "add %[2.reg],%[1]" - erase(%[2.reg]) setcc(%[2.reg]) | - {Xreg_off, %[2.reg], %[2.off]} | | (2,3) + %[1] -... | nocoercions : ANYCON Xbpreg_off | | - {Xbpreg_off, %[2.reg], %[2.ind]+%[1.val]} | | -... | nocoercions : ANYCON Rbpreg_off | | - {Rbpreg_off, %[2.reg], %[2.ind]+%[1.val]} | | -... | rm Xbpreg_off | - "add %[2.reg],%[1]" - erase(%[2.reg]) setcc(%[2.reg]) | - {Xbpreg_off, %[2.reg], %[2.ind]} | | (2,3) + %[1] -... | Xreg_off rmorconst | - "add %[1.reg],%[2]" - erase(%[1.reg]) setcc(%[1.reg]) | - {Xreg_off, %[1.reg], %[1.off]} | | (2,3) + %[2] -... | Xbpreg_off rmorconst | - "add %[1.reg],%[2]" - erase(%[1.reg]) setcc(%[1.reg]) | - {Xbpreg_off, %[1.reg], %[1.ind]} | | (2,3) + %[2] -... | nocoercions : Xreg_off ANYCON | | - {Xreg_off, %[1.reg], - %[1.off]+"+"+tostring(%[2.val])} | | -... | nocoercions : Xreg_off ADDR_EXTERN | | - {Xreg_off, %[1.reg], %[1.off]+"+"+%[2.off]} | | -... | nocoercions : Rreg_off ANYCON | | - {Rreg_off, %[1.reg], - %[1.off]+"+"+tostring(%[2.val])} | | -... | nocoercions : Rreg_off ADDR_EXTERN | | - {Rreg_off, %[1.reg], %[1.off]+"+"+%[2.off]} | | -... | nocoercions : Xreg_off reg_off | - "add %[1.reg],%[2.reg]" - erase(%[1.reg]) setcc(%[1.reg]) | - {Xreg_off,%[1.reg],%[1.off]+"+"+%[2.off]} | | (2,3) -#ifndef REGVARS -... | IREG ADDR_LOCAL | | {bpreg_off,%[1],%[2.ind]} | | -/* -... | (REG-IREG) ADDR_LOCAL | - allocate(%[1],ADDREG=%[1]) - "add %[a],bp" - | {reg_off, %[a], tostring(%[2.ind])} | | (2,3) -*/ -#else -... | nocoercions: RREG ADDR_LOCAL | | - {Rbpreg_off,%[1],%[2.ind]} | | -#endif -#ifdef DEEPER -... | X_REG rmorconst | - "add %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | rmorconst X_REG | - "add %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "add %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "add %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -#else -... | X_ADDREG ADDR_EXTERN | | {Xreg_off, %[1], %[2.off]} | | -... | X_ADDREG rm | - "add %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | ADDR_EXTERN X_ADDREG | | {Xreg_off, %[2], %[1.off]} | | -... | rm X_ADDREG | - "add %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -#endif -sbs $1==2 | nocoercions : ANYCON Xreg_off | | - {Xreg_off, %[2.reg], %[2.off]+"-"+tostring(%[1.val])} | | -... | nocoercions : ANYCON Rreg_off | | - {Rreg_off, %[2.reg], %[2.off]+"-"+tostring(%[1.val])} | | -... | nocoercions : ANYCON ADDR_LOCAL | | - {ADDR_LOCAL, %[2.ind]-%[1.val]} | | -... | rm Xreg_off | - "sub %[2.reg],%[1]" - erase(%[2.reg]) setcc(%[2.reg]) | - {Xreg_off, %[2.reg], %[2.off]} | | -/* Should not occur -... | nocoercions : reg_off ANYCON | | - {reg_off, %[1.reg], %[1.off]+"-"+tostring(%[2.val])} | | -... | ANYCON ADDR_EXTERN | | - {ADDR_EXTERN, %[2.off]+"+"+tostring(%[1.val])} | | -... | nocoercions : ANYCON ADDR_LOCAL | | - {ADDR_LOCAL, %[1.val]+%[2.ind]} | | -*/ -... | rm X_REG | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | const X_ACC | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) - -/**************************************** - * Group 7 : increment/decrement/zero * - ****************************************/ - -inc | X_REG | - "inc %[1]" - setcc(%[1]) erase(%[1]) | %[1] | |(1,2) -#ifdef REGVARS -inl inreg($1)==2| | - remove(regvar($1)) - "inc %(regvar($1)%)" - erase(regvar($1)) setcc(regvar($1)) | | |(1,2) -#endif -inl | | remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "inc $1(bp)" - setcc({LOCAL2,$1,2}) | | |(3,24) -ine | | remove(indirects) - "inc ($1)" - setcc({EXTERN2,$1}) | | |(4,21) -dec | X_REG | - "dec %[1]" - setcc(%[1]) erase(%[1]) | %[1] | |(1,2) -#ifdef REGVARS -del inreg($1)==2| | - remove(regvar($1)) - "dec %(regvar($1)%)" - erase(regvar($1)) setcc(regvar($1)) | | |(1,2) -#endif -del | | remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "dec $1(bp)" - setcc({LOCAL2,$1,2}) | | |(3,24) -dee | | remove(indirects) - "dec ($1)" - setcc({EXTERN2,$1}) | | |(4,21) -#ifdef REGVARS -zrl inreg($1)==2| | - remove(regvar($1)) - move({ANYCON,0},regvar($1)) - erase(regvar($1)) | | | -#endif -zrl | | remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - move({ANYCON,0},{LOCAL2,$1,2}) - | | | -zre | | remove(indirects) - move({ANYCON,0},{EXTERN2,$1})| | | -zer $1==2 | | | {ANYCON,0} | | -zer $1==4 | | | {ANYCON,0} {ANYCON,0} | | -zer $1==6 | | | {ANYCON,0} {ANYCON,0} - {ANYCON,0} | | -zer $1==8 | | | {ANYCON,0} {ANYCON,0} - {ANYCON,0} {ANYCON,0} | | -zer defined($1) | | remove(ALL) - move({ANYCON,$1/2},cx) - move({ANYCON,0},bx) - "1: push bx" - "loop 1b" - samecc erase(cx) | | |(3,10+$1*4) -zer !defined($1)| X_CXREG | - remove(ALL) - move({ANYCON,0},bx) - "sar cx,1" - "1:\tpush bx" - "loop 1b" - samecc erase(%[1]) | | | - -#ifdef REGVARS -lol adi stl $1==$3 && $2==2 && inreg($1)==2 | rmorconst | - remove(regvar($1)) - "add %(regvar($1)%),%[1]" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol adi stl $1==$3 && $2==2 | regorconst | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "add $1(bp),%[1]" - setcc({LOCAL2, $1, 2}) | | | -ldl adi sdl $1==$3 && $2==4 | regorconst regorconst | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+4 ) - "add $1(bp),%[1]" - "adc %($1+2%)(bp),%[2]" | | | -#ifdef REGVARS -lol loc sbi stl $1==$4 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - "sub %(regvar($1)%),$2" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol loc sbi stl $1==$4 && $3==2 | | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "sub $1(bp),$2" - setcc({LOCAL2, $1, 2}) | | | -#ifdef REGVARS -lol loc sli stl $1==$4 && $2==1 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - "sal %(regvar($1)%),1" - erase(regvar($1)) setcc(regvar($1)) | | | -lol loc sli stl $1==$4 && $2==2 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - "sal %(regvar($1)%),1" - "sal %(regvar($1)%),1" - erase(regvar($1)) setcc(regvar($1)) | | | -lol loc sli stl $1==$4 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - allocate(CXREG = {ANYCON, $2}) - "sal %(regvar($1)%),cl" - erase(regvar($1)) setcc(regvar($1)) | | | -lol loc sri stl $1==$4 && $2==1 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - "sar %(regvar($1)%),1" - erase(regvar($1)) setcc(regvar($1)) | | | -lol loc sri stl $1==$4 && $2==2 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - "sar %(regvar($1)%),1" - "sar %(regvar($1)%),1" - erase(regvar($1)) setcc(regvar($1)) | | | -lol loc sri stl $1==$4 && $3==2 && inreg($1)==2 | | - remove(regvar($1)) - allocate(CXREG = {ANYCON, $2}) - "sar %(regvar($1)%),cl" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -#ifdef REGVARS -lol ngi stl $1==$3 && $2==2 && inreg($1)==2 | | - remove(regvar($1)) - "neg %(regvar($1)%)" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol ngi stl $1==$3 && $2==2 | | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "neg $1(bp)" - setcc({LOCAL2, $1, 2}) | | | -ldl ngi sdl $1==$3 && $2==4 | | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+4 ) - "neg %($1+2%)(bp)" - "neg $1(bp)" - "sbb %($1+2%)(bp),0" | | | -lol ads stl $1==$3 && $2==2 | | | | lol $1 adi 2 stl $1 | -#ifdef REGVARS -lol lol adp stl $1==$2 && $1==$4 && inreg($1)==2 | | - allocate(ADDREG=regvar($1)) | %[a] | lol $2 adp $3 stl $2 | -lol inl $1==$2 && inreg($1)==2 | | - allocate(REG=regvar($1)) | %[a] | inl $1 | -lol del $1==$2 && inreg($1)==2 | | - allocate(REG=regvar($1)) | %[a] | del $1 | -#endif -lol lol adp stl $1==$2 && $1==$4 | | - allocate(ADDREG={LOCAL2,$1,2}) | %[a] | lol $2 adp $3 stl $2 | -lol inl $1==$2 | | allocate(REG={LOCAL2,$1,2}) | %[a] | inl $1 | -lol del $1==$2 | | allocate(REG={LOCAL2,$1,2}) | %[a] | del $1 | -lol adp stl $1==$3 && $2==1 | | | | inl $1 | -lol adp stl $1==$3 && $2==0-1 | | | | del $1 | -#ifdef REGVARS -lol adp stl $1==$3 && inreg($1)==2 | | - remove(regvar($1)) - "add %(regvar($1)%),$2" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol adp stl $1==$3 | | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "add $1(bp),$2" - setcc({LOCAL2, $1, 2}) | | | -#ifdef REGVARS -lol and stl $1==$3 && $2==2 && inreg($1)==2 | rmorconst | - remove(regvar($1)) - "and %(regvar($1)%),%[1]" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol and stl $1==$3 && $2==2 | regorconst | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "and $1(bp),%[1]" - setcc({LOCAL2, $1, 2}) | | | -#ifdef REGVARS -lol ior stl $1==$3 && $2==2 && inreg($1)==2 | rmorconst | - remove(regvar($1)) - "or %(regvar($1)%),%[1]" - erase(regvar($1)) setcc(regvar($1)) | | | -#endif -lol ior stl $1==$3 && $2==2 | regorconst | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "or $1(bp),%[1]" - setcc({LOCAL2, $1, 2}) | | | -#ifdef REGVARS -lol com stl $1==$3 && $2==2 && inreg($1)==2 | | - remove(regvar($1)) - "not %(regvar($1)%)" - erase(regvar($1)) samecc | | | -#endif -lol com stl $1==$3 && $2==2 | | - remove(indexed) - remove(locals, %[ind]>=$1 && %[ind]<$1+2 ) - "not $1(bp)" - samecc | | | -#ifdef REGVARS -lil adi sil $1==$3 && $2==2 && inreg($1)==2 | regorconst | - remove(referals) - "add (%(regvar($1)%)),%[1]" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil adi sil $1==$3 && $2==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "add (%[a]),%[1]" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil ngi sil $1==$3 && $2==2 && inreg($1)==2 | | - remove(referals) - "neg (%(regvar($1)%))" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil ngi sil $1==$3 && $2==2 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "neg (%[a])" - setcc({ind_reg2, %[a]}) | | | -lil ads sil $1==$3 && $2==2 | | | | lil $1 adi 2 sil $1 | -#ifdef REGVARS -lil adp sil $1==$3 && $2==1 && inreg($1)==2 | | - remove(referals) - "inc (%(regvar($1)%))" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil adp sil $1==$3 && $2==1 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "inc (%[a])" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil adp sil $1==$3 && $2==0-1 && inreg($1)==2 | | - remove(referals) - "dec (%(regvar($1)%))" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil adp sil $1==$3 && $2==0-1 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "dec (%[a])" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil adp sil $1==$3 && inreg($1)==2 | | - remove(referals) - "add (%(regvar($1)%)),$2" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil adp sil $1==$3 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "add (%[a]),$2" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil and sil $1==$3 && $2==2 && inreg($1)==2 | regorconst | - remove(referals) - "and (%(regvar($1)%)),%[1]" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil and sil $1==$3 && $2==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "and (%[a]),%[1]" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil ior sil $1==$3 && $2==2 && inreg($1)==2 | regorconst | - remove(referals) - "or (%(regvar($1)%)),%[1]" - setcc({ind_reg2, regvar($1)}) | | | -#endif -lil ior sil $1==$3 && $2==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "or (%[a]),%[1]" - setcc({ind_reg2, %[a]}) | | | -#ifdef REGVARS -lil com sil $1==$3 && $2==2 && inreg($1)==2 | | - remove(referals) - "not (%(regvar($1)%))" - samecc | | | -#endif -lil com sil $1==$3 && $2==2 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "not (%[a])" - samecc | | | -#ifdef REGVARS -lol lof adi lol stf $1==$4 && $2==$5 && $3==2 && inreg($1)==2 | regorconst | - remove(referals) - "add $2(%(regvar($1)%)),%[1]" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof adi lol stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "add $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof ngi lol stf $1==$4 && $2==$5 && $3==2 && inreg($1)==2 | | - remove(referals) - "neg $2(%(regvar($1)%))" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof ngi lol stf $1==$4 && $2==$5 && $3==2 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "neg $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -lol lof ads lol stf $1==$4 && $2==$5 && $3==2 | | | | lol $1 lof $2 adi 2 lol $1 stf $2 | -#ifdef REGVARS -lol lof adp lol stf $1==$4 && $2==$5 && $3==1 && inreg($1)==2 | | - remove(referals) - "inc $2(%(regvar($1)%))" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof adp lol stf $1==$4 && $2==$5 && $2==1 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "inc $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof adp lol stf $1==$4 && $2==$5 && $3==0-1 && inreg($1)==2 | | - remove(referals) - "dec $2(%(regvar($1)%))" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof adp lol stf $1==$4 && $2==$5 && $3==0-1 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "dec $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 | | - remove(referals) - "add $2(%(regvar($1)%)),$3" - setcc({ind_regoff2, regvar($1),tostring($2)}) | | | -#endif -lol lof adp lol stf $1==$4 && $2==$5 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "add $2(%[a]),$3" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof and lol stf $1==$4 && $2==$5 && $3==2 && inreg($1)==2 | regorconst | - remove(referals) - "and $2(%(regvar($1)%)),%[1]" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof and lol stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "and $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof ior lol stf $1==$4 && $2==$5 && $3==2 && inreg($1)==2 | regorconst | - remove(referals) - "or $2(%(regvar($1)%)),%[1]" - setcc({ind_regoff2, regvar($1), tostring($2)}) | | | -#endif -lol lof ior lol stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "or $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -#ifdef REGVARS -lol lof com lol stf $1==$4 && $2==$5 && $3==2 && inreg($1)==2 | | - remove(referals) - "not $2(%(regvar($1)%))" - samecc | | | -#endif -lol lof com lol stf $1==$4 && $2==$5 && $3==2 | | - allocate(ADDREG={LOCAL2, $1, 2}) - remove(referals) - "not $2(%[a])" - samecc | | | -loe adi ste $1==$3 && $2==2 | regorconst | - remove(indirects) - "add ($1),%[1]" - setcc({EXTERN2, $1}) | | | -lde adi sde $1==$3 && $2==4 | regorconst regorconst | - remove(indirects) - "add ($1),%[1]" - "adc ($1+2),%[2]" | | | -loe ngi ste $1==$3 && $2==2 | | - remove(indirects) - "neg ($1)" - setcc({EXTERN2, $1}) | | | -lde ngi sde $1==$3 && $2==4 | | - remove(indirects) - "neg ($1+2)" - "neg ($1)" - "sbb ($1+2),0" | | | -loe ads ste $1==$3 && $2==2 | regorconst | - remove(indirects) - "add ($1),%[1]" - setcc({EXTERN2, $1}) | | | -loe loe adp ste $1==$4 && $1==$4 | | - allocate(ADDREG={EXTERN2,$1}) | %[a] | loe $1 adp $3 ste $1 | -loe ine $1==$2 | | allocate(REG={EXTERN2,$1}) | %[a] | ine $1 | -loe dee $1==$2 | | allocate(REG={EXTERN2,$1}) | %[a] | dee $1 | -loe adp ste $1==$3 && $2==1 | | - remove(indirects) - "inc ($1)" - setcc({EXTERN2, $1}) | | | -loe adp ste $1==$3 && $2==0-1 | | - remove(indirects) - "dec ($1)" - setcc({EXTERN2, $1}) | | | -loe adp ste $1==$3 | | - remove(indirects) - "add ($1),$2" - setcc({EXTERN2, $1}) | | | -loe and ste $1==$3 && $2==2 | regorconst | - remove(indirects) - "and ($1),%[1]" - setcc({EXTERN2, $1}) | | | -loe ior ste $1==$3 && $2==2 | regorconst | - remove(indirects) - "or ($1),%[1]" - setcc({EXTERN2, $1}) | | | -loe com ste $1==$3 && $2==2 | | - remove(indirects) - "not ($1)" - samecc | | | -loe lof adi loe stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "add $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof ngi loe stf $1==$4 && $2==$5 && $3==2 | | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "neg $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof ads loe stf $1==$4 && $2==$5 && $3==2 | | | | loe $1 lof $2 adi 2 loe $1 stf $2 | -loe lof adp loe stf $1==$4 && $2==$5 && $2==1 | | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "inc $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof adp loe stf $1==$4 && $2==$5 && $3==0-1 | | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "dec $2(%[a])" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof adp loe stf $1==$4 && $2==$5 | | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "add $2(%[a]),$3" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof and loe stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "and $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof ior loe stf $1==$4 && $2==$5 && $3==2 | regorconstnoaddr | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "or $2(%[a]),%[1]" - setcc({ind_regoff2, %[a], tostring($2)}) | | | -loe lof com loe stf $1==$4 && $2==$5 && $3==2 | | - allocate(ADDREG={EXTERN2, $1}) - remove(referals) - "not $2(%[a])" - samecc | | | - -/**************************************** - * Group 8 : Convert instructions * - ****************************************/ - -cii | CXREG DXREG X_ACC | - remove(ALL) - "call .cii" - erase(%[3]) | %[3] | | -ciu | | | | cuu | -cui | | | | cuu | -cuu | CXREG DXREG X_ACC | - remove(ALL) - "call .cuu" - erase(%[3]) | %[3] | | -loc loc cii $1==1 && $2==2 | X_ACC | - "cbw" - samecc | ax | |(1,2) -... | nocoercions: rmorconst1 | - allocate(%[1], ACC1 = %[1]) - "cbw" - samecc | ax | |(1,2) -loc loc cii $1==1 && $2==4 | X_ACC | - allocate(DXREG) - "cbw" - "cwd" - samecc | %[a] ax | |(2,7) -... | nocoercions: rmorconst1 | - allocate(%[1], ACC1 = %[1], DXREG) - "cbw" - "cwd" - samecc | dx ax | |(2,7) -loc loc cii $1==2 && $2==4 | ACC | - allocate(DXREG) - "cwd" - samecc | %[a] ax | |(1,5) -loc loc cii $1==4 && $2==2 | a_word a_word | | %[1] | | -loc loc ciu | | | | loc $1 loc $2 cuu | -loc loc cui | | | | loc $1 loc $2 cuu | -loc loc cuu $1==$2 | | | | | -loc loc cuu $1==2 && $2==4 | a_word | | {ANYCON,0} %[1] | | -loc loc cuu $1==4 && $2==2 | a_word a_word | | %[1] | | - -/* - * Floating point stuff - * Conversion - */ -loc loc cif $1==2 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" | | cal ".cif4" | -loc loc cif $1==4 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" | | cal ".cif4" asp 2 | -loc loc cif $1==2 && $2==8 | X_REG | - remove(ALL) - "push %[1]" - "push %[1]" - "push %[1]" - "mov ax,$1" - "push ax" | | cal ".cif8" | -loc loc cif $1==4 && $2==8 | X_REG X_REG | - remove(ALL) - "push %[1]" - "push %[2]" - "push %[1]" - "mov ax,$1" - "push ax" | | cal ".cif8" | -loc loc cuf $1==2 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" | | cal ".cuf4" | -loc loc cuf $1==4 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" | | cal ".cuf4" asp 2 | -loc loc cuf $1==2 && $2==8 | X_REG | - remove(ALL) - "push %[1]" - "push %[1]" - "push %[1]" - "mov ax,$1" - "push ax" | | cal ".cuf8" | -loc loc cuf $1==4 && $2==8 | X_REG X_REG | - remove(ALL) - "push %[1]" - "push %[2]" - "push %[1]" - "mov ax,$1" - "push ax" | | cal ".cuf8" | -loc loc cfi $1==4 && $2==2 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfi" asp 8 lfr 2 | -loc loc cfi $1==4 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfi" asp 4 | -loc loc cfi $1==8 && $2==2 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfi" asp 12 lfr 2 | -loc loc cfi $1==8 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfi" asp 8 | -loc loc cfu $1==4 && $2==2 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfu" asp 8 lfr 2 | -loc loc cfu $1==4 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfu" asp 4 | -loc loc cfu $1==8 && $2==2 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfu" asp 12 lfr 2 | -loc loc cfu $1==8 && $2==4 | | - remove(ALL) - "mov ax,$1" - "push ax" - "mov ax,$2" - "push ax" | | cal ".cfu" asp 8 | -loc loc cff $1==8 && $2==4 | | - remove(ALL) | | cal ".cff4" asp 4 | -loc loc cff $1==4 && $2==8 | X_REG X_REG | - remove(ALL) - allocate(REG) - "xor %[a],%[a]" - "push %[a]" - "push %[a]" - "push %[2]" - "push %[1]" | | cal ".cff8" | - -/**************************************** - * Group 9 : Logical instructions * - ****************************************/ - -and $1==2 | NO X_REG rmorconst | - "and %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | rmorconst X_REG | - "and %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "and %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "and %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -and $1==4 | NO X_REG X_REG rmorconst rmorconst | - "and %[1],%[3]" - "and %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(4,6)+%[4]+%[3] -... | nocoercions: X_ACC X_REG const rmorconst | - "and %[1],%[3]" - "and %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(5,7)+%[4] -... | rmorconst rmorconst X_REG X_REG | - "and %[3],%[1]" - "and %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(4,6)+%[1]+%[2] -... | nocoercions: const rmorconst-ACC X_ACC X_REG | - "and %[3],%[1]" - "and %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(5,7)+%[2] -and defined($1) | | remove(ALL) - "mov cx,$1" - "call .and" | | | -and !defined($1)| X_CXREG | - remove(ALL) - "call .and" - erase(%[1]) | | | -ior $1==2 | X_REG rmorconst | - "or %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | NO rmorconst X_REG | - "or %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "or %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "or %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -ior $1==4 | NO X_REG X_REG rmorconst rmorconst | - "or %[1],%[3]" - "or %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(4,6)+%[4]+%[3] -... | nocoercions: X_ACC X_REG const rmorconst | - "or %[1],%[3]" - "or %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(5,7)+%[4] -... | rmorconst rmorconst X_REG X_REG | - "or %[3],%[1]" - "or %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(4,6)+%[1]+%[2] -... | nocoercions: const rmorconst-ACC X_ACC X_REG | - "or %[3],%[1]" - "or %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(5,7)+%[2] -ior defined($1) | | remove(ALL) - "mov cx,$1" - "call .ior" | | | -ior !defined($1)| X_CXREG | - remove(ALL) - "call .ior" - erase(%[1]) | | | -xor $1==2 | NO X_REG rmorconst | - "xor %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | rmorconst X_REG | - "xor %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "xor %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "xor %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -xor $1==4 | NO X_REG X_REG rmorconst rmorconst | - "xor %[1],%[3]" - "xor %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(4,6)+%[4]+%[3] -... | nocoercions: X_ACC X_REG const rmorconst | - "xor %[1],%[3]" - "xor %[2],%[4]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] %[1] | |(5,7)+%[4] -... | rmorconst rmorconst X_REG X_REG | - "xor %[3],%[1]" - "xor %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(4,6)+%[1]+%[2] -... | nocoercions: const rmorconst-ACC X_ACC X_REG | - "xor %[3],%[1]" - "xor %[4],%[2]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] %[3] | |(5,7)+%[2] -xor defined($1) | | remove(ALL) - "mov cx,$1" - "call .xor" | | | -xor !defined($1)| X_CXREG | - remove(ALL) - "call .xor" - erase(%[1]) | | | -com $1==2 | X_REG | - "not %[1]" - samecc erase(%[1]) | %[1] | |(2,3) -com $1==4 | X_REG X_REG | - "not %[2]" - "not %[1]" - samecc erase(%[1]) erase(%[2]) - | %[2] %[1] | |(4,6) -com defined($1) | | remove(ALL) - "mov cx,$1" - "call .com" | | | -com !defined($1)| X_CXREG | - remove(ALL) - "call .com" - erase(%[1]) | | | -loc rol $1==1 && $2==2 | X_REG | - "rol %[1],1" - samecc erase(%[1]) | %[1] | | (2,2) -rol $1==2 | SHIFT_CREG X_REG | - "rol %[2],cl" - samecc erase(%[2]) | %[2] | | (2,8) -rol $1==4 | X_CXREG X_REG X_REG | - "jcxz 1f" - "2: sal %[2],1" - "rcl %[3],1" - "adc %[2],0" - "loop 2b\n1:" - erase(%[1]) erase(%[2]) erase(%[3]) - | %[3] %[2] | | -/* -rol !defined($1)| X_CXREG | - remove(ALL) - "call .rol" | | | -*/ -loc ror $1==1 && $2==2 | X_REG | - "ror %[1],1" - samecc erase(%[1]) | %[1] | | (2,2) -ror $1==2 | SHIFT_CREG X_REG | - "ror %[2],cl" - samecc erase(%[2]) | %[2] | | (2,8) -ror $1==4 | X_CXREG X_REG X_REG | - "jcxz 1f" - "neg cx" - "add cx,32" - "2: sal %[2],1" - "rcl %[3],1" - "adc %[2],0" - "loop 2b\n1:" - erase(%[1]) erase(%[2]) erase(%[3]) - | %[3] %[2] | | -/* -ror !defined($1)| X_CXREG | - remove(ALL) - "call .ror" | | | -*/ - -/******************************** - * Group 10 : Set instructions * - ********************************/ - -inn $1==2 | SHIFT_CREG X_REG | - "shr %[2],cl" - "and %[2],1" - setcc(%[2]) erase(%[2]) | %[2] | |(6,13) -... | SHIFT_CREG X_ACC | - "shr %[2],cl" - "and %[2],1" - setcc(%[2]) erase(%[2]) | %[2] | |(5,13) -loc inn $1==1 && $2==2 | X_REG | - "shr %[1],1" - "and %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | |(6,6) -... | X_ACC | - "shr %[1],1" - "and %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | |(5,6) -loc inn $1==0 && $2==2 | X_REG | - "and %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | |(6,6) -... | X_ACC | - "and %[1],1" - setcc(%[1]) erase(%[1]) | %[1] | |(5,6) -inn defined($1) | X_ACC | - remove(ALL) - move({ANYCON,$1},cx) - "call .inn" - erase(ax) | ax | | -inn !defined($1)| CXREG X_ACC | - remove(ALL) - "call .inn" - erase(%[2]) | ax | | -loc inn zeq $2==2 | rm STACK | - "test %[1],%(1<<$1%)" - "je $3" | | | -loc inn zne $2==2 | rm STACK | - "test %[1],%(1<<$1%)" - "jne $3" | | | -set $1==2 | SHIFT_CREG | - allocate(REG={ANYCON,1}) - "shl %[a],cl" - setcc(%[a]) erase(%[a]) | %[a] | | -set defined($1) | X_ACC | - remove(ALL) - move({ANYCON,$1},cx) - "call .set" - erase(%[1]) | | | -set !defined($1)| CXREG X_ACC | - remove(ALL) - "call .set" - erase(%[2]) | | | - -/**************************************** - * Group 11 : Array instructions * - ****************************************/ - -lae aar $2==2 && rom(1,3)==1 && rom(1,1)==0 | | | | ads 2 | -lae aar $2==2 && rom(1,3)==1 && rom(1,1)!=0 | | | | adp 0-rom(1,1) ads 2 | -lae aar $2==2 && rom(1,3)==2 && rom(1,1)==0 | X_ADDREG | - "sal %[1],1" - erase(%[1]) | %[1] | ads 2 | -lae aar $2==2 && rom(1,3)==2 && rom(1,1)!=0 | X_ADDREG | - "sal %[1],1" - erase(%[1]) | %[1] | adp 0-2*rom(1,1) ads 2 | -lae aar $2==2 && rom(1,3)==4 && rom(1,1)==0 | X_ADDREG | - "sal %[1],1" - "sal %[1],1" - erase(%[1]) | %[1] | ads 2 | -lae aar $2==2 && rom(1,3)==4 && rom(1,1)!=0 | X_ADDREG | - "sal %[1],1" - "sal %[1],1" - erase(%[1]) | %[1] | adp 0-4*rom(1,1) ads 2 | -lae aar $2==2 && rom(1,1)==0 | X_ACC | - allocate(DXREG,REG={ANYCON,rom(1,3)}) - "mul %[b]" - erase(%[1]) | %[1] | ads 2 | -lae aar $2==2 && defined(rom(1,1)) | X_ACC | - allocate(DXREG,REG={ANYCON,rom(1,3)}) - "mul %[b]" - erase(%[1]) | %[1] | adp 0-rom(1,1)*rom(1,3) ads 2 | -loc sli ads $1==1 && $2==2 && $3==2 | X_ADDREG | - "sal %[1],1" - erase(%[1]) | %[1] | ads 2 | -#ifdef REGVARS -... | nocoercions: rmorconst-ADDREG uses_bx | - allocate(%[2],REG=%[2],ADDREG=%[1]) - "sal %[b],1" - erase(%[b]) | %[b] %[a] | ads 2 | -#endif -loc sli ads $1==2 && $2==2 && $3==2 | X_ADDREG | - "sal %[1],1" - "sal %[1],1" - erase(%[1]) | %[1] | ads 2 | -#ifdef REGVARS -... | nocoercions: rmorconst-ADDREG uses_bx | - allocate(%[2],REG=%[2],ADDREG=%[1]) - "sal %[b],1" - "sal %[b],1" - erase(%[b]) | %[b] %[a] | ads 2 | -#endif -loc sli ads $2==2 && $3==2 | X_ADDREG | - allocate(CXREG={ANYCON, $1}) - "sal %[1],cl" - erase(%[1]) | %[1] | ads 2 | -#ifdef REGVARS -... | nocoercions: rmorconst-(ADDREG+CXREG) uses_bx | - allocate(%[2],REG=%[2],ADDREG=%[1],CXREG={ANYCON,$1}) - "sal %[b],cl" - erase(%[b]) | %[b] %[a] | ads 2 | -#endif -aar $1==2 | halfindir X_ACC X_ADDREG | - allocate(DXREG) - "sub %[2],%[1]" - "mul 4+%[1]" - "add %[3],%[2]" - erase(%[2]) erase(%[3]) - | %[3] | | -... | ADDR_EXTERN X_ACC X_ADDREG | - allocate(DXREG) - "sub %[2],(%[1])" - "mul (4+%[1])" - "add %[3],%[2]" - erase(%[2]) erase(%[3]) - | %[3] | | -lae sar defined(rom(1,3)) | | | | lae $1 aar $2 sti rom(1,3) | -lae lar defined(rom(1,3)) | | | | lae $1 aar $2 loi rom(1,3) | -aar !defined($1) | | remove(ALL) - "call .iaar" | bx | | -sar $1==2 | X_BXREG X_ACC | - remove(ALL) - "call .sar2" - erase(%[1]) erase(%[2]) - | | | -sar !defined($1) | | remove(ALL) - "call .isar" | | | -lar $1==2 | X_BXREG X_ACC | - remove(ALL) - "call .lar2" - erase(%[1]) erase(%[2]) - | | | -lar !defined($1) | | remove(ALL) - "call .ilar" | | | - -/**************************************** - * group 12 : Compare instructions * - ****************************************/ - -cmi $1==2 | NO register rmorconst | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jl 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(4,4) -... | rmorconst register | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jl 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(4,4) -... | ACC const | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jl 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(3,4) -... | const ACC | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jl 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(3,4) -cmi $1==4 | | remove(ALL) - "call .cmi4" | ax | | -cmu $1==2 | | | | cmp | -cmu $1==4 | | remove(ALL) - "call .cmu4" | ax | | -cms $1==2 | NO X_REG rmorconst | - "sub %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (2,3) + %[2] -... | rmorconst X_REG | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (2,3) + %[1] -... | X_ACC const | - "sub %[1],%[2]" - erase(%[1]) setcc(%[1]) | %[1] | | (3,4) -... | const X_ACC | - "sub %[2],%[1]" - erase(%[2]) setcc(%[2]) | %[2] | | (3,4) -cms $1==4 | rmorconst rmorconst X_REG X_REG | - "sub %[3],%[1]" - "sbb %[4],%[2]" - "or %[4],%[3]" - setcc(%[4]) erase(%[3]) erase(%[4]) - | %[4] | | -... | NO X_REG X_REG rmorconst rmorconst | - "sub %[1],%[3]" - "sbb %[2],%[4]" - "or %[2],%[1]" - setcc(%[2]) erase(%[1]) erase(%[2]) - | %[2] | | -cms defined($1) | | remove(ALL) - move({ANYCON,$1},cx) - "call .cms" - erase(cx) | cx | | -cms !defined($1)| X_CXREG | - remove(ALL) - "call .cms" - erase(cx) | cx | | - -/* - * Floating point - * Comparision - */ - -cmf $1==4 | | remove(ALL) | | cal ".cmf4" asp 8 lfr 2 | -cmf $1==8 | | remove(ALL) | | cal ".cmf8" asp 16 lfr 2 | -/* - * Floating Point - * Zero Constants - */ -zrf | | | | zer $1 | - -/* The costs with cmp are the cost of the 8086 cmp instruction */ -cmp | NO register rmorconst | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jb 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(4,4) -... | rmorconst register | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jb 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(4,4) -... | ACC const | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jb 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(3,4) -... | const ACC | - allocate(REG = {ANYCON,0}) - "cmp %[1],%[2]" - "je 2f" - "jb 1f" - "inc %[a]" - "jmp 2f" - "1:\tdec %[a]\n2:" - setcc(%[a]) - erase(%[a]) | %[a] | |(3,4) -tlt | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "jge 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -tle | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "jg 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -teq | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -tne | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -tge | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "jl 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -tgt | rm | - allocate(REG={ANYCON,0}) - test(%[1]) - "jle 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -tlt ior $2==2 | rm X_REG | - test(%[1]) - "jge 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -tle ior $2==2 | rm X_REG | - test(%[1]) - "jg 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -teq ior $2==2 | rm X_REG | - test(%[1]) - "jne 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -tne ior $2==2 | rm X_REG | - test(%[1]) - "je 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -tge ior $2==2 | rm X_REG | - test(%[1]) - "jl 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -tgt ior $2==2 | rm X_REG | - test(%[1]) - "jle 1f" - "or %[2],1\n1:" - erase(%[2]) | %[2] | | -cmi tlt ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "jge 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -cmi tle ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "jg 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -cmi teq ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "jne 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -cmi tne ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "je 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -cmi tge ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "jl 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -cmi tgt ior $1==2 && $3==2 | regorconst rm X_REG | - "cmp %[2],%[1]" - "jle 1f" - "or %[3],1\n1:" - erase(%[3]) | %[3] | | -/* The cmp instruction has a special form for comparing - a byte ( sign-extended ) to a word (e.g. a register) - The "cmp ax,0" and "cmp bx,0" instructions have widely different - encodings but take the same amount of time and space. - Conclusion, using the special instruction for comparing - constants with ax is only better when the constant is <-128 or >127. - This relatively rare event wasn't worth extra entries in this table. -*/ -cmi tlt $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jge 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jle 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmi tle $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jg 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jl 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmi teq $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmi tne $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmi tge $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jl 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jg 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmi tgt $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jle 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jge 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp tlt | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jae 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jbe 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp tle | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "ja 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jb 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp teq | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp tne | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp tge | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jb 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "ja 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp tgt | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jbe 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jae 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cms teq $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "jne 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cms tne $1==2 | regorconst rm | - allocate(REG={ANYCON,0}) - "cmp %[2],%[1]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -... | NO rm regorconst | - allocate(REG={ANYCON,0}) - "cmp %[1],%[2]" - "je 1f" - "inc %[a]\n1:" - erase(%[a]) | %[a] | | -cmp zlt | regorconst rm STACK | - "cmp %[2],%[1]" - "jb $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "ja $2" | | | -cmp zle | regorconst rm STACK | - "cmp %[2],%[1]" - "jbe $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jae $2" | | | -cmp zeq | regorconst rm STACK | - "cmp %[2],%[1]" - "je $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "je $2" | | | -cmp zne | regorconst rm STACK | - "cmp %[2],%[1]" - "jne $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jne $2" | | | -cmp zge | regorconst rm STACK | - "cmp %[2],%[1]" - "jae $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jbe $2" | | | -cmp zgt | regorconst rm STACK | - "cmp %[2],%[1]" - "ja $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jb $2" | | | -cms zeq $1==2 | regorconst rm STACK | - "cmp %[2],%[1]" - "je $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "je $2" | | | -cms zne $1==2 | regorconst rm STACK | - "cmp %[2],%[1]" - "jne $2" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jne $2" | | | -ldc cmi zlt highw(1)==0 && loww(1)==0 && $2==4 | rmorconst rmorconst | - | %[2] | zlt $3 | -ldc cmi zge highw(1)==0 && loww(1)==0 && $2==4 | rmorconst rmorconst | - | %[2] | zge $3 | -ldc cms zeq $2==4 && loww(1)==0 && highw(1)==0 | rmorconst X_REG | - remove(ALL) - "or %[2],%[1]" - "je $3" | | | -... | X_REG rmorconst | - remove(ALL) - "or %[1],%[2]" - "je $3" | | | -ldc cms zne $2==4 && loww(1)==0 && highw(1)==0 | rmorconst X_REG | - remove(ALL) - "or %[2],%[1]" - "jne $3" | | | -... | X_REG rmorconst | - remove(ALL) - "or %[1],%[2]" - "jne $3" | | | -ldc cms zeq $2==4 | rmorconst rmorconst | - remove(ALL) - "cmp %[1],%(loww(1)%)" - "jne 1f" - "cmp %[2],%(highw(1)%)" - "je $3" - "1:" | | | -ldc cms zne $2==4 | rmorconst rmorconst | - remove(ALL) - "cmp %[1],%(loww(1)%)" - "jne $3" - "cmp %[2],%(highw(1)%)" - "jne $3" | | | -cms zne $1==4 | regorconst regorconst rm rm STACK | - "cmp %[3],%[1]" - "jne $2" - "cmp %[4],%[2]" - "jne $2" | | | -... | NO rm rm regorconst regorconst | - remove(ALL) - "cmp %[1],%[3]" - "jne $2" - "cmp %[2],%[4]" - "jne $2" | | | -cms zeq $1==4 | regorconst regorconst rm rm STACK | - "cmp %[3],%[1]" - "jne 1f" - "cmp %[4],%[2]" - "je $2\n1:" | | | -... | NO rm rm regorconst regorconst | - remove(ALL) - "cmp %[1],%[3]" - "jne 1f" - "cmp %[2],%[4]" - "je $2\n1:" | | | -and zeq $1==2 | regorconst rm STACK | - "test %[2],%[1]" - "je $2" | | | -... | NO rm regorconst | - remove(ALL) - "test %[1],%[2]" - "je $2" | | | -and zne $1==2 | regorconst rm STACK | - "test %[2],%[1]" - "jne $2" | | | -... | NO rm regorconst | - remove(ALL) - "test %[1],%[2]" - "jne $2" | | | -loc and zeq $1<256 && $1>=0 && $2==2 | nocoercions : rm1 + memory2 | - remove(ALL) - "testb %[1],$1" - "je $3" | | | (1,3) + %[1] -... | GENREG STACK | - "testb %[1.1],$1" - "je $3" | | | (1,3) + %[1] -... | nocoercions : IREG | - remove(ALL) - "test %[1],$1" - "je $3" | | | (2,3) + %[1] -loc and zne $1<256 && $1>=0 && $2==2 | nocoercions : rm1 + memory2 | - remove(ALL) - "testb %[1],$1" - "jne $3" | | | (1,3) + %[1] -... | GENREG STACK | - "testb %[1.1],$1" - "jne $3" | | | (1,3) + %[1] -... | nocoercions : IREG | - remove(ALL) - "test %[1],$1" - "jne $3" | | | (2,3) + %[1] -loc beq $1<256 && $1>=0 | nocoercions : rm1 | - remove(ALL) - "cmpb %[1],$1" - "je $2" | | | (1,3) + %[1] -... | rm STACK | - "cmp %[1],$1" - "je $2" | | | (2,3) + %[1] -loc bne $1<256 && $1>=0 | nocoercions : rm1 | - remove(ALL) - "cmpb %[1],$1" - "jne $2" | | | (1,3) + %[1] -... | rm STACK | - "cmp %[1],$1" - "jne $2" | | | (2,3) + %[1] -/* Note: test for <,<=,>,>= can be done in this way, - with use of the unsigned conditional jumps, jb, etc. */ -loc cmu zeq $1<256 && $1>=0 && $2==2 | nocoercions : rm1 | - remove(ALL) - "cmpb %[1],$1" - "je $3" | | | (1,3) + %[1] -... | rm STACK | - "cmp %[1],$1" - "je $3" | | | (2,3) + %[1] -loc cmu zne $1<256 && $1>=0 && $2==2 | nocoercions : rm1 | - remove(ALL) - "cmpb %[1],$1" - "jne $3" | | | (1,3) + %[1] -... | rm STACK | - "cmp %[1],$1" - "jne $3" | | | (2,3) + %[1] - -/**************************************** - * Group 13 : Branch instructions * - ****************************************/ - -bra | | remove(ALL) - "jmp $1" - samecc | | | -blt | regorconst rm STACK | - "cmp %[2],%[1]" - "jl $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jg $1" | | | -ble | regorconst rm STACK | - "cmp %[2],%[1]" - "jle $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jge $1" | | | -beq | regorconst rm STACK | - "cmp %[2],%[1]" - "je $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "je $1" | | | -bne | regorconst rm STACK | - "cmp %[2],%[1]" - "jne $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jne $1" | | | -bge | regorconst rm STACK | - "cmp %[2],%[1]" - "jge $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jle $1" | | | -bgt | regorconst rm STACK | - "cmp %[2],%[1]" - "jg $1" | | | -... | NO rm regorconst | - remove(ALL) - "cmp %[1],%[2]" - "jl $1" | | | -zlt | rm STACK | - test(%[1]) - "jl $1" | | | -zle | rm STACK | - test(%[1]) - "jle $1" | | | -zeq | rm+rm1 STACK | - test(%[1]) - "je $1" | | | -zne | rm+rm1 STACK | - test(%[1]) - "jne $1" | | | -zge | rm STACK | - test(%[1]) - "jge $1" | | | -zgt | rm STACK | - test(%[1]) - "jg $1" | | | - -/************************************************ - * group 14 : Procedure call instructions * - ************************************************/ - -cal | | remove(ALL) - "call $1" | | | -cai | rm | remove(ALL) - "call %[1]" | | | -lfr $1==2 | | | ax | | -lfr $1==4 | | | dx ax | | -lfr $1==6 | | remove(ALL) - "call .lfr6" | | | -lfr $1==8 | | remove(ALL) - "call .lfr8" | | | -ret $1==0 | | remove(ALL) -#ifdef REGVARS - return -#else - "mov sp,bp" - "pop bp" - "ret" -#endif - | | | -ret $1==2 | ACC | - remove(ALL) -#ifdef REGVARS - return -#else - "mov sp,bp" - "pop bp" - "ret" -#endif - | | | -ret $1==4 | ACC DXREG | - remove(ALL) -#ifdef REGVARS - return -#else - "mov sp,bp" - "pop bp" - "ret" -#endif - | | | -ret $1==6 | STACK | - "call .ret6" -#ifdef REGVARS - return -#else - "mov sp,bp" - "pop bp" - "ret" -#endif - | | | -ret $1==8 | STACK | - "call .ret8" -#ifdef REGVARS - return -#else - "mov sp,bp" - "pop bp" - "ret" -#endif - | | | - -/************************************************ - * Group 15 : Miscellaneous instructions * - ************************************************/ - -asp $1==2 | nocoercions : a_word | | | | -... | STACK | - allocate(BXREG) - "pop %[a]" erase(%[a]) samecc | | | (1,8) -asp $1==4 | nocoercions : a_word a_word | | | | -... | STACK | - allocate(BXREG) - "pop %[a]" "pop %[a]" - erase(%[a]) samecc | | | (2,16) -asp $1==0-2 | | /* Anything will do */ | bp | | -asp | STACK | - "add sp,$1" | | | (4,4) -ass $1==2 | rmorconst STACK | - "add sp,%[1]" | | | -ass !defined($1)| rm rmorconst STACK | - "cmp %[1],2" - "jne .unknown" - "add sp,%[2]" | | | -blm $1==0 | | | | asp 4 | -blm $1>0 | | - remove(ALL) - allocate(CXREG={ANYCON,$1/2}) - "call .blm" - erase(%[a]) - | | | -bls $1==2 | X_CXREG | - remove(ALL) - "sar cx,1" - "call .blm" - erase(%[1]) - | | | -bls !defined($1)| rm-CXREG X_CXREG | - remove(ALL) - "cmp %[1],2" - "jne .unknown" - "sar cx,1" - "call .blm" - erase(%[2]) - | | | -csa $1==2 | X_BXREG X_ACC | - remove(ALL) - "jmp .csa2" - erase(%[1]) erase(%[2]) | | | -csa !defined($1)| rm-BXREG-ACC X_BXREG X_ACC | - remove(ALL) - "cmp %[1],2" - "jne .unknown" - "jmp .csa2" - erase(%[2]) erase(%[3]) | | | -csb $1==2 | X_BXREG X_ACC | - remove(ALL) - "jmp .csb2" - erase(%[1]) erase(%[2]) | | | -csb !defined($1)| rm-BXREG-ACC X_BXREG X_ACC | - remove(ALL) - "cmp %[1],2" - "jne .unknown" - "jmp .csb2" - erase(%[2]) erase(%[3]) | | | -dup $1==2 | regorconst | | %[1] %[1] | | -... | ACC1 | | %[1] %[1] | | -dup $1==4 | regorconst regorconst | | %[2] %[1] %[2] %[1] | | -dup | | remove(ALL) - move({ANYCON, $1}, cx) - "call .dup" - erase(cx) | | | -dus $1==2 | X_CXREG | - remove(ALL) - "call .dup" - erase(%[1]) | | | -dus !defined($1)| rm-CXREG X_CXREG | - remove(ALL) - "cmp %[1],2" - "jne .unknown" - "call .dup" - erase(%[2]) | | | -exg $1==2 | a_word a_word | | %[1] %[2] | | -exg $1==4 | a_word a_word a_word a_word | - | %[2] %[1] %[4] %[3] | | -exg defined($1) | | remove(ALL) - move({ANYCON,$1},cx) - "call .exg" - erase(cx) | | | -exg | rmorconst | - remove(ALL) - move(%[1],cx) - "call .exg" - erase(cx) | | | -gto | | remove(ALL) - "mov bx,$1" - "jmp .gto" | | | -fil | | "mov (hol0+4),$1" | | | -lim | | allocate(REG) - "mov %[a],(.ignmask)" | %[a] | | -lin | | "mov (hol0),$1" | | | -lni | | "inc (hol0)" | | | -lor $1==0 | | | bp | | -lor $1==1 | STACK | - allocate(REG) - "mov %[a],sp" | %[a] | | -lor $1==2 | | allocate(REG) - "mov %[a],(.reghp)" | %[a] | | -mon | X_ACC | - remove(ALL) - "call .mon" | | | -nop | | remove(ALL) - "call .nop" | | | -rck $1==2 | BXREG ACC | - "call .rck" | ax | | -rck !defined($1)| rm-BXREG-ACC BXREG ACC | - "cmp %[1],2" - "jne .unknown" - "call .rck" | ax | | -rtt | | | | ret 0 | -sig | X_REG | - "xchg (.trppc),%[1]" - erase(%[1]) | %[1] | | -sim | regorconst | - "mov (.ignmask),%[1]" | | | -str $1==0 | rmorconst | - "mov bp,%[1]" | | | -str $1==1 | rmorconst STACK | - "mov sp,%[1]" | | | -str $1==2 | | - remove(ALL) - "call .strhp" | | | -trp | X_ACC | - remove(ALL) - "call .Xtrp" | | | - -/******************************** - * From source to register * - ********************************/ - -| rmorconst | allocate(%[1],REG=%[1]) | %[a] | | -| Xreg_off | "add %[1.reg],%[1.off]" - erase(%[1.reg]) setcc(%[1.reg]) - | %[1.reg] | |(2,3) + %[1] -| halfindir | - allocate(%[1],REG) - move(%[1],%[a]) - samecc | %[a] | |(0,0) -| halfindir | - allocate(%[1],ADDREG) - move(%[1],%[a]) - samecc | %[a] | |(0,0) - -/******************************** - * From source to token * - ********************************/ - -| ANYCON | | {ADDR_EXTERN,tostring(%[1.val])} | | - -/******************************** - * From source1 * - ********************************/ - -| rm1 | allocate(%[1],REG1=%[1]) | %[a] | | -| rm1 | allocate(%[1],GENREG) - move(%[1],%[a.1]) - "xorb %[a.2],%[a.2]" | %[a] | |(2,3) -| ACC1 | allocate(%[1],ACC) - "xorb %[a.2],%[a.2]" | %[a] | |(2,3) -/* -| BLREG | allocate(%[1],BXREG) - "xorb %[a.2],%[a.2]" | %[a] | |(2,3) -*/ - - - -/************************ - * From STACK coercions * - ************************/ - -| STACK | allocate(REG) - "pop %[a]" - samecc | %[a] | | (2,8) - -MOVES: -(ACC, EXTERN2, "mov %[2],%[1]" samecc, (3,16)) -(ACC1, EXTERN1, "movb %[2],%[1]" samecc, (3,16)) -(ACC, EXTERN1, "movb %[2],%[1.1]" samecc, (3,16)) -(EXTERN2, ACC, "mov %[2],%[1]" samecc, (3,14)) -(EXTERN1, ACC1, "movb %[2],%[1]" samecc, (3,14)) -(rm, register, "mov %[2],%[1]" samecc, (2,2) + %[1] ) -(anyreg, dest, "mov %[2],%[1]" samecc, (2,3) + %[2] ) -(halfindir, register, "lea %[2],%[1]" samecc, (2,3) + %[1] ) -(rm1, REG1, "movb %[2],%[1]" samecc, (2,2) + %[1] ) -(REG1, rm1, "movb %[2],%[1]" samecc, (2,3) + %[2] ) -(GENREG, rm1, "movb %[2],%[1.1]" samecc, (2,3) + %[2] ) -(ANYCON %[val]==0, register, "xor %[2],%[2]" setcc(%[2]), (2,3)) -(ANYCON %[val]==0, REG1, "xorb %[2],%[2]" setcc(%[2]),(2,3)) -(const, register, "mov %[2],%[1]" samecc, (3,4)) -(const, REG1, "movb %[2],%[1]" samecc, (2,4)) -(const, dest, "mov %[2],%[1]" samecc, (4,4) + %[2] ) -(const, rm1, "movb %[2],%[1]" samecc, (3,4) + %[2] ) - -TESTS: -(anyreg, "or %[1],%[1]", (2,3)) -(memory2, "cmp %[1],0", (3,11)+%[1]) -(REG1, "orb %[1],%[1]", (2,3)) -(memory1, "cmpb %[1],0", (3,11)+%[1]) - -STACKS: -(anyreg, , "push %[1]" - samecc , (1,10) ) -(memory2, , "push %[1]" - samecc , (2,10) + %[1] ) -(const, REG, move(%[1],%[a]) - "push %[a]" - samecc , (4,11) ) -(const, , ".sect .data\n1: .data2 %[1]\n.sect .text" - "push (1b)" - samecc , (6,24) ) -(rm1, GENREG, move({ANYCON,0},%[a]) - move(%[1],%[a.1]) - "push %[a]" - samecc , (2,10) + %[1] ) -(rm1, , "push %[1]" - "push si" - "mov si,sp" - "movb 3(si),0" - "pop si" - samecc , (10,60) + %[1] ) -(Xreg_off, , "add %[1.reg],%[1.off]" - "push %[1.reg]" - erase(%[1.reg]) - setcc(%[1.reg]) , ( 4,14) ) -(Xbpreg_off, , move(%[1],%[1.reg]) - "push %[1.reg]" - samecc , ( 6,17) + %[1] ) -(ADDR_LOCAL %[ind]==0 , , - "push bp" - samecc , ( 1, 10) ) -(halfindir, REG,move(%[1],%[a]) - "push %[a]" - samecc , ( 6,17) + %[1] ) -(halfindir, , "push ax" - "push si" - "lea ax,%[1]" - "mov si,sp" - "xchg 2(si),ax" - "pop si" - samecc , (10,59) + %[1] ) diff --git a/mach/i86/libbc/.distr b/mach/i86/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i86/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i86/libbc/Makefile b/mach/i86/libbc/Makefile deleted file mode 100644 index ea5efd82c..000000000 --- a/mach/i86/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i86" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i86/libbc/compmodule b/mach/i86/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i86/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i86/libcc/.distr b/mach/i86/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i86/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i86/libcc/Makefile b/mach/i86/libcc/Makefile deleted file mode 100644 index 980de4467..000000000 --- a/mach/i86/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i86" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cpmath - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cpmath: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmath - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmpmath: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i86/libcc/compmodule b/mach/i86/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i86/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i86/libm2/.distr b/mach/i86/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i86/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i86/libm2/Makefile b/mach/i86/libm2/Makefile deleted file mode 100644 index af2f2d505..000000000 --- a/mach/i86/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=i86" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i86/libm2/compmodule b/mach/i86/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/i86/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/i86/liboc/.distr b/mach/i86/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i86/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i86/liboc/Makefile b/mach/i86/liboc/Makefile deleted file mode 100644 index 17324df53..000000000 --- a/mach/i86/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i86" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i86/liboc/compmodule b/mach/i86/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i86/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/i86/libpc/.distr b/mach/i86/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/i86/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/i86/libpc/Makefile b/mach/i86/libpc/Makefile deleted file mode 100644 index 500b08a8d..000000000 --- a/mach/i86/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=i86" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/i86/libpc/compmodule b/mach/i86/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/i86/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68020/libbc/.distr b/mach/m68020/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68020/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68020/libbc/Makefile b/mach/m68020/libbc/Makefile deleted file mode 100644 index 3ad7e4234..000000000 --- a/mach/m68020/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68020" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68020/libbc/compmodule b/mach/m68020/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68020/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68020/libcc/.distr b/mach/m68020/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68020/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68020/libcc/Makefile b/mach/m68020/libcc/Makefile deleted file mode 100644 index 7d8176921..000000000 --- a/mach/m68020/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68020" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68020/libcc/compmodule b/mach/m68020/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68020/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68020/libm2/.distr b/mach/m68020/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68020/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68020/libm2/Makefile b/mach/m68020/libm2/Makefile deleted file mode 100644 index e3dd5d2b6..000000000 --- a/mach/m68020/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=m68020" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68020/libm2/compmodule b/mach/m68020/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/m68020/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/m68020/liboc/.distr b/mach/m68020/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68020/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68020/liboc/Makefile b/mach/m68020/liboc/Makefile deleted file mode 100644 index b985fb35f..000000000 --- a/mach/m68020/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68020" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68020/liboc/compmodule b/mach/m68020/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68020/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68020/libpc/.distr b/mach/m68020/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68020/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68020/libpc/Makefile b/mach/m68020/libpc/Makefile deleted file mode 100644 index fa76bf1f3..000000000 --- a/mach/m68020/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68020" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68020/libpc/compmodule b/mach/m68020/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68020/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k2/cg/.distr b/mach/m68k2/cg/.distr deleted file mode 100644 index 6a5c77b41..000000000 --- a/mach/m68k2/cg/.distr +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -mach.c -mach.h -table -tables1.c -tables1.h diff --git a/mach/m68k2/cg/mach.c b/mach/m68k2/cg/mach.c deleted file mode 100644 index d0281d7f5..000000000 --- a/mach/m68k2/cg/mach.c +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef NORCSID -static char rcsid[] = "$Header$"; -#endif - -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - * - */ - -/* - * machine dependent back end routines for the Motorola 68000 - */ - -con_part(sz,w) register sz; word w; { - - while (part_size % sz) - part_size++; - if (part_size == TEM_WSIZE) - part_flush(); - if (sz == 1) { - w &= 0xFF; - if (part_size == 0) - w <<= 8; - part_word |= w; - } else { - assert(sz == 2); - part_word = w; - } - part_size += sz; -} - -con_mult(sz) word sz; { - - if (sz != 4) - fatal("bad icon/ucon size"); - fprintf(codefile,".data4 %s\n",str); -} - -#define IEEEFLOAT -#define FL_MSL_AT_LOW_ADDRESS 1 -#define FL_MSW_AT_LOW_ADDRESS 1 -#define FL_MSB_AT_LOW_ADDRESS 1 -#define CODE_GENERATOR -#include - -#ifdef REGVARS - -regscore(off,size,typ,score,totyp) - long off; -{ - if (score == 0) return -1; - switch(typ) { - case reg_float: - return -1; - case reg_pointer: - if (size != 4 || totyp != reg_pointer) return -1; - score *= 2; - break; - case reg_loop: - score += 5; - /* fall through .. */ - case reg_any: - if (size != 2 || totyp == reg_pointer) return -1; - break; - } - if (off >= 0) { - /* parameters must be initialised with an instruction - * like "move.w 4(a6),d0", which costs 2 words. - */ - score -= 2; - } - score -= 1; /* take save/restore into account */ - return score; -} -struct regsav_t { - char *rs_reg; /* e.g. "a3" or "d5" */ - long rs_off; /* offset of variable */ - int rs_size; /* 2 or 4 bytes */ -} regsav[9]; - - -int regnr; - -i_regsave() -{ - regnr = 0; -} - -#define MOVEM_LIMIT 2 -/* If #registers to be saved exceeds MOVEM_LIMIT, we -* use the movem instruction to save registers; else -* we simply use several move.l's. -*/ - -save() -{ - register struct regsav_t *p; - - if (regnr > MOVEM_LIMIT) { - fprintf(codefile,"movem.l "); - for (p = regsav; ;) { - fprintf(codefile,"%s",p->rs_reg); - if (++p == ®sav[regnr]) break; - putc('/',codefile); - } - fprintf(codefile,",-(sp)\n"); - } else { - for (p = regsav; p < ®sav[regnr]; p++) { - fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg); - } - } - /* initialise register-parameters */ - for (p = regsav; p < ®sav[regnr]; p++) { - if (p->rs_off >= 0) { - fprintf(codefile,"move.%c %ld(a6),%s\n", - (p->rs_size == 4 ? 'l' : 'w'), - p->rs_off, - p->rs_reg); - } - } -} - -restr() -{ - register struct regsav_t *p; - - if (regnr > MOVEM_LIMIT) { - fprintf(codefile,"movem.l (sp)+,"); - for (p = regsav; ;) { - fprintf(codefile,"%s",p->rs_reg); - if (++p == ®sav[regnr]) break; - putc('/',codefile); - } - putc('\n',codefile); - } else { - for (p = ®sav[regnr-1]; p >= regsav; p--) { - fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg); - } - } - fprintf(codefile,"unlk a6\n"); - fprintf(codefile,"rts\n"); -} - - -f_regsave() -{ - save(); -} - -regsave(str,off,size) - char *str; - long off; -{ - assert (regnr < 9); - regsav[regnr].rs_reg = str; - regsav[regnr].rs_off = off; - regsav[regnr++].rs_size = size; - fprintf(codefile, "!Local %ld into %s\n",off,str); -} - -regreturn() -{ - restr(); -} - -#endif - -prolog(nlocals) full nlocals; { - - fprintf(codefile,"tst.b -%ld(sp)\nlink\ta6,#-%ld\n",nlocals+40,nlocals); -} - - - -mes(type) word type ; { - int argt ; - - switch ( (int)type ) { - case ms_ext : - for (;;) { - switch ( argt=getarg( - ptyp(sp_cend)|ptyp(sp_pnam)|sym_ptyp) ) { - case sp_cend : - return ; - default: - strarg(argt) ; - fprintf(codefile,".define %s\n",argstr) ; - break ; - } - } - default : - while ( getarg(any_ptyp) != sp_cend ) ; - break ; - } -} - - -char *segname[] = { - ".sect .text", /* SEGTXT */ - ".sect .data", /* SEGCON */ - ".sect .rom", /* SEGROM */ - ".sect .bss" /* SEGBSS */ -}; diff --git a/mach/m68k2/cg/mach.h b/mach/m68k2/cg/mach.h deleted file mode 100644 index 61f4a6528..000000000 --- a/mach/m68k2/cg/mach.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $Header$ */ -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - */ -#define ex_ap(y) fprintf(codefile,".extern %s\n", y) -#define in_ap(y) /* nothing */ - -#define newilb(x) fprintf(codefile,"%s:\n",x) -#define newdlb(x) fprintf(codefile,"%s:\n",x) -#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y) -#define newlbss(l,x) fprintf(codefile,".comm %s,%ld\n",l,x); - -#define pop_fmt "(sp)+" -#define cst_fmt "%ld" -#define off_fmt "%ld" -#define ilb_fmt "I%x_%x" -#define dlb_fmt "_%d" -#define hol_fmt "hol%d" - -#define loc_off "%d(a6)" -#define arg_off "8+%d(a6)" -#define hol_off "%ld+hol%d" - -#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) -#define con_ilb(x) fprintf(codefile,".data4\t%s\n",x) -#define con_dlb(x) fprintf(codefile,".data4\t%s\n",x) - -#define fmt_id(fr,to) sprintf(to, "_%s", fr) - -#define modhead ".sect .text;.sect .rom;.sect .data;.sect .bss\n" - -#define BSS_INIT 0 - diff --git a/mach/m68k2/cg/table b/mach/m68k2/cg/table deleted file mode 100644 index 1f21312b3..000000000 --- a/mach/m68k2/cg/table +++ /dev/null @@ -1,2880 +0,0 @@ -"$Header$" -/* - * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands. - * - * This product is part of the Amsterdam Compiler Kit. - * - * Permission to use, sell, duplicate or disclose this software must be - * obtained in writing. Requests for such permissions may be sent to - * - * Dr. Andrew S. Tanenbaum - * Wiskundig Seminarium - * Vrije Universiteit - * Postbox 7161 - * 1007 MC Amsterdam - * The Netherlands - * - */ - -/*********************************************************************** - ***** ***** - ***** 6 8 0 0 0 B A C K E N D T A B L E S ***** - ***** ***** - ***********************************************************************/ - - - -/* - * INTEGER SIZE: 16 bits - * POINTER SIZE: 32 bits - */ - -#define REGVARS - -EM_WSIZE = 2 -EM_PSIZE = 4 -EM_BSIZE = 8 - - - -/*************************** - ** R E G I S T E R S ** - ***************************/ - -REGISTERS: -D0 = ("d0",2) DATAREG. -D1 = ("d1",2) DATAREG. -D2 = ("d2",2) DATAREG. - -/* Note: the order of the registers is important: it is used by - * the .gto routine in the tail_em library. - */ - -#ifdef REGVARS -D7 = ("d7",2) regvar, DATAREG. -D6 = ("d6",2) regvar, DATAREG. -D5 = ("d5",2) regvar, DATAREG. -D4 = ("d4",2) regvar, DATAREG. -D3 = ("d3",2) regvar, DATAREG. -#else -D3 = ("d3",2) DATAREG. -D4 = ("d4",2) DATAREG. -D5 = ("d5",2) DATAREG. -D6 = ("d6",2) DATAREG. -D7 = ("d7",2) DATAREG. -#endif - -#ifndef REGVARS -DD7 = ("d7",4,D7) DATAREG4. -DD6 = ("d6",4,D6) DATAREG4. -DD5 = ("d5",4,D5) DATAREG4. -DD4 = ("d4",4,D4) DATAREG4. -DD3 = ("d3",4,D3) DATAREG4. -#endif -DD2 = ("d2",4,D2) DATAREG4. -DD1 = ("d1",4,D1) DATAREG4. -DD0 = ("d0",4,D0) DATAREG4. - -A0 = ("a0",4) ADDREG. -A1 = ("a1",4) ADDREG. -#ifdef REGVARS -A5 = ("a5",4) regvar(pointer), ADDREG. -A4 = ("a4",4) regvar(pointer), ADDREG. -A3 = ("a3",4) regvar(pointer), ADDREG. -A2 = ("a2",4) regvar(pointer), ADDREG. -#else -A2 = ("a2",4) ADDREG. -A3 = ("a3",4) ADDREG. -A4 = ("a4",4) ADDREG. -A5 = ("a5",4) ADDREG. -#endif - -LB = ("a6",4) LOCALBASE. - - - - - -/***************** - ** T O K E N S ** - *****************/ - -TOKENS: -IADDREG = {REGISTER reg;} 2 cost=(0,2) "(%[reg])" - /* indirect address reg. */ -IADDREG1 = {REGISTER reg;} 2 cost=(0,2) "(%[reg])" -DISPL = {REGISTER reg; - INT dis;} 2 cost=(2,4) "%[dis](%[reg])" - /* displacement */ -DISPL1 = {REGISTER reg; - INT dis;} 2 cost=(2,4) "%[dis](%[reg])" -INDEXED = {REGISTER reg,ireg; - INT di;} 2 cost=(2,5) "%[di](%[reg],%[ireg].w)" -ABS = {STRING addr;} 2 cost=(3,5) "%[addr]" -ABS1 = {STRING addr;} 2 cost=(3,5) "%[addr]" -IMMEDIATE = {INT cc;} 2 cost=(1,2) "#%[cc]" -LOCAL_ADDR = {INT off;} 4 cost=(2,6) "%[off](a6)" -REGOFF_ADDR = {REGISTER reg; - INT off;} 4 cost=(2,6) "%[off](%[reg])" -EXTERNAL_ADDR = {STRING off;} 4 cost=(4,4) "#%[off]" -INDEX_ADDR = {REGISTER reg,ireg; - INT di;} 4 - -IADDREG4 = {REGISTER reg;} 4 cost=(0,4) "(%[reg])" /* indirect address reg. */ -DISPL4 = {REGISTER reg; - INT dis;} 4 cost=(2,6) "%[dis](%[reg])" /* disisplacement */ -INDEXED4 = {REGISTER reg,ireg; - INT di;} 4 cost=(2,7) "%[di](%[reg],%[ireg].w)" -/* The ABS addressing mode requires either 1 or 2 words of extension. - * We just use the average (1.5 words=2bytes). The access time is either - * 4 or 6 cycles, so we use 5. - */ - -ABS4 = {STRING addr;} 4 cost=(3,7) "%[addr]" -IMMEDIATE4 = {INT cc;} 4 cost=(4,4) "#%[cc]" -DOUBLE = {STRING cc;} 4 cost=(4,4) "#%[cc]" -DOUBLEZERO = { } 4 -EXTENDED4 = {REGISTER reg;} 4 cost=(0,0) "%[reg]" - -REGINC1 = {REGISTER reg;} 2 cost=(0,3) "(%[reg])+" -REGINC2 = {REGISTER reg;} 2 cost=(0,3) "(%[reg])+" -REGINC4 = {REGISTER reg;} 4 cost=(0,3) "(%[reg])+" -REGDEC1 = {REGISTER reg;} 2 cost=(0,3) "-(%[reg])" -REGDEC2 = {REGISTER reg;} 2 cost=(0,3) "-(%[reg])" -REGDEC4 = {REGISTER reg;} 4 cost=(0,3) "-(%[reg])" - - - - -/************************************* - ** T O K E N E X P R E S S I O N S ** - *************************************/ - -TOKENEXPRESSIONS: -REGCH1 = REGINC1 + REGDEC1 -REGCH2 = REGINC2 + REGDEC2 -REGCH4 = REGINC4 + REGDEC4 -REGCH = REGCH1 + REGCH2 + REGCH4 -DATA = DATAREG + IADDREG + DISPL + INDEXED + - ABS + IMMEDIATE + REGCH2 -MEMORY = DATA - DATAREG -CONTROL = MEMORY - IMMEDIATE -ALTERABLE = DATAREG + IADDREG + DISPL + - INDEXED + ABS + REGCH2 -ANY = DATA + MEMORY + CONTROL + ALTERABLE -DATA_ALT = DATA * ALTERABLE -ALT_MEM = ALTERABLE * MEMORY - -DATASCR = DATAREG * SCRATCH -ADDSCR = ADDREG * SCRATCH -MEM_ALL = ALL - DATAREG - DATAREG4 - ADDREG - IMMEDIATE - IMMEDIATE4 - - LOCAL_ADDR -REGOFF_ADDR - EXTERNAL_ADDR - DOUBLE - DOUBLEZERO -ALL_ACCESSIBLE = IADDREG + IADDREG4 + IADDREG1 + INDEXED + INDEXED4 + REGCH - -ANY1 = DISPL1 + ABS1 + IADDREG1 + REGCH1 + IMMEDIATE -DATA_ALT1 = ANY1 -DATA_ALT_1OR2 = DATA_ALT + DATA_ALT1 - - -REG4 = DATAREG4 + ADDREG + EXTENDED4 -DATA4 = DATAREG4 + IADDREG4 + DISPL4 + INDEXED4 + - ABS4 + IMMEDIATE4 + DOUBLE + REGCH4 + EXTENDED4 -MEMORY4 = DATA4 - DATAREG4 -CONTROL4 = MEMORY4 - IMMEDIATE4 - DOUBLE -ALTERABLE4 = DATAREG4 + ADDREG + IADDREG4 + DISPL4 + - INDEXED4 + ABS4 + REGCH4 + EXTENDED4 -ANY4 = DATA4 + MEMORY4 + CONTROL4 + ALTERABLE4 + LOCALBASE + - EXTERNAL_ADDR -DATA_ALT4 = DATA4 * ALTERABLE4 -ALT_MEM4 = ALTERABLE4 * MEMORY4 - -DATASCR4 = DATAREG4 * SCRATCH -NO_ADDREG = EXTERNAL_ADDR + ABS4 + IMMEDIATE4 + EXTENDED4 + DATAREG4 - -CONST4 = EXTERNAL_ADDR + IMMEDIATE4 - - - - -/************* - ** C O D E ** - *************/ - -CODE: - -/* G R O U P I : L O A D S */ - -loc | | | {IMMEDIATE,$1} | | -loc loc $1==0 && $2==0 | | | {DOUBLEZERO} | | -ldc | | | {DOUBLE, $1} | | -#ifdef REGVARS -lol inreg($1)==2 | | | regvar($1) | | -#endif -lol | | | {DISPL,LB,$1} | | -#ifdef REGVARS -ldl inreg($1)==2 | | remove(REGCH, %[reg] == regvar($1)) - | regvar($1) | | -#endif -ldl | | | {DISPL4,LB,$1} | | -loe | | | {ABS,$1} | | -lde | | | {ABS4,$1} | | -#ifdef REGVARS -lil inreg($1) == 2 | | | {IADDREG, regvar($1)} | | -#endif -lil | | allocate(ADDREG = {DISPL4,LB,$1})| {IADDREG,%[a]} | | -lof | ADDREG | | {DISPL,%[1],$1} | | -... | nocoercions: EXTERNAL_ADDR | | {ABS,%[1.off]+"+"+tostring($1)} | | -... | nocoercions: LOCAL_ADDR | | {DISPL,LB,%[1.off]+$1} | | -... | nocoercions: REGOFF_ADDR | | {DISPL,%[1.reg],%[1.off]+$1} | | -ldf | ADDREG | | {DISPL4,%[1],$1} | | -... | nocoercions: EXTERNAL_ADDR | | {ABS4,%[1.off]+"+"+tostring($1)} | | -... | nocoercions: LOCAL_ADDR | | {DISPL4,LB,%[1.off]+$1} | | -... | nocoercions: REGOFF_ADDR | | {DISPL4,%[1.reg],%[1.off]+$1} | | -lal | | | {LOCAL_ADDR,$1} | | -| LOCAL_ADDR | allocate(ADDREG) - "lea %[1.off](a6),%[a]" - samecc | %[a] | | -| REGOFF_ADDR | allocate(ADDREG) - "lea %[1.off](%[1.reg]),%[a]" - samecc | %[a] | | -lae | | | {EXTERNAL_ADDR,$1} | | -| EXTERNAL_ADDR | allocate(ADDREG) - "lea %[1.off],%[a]" - samecc | %[a] | | (3,5) - -/* For the lxl and lxa instructions we assume that the static link - * (i.e. a pointer to the LB of the lexically enclosing subprogram) - * is passed as zero-th actual parameter. The distance (in bytes) - * between LB and the zero-th parameter is the constant EM_BSIZE - */ - -lxl $1 == 0 | | | LB | | -lxl $1 == 1 | | | {DISPL4,LB,8} | | -lxl $1 == 2 | | - allocate(ADDREG) - "move.l 8(a6),%[a]" - "move.l 8(%[a]),%[a]" | %[a] | | -lxl $1>1 | | - allocate(ADDREG,DATAREG = {IMMEDIATE,$1-1}) - "move.l a6,%[a]" - "1:" - "move.l 8(%[a]),%[a]" - "dbf %[b],1b" - erase(%[b]) | %[a] | | -lxa $1 == 0 | | - allocate(ADDREG = {IMMEDIATE4,8}) - "add.l a6,%[a]" - erase(%[a]) | %[a] | | -lxa $1 > 0 | | - allocate(ADDREG, DATAREG = {IMMEDIATE,$1-1}) - "move.l a6,%[a]" - "1:" - "move.l 8(%[a]),%[a]" - "dbf %[b],1b" - "add.l #8,%[a]" - erase(%[b]) | %[a] | | -loi $1 == 1 | ADDREG | | {IADDREG1, %[1]} | | -... | nocoercions: LOCAL_ADDR | | {DISPL1,LB,%[1.off]} | | -... | nocoercions: REGOFF_ADDR | | {DISPL1,%[1.reg],%[1.off]} | | -... | nocoercions: EXTERNAL_ADDR | | {ABS1,%[1.off]} | | -loi $1 == 2 | ADDREG | | {IADDREG,%[1]} | | -loi $1 == 4 | ADDREG | | {IADDREG4,%[1]} | | -lal loi $2 == 6 | | remove(ALL) - "move.w $1+4(a6),-(sp)" - "move.l $1(a6),-(sp)" | | | -lal loi $2 == 8 | | remove(ALL) - "move.l $1+4(a6),-(sp)" - "move.l $1(a6),-(sp)" | | | -lae loi $2 == 6 | | remove(ALL) - "move.w $1+4,-(sp)" - "move.l $1,-(sp)" | | | -lae loi $2 == 8 | | remove(ALL) - "move.l $1+4,-(sp)" - "move.l $1,-(sp)" | | | -loi $1 == 6 | ADDREG | | {DISPL,%[1],4} {IADDREG4,%[1]} | | -loi $1 == 8 | ADDREG | | {DISPL4,%[1],4} {IADDREG4,%[1]} | | -loi $1 > 8 | ADDSCR | remove(ALL) - allocate(DATAREG4= {IMMEDIATE4,$1/2-1}) - "add.l #$1,%[1]" - "1:" - "move.w -(%[1]),-(sp)" - "dbf %[a],1b" - erase(%[a]) | | | - ... | nocoercions: LOCAL_ADDR | - remove(ALL) - allocate(DATAREG4 = {IMMEDIATE4,$1/2-1}, - ADDREG) - "lea %[1.off]+$1(a6),%[b]" - "1:" - "move.w -(%[b]),-(sp)" - "dbf %[a],1b" - erase(%[a]) | | | - ... | nocoercions: EXTERNAL_ADDR | - remove(ALL) - allocate(DATAREG4={IMMEDIATE4,$1/2-1}, - ADDREG) - "lea %[1.off]+$1,%[b]" - "1:" - "move.w -(%[b]),-(sp)" - "dbf %[a],1b" - erase(%[a]) | | | -los $1 == 2 | | - remove(ALL) - "jsr .los" | | | -lpi | | | {EXTERNAL_ADDR,$1} | | - - - - -/* G R O U P II : S T O R E S */ - - -/* A store instruction can always corrupt part of the fakestack, - * so some items of the stack have to be removed (i.e. pushed on - * the real stack or stored in a register). Registers on the - * fakestack will never be corrupted, because they can never be - * the destination. - * For most store instructions (e.g. sil,stf) we have hardly any - * idea what the destination will be, so everything on the - * fakestack (except registers) is removed (i.e. remove(MEM_ALL)). - * For a stl,sdl,ste and sde we remove only those items that may - * be affected, assuming that a stl only affects locals and a - * ste only affects externals. Care has to be taken that doubles - * and singles may overlap, e.g. "lol 6 sdl 4". - * Furthermore, stacktoken instances that resulted from a lof,lif - * or loi may be corrupted too. - */ - - -#ifdef REGVARS -stl inreg($1)==2 | nocoercions: ANY | remove(regvar($1)) - move(%[1],regvar($1)) | | | -... | STACK | - "move.w (sp)+,%(regvar($1)%)" | | | -#endif -stl | nocoercions: ANY | remove(DISPL,%[reg] == LB && %[dis] == $1) - remove(DISPL4,%[reg] == LB && (%[dis] == $1-2 || - %[dis] == $1)) - remove(DISPL1,%[reg] == LB && (%[dis] == $1 || - %[dis] == $1+1)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - move(%[1],{DISPL,LB,$1}) | | | -... | STACK | - "move.w (sp)+,$1(a6)" | | | -ste | ANY | - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - move(%[1],{ABS,$1}) | | | -#ifdef REGVARS -sil inreg($1)==2 | ANY | remove(MEM_ALL) - move(%[1],{IADDREG,regvar($1)}) | | | -#endif -sil | ANY | allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - move(%[1],{IADDREG,%[a]}) - setcc({IADDREG,%[a]}) | | | -stf | ADDREG ANY | remove(MEM_ALL) - move(%[2],{DISPL,%[1],$1}) | | | -sti $1 == 1 - | ADDREG DATAREG | - remove(MEM_ALL) - move(%[2], {IADDREG1,%[1]}) | | | -... | ADDREG IADDREG | - remove(MEM_ALL) - move({DISPL,%[2.reg],1}, {IADDREG1,%[1]}) | | | -... | ADDREG DISPL | - remove(MEM_ALL) - move({DISPL,%[2.reg],%[2.dis]+1}, {IADDREG1,%[1]}) | | | -... | ADDREG INDEXED | - remove(MEM_ALL) - move({INDEXED,%[2.reg],%[2.ireg],%[2.di]+1}, - {IADDREG1,%[1]}) | | | -... | ADDREG ABS | - remove(MEM_ALL) - move({ABS,%[2.addr]+"+1"}, {IADDREG1,%[1]}) | | | -... | ADDREG IMMEDIATE | - remove(MEM_ALL) - move({IMMEDIATE,(%[2.cc]-((%[2.cc]>>8)<<8)+128)%256-128}, - {IADDREG1,%[1]}) | | | -... | ADDREG ANY1+DATAREG | - remove(MEM_ALL) - move(%[2],{IADDREG1,%[1]}) | | | -... | nocoercions: LOCAL_ADDR DATAREG | - remove(MEM_ALL) - move(%[2], {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR IADDREG | - remove(MEM_ALL) - move({DISPL,%[2.reg],1}, {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR DISPL | - remove(MEM_ALL) - move({DISPL,%[2.reg],%[2.dis]+1}, {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR INDEXED | - remove(MEM_ALL) - move({INDEXED,%[2.reg],%[2.ireg],%[2.di]+1}, - {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR ABS | - remove(MEM_ALL) - move({ABS,%[2.addr]+"+1"}, {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR IMMEDIATE | - remove(MEM_ALL) - move({IMMEDIATE,(%[2.cc]-((%[2.cc]>>8)<<8)+128)%256-128}, - {DISPL1,LB,%[1.off]}) | | | -... | nocoercions: LOCAL_ADDR ANY1+DATAREG | - remove(MEM_ALL) - move(%[2],{DISPL1,LB,%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR DATAREG | - remove(MEM_ALL) - move(%[2], {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR IADDREG | - remove(MEM_ALL) - move({DISPL,%[2.reg],1}, {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR DISPL | - remove(MEM_ALL) - move({DISPL,%[2.reg],%[2.dis]+1}, {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR INDEXED | - remove(MEM_ALL) - move({INDEXED,%[2.reg],%[2.ireg],%[2.di]+1}, - {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR ABS | - remove(MEM_ALL) - move({ABS,%[2.addr]+"+1"}, {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR IMMEDIATE | - remove(MEM_ALL) - move({IMMEDIATE,(%[2.cc]-((%[2.cc]>>8)<<8)+128)%256-128}, - {DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: REGOFF_ADDR ANY1+DATAREG | - remove(MEM_ALL) - move(%[2],{DISPL1,%[1.reg],%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR DATAREG | - remove(MEM_ALL) - move(%[2], {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR IADDREG | - remove(MEM_ALL) - move({DISPL,%[2.reg],1}, {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR DISPL | - remove(MEM_ALL) - move({DISPL,%[2.reg],%[2.dis]+1}, {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR INDEXED | - remove(MEM_ALL) - move({INDEXED,%[2.reg],%[2.ireg],%[2.di]+1}, - {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR ABS | - remove(MEM_ALL) - move({ABS,%[2.addr]+"+1"}, {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR IMMEDIATE | - remove(MEM_ALL) - move({IMMEDIATE,(%[2.cc]-((%[2.cc]>>8)<<8)+128)%256-128}, - {ABS1,%[1.off]}) | | | -... | nocoercions: EXTERNAL_ADDR ANY1+DATAREG | - remove(MEM_ALL) - move(%[2],{ABS1,%[1.off]}) | | | -sti $1 == 2 | ADDREG ANY | remove(MEM_ALL) - move(%[2],{IADDREG,%[1]}) | | | -sti $1 == 4 | ADDREG ANY4 | remove(MEM_ALL) - move(%[2],{IADDREG4,%[1]}) | | | -sti $1 > 4 | ADDSCR | remove(ALL) - allocate(DATAREG4={IMMEDIATE4,$1/2-1}) - "1:" - "move.w (sp)+,(%[1])+" - "dbf %[a], 1b" - setcc({IADDREG,%[1]}) | | | -sts $1 == 2 | | remove(ALL) - "jsr .sts" - | | | -#ifdef REGVARS -sdl inreg($1)==2 | nocoercions: ANY4 | remove(regvar($1)) - move (%[1],regvar($1)) | | | -... | STACK | - "move.l (sp)+,%(regvar($1)%)" | | | -#endif -sdl | nocoercions: ANY4 | - remove(DISPL,%[reg] == LB && (%[dis] == $1 || %[dis] == $1+2)) - remove(DISPL4,%[reg] == LB && (%[dis] >= $1-2 && - %[dis] <= $1+2)) - remove(DISPL1,%[reg] == LB && (%[dis] >= $1 && - %[dis] <= $1+3)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - move(%[1],{DISPL4,LB,$1}) | | | -... | STACK | - "move.l (sp)+,$1(a6)" | | | -sde | ANY4 | - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - move(%[1],{ABS4,$1}) | | | -sdf | ADDREG ANY4 | remove(MEM_ALL) - move(%[2],{DISPL4,%[1],$1}) | | | - - -#ifdef REGVARS - -/* R U L E S F O R R E G I S T E R V A R I A B L E S */ - -/* Note that these rules should come before the normal patterns for - * local variables that are not register-variables. - */ - -ldl ldl adp sdl loi $1==$2 && $2==$4 && inreg($1)==2 && $3==1 && $5==1 | | - remove(regvar($1)) - | { REGINC1, regvar($1)} | | -ldl ldl adp sdl loi $1==$2 && $2==$4 && inreg($1)==2 && $3==2 && $5==2 | | - remove(regvar($1)) - | { REGINC2, regvar($1)} | | -ldl ldl adp sdl loi $1==$2 && $2==$4 && inreg($1)==2 && $3==4 && $5==4 | | - remove(regvar($1)) - | { REGINC4, regvar($1)} | | -ldl adp sdl ldl loi $1==$3 && $1==$4 && $2==(0-1) && inreg($1)==2 && $5==1 - | | remove(regvar($1)) - | {REGDEC1,regvar($1)} | | -ldl adp sdl ldl loi $1==$4 && $2==(0-2) && inreg($1)==2 && $3==$4 && $5==2 - | | remove(regvar($1)) - | {REGDEC2,regvar($1)} | | -ldl adp sdl ldl loi $1==$4 && $2==(0-4) && inreg($1)==2 && $3==$4 && $5==4 - | | remove(regvar($1)) - | {REGDEC4,regvar($1)} | | -ldl sti ldl adp sdl $1==$3 && $3==$5 && inreg($1)==2 && $2==1 && $4==1 | ANY1+DATAREG | - remove(regvar($1)) - remove(MEM_ALL) - "move.b %[1],(%(regvar($1)%))+" | | | -ldl sti ldl adp sdl $1==$3 && $3==$5 && inreg($1)==2 && $2==2 && $4==2 | ANY | - remove(regvar($1)) - remove(MEM_ALL) - "move.w %[1],(%(regvar($1)%))+" | | | -ldl sti ldl adp sdl $1==$3 && $3==$5 && inreg($1)==2 && $2==4 && $4==4 | ANY4 | - remove(regvar($1)) - remove(MEM_ALL) - "move.l %[1],(%(regvar($1)%))+" | | | -ldl adp sdl ldl sti $1==$4 && inreg($1)==2 && $2==(0-1) && $5==1 && $3==$4 - | ANY1+DATAREG | - remove(regvar($1)) - remove(MEM_ALL) - "move.b %[1],-(%(regvar($1)%))" | | | -ldl adp sdl ldl sti $1==$4 && inreg($1)==2 && $2==(0-2) && $5==2 && $3==$4 - | ANY | - remove(regvar($1)) - remove(MEM_ALL) - "move.w %[1],-(%(regvar($1)%))" | | | -ldl adp sdl ldl sti $1==$4 && inreg($1)==2 && $2==(0-4) && $5==4 && $3==$4 - | ANY4 | - remove(regvar($1)) - remove(MEM_ALL) - "move.l %[1],-(%(regvar($1)%))" | | | - -ldl ldl adp sdl $1==$2 && $2==$4 && inreg($1)==2 | | - allocate(ADDREG=regvar($1)) | %[a] - | ldl $2 adp $3 sdl $2 | -lol inl $1==$2 && inreg($1)==2 | | - allocate(DATAREG=regvar($1)) | %[a] - | inl $2 | -lol inl $1==$2 | | - allocate(DATAREG={DISPL,LB,$1}) | %[a] - | inl $2 | -lol del $1==$2 && inreg($1)==2 | | - allocate(DATAREG=regvar($1)) | %[a] - | del $2 | -lol del $1==$2 | | - allocate(DATAREG={DISPL,LB,$1}) | %[a] - | del $2 | -loe ine $1==$2 | | - allocate(DATAREG={ABS,$1}) | %[a] - | ine $2 | -loe dee $1==$2 | | - allocate(DATAREG={ABS,$1}) | %[a] - | dee $2 | - -lol adi stl $1 == $3 && $2 == 2 && inreg($1)==2 | ANY | - remove(regvar($1)) - "add.w %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lil adi sil $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],(%(regvar($1)%))" | | | -ldl ldc adi sdl $1 == $4 && $3 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "add.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -ldl adi sdl $1 == $3 && $2 == 4 && inreg($1)==2 | DATAREG4+EXTENDED4+DOUBLE | - remove(regvar($1)) - "add.l %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lol loc sbi stl $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "sub.w #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lil loc adi sil $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(MEM_ALL) - "add.w #$2,(%(regvar($1)%))" | | | -ldl ldc sbi sdl $1 == $4 && $3 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "sub.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lol ngi stl $1 == $3 && $2 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "neg.w %(regvar($1)%)" - erase(regvar($1)) | | | -lil ngi sil $1 == $3 && $2 == 2 && inreg($1)==2 | | - remove(MEM_ALL) - "neg.w (%(regvar($1)%))" | | | -lol ngi stl $1 == $3 && $2 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "neg.l %(regvar($1)%)" - erase(regvar($1)) | | | -lol loc sli stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "asl.w #1, %(regvar($1)%)" - erase(regvar($1)) | | | -lol loc sri stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "asr.w #1,%(regvar($1)%)" - erase(regvar($1)) | | | -lol loc sru stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "lsr.w #1,%(regvar($1)%)" - erase(regvar($1)) | | | -lol loc adu stl $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "add.w #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lol adu stl $1 == $3 && $2 == 2 && inreg($1)==2 | ANY | - remove(regvar($1)) - "add.w %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lil adu sil $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],(%(regvar($1)%))" | | | -ldl ldc adu sdl $1 == $4 && $3 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "add.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -ldl adu sdl $1 == $3 && $2 == 4 && inreg($1)==2 | DATAREG4+EXTENDED4+DOUBLE | - remove(regvar($1)) - "add.l %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lol loc sbu stl $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "sub.w #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lil loc adu sil $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(MEM_ALL) - "add.w #$2,(%(regvar($1)%))" | | | -ldl ldc sbu sdl $1 == $4 && $3 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "sub.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lol loc slu stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "asl.w #1,%(regvar($1)%)" - erase(regvar($1)) | | | -ldl adp sdl $1 == $3 && inreg($1)==2 | | remove(regvar($1)) - "add.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -ldl loi ldl loi adp ldl sti $2==4&&$4==4&&$7==4&&$1==$3&&$1==$6&&inreg($1)==2 - | | remove(MEM_ALL) - allocate(ADDREG = {IADDREG4,regvar($1)}) - "add.l #$5,(%(regvar($1)%))" | %[a] | | -loc ldl ads sdl $2 == $4 && $3 == 2 && inreg($2)==2 | | - remove(regvar($2)) - "add.l #$1,%(regvar($2)%)" - erase(regvar($2)) | | | -ldl ldc ads sdl $1 == $4 && $3 == 4 && inreg($1)==2 | | - remove(regvar($1)) - "add.l #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lil inc sil $1==$3 && inreg($1)==2 | | - remove(MEM_ALL) - "add.w #1,(%(regvar($1)%))" - setcc({IADDREG,regvar($1)}) | | | -lil dec sil $1==$3 && inreg($1)==2 | | - remove(MEM_ALL) - "sub.w #1,(%(regvar($1)%))" - setcc({IADDREG,regvar($1)}) | | | -lol and stl $1 == $3 && $2 == 2 && inreg($1)==2 | ANY | - remove(regvar($1)) - "and.w %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lil and sil $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "and.w %[1],(%(regvar($1)%))" | | | -lol ior stl $1 == $3 && $2 == 2 && inreg($1)==2 | ANY | - remove(regvar($1)) - "or.w %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lil ior sil $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "or.w %[1],(%(regvar($1)%))" | | | -lol loc xor stl $1 == $4 && $3 == 2 && inreg($1)==2 | | - remove(regvar($1)) - "eor.w #$2,%(regvar($1)%)" - erase(regvar($1)) | | | -lol xor stl $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(regvar($1)) - "eor.w %[1],%(regvar($1)%)" - erase(regvar($1)) | | | -lil xor sil $1 == $3 && $2 == 2 && inreg($1)==2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "eor.w %[1],(%(regvar($1)%))" | | | -ldl ldf adp ldl sdf inreg($1)==2 && $1==$4 && $2==$5 | | - remove(MEM_ALL) - "add.l #$3,$2(%(regvar($1)%))" | | | -ldl ldf dup adp ldl sdf inreg($1)==2 && $1==$5 && $2==$6 && $3==4 | | - remove(MEM_ALL) - allocate(ADDREG={DISPL4,regvar($1), $2}) - "add.l #$4,$2(%(regvar($1)%))" - erase(%[a]) | %[a] | | -ldl lof inc ldl stf inreg($1)==2 && $1==$4 && $2==$5 | | - remove(MEM_ALL) - "add.w #1,$2(%(regvar($1)%))" | | | -ldl lof dec ldl stf inreg($1)==2 && $1==$4 && $2==$5 | | - remove(MEM_ALL) - "sub.w #1,$2(%(regvar($1)%))" | | | -ldl lof adi ldl stf inreg($1)==2 && $1==$4 && $2==$5 && $3==2 - | IMMEDIATE+DATAREG | - remove(MEM_ALL) - "add.w %[1],$2(%(regvar($1)%))" | | | -ldl lof sbi ldl stf inreg($1)==2 && $1==$4 && $2==$5 && $3==2 - | IMMEDIATE+DATAREG | - remove(MEM_ALL) - "sub.w %[1],$2(%(regvar($1)%))" | | | -#endif -/* G R O U P III AND IV : I N T E G E R A R I T H M E T I C */ - -adi $1 == 2 | ANY DATASCR | "add.w %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,2)+%[1] -... | DATASCR ANY | "add.w %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,2)+%[2] -lol adi stl $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],$1(a6)" | | | -loe adi ste $1 == $3 && $2 == 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],$1" | | | -lil adi sil $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - allocate(ADDREG={DISPL4,LB,$1}) - remove(ALL) - "add.w %[1],(%[a])" | | | -loe loc adi ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "add.w #$2,$1" | | | (7,11) -adi $1 == 4 | ANY4 DATASCR4 | "add.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,3)+%[1] -... | DATASCR4 ANY4 | "add.l %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,3)+%[2] -ldl ldc adi sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "add.l #$2,$1(a6)" | | | (8,16) -lde ldc adi sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "add.l #$2,$1" | | | (9,17) -ldl adi sdl $1 == $3 && $2 == 4 && inreg($1) < 2 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "add.l %[1],$1(a6)" | | | -lde adi sde $1 == $3 && $2 == 4 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "add.l %[1],$1" | | | -sbi $1 == 2 | ANY DATASCR | "sub.w %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,2)+%[1] -lol loc sbi stl $1 == $4 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "sub.w #$2,$1(a6)" | | | (6,10) -loe loc sbi ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "sub.w #$2,$1" | | | (7,11) -lil loc adi sil $1 == $4 && $3 == 2 | | - allocate(ADDREG = {DISPL4,LB,$1}) - remove(MEM_ALL) - "add.w #$2,(%[a])" | | | -sbi $1 == 4 | ANY4 DATASCR4 | "sub.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,3)+%[1] -ldl ldc sbi sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "sub.l #$2,$1(a6)" | | | (8,16) -lde ldc sbi sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "sub.l #$2,$1" | | | (9,17) -mli $1 == 2 | DATASCR ANY | "muls %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -mli $1 == 2 | ANY DATASCR | "muls %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -loc loc cii ldc mli $1==2 && $2==4 && highw(4)==0 && loww(4)>0 && $5==4 - | DATASCR | allocate(%[1],DATAREG4) - move(%[1],%[a.1]) - "muls #$4,%[a]" - erase(%[a]) - setcc(%[a]) | %[a] | | -mli $1 == 4 | | remove(ALL) - "jsr .mli" - | DD1 | | -dvi $1 == 2 | ANY DATASCR | "ext.l %[2]" - "divs %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -dvi $1 == 4 | | remove(ALL) - "jsr .dvi" - | DD1 | | -rmi $1 == 2 | ANY DATASCR | "ext.l %[2]" - "divs %[1],%[2]" - "swap %[2]" - erase(%[2]) | %[2] | | -rmi $1 == 4 | | remove(ALL) - "jsr .dvi" - | DD2 | | -ngi $1 == 2 | DATASCR | "neg %[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -lol ngi stl $1 == $3 && $2 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "neg.w $1(a6)" | | | -loe ngi ste $1 == $3 && $2 == 2 | | - remove(MEM_ALL) - "neg.w $1" | | | -lil ngi sil $1 == $3 && $2 == 2 | | - allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "neg.w (%[a])" | | | -ngi $1 == 4 | DATASCR4 | "neg.l %[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -lol ngi stl $1 == $3 && $2 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "neg.l $1(a6)" | | | -loe ngi ste $1 == $3 && $2 == 4 | | - remove(MEM_ALL) - "neg.l $1" | | | -loc sli $1 == 1 && $2 == 2 | DATASCR | - "add.w %[1],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -loc sli $1 > 1 && $1 <= 8 && $2 == 2 | DATASCR | - "asl.w #$1,%[1]" - erase(%[1]) | %[1] | | -loc sli $1 == 1 && $2 == 4 | DATASCR4 | - "add.l %[1],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -loc sli $1 > 1 && $1 <= 8 && $2 == 4 | DATASCR4 | - "asl.l #$1,%[1]" - erase(%[1]) | %[1] | | -lol loc sli ads inreg($1) == 2 && $2 == 1 && $3 == 2 && $4 == 2 | ADDSCR | - "add.w %(regvar($1)%),%[1]" - "add.w %(regvar($1)%),%[1]" - erase(%[1]) | %[1] | | -lol loc sli stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "asl.w #1, $1(a6)" | | | -loe loc sli ste $1 == $4 && $2 == 1 && $3 == 2 | | - remove(MEM_ALL) - "asl.w #1, $1" | | | -sli $1 == 2 | DATAREG DATASCR | "asl %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -sli $1 == 4 | DATAREG DATASCR4 | "asl.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -loc sri $1 >= 1 && $1 <= 8 && $2 == 2 | DATASCR | - "asr.w #$1,%[1]" - erase(%[1]) | %[1] | | -loc sri $1 >= 1 && $1 <= 8 && $2 == 4 | DATASCR4 | - "asr.l #$1,%[1]" - erase(%[1]) | %[1] | | -lol loc sri stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "asr.w #1,$1(a6)" | | | -loe loc sri ste $1 == $4 && $2 == 1 && $3 == 2 | | - remove(MEM_ALL) - "asr.w #1,$1" | | | -sri $1 == 2 | DATAREG DATASCR | "asr %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -sri $1 == 4 | DATAREG DATASCR4 | "asr.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -mlu $1 == 2 | ANY DATASCR | "mulu %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -mlu $1 == 4 | | remove(ALL) - "jsr .mlu" - | DD1 | | -dvu $1 == 2 | ANY ANY | allocate(DATAREG) - "clr.l %[a]" - "move.w %[2],%[a]" - "divu %[1],%[a]" | %[a] | | -dvu $1 == 4 | | remove(ALL) - "jsr .dvu" - | DD1 | | -rmu $1 == 2 | ANY ANY | allocate(DATAREG) - "clr.l %[a]" - "move.w %[2],%[a]" - "divu %[1],%[a]" - "swap %[a]" | %[a] | | -rmu $1 == 4 | | remove(ALL) - "jsr .dvu" - | DD2 | | -loc sru $1 >= 1 && $1 <= 8 && $2 == 2 | DATASCR | - "lsr.w #$1,%[1]" - erase(%[1]) | %[1] | | -loc sru $1 >= 1 && $1 <= 8 && $2 == 4 | DATASCR4 | - "lsr.l #$1,%[1]" - erase(%[1]) | %[1] | | -lol loc sru stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "lsr.w #1,$1(a6)" | | | -loe loc sru ste $1 == $4 && $2 == 1 && $3 == 2 | | - remove(MEM_ALL) - "lsr.w #1,$1" | | | -sru $1 == 2 | DATAREG DATASCR | "lsr %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -sru $1 == 4 | DATAREG DATASCR4 | "lsr.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | - - -/* The adu instruction has precisely the same effect as an adi. - * The same applies to (sbu,sbi) and (slu,sli) - */ - -lol loc adu stl $1 == $4 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "add.w #$2,$1(a6)" | | | -lol adu stl $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],$1(a6)" | | | -loe adu ste $1 == $3 && $2 == 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "add.w %[1],$1" | | | -lil adu sil $1 == $3 && $2 == 2 | DATAREG+IMMEDIATE | - allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "add.w %[1],(%[a])" | | | -loe loc adu ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "add.w #$2,$1" | | | (7,11) -ldl ldc adu sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "add.l #$2,$1(a6)" | | | (8,16) -lde ldc adu sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "add.l #$2,$1" | | | (9,17) -ldl adu sdl $1 == $3 && $2 == 4 && inreg($1) < 2 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "add.l %[1],$1(a6)" | | | -lde adu sde $1 == $3 && $2 == 4 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "add.l %[1],$1" | | | -lol loc sbu stl $1 == $4 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "sub.w #$2,$1(a6)" | | | (6,10) -loe loc sbu ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "sub.w #$2,$1" | | | (7,11) -lil loc adu sil $1 == $4 && $3 == 2 | | - allocate(ADDREG = {DISPL4,LB,$1}) - remove(MEM_ALL) - "add.w #$2,(%[a])" | | | -ldl ldc sbu sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "sub.l #$2,$1(a6)" | | | (8,16) -lde ldc sbu sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "sub.l #$2,$1" | | | (9,17) -loc slu $1 >= 1 && $1 <= 8 && $2 == 2 | DATASCR | - "asl.w #$1,%[1]" - erase(%[1]) | %[1] | | -loc slu $1 >= 1 && $1 <= 8 && $2 == 4 | DATASCR4 | - "asl.l #$1,%[1]" - erase(%[1]) | %[1] | | -lol loc slu stl $1 == $4 && $2 == 1 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "asl.w #1,$1(a6)" | | | -loe loc slu ste $1 == $4 && $2 == 1 && $3 == 2 | | - remove(MEM_ALL) - "asl.w #1,$1" | | | -adu | | | | adi $1 | -sbu | | | | sbi $1 | -slu | | | | sli $1 | - -/* Floating point stuff */ -adf $1==4 | | | | cal ".adf4" asp 4 | -adf $1==8 | | | | cal ".adf8" asp 8 | -sbf $1==4 | | | | cal ".sbf4" asp 4 | -sbf $1==8 | | | | cal ".sbf8" asp 8 | -mlf $1==4 | | | | cal ".mlf4" asp 4 | -mlf $1==8 | | | | cal ".mlf8" asp 8 | -dvf $1==4 | | | | cal ".dvf4" asp 4 | -dvf $1==8 | | | | cal ".dvf8" asp 8 | -ngf $1==4 | | | | cal ".ngf4" | -ngf $1==8 | | | | cal ".ngf8" | -fif $1==4 | | | | lor 1 cal ".fif4" asp 4 | -fif $1==8 | | | | lor 1 cal ".fif8" asp 4 | -fef $1==4 | | | | lor 1 adp 0-2 cal ".fef4" asp 2 | -fef $1==8 | | | | lor 1 adp 0-2 cal ".fef8" asp 2 | - - -/* G R O U P VI : P O I N T E R A R I T H M E T I C */ - -adp $1 >= 1 && $1 <= 8 - | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" - + tostring($1)} | | -... | nocoercions: LOCAL_ADDR | | {LOCAL_ADDR,%[1.off]+$1} | | -... | nocoercions: REGOFF_ADDR | | {REGOFF_ADDR,%[1.reg],%[1.off]+$1} | | -... | nocoercions: ADDREG | | {REGOFF_ADDR,%[1],$1} | | -... | ADDSCR | "add.l #$1,%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -adp $1 >= 0-32767 && $1 <= 32767 - | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" - + tostring($1)} | | -... | nocoercions: LOCAL_ADDR | | {LOCAL_ADDR,%[1.off]+$1} | | -... | nocoercions: REGOFF_ADDR | | {REGOFF_ADDR,%[1.reg],%[1.off]+$1} | | -... | nocoercions: ADDREG | | {REGOFF_ADDR,%[1],$1} | | -... | ADDSCR | | {REGOFF_ADDR,%[1],$1} | | -adp | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" - + tostring($1)} | | -... | ADDSCR | "add.l #$1,%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | - -/* The next patterns are for efficient translation of "*p++" in C */ -ldl ldl adp sdl $1 == $2 && $2 == $4 && inreg($1) < 2 | | - allocate(ADDREG={DISPL4,LB,$1}) - remove(DISPL,%[reg] == LB && (%[dis] == $1 || %[dis] == $1+2)) - remove(DISPL4,%[reg] == LB && (%[dis] >= $1-2 && - %[dis] <= $1+2)) - remove(DISPL1,%[reg] == LB && (%[dis] >= $1 && - %[dis] <= $1+3)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "add.l #$3,$1(a6)" | %[a] | | -lde lde adp sde $1 == $2 && $2 == $4 | | - allocate(ADDREG={ABS4,$1}) - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "add.l #$3,$1" | %[a] | | -ldl adp sdl $1 == $3 && inreg($1) < 2 | | remove(MEM_ALL) - "add.l #$2,$1(a6)" | | | (8,16) -lde adp sde $1 == $3 | | remove(MEM_ALL) - "add.l #$2,$1" | | | (9,17) -ldc ads loww(1) == 0 && highw(1) == 0 && $2 == 4 | | | | | -ldc ads highw(1) == 0 && loww(1) > 0 && loww(1) <= 32767 && $2 == 4 | ADDREG | - | {REGOFF_ADDR,%[1],loww(1)} | | -ldc ads highw(1) == (0-1) && (loww(1) < 0 || loww(1) > 32767) && $2 == 4 | ADDREG | - | {REGOFF_ADDR,%[1],loww(1)} | | -ads $1 == 2 | ANY ADDSCR | "add.w %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -ads $1 == 4 | ANY4 ADDSCR | "add.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -#ifdef REGVARS -ldl ads sdl $1==$3 && inreg($1)==2 && $2==4 | ANY4 | - remove(regvar($1)) - "add.l %[1],%(regvar($1)%)" | | | -ads sdl inreg($2)==2 && $1==4 | ANY4 NO_ADDREG | - remove(regvar($2)) - move(%[1],regvar($2)) - "add.l %[2],%(regvar($2)%)" - erase(regvar($2)) | | | (2,8)+%[2] -... | NO_ADDREG ANY4 | - remove(regvar($2)) - move(%[2],regvar($2)) - "add.l %[1],%(regvar($2)%)" - erase(regvar($2)) | | | (2,8)+%[1] -... | nocoercions : ANY4 STACK | - remove(regvar($2)) - "move.l (sp)+,%(regvar($2)%)" - "add.l %[1],%(regvar($2)%)" | | | (4,8)+%[1] -#endif -loc ldl ads sdl $2 == $4 && $3 == 2 && inreg($2) < 2 | | - remove(MEM_ALL) - "add.l #$1,$2(a6)" | | | (8,16) -lde loc ads sde $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "add.l #$2,$1" | | | (9,17) -ldl ldc ads sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "add.l #$2,$1(a6)" | | | (8,16) -lde ldc ads sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "add.l #$2,$1" | | | (9,17) -ldl ads sdl $1==$3 && inreg($1)<2 && $2==4 | DOUBLE+DATAREG4+EXTENDED4 | - remove(MEM_ALL) - "add.l %[1],$1(a6)" | | | -lde ads sde $1==$3 && $2==4 | DOUBLE+DATAREG4+EXTENDED4 | - remove(MEM_ALL) - "add.l %[1],$1" | | | -sbs $1 == 2 | ANY4 DATASCR4 | "sub.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2.1] | | -sbs $1 == 4 | ANY4 DATASCR4 | "sub.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | - - -/* G R O U P VII : I N C R E M E N T / D E C R E M E N T */ - -inc | DATASCR | "add.w #1,%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -... | STACK | "add.w #1,(sp)" | | | -#ifdef REGVARS -lil inc sil $1==$3 && inreg($1) == 2 | | - remove(MEM_ALL) - "add.w #1,(%(regvar($1)%))" - setcc({IADDREG,regvar($1)}) | | | -lil dec sil $1==$3 && inreg($1) == 2 | | - remove(MEM_ALL) - "sub.w #1,(%(regvar($1)%))" - setcc({IADDREG,regvar($1)}) | | | -#endif -lil inc sil $1==$3 | | allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "add.w #1,(%[a])" | | | -lil dec sil $1==$3 | | allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "sub.w #1,(%[a])" | | | -#ifdef REGVARS -inl inreg($1)==2 | | remove(regvar($1)) - "add.w #1,%(regvar($1)%)" - erase(regvar($1)) - setcc(regvar($1)) | | | -del inreg($1)==2 | | remove(regvar($1)) - "sub.w #1,%(regvar($1)%)" - erase(regvar($1)) - setcc(regvar($1)) | | | -zrl inreg($1)==2 | | remove(regvar($1)) - "clr.w %(regvar($1)%)" - erase(regvar($1)) - setcc(regvar($1)) | | | -#endif -inl inreg($1) < 2 | | remove(DISPL,%[reg] == LB && %[dis] == $1) - remove(DISPL4,%[reg] == LB && (%[dis] == $1-2 || - %[dis] == $1)) - remove(DISPL1,%[reg] == LB && (%[dis] == $1 || - %[dis] == $1+1)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "add.w #1,$1(a6)" - setcc({DISPL,LB,$1}) | | | -ine | | - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "add.w #1,$1" - setcc({ABS,$1}) | | | -dec | DATASCR | "sub.w #1,%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -... | STACK | "sub.w #1,(sp)" | | | -del inreg($1) < 2 | | remove(DISPL,%[reg] == LB && %[dis] == $1) - remove(DISPL4,%[reg] == LB && (%[dis] == $1-2 || - %[dis] == $1)) - remove(DISPL1,%[reg] == LB && (%[dis] == $1 || - %[dis] == $1+1)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "sub.w #1,$1(a6)" - setcc({DISPL,LB,$1}) | | | -dee | | - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "sub.w #1,$1" - setcc({ABS,$1}) | | | -zrl inreg($1) < 2 | | remove(DISPL,%[reg] == LB && %[dis] == $1) - remove(DISPL4,%[reg] == LB && (%[dis] == $1-2 || - %[dis] == $1)) - remove(DISPL1,%[reg] == LB && (%[dis] == $1 || - %[dis] == $1+1)) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "clr $1(a6)" - setcc({DISPL,LB,$1}) | | | -zre | | - remove(ABS) - remove(ABS4) - remove(ABS1) - remove(DISPL,%[reg] != LB) - remove(DISPL4,%[reg] != LB) - remove(DISPL1,%[reg] != LB) - remove(ALL_ACCESSIBLE) - "clr $1" - setcc({ABS,$1}) | | | -zrf $1 == 4 | | | {IMMEDIATE4,0} | | -zrf $1 == 8 | | | {IMMEDIATE4,0} {IMMEDIATE4,0} | | -zer $1 == 2 | | | {IMMEDIATE,0} | | -zer $1 == 4 | | | | ldc 0 | -zer $1 == 6 | | remove(ALL) - "clr.l -(sp)" - "clr.w -(sp)" | | | -zer $1 == 8 | | remove(ALL) - "clr.l -(sp)" - "clr.l -(sp)" | | | -zer $1 == 10 | | remove(ALL) - "clr.l -(sp)" - "clr.l -(sp)" - "clr.w -(sp)" | | | -zer $1 == 12 | | remove(ALL) - "clr.l -(sp)" - "clr.l -(sp)" - "clr.l -(sp)" | | | -zer $1 > 12 | | remove(ALL) - allocate(DATAREG4) - "move.l #$1/2-1,%[a]" - "1:" - "clr -(sp)" - "dbf %[a],1b" | | | -zrf | | | | zer $1 | - - - -/* G R O U P VIII : C O N V E R T */ - - -loc loc cii loc loc cii $1==$5 && $2==$4 && $1 <= $2 | | | | | /* should be peephole optim */ -loc loc cii $1==$2 | | | | | -loc loc cuu $1==$2 | | | | | -loc loc ciu $1==$2 | | | | | -loc loc cui $1==$2 | | | | | - -cii | | remove(ALL) - "jsr .cii" - | | | -cuu | | remove(ALL) - "jsr .cuu" - | | | -cui | | | | cuu | -ciu | | | | cuu | - -loc loc cii $1==1 && $2==2 | DATASCR | - "ext.w %[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,3) -... | nocoercions: ANY1 | - allocate(DATAREG) - "move.b %[1],%[a]" - "ext.w %[a]" - setcc(%[a]) | %[a] | | (4,6)+%[1] -loc loc cii $1==1 && $2==4 | ANY | - allocate(%[1],DATAREG4) - move(%[1],%[a.1]) - "ext.w %[a]" - "ext.l %[a]" - erase(%[a]) - setcc(%[a]) | %[a] | | -loc loc cii $1==2 && $2==4 | ANY | - allocate(%[1],DATAREG4) - move(%[1],%[a.1]) - "ext.l %[a]" - erase(%[a]) - setcc(%[a]) | %[a] | | -#ifdef REGVARS -lol loc loc cii inreg($1)==2 && $2==2 && $3==4 | | - "ext.l %(regvar($1)%)" - | { EXTENDED4, regvar($1) } | | -#endif -loc loc cuu $1==2 && $2==4 | | | {IMMEDIATE,0} | | -loc loc ciu $1==2 && $2==4 | | | {IMMEDIATE,0} | | -loc loc cui $1==2 && $2==4 | | | {IMMEDIATE,0} | | - -loc loc loc cuu $1 == 0 && $2 == 1 && $3 == 4 | | | {DOUBLE,"0"} | | -loc loc loc ciu $1 == 0 && $2 == 1 && $3 == 4 | | | {DOUBLE,"0"} | | -loc loc loc cui $1 == 0 && $2 == 1 && $3 == 4 | | | {DOUBLE,"0"} | | -loc loc loc cuu $1 == 0 && $2 == 2 && $3 == 4 | | | {DOUBLE,"0"} | | -loc loc loc ciu $1 == 0 && $2 == 2 && $3 == 4 | | | {DOUBLE,"0"} | | -loc loc loc cui $1 == 0 && $2 == 2 && $3 == 4 | | | {DOUBLE,"0"} | | - -loc loc cii $1==4 && $2==2 | DATAREG4 | | %[1.1] | | -... | ANY-REGCH2 ANY | | %[2] | | -loc loc cuu $1==4 && $2==2 | DATAREG4 | | %[1.1] | | -... | ANY-REGCH2 | | | | -loc loc ciu $1==4 && $2==2 | DATAREG4 | | %[1.1] | | -... | ANY-REGCH2 | | | | -loc loc cui $1==4 && $2==2 | DATAREG4 | | %[1.1] | | -... | ANY-REGCH2 | | | | -loc loc loc cuu $2 == 1 && $3 == 4 && $1 > 0 && $1 < 128 | | | | ldc $1 | - -/* Floating point stuff */ - -/* - * Floating point stuff - * - * Conversion - * - */ - -loc loc cif $1==2 && $2==4 | | | | loc $1 cal ".cif4" | -loc loc cif $1==2 && $2==8 | ANY | - remove(ALL) - "clr.l -(sp)" - "move.w %[1],-(sp)" - | | loc $1 cal ".cif8" | -loc loc cif $1==4 && $2==4 | | | | loc $1 cal ".cif4" asp 2 | -loc loc cif $1==4 && $2==8 | ANY4 | - remove(ALL) - "clr.w -(sp)" - "move.l %[1],-(sp)" - | | loc $1 cal ".cif8" | -loc loc cuf $1==2 && $2==4 | | | | loc $1 cal ".cuf4" | -loc loc cuf $1==2 && $2==8 | ANY | - remove(ALL) - "clr.l -(sp)" - "move.w %[1],-(sp)" - | | loc $1 cal ".cuf8" | -loc loc cuf $1==4 && $2==4 | | | | loc $1 cal ".cuf4" asp 2 | -loc loc cuf $1==4 && $2==8 | ANY4 | - remove(ALL) - "clr.w -(sp)" - "move.l %[1],-(sp)" - | | loc $1 cal ".cuf8" | -loc loc cfi $1==4 && $2==2 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfi" asp 6 | -loc loc cfi $1==4 && $2==4 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfi" asp 4 | -loc loc cfi $1==8 && $2==2 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfi" asp 10 | -loc loc cfi $1==8 && $2==4 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfi" asp 8 | -loc loc cfu $1==4 && $2==2 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfu" asp 6 | -loc loc cfu $1==4 && $2==4 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfu" asp 4 | -loc loc cfu $1==8 && $2==2 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfu" asp 10 | -loc loc cfu $1==8 && $2==4 | | - remove(ALL) - "move.w #$1,-(sp)" - "move.w #$2,-(sp)" - | | cal ".cfu" asp 8 | -loc loc cff $1==8 && $2==4 | | - remove(ALL) - | | cal ".cff4" asp 4 | -loc loc cff $1==4 && $2==8 | ANY4 | - remove(ALL) - "clr.l -(sp)" - "move.l %[1],-(sp)" | | cal ".cff8" | -loc loc cff $1==4 && $2==8 | | - remove(ALL) - "move.l (sp),ax" - "clr.l -(sp)" - "move.l ax,(sp)" | | cal ".cff8" | - -/* G R O U P IX : L O G I C A L */ - -and $1 == 2 | ANY DATASCR | - "and %[1],%[2]" - setcc(%[2]) - erase(%[2]) | %[2] | | (2,2)+%[1] -... | DATASCR ANY | - "and %[2],%[1]" - setcc(%[1]) - erase(%[1]) | %[1] | | (2,2)+%[2] -lol loc and $2 == 255 && inreg($1) < 2 && $3 == 2 | | | {DISPL1,LB,$1+1} | | -lal loi and lal sti $1 == $4 && $2 == 1 && $3 == 2 && $5 == 1 && inreg($1) < 2 - | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "and.b %[1],$1(a6)" | | | -loe loc and ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "and.w #$2,$1" | | | (7,11) -lol and stl $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG + IMMEDIATE | - remove(MEM_ALL) - "and.w %[1],$1(a6)" | | | -loe and ste $1 == $3 && $2 == 2 | DATAREG + IMMEDIATE | - remove(MEM_ALL) - "and.w %[1],$1" | | | -lil and sil $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG + IMMEDIATE | - allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "and.w %[1],(%[a])" | | | -/* Note that the contents of an address register may not be used as - * operand of a and, or etc. instruction - */ -and $1 == 4 | ANY4-ADDREG DATASCR4 | - "and.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,3)+%[1] -... | DATASCR4 ANY4-ADDREG | - "and.l %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,3)+%[2] -ldl ldc and sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "and.l #$2,$1(a6)" | | | (8,16) -lde ldc and sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "and.l #$2,$1" | | | (9,17) -ldl and sdl $1 == $3 && $2 == 4 && inreg($1) < 2 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "and.l %[1],$1(a6)" | | | -lde and sde $1 == $3 && $2 == 4 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "and.l %[1],$1" | | | -and $1 > 4 | STACK | - allocate(DATAREG4,ADDREG,DATAREG) - "move.l #$1/2-1,%[a]" - "move.l sp,%[b]" - "add.l #$1,%[b]" - "1:" - "move.w (sp)+,%[c]" - "and %[c],(%[b])+" - "dbf %[a],1b" | | | -and !defined($1) | DATASCR STACK | - allocate(ADDREG,DATAREG) - "lea 0(sp,%[1]),%[a]" - "asr #1,%[1]" - "sub.w #1,%[1]" - "1:" - "move.w (sp)+,%[b]" - "and %[b],(%[a])+" - "dbf %[1],1b" - erase(%[1]) | | | -ior $1 == 2 | ANY DATASCR | - "or %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,2)+%[1] -... | DATASCR ANY | - "or %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,2)+%[2] -lal loi ior lal sti $1 == $4 && $2 == 1 && $3 == 2 && $5 == 1 && inreg($1) < 2 - | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "or.b %[1],$1(a6)" | | | -lol ior stl $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "or.w %[1],$1(a6)" | | | -loe ior ste $1 == $3 && $2 == 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "or.w %[1],$1" | | | -lil ior sil $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "or.w %[1],(%[a])" | | | -loe loc ior ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "or.w #$2,$1" | | | (7,11) -ior $1 == 4 | ANY4-ADDREG DATASCR4 | - "or.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | |(2,3)+%[1] -... | DATASCR4 ANY4-ADDREG | - "or.l %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | |(2,3)+%[2] -ldl ldc ior sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "or.l #$2,$1(a6)" | | | (8,16) -lde ldc ior sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "or.l #$2,$1" | | | (9,17) -ldl ior sdl $1 == $3 && $2 == 4 && inreg($1) < 2 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "or.l %[1],$1(a6)" | | | -lde ior sde $1 == $3 && $2 == 4 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "or.l %[1],$1" | | | -ior $1 > 4 | STACK | - allocate(DATAREG4,ADDREG,DATAREG) - "move.l #$1/2-1,%[a]" - "move.l sp,%[b]" - "add.l #$1,%[b]" - "1:" - "move.w (sp)+,%[c]" - "or %[c],(%[b])+" - "dbf %[a],1b" | | | -ior !defined($1) | DATASCR STACK | - allocate(ADDREG,DATAREG) - "lea 0(sp,%[1]),%[a]" - "asr #1,%[1]" - "sub.w #1,%[1]" - "1:" - "move.w (sp)+,%[b]" - "or %[b],(%[a])+" - "dbf %[1],1b" - erase(%[1]) | | | -xor $1 == 2 | DATAREG DATASCR | - "eor %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,2)+%[1] -... | DATASCR DATAREG | - "eor %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,2)+%[2] -lal loi xor lal sti $1 == $4 && $2 == 1 && $3 == 2 && $5 == 1 && inreg($1) < 2 - | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "eor.b %[1],$1(a6)" | | | -lol loc xor stl $1 == $4 && $3 == 2 && inreg($1) < 2 | | - remove(MEM_ALL) - "eor.w #$2,$1(a6)" | | | (6,10) -loe loc xor ste $3 == 2 && $1 == $4 | | - remove(MEM_ALL) - "eor.w #$2,$1" | | | (7,11) -lol xor stl $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "eor.w %[1],$1(a6)" | | | -loe xor ste $1 == $3 && $2 == 2 | DATAREG+IMMEDIATE | - remove(MEM_ALL) - "eor.w %[1],$1" | | | -lil xor sil $1 == $3 && $2 == 2 && inreg($1) < 2 | DATAREG+IMMEDIATE | - allocate(ADDREG={DISPL4,LB,$1}) - remove(MEM_ALL) - "eor.w %[1],(%[a])" | | | -xor $1 == 4 | DATAREG4+EXTENDED4 DATASCR4 | - "eor.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | (2,3)+%[1] -... | DATASCR4 DATAREG4+EXTENDED4 | - "eor.l %[2],%[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | (2,3)+%[2] -ldl ldc xor sdl $1 == $4 && $3 == 4 && inreg($1) < 2 | | - remove(MEM_ALL) - "eor.l #$2,$1(a6)" | | | (8,16) -lde ldc xor sde $3 == 4 && $1 == $4 | | - remove(MEM_ALL) - "eor.l #$2,$1" | | | (9,17) -ldl xor sdl $1 == $3 && $2 == 4 && inreg($1) < 2 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "eor.l %[1],$1(a6)" | | | -lde xor sde $1 == $3 && $2 == 4 | DATAREG4+EXTENDED4+DOUBLE | - remove(MEM_ALL) - "eor.l %[1],$1" | | | -xor $1 > 4 | STACK | - allocate(DATAREG4,ADDREG,DATAREG) - "move.l #$1/2-1,%[a]" - "move.l sp,%[b]" - "add.l #$1,%[b]" - "1:" - "move.w (sp)+,%[c]" - "eor %[c],(%[b])+" - "dbf %[a],1b" | | | -xor !defined($1) | DATASCR STACK | - allocate(ADDREG,DATAREG) - "lea 0(sp,%[1]),%[a]" - "asr #1,%[1]" - "sub.w #1,%[1]" - "1:" - "move.w (sp)+,%[b]" - "eor %[b],(%[a])+" - "dbf %[1],1b" - erase(%[1]) | | | -com $1 == 2 | DATASCR | "not %[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -com $1 == 4 | DATASCR4 | "not.l %[1]" - erase(%[1]) - setcc(%[1]) | %[1] | | -com $1 > 4 | STACK | allocate(DATAREG4,ADDREG) - "move.l #$1/2-1,%[a]" - "move.l sp,%[b]" - "1:" - "not (%[b])+" - "dbf %[a],1b" | | | -com !defined($1) | DATASCR STACK | allocate(ADDREG) - "asr #1,%[1]" - "sub.w #1,%[1]" - "move.w sp,%[a]" - "1:" - "not (%[a])+" - "dbf %[1],1b" | | | -rol $1 == 2 | DATAREG DATASCR | - "rol %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -rol $1 == 4 | DATAREG DATASCR4 | - "rol.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -ror $1 == 2 | DATAREG DATASCR | - "ror %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | -ror $1 == 4 | DATAREG DATASCR4 | - "ror.l %[1],%[2]" - erase(%[2]) - setcc(%[2]) | %[2] | | - - -/* G R O U P X : S E T S */ - -inn defined($1) | | remove(ALL) - move({IMMEDIATE,$1},D0) - "jsr .inn" - erase(D0) - | D0 | | -inn !defined($1) | ANY | remove(ALL) - move(%[1],D0) - "jsr .inn" - erase(D0) - | D0 | | -set defined($1) | | remove(ALL) - move({IMMEDIATE,$1},D0) - "jsr .set" - erase(D0) - | | | -set !defined($1) | ANY | remove(ALL) - move(%[1],D0) - "jsr .set" - erase(D0) - | | | - - -/* G R O U P XI : A R R A Y S */ - -/* In general, array references are resolved via a subroutine call. - * Only for two very simple cases we use a more efficient method. - * The array must be static, i.e. its element size and its index - * range must be static. In these cases the array descriptor will - * normally be stored in a rom and an element will be accessed via - * the sequence "lae lar", in which lae puts the address of the - * descriptor on the stack. The efficient method is used only if the - * element size is 2 or 4 bytes. We also make sure that - * the offset generated fits in 8 bits. - */ - - -lae lar $2 == 2 && rom(1,3) == 2 && rom(1,1) >= (0-63) && rom(1,1) <= 63 - | DATASCR ADDREG | - "asl #1,%[1]" - erase(%[1]) - setcc(%[1]) | - {INDEXED,%[2],%[1], - (0-2)*rom(1,1)} | | -lae lar $2 == 2 && rom(1,3) == 4 && rom(1,1) >= (0-31) && rom(1,1) <= 31 - | DATASCR ADDREG | - "asl #2,%[1]" - erase(%[1]) - setcc(%[1]) | - {INDEXED4,%[2],%[1], - (0-4)*rom(1,1)} | | -lar $1 == 2 | | remove(ALL) - "jsr .lar" - | | | -lae sar $2 == 2 && rom(1,3) == 2 && rom(1,1) >= (0-63) && rom(1,1) <= 63 - | DATASCR ADDREG ANY | - remove(MEM_ALL) - "asl #1,%[1]" - move(%[3],{INDEXED,%[2],%[1], - (0-2)*rom(1,1)} ) - erase(%[1]) | | | -lae sar $2 == 2 && rom(1,3) == 4 && rom(1,1) >= (0-31) && rom(1,1) <= 31 - | DATASCR ADDREG ANY4 | - remove(MEM_ALL) - "asl #2,%[1]" - move(%[3],{INDEXED4,%[2],%[1], - (0-4)*rom(1,1)}) - erase(%[1]) | | | -sar $1 == 2 | | remove(ALL) - "jsr .sar" - | | | -lae aar $2 == 2 && rom(1,3) == 2 && rom(1,1) >= (0-63) && rom(1,1) <= 63 - | DATASCR ADDREG | - "asl #1,%[1]" - erase(%[1]) - setcc(%[1]) | - {INDEX_ADDR,%[2],%[1], - (0-2)*rom(1,1)} | | -lae aar $2 == 2 && rom(1,3) == 4 && rom(1,1) >= (0-31) && rom(1,1) <= 31 - | DATASCR ADDREG | - "asl #2,%[1]" - erase(%[1]) - setcc(%[1]) | - {INDEX_ADDR,%[2],%[1], - (0-4)*rom(1,1)} | | -| INDEX_ADDR | allocate(ADDREG) - "lea %[1.di](%[1.reg],%[1.ireg].w),%[a]" - samecc | %[a] | | -aar $1 == 2 | | remove(ALL) - "jsr .aar" - | | | -lar !defined($1) | | - remove(ALL) - "jsr .lari" - | | | -sar !defined($1) | | - remove(ALL) - "jsr .sari" - | | | -aar !defined($1) | | - remove(ALL) - "jsr .aari" - | | | - - -/* G R O U P XII : C O M P A R E */ - -cmi $1 == 2 | ANY DATAREG | allocate(DATAREG={IMMEDIATE, 0}) - "cmp.w %[1],%[2]" - "beq 2f" - "bgt 1f" - "add.w #1,%[a]" - "bra 2f" - "1:sub.w #1,%[a]\n2:" - erase(%[a]) - setcc(%[a]) | %[a] | | -cmi $1 == 4 | | remove(ALL) - "jsr .cmi" - | D1 | | -cmu $1 == 4 | | | | cmp | -cmu defined($1) | | remove(ALL) - "move.w #$1,d0" - "jsr .cmu" - | D1 | | -cmu !defined($1) | ANY | remove(ALL) - move(%[1],D0) - erase(D0) - "jsr .cmu" - | D1 | | -cms $1 == 2 | ANY DATASCR | "sub.w %[1],%[2]" - setcc(%[2]) - erase(%[2]) | %[2] | | -... | DATASCR ANY | "sub.w %[2],%[1]" - setcc(%[1]) - erase(%[1]) | %[1] | | -cms $1==4 | | | | cmi $1 | -cms defined($1) | | remove(ALL) - "move.w #$1,d0" - "jsr .cms" - | | | -cms !defined($1) | ANY | remove(ALL) - move(%[1],D0) - "jsr .cms" - erase(D0) - | | | -cmp | | remove(ALL) - "jsr .cmp" - | D1 | | -/* - * Floating point - * Comparision - */ - -cmf $1==4 | | - remove(ALL) - | | cal ".cmf4" asp 8 lfr 2 | -cmf $1==8 | | - remove(ALL) - | | cal ".cmf8" asp 16 lfr 2 | - -cmi tlt and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "blt 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tlt ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bge 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tle and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "ble 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tle ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bgt 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi teq and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "beq 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi teq ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bne 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tne and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bne 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tne ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "beq 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tge and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bge 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tge ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "blt 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tgt and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bgt 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tgt ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "ble 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | - -cmu tlt and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bcs 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tlt ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bcc 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tle and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bls 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tle ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bhi 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu teq and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "beq 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu teq ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bne 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tne and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bne 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tne ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "beq 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tge and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bcc 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tge ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bcs 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tgt and $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bhi 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmu tgt ior $1==2 && $3==2 | ANY DATAREG DATASCR | - "cmp %[1],%[2]" - "bls 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmu zlt $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "bcs $2" | | | -cmu zle $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "bls $2" | | | -cmu zeq $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "beq $2" | | | -cmu zne $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "bne $2" | | | -cmu zge $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "bcc $2" | | | -cmu zgt $1==2 | ANY DATAREG STACK | - "cmp.w %[1],%[2]" - "bhi $2" | | | - -cmi tlt and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "blt 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tlt ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bge 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tle and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "ble 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tle ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bgt 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi teq and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "beq 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi teq ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bne 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tne and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bne 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tne ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "beq 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tge and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bge 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tge ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "blt 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tgt and $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "bgt 1f" - "clr %[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tgt ior $1==4 && $3==2 | ANY4 DATAREG4+EXTENDED4 DATASCR | - "cmp.l %[1],%[2]" - "ble 1f" - "bset #0,%[3]" - "1:" - erase(%[3]) | %[3] | | -cmi tlt $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "blt 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi tle $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "ble 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi teq $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "beq 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi tne $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bne 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi tge $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bge 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi tgt $1==4 | ANY4 DATAREG4+EXTENDED4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bgt 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | - -ldc cmi tlt and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "blt 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tlt ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bge 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tle and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "ble 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tle ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bgt 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi teq and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "beq 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi teq ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bne 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tne and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bne 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tne ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "beq 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tge and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bge 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tge ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "blt 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tgt and loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "bgt 1f" - "clr %[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tgt ior loww(1)==0&&highw(1)==0 && $2==4 && $4==2 | DATA_ALT4 DATASCR | - "tst.l %[1]" - "ble 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -ldc cmi tlt loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "blt 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -ldc cmi tle loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "ble 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -ldc cmi teq loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "beq 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -ldc cmi tne loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "bne 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -ldc cmi tge loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "bge 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -ldc cmi tgt loww(1)==0&&highw(1)==0 | DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "tst.l %[1]" - "bgt 1f" - "clr %[a]" - "1:" - erase(%[a]) | %[a] | | -cmi zlt $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "blt $2" | | | -cmi zle $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "ble $2" | | | -cmi zeq $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "beq $2" | | | -cmi zne $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "bne $2" | | | -cmi zge $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "bge $2" | | | -cmi zgt $1==4 | ANY4 REG4 STACK | - "cmp.l %[1],%[2]" - "bgt $2" | | | -ldc cmi zlt loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "blt $3" | | | -ldc cmi zle loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "ble $3" | | | -ldc cmi zeq loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "beq $3" | | | -ldc cmi zne loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "bne $3" | | | -ldc cmi zge loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "bge $3" | | | -ldc cmi zgt loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "bgt $3" | | | - -ldc cmi zlt $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "blt $3" | | | -ldc cmi zle $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "ble $3" | | | -ldc cmi zeq $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "beq $3" | | | -ldc cmi zne $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "bne $3" | | | -ldc cmi zge $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "bge $3" | | | -ldc cmi zgt $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "bgt $3" | | | - -ldc cms zeq loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "beq $3" | | | -ldc cms zne loww(1)==0&&highw(1)==0 && $2==4 | DATA_ALT4 STACK | - test(%[1]) - "bne $3" | | | -ldc cms zeq $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "beq $3" | | | -ldc cms zne $2==4 | DATA_ALT4 STACK | - "cmp.l #$1,%[1]" - "bne $3" | | | - -cmp tlt | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bcs 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bcs 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -cmp tle | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bls 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bls 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -cmp teq | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "beq 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "beq 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -cmp bne | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bne 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bne 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -cmp tge | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bcc 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bcc 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -cmp tgt | ANY4 ADDREG | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bhi 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | -... | nocoercions: CONST4 DATA_ALT4 | allocate(DATAREG={IMMEDIATE,1}) - "cmp.l %[1],%[2]" - "bhi 1f" - "clr.w %[a]" - "1:" - erase(%[a]) | %[a] | | - -cmp zlt | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "bcs $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "bcs $2" | | | -cmp zle | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "bls $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "bls $2" | | | -cmp zeq | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "beq $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "beq $2" | | | -cmp zne | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "bne $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "bne $2" | | | -cmp zge | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "bcc $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "bcc $2" | | | -cmp zgt | ANY4 ADDREG | remove(ALL) - "cmp.l %[1],%[2]" - "bhi $2" | | | -... | nocoercions: CONST4 DATA_ALT4 | remove(ALL) - "cmp.l %[1],%[2]" - "bhi $2" | | | -tlt and $2==2 | DATA_ALT DATASCR | - test(%[1]) - "blt 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -tlt ior $2==2 | DATA_ALT DATASCR | - test(%[1]) - "bge 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -tlt | DATA_ALT | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "blt 1f" - "clr %[a]" - "1:" | %[a] | | -tle and $2==2 | DATA_ALT DATASCR | - test(%[1]) - "ble 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -tle ior $2==2 | DATA_ALT DATASCR | - test(%[1]) - "bgt 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -tle | DATA_ALT | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "ble 1f" - "clr %[a]" - "1:" | %[a] | | -teq and $2==2 | DATA_ALT_1OR2 DATASCR | - test(%[1]) - "beq 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -teq ior $2==2 | DATA_ALT_1OR2 DATASCR | - test(%[1]) - "bne 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -teq | DATA_ALT_1OR2 | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "beq 1f" - "clr %[a]" - "1:" | %[a] | | -tne and $2==2 | DATA_ALT_1OR2 DATASCR | - test(%[1]) - "bne 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -tne ior $2==2 | DATA_ALT_1OR2 DATASCR | - test(%[1]) - "beq 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -tne | DATA_ALT_1OR2 | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "bne 1f" - "clr %[a]" - "1:" | %[a] | | -tge and $2==2 | DATA_ALT DATASCR | - test(%[1]) - "bge 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -tge ior $2==2 | DATA_ALT DATASCR | - test(%[1]) - "blt 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -tge | DATA_ALT | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "bge 1f" - "clr %[a]" - "1:" | %[a] | | -tgt and $2==2 | DATA_ALT DATASCR | - test(%[1]) - "bgt 1f" - "clr.w %[2]" - "1:" - erase(%[2]) | %[2] | | -tgt ior $2==2 | DATA_ALT DATASCR | - test(%[1]) - "ble 1f" - "bset #0,%[2]" - "1:" - erase(%[2]) | %[2] | | -tgt | DATA_ALT | allocate(DATAREG={IMMEDIATE,1}) - test(%[1]) - "bgt 1f" - "clr %[a]" - "1:" | %[a] | | - - -/* G R O U P XIII : B R A N C H */ - -bra | STACK | "bra $1" | | | -/* byte comparisons */ -loc beq $1 >= 0 && $1 < 128 | nocoercions: DATA_ALT1 | - remove(ALL) - "cmp.b #$1,%[1]" - "beq $2" | | | -... | DATA_ALT STACK | - "cmp #$1,%[1]" - "beq $2" | | | -loc bne $1 >= 0 && $1 < 128 | nocoercions: DATA_ALT1 | - remove(ALL) - "cmp.b #$1,%[1]" - "bne $2" | | | -... | DATA_ALT STACK | - "cmp #$1,%[1]" - "bne $2" | | | -blt | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "blt $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "blt $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "bgt $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "bgt $1" | | | -ble | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "ble $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "ble $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "bge $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "bge $1" | | | -beq | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "beq $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "beq $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "beq $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "beq $1" | | | -bne | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "bne $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "bne $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "bne $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "bne $1" | | | -bge | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "bge $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "bge $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "ble $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "ble $1" | | | -bgt | IMMEDIATE DATA_ALT STACK | "cmp %[1],%[2]" - "bgt $1" | | | -... | ANY DATAREG STACK | "cmp %[1],%[2]" - "bgt $1" | | | -... | DATAREG ANY STACK | "cmp %[2],%[1]" - "blt $1" | | | -... | DATA_ALT IMMEDIATE STACK | "cmp %[2],%[1]" - "blt $1" | | | -zlt | DATA_ALT | remove(ALL) - test(%[1]) - "blt $1" | | | -zle | DATA_ALT | remove(ALL) - test(%[1]) - "ble $1" | | | -zeq | DATA_ALT_1OR2 | remove(ALL) - test(%[1]) - "beq $1" | | | -zne | DATA_ALT_1OR2 | remove(ALL) - test(%[1]) - "bne $1" | | | -zge | DATA_ALT | remove(ALL) - test(%[1]) - "bge $1" | | | -zgt | DATA_ALT | remove(ALL) - test(%[1]) - "bgt $1" | | | - -/* G R O U P : XIV P R O C E D U R E C A L L S */ - -lpi cai | | | | cal $1 | -cai | ADDREG | remove(ALL) - "jsr (%[1])" - | | | -cal | | remove(ALL) - "jsr $1" - | | | -lfr $1 == 2 | | | D0 | | -lfr $1 == 4 | | | DD0 | | -lfr $1 == 8 | | | DD1 DD0 | | - -ret $1 == 0 | STACK | -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -ret $1 == 2 | ANY STACK | - move(%[1],D0) -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -... | STACK | - "move.w (sp)+,d0" -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -ret $1 == 4 | ANY4 STACK | - move(%[1],DD0) -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -... | STACK | - "move.l (sp)+,d0" -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -ret $1 == 8 | ANY4 ANY4 STACK | - move(%[1],DD0) - move(%[2],DD1) -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif -... | STACK | - "move.l (sp)+,d0" - "move.l (sp)+,d1" -#ifdef REGVARS - return | | | -#else - "unlk a6" - "rts" | | | -#endif - -/* G R O U P XV : M I S C E L L A N E O U S */ - -asp $1 >= 1 && $1 <= 8 | STACK | "add.l #$1,sp" | | | -asp | STACK | "lea $1(sp),sp" | | | - -ass $1 == 2 | DATAREG STACK | "add.l %[1],sp" | | | -ass $1 == 4 | DATAREG4 STACK | "add.l %[1],sp" | | | -blm $1 == 2 | ADDREG ADDREG | remove(MEM_ALL) - move({IADDREG,%[2]}, {IADDREG,%[1]}) | | | -blm $1 == 4 | ADDREG ADDREG | remove(MEM_ALL) - move({IADDREG4,%[2]}, {IADDREG4,%[1]}) | | | -blm $1 == 6 | ADDSCR ADDSCR | remove(MEM_ALL) - "move.w (%[2])+,(%[1])+" - "move.l (%[2]),(%[1])" - erase(%[1]) - erase(%[2]) | | | -blm $1 == 8 | ADDSCR ADDSCR | remove(MEM_ALL) - "move.l (%[2])+,(%[1])+" - "move.l (%[2]),(%[1])" - erase(%[1]) - erase(%[2]) | | | -blm $1 == 10 | ADDSCR ADDSCR | remove(MEM_ALL) - "move.w (%[2])+,(%[1])+" - "move.l (%[2])+,(%[1])+" - "move.l (%[2]),(%[1])" - erase(%[1]) - erase(%[2]) | | | -blm $1 == 12 | ADDSCR ADDSCR | remove(MEM_ALL) - "move.l (%[2])+,(%[1])+" - "move.l (%[2])+,(%[1])+" - "move.l (%[2]),(%[1])" - erase(%[1]) - erase(%[2]) | | | -blm $1 > 12 | ADDSCR ADDSCR | remove(MEM_ALL) - allocate(DATAREG4={IMMEDIATE4,$1/2-1}) - "1:" - "move.w (%[2])+,(%[1])+" - "dbf %[a],1b" - erase(%[a]) - erase(%[1]) - erase(%[2]) | | | -bls $1 == 2 | DATASCR ADDSCR ADDSCR | - remove(MEM_ALL) - "asr #1,%[1]" - "sub.w #1,%[1]" - "blt 2f" - "1:" - "move.w (%[3])+,(%[2])+" - "dbf %[1],1b" - "2:" - erase(%[1]) - erase(%[2]) - erase(%[3]) | | | -#ifdef OLD -bls $1 == 2 | STACK | - allocate(ADDREG,ADDREG,DATAREG) - "move.w (sp)+,%[c]" - "move.l (sp)+,%[b]" - "move.l (sp)+,%[a]" - "asr #1,%[c]" - "sub.w #1,%[c]" - "blt 2f" - "1:" - "move.w (%[a])+,(%[b])+" - "dbf %[c],1b" - "2:" | | | -#endif -bls $1 == 4 | DATASCR4 ADDSCR ADDSCR | - remove(MEM_ALL) - "asr_l #1,%[1]" - "sub.l #1,%[1]" - "blt 2f" - "1:" - "move.w (%[3])+,(%[2])+" - "dbf %[1],1b" - "2:" - erase(%[1]) - erase(%[2]) - erase(%[3]) | | | - -/* For csa and csb we just jump to a piece of code that computes - * the jump-address and jumps to this address - */ - -csa $1 == 2 | | remove(ALL) - "jmp .csa" - | | | -csa $1 == 4 | | remove(ALL) - "jmp .csa4" - | | | -csb $1 == 2 | | remove(ALL) - "jmp .csb" - | | | -csb $1 == 4 | | remove(ALL) - "jmp .csb4" - | | | -dch | | | | loi 4 | -dup $1 == 2 | ANY-REGCH2 | | %[1] %[1] | | -dup $1 == 4 | DATAREG4+ADDREG | | %[1] %[1] | | - ... | ANY-REGCH2 ANY-REGCH2 | | %[2] %[1] %[2] %[1] | | -dup $1 > 4 | STACK | allocate(ADDREG,DATAREG4) - "move.l sp,%[a]" - "add.l #$1,%[a]" - "move.l #$1/2-1,%[b]" - "1:" - "move.w -(%[a]),-(sp)" - "dbf %[b],1b" | | | -dus $1 == 2 | DATASCR | remove(ALL) - allocate(ADDREG) - "move.l sp,%[a]" - "add.l %[1],%[a]" - "sub.w #1,%[1]" - "asr #1,%[1]" - "1:" - "move.w -(%[a]),-(sp)" - "dbf %[1],1b" | | | -exg $1==2 | ANY ANY | | %[1] %[2] | | -exg | STACK | "move.w #$1,d0" - "jsr .exg" | | | -fil | | "move.l #$1,.filn" | | | -gto | STACK | allocate(ADDREG) - "lea $1,%[a]" - "move.l 4(%[a]),sp" - "move.l 8(%[a]),a6" - "move.l (%[a]),%[a]" - "jmp (%[a])" | | | -lin | | "move.w #$1,.lino" | | | -lni | | "add.w #1,.lino" | | | -mon | STACK | "jsr .mon" | | | -nop | STACK | "jsr .nop" | | | -lim | | | {ABS,".trpim"} | | -lor $1 == 0 | | | LB | | -#ifdef REGVARS -lor sdl $1 == 1 && inreg($2) == 2 | - STACK | "move.l sp,%(regvar($1)%)" | | | -#endif -lor sdl $1 == 1 | STACK | "move.l sp,$2(a6)" | | | -lor adp $1 == 1 | STACK | allocate(ADDREG) - "move.l sp,%[a]" - "add.l #$2,%[a]" | %[a] | | -lor ldf $1 == 1 | STACK | allocate(ADDREG) - "move.l $2(sp),%[a]" | %[a] | | -lor $1 == 1 | STACK | "move.l sp,-(sp)" | | | -lor $1 == 2 | | | {ABS4,".reghp"} | | -lpb | | | | adp 8 | -rck $1 == 2 | | remove(ALL) - "jsr .rck" - | | | -rtt | | | | ret 0 | -sig | STACK | "jsr .sig" | | | -sim | | remove(ALL) - "move.w (sp)+,.trpim" | | | -str $1 == 0 | ANY4 STACK | "move.l %[1],a6" | | | -str $1 == 1 | STACK | "move.l (sp)+,sp" | | | -str $1 == 2 | | remove(ALL) - "jsr .strhp" - | | | -trp | STACK | "jsr .trp" | | | - - -/* C O E R C I O N S */ - - -/* from stack */ - -| STACK | allocate(DATAREG) - "move.w (sp)+,%[a]" - setcc(%[a]) | %[a] | | (2,4) -| STACK | allocate(DATAREG4) - "move.l (sp)+,%[a]" - setcc(%[a]) | %[a] | | (2,6) -| STACK | allocate(ADDREG) - "move.l (sp)+,%[a]" - setcc(%[a]) | %[a] | | (2,6) - - -/* to a register, for efficiency */ - -| ANY | allocate(%[1],DATAREG=%[1]) | %[a] | | (2,2) - -| ANY4 | allocate(%[1],DATAREG4=%[1]) | %[a] | | (2,2) -| ANY4 | allocate(%[1],ADDREG=%[1]) | %[a] | | (2,2) - -/* from double to 2 singles */ - -| DOUBLEZERO | | {IMMEDIATE,0} {IMMEDIATE,0} | | -| DISPL4 | | {DISPL,%[1.reg],%[1.dis]+2} {DISPL,%[1.reg],%[1.dis]} | | -/* impossible to add string and integer: -| ABS4 | | {ABS,%[1.addr]} {ABS,[%1.addr]+2} | | -*/ -/* -| INDEXED4 | | {INDEXED,%[1.reg],%[1.ireg],%[1.di]} - {INDEXED,%[1.reg],%[1.ireg],%[1.di]+2} | | -*/ - -/* from 1 to 2 bytes */ - -| ANY1 | allocate(DATAREG = {IMMEDIATE,0}) - "move.b %[1],%[a]" - erase(%[a]) | %[a] | | - - -MOVES: -(IMMEDIATE %[cc] == 0, DATA_ALT, "clr.w %[2]" setcc(%[2]),(2,3)+%[2] ) -(IMMEDIATE (%[cc] >= 0-128 && %[cc] <= 127), DATAREG, - "move.l %[1],%[2]" setcc(%[2]),(2,2)) -(ANY, DATA_ALT, "move.w %[1], %[2]"setcc(%[2]),(2,2)+%[1]+%[2]) -(IMMEDIATE %[cc] == 0, ANY1, "clr.b %[2]" setcc(%[2]),(2,3)+%[2] ) -(ANY+ANY1-REGCH2, ANY1, "move.b %[1], %[2]"setcc(%[2]),(2,2)+%[1]+%[2]) -(IMMEDIATE4 %[cc] == 0, DATA_ALT4, "clr.l %[2]"setcc(%[2]),(2,5)+%[2]) -(DOUBLEZERO, DATA_ALT4, "clr.l %[2]"setcc(%[2]),(2,5)+%[2]) -(DOUBLE %[cc] == "0", DATA_ALT4, "clr.l %[2]"setcc(%[2]),(2,5)+%[2]) -(IMMEDIATE4 (%[cc] >= 0-128 && %[cc] <= 127),DATAREG4, - "move.l %[1],%[2]" setcc(%[2]),(2,2)) -(IMMEDIATE4, ADDREG, "lea %[1.cc],%[2]" nocc, (4,4)) -(EXTERNAL_ADDR, ADDREG, "lea %[1.off],%[2]" nocc, (5,5)) -(LOCAL_ADDR+REGOFF_ADDR, ADDREG, "lea %[1],%[2]" nocc, (5,5)) -(ANY4, DATA_ALT4, "move.l %[1], %[2]"setcc(%[2]),(2,2)+%[1]+%[2]) -(ANY, ADDREG, "move.w %[1], %[2]"samecc,(2,2)+%[1]) -(ANY4,ADDREG, "move.l %[1], %[2]"samecc,(2,2)+%[1]) - -TESTS: -(DATA_ALT, "tst %[1]",(2,2)+%[1]) -(DATA_ALT4,"tst.l %[1]",(2,2)+%[1]) -(ANY1,"tst.b %[1]",(2,2)+%[1]) - -STACKS: -(IMMEDIATE %[cc] == 0, , "clr.w -(sp)" setcc(%[1])) -(ANY, , "move.w %[1],-(sp)" setcc(%[1]), (2,4) + %[1]) -(EXTERNAL_ADDR, , "pea %[1.off]" nocc) -(LOCAL_ADDR+REGOFF_ADDR, , "pea %[1]" nocc) -(INDEX_ADDR, , "pea %[1.di](%[1.reg],%[1.ireg].w)" nocc) -(IMMEDIATE4 %[cc] == 0, , "clr.l -(sp)") -(IMMEDIATE4, , "pea %[1.cc]" nocc) -(DOUBLEZERO, , "clr.l -(sp)", (2,4)) -(ANY4, , "move.l %[1],-(sp)" setcc(%[1]), (2,6) + %[1]) -(ANY1, , "clr.w -(sp)" "move.b %[1],1(sp)") diff --git a/mach/m68k2/libbc/.distr b/mach/m68k2/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k2/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k2/libbc/Makefile b/mach/m68k2/libbc/Makefile deleted file mode 100644 index 0a8349764..000000000 --- a/mach/m68k2/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k2" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k2/libbc/compmodule b/mach/m68k2/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k2/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k2/libcc/.distr b/mach/m68k2/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k2/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k2/libcc/Makefile b/mach/m68k2/libcc/Makefile deleted file mode 100644 index b26a35f83..000000000 --- a/mach/m68k2/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k2" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k2/libcc/compmodule b/mach/m68k2/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k2/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k2/libm2/.distr b/mach/m68k2/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k2/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k2/libm2/Makefile b/mach/m68k2/libm2/Makefile deleted file mode 100644 index 7ca4d117c..000000000 --- a/mach/m68k2/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=m68k2" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k2/libm2/compmodule b/mach/m68k2/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/m68k2/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/m68k2/liboc/.distr b/mach/m68k2/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k2/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k2/liboc/Makefile b/mach/m68k2/liboc/Makefile deleted file mode 100644 index 2b4f9059c..000000000 --- a/mach/m68k2/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k2" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k2/liboc/compmodule b/mach/m68k2/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k2/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k2/libpc/.distr b/mach/m68k2/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k2/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k2/libpc/Makefile b/mach/m68k2/libpc/Makefile deleted file mode 100644 index 9a63cb54d..000000000 --- a/mach/m68k2/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k2" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k2/libpc/compmodule b/mach/m68k2/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k2/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k4/libbc/.distr b/mach/m68k4/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k4/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k4/libbc/Makefile b/mach/m68k4/libbc/Makefile deleted file mode 100644 index 7e8bc3ed8..000000000 --- a/mach/m68k4/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k4" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k4/libbc/compmodule b/mach/m68k4/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k4/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k4/libcc/.distr b/mach/m68k4/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k4/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k4/libcc/Makefile b/mach/m68k4/libcc/Makefile deleted file mode 100644 index 667d46e98..000000000 --- a/mach/m68k4/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k4" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k4/libcc/compmodule b/mach/m68k4/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k4/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k4/libm2/.distr b/mach/m68k4/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k4/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k4/libm2/Makefile b/mach/m68k4/libm2/Makefile deleted file mode 100644 index 423a73b8e..000000000 --- a/mach/m68k4/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=m68k4" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k4/libm2/compmodule b/mach/m68k4/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/m68k4/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/m68k4/liboc/.distr b/mach/m68k4/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k4/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k4/liboc/Makefile b/mach/m68k4/liboc/Makefile deleted file mode 100644 index e3d7e9522..000000000 --- a/mach/m68k4/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k4" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k4/liboc/compmodule b/mach/m68k4/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/m68k4/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/m68k4/libpc/.distr b/mach/m68k4/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/m68k4/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/m68k4/libpc/Makefile b/mach/m68k4/libpc/Makefile deleted file mode 100644 index c3c180fc1..000000000 --- a/mach/m68k4/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=m68k4" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/m68k4/libpc/compmodule b/mach/m68k4/libpc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/m68k4/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/mantra/libcc/.distr b/mach/mantra/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/mantra/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/mantra/libcc/Makefile b/mach/mantra/libcc/Makefile deleted file mode 100644 index fafffc9a8..000000000 --- a/mach/mantra/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=mantra" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/mantra/libcc/compmodule b/mach/mantra/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/mantra/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/mantra/libm2/.distr b/mach/mantra/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/mantra/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/mantra/libm2/Makefile b/mach/mantra/libm2/Makefile deleted file mode 100644 index 5fc7a5336..000000000 --- a/mach/mantra/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=mantra" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/mantra/libm2/compmodule b/mach/mantra/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/mantra/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/mantra/liboc/.distr b/mach/mantra/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/mantra/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/mantra/liboc/Makefile b/mach/mantra/liboc/Makefile deleted file mode 100644 index a0f5ff2a3..000000000 --- a/mach/mantra/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=mantra" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/mantra/liboc/compmodule b/mach/mantra/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/mantra/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/minix/libcc/.distr b/mach/minix/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/minix/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/minix/libcc/Makefile b/mach/minix/libcc/Makefile deleted file mode 100644 index 6d69d9325..000000000 --- a/mach/minix/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=minix" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -all: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/minix/libcc/compmodule b/mach/minix/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/minix/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/minix/libm2/.distr b/mach/minix/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/minix/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/minix/libm2/Makefile b/mach/minix/libm2/Makefile deleted file mode 100644 index 83bb8abc4..000000000 --- a/mach/minix/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=minix" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/minix/libm2/compmodule b/mach/minix/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/minix/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/minix/liboc/.distr b/mach/minix/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/minix/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/minix/liboc/Makefile b/mach/minix/liboc/Makefile deleted file mode 100644 index 00ec310b1..000000000 --- a/mach/minix/liboc/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=minix" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -all: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/minix/liboc/compmodule b/mach/minix/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/minix/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/minix/libpc/.distr b/mach/minix/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/minix/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/minix/libpc/Makefile b/mach/minix/libpc/Makefile deleted file mode 100644 index 1874601a3..000000000 --- a/mach/minix/libpc/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=minix" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -all: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/minix/libpc/compmodule b/mach/minix/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/minix/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/minixST/libcc/.distr b/mach/minixST/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/minixST/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/minixST/libcc/Makefile b/mach/minixST/libcc/Makefile deleted file mode 100644 index d4628255f..000000000 --- a/mach/minixST/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=minixST" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -all: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/minixST/libcc/compmodule b/mach/minixST/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/minixST/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/ns/libbc/.distr b/mach/ns/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/ns/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/ns/libbc/Makefile b/mach/ns/libbc/Makefile deleted file mode 100644 index 334a774c1..000000000 --- a/mach/ns/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=ns" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/ns/libbc/compmodule b/mach/ns/libbc/compmodule deleted file mode 100755 index 846ba6f1e..000000000 --- a/mach/ns/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/ns/libcc/.distr b/mach/ns/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/ns/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/ns/libcc/Makefile b/mach/ns/libcc/Makefile deleted file mode 100644 index 5f2cbc8cb..000000000 --- a/mach/ns/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=ns" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/libm" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/ns/libcc/compmodule b/mach/ns/libcc/compmodule deleted file mode 100755 index 846ba6f1e..000000000 --- a/mach/ns/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/ns/libm2/.distr b/mach/ns/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/ns/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/ns/libm2/Makefile b/mach/ns/libm2/Makefile deleted file mode 100644 index fbe21f07c..000000000 --- a/mach/ns/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=ns" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/ns/libm2/compmodule b/mach/ns/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/ns/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/ns/liboc/.distr b/mach/ns/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/ns/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/ns/liboc/Makefile b/mach/ns/liboc/Makefile deleted file mode 100644 index 28ecb4bbe..000000000 --- a/mach/ns/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=ns" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/ns/liboc/compmodule b/mach/ns/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/ns/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/ns/libpc/.distr b/mach/ns/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/ns/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/ns/libpc/Makefile b/mach/ns/libpc/Makefile deleted file mode 100644 index d4a03084e..000000000 --- a/mach/ns/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=ns" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/ns/libpc/compmodule b/mach/ns/libpc/compmodule deleted file mode 100755 index 846ba6f1e..000000000 --- a/mach/ns/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/ns/libsys/.distr b/mach/ns/libsys/.distr deleted file mode 100644 index 1edec9f14..000000000 --- a/mach/ns/libsys/.distr +++ /dev/null @@ -1,3 +0,0 @@ -LIST -head_em.s -libmon_s.a diff --git a/mach/ns/libsys/LIST b/mach/ns/libsys/LIST deleted file mode 100644 index 7afca84f6..000000000 --- a/mach/ns/libsys/LIST +++ /dev/null @@ -1,91 +0,0 @@ -libmon_s.a -exit.s -gtty.s -signal.s -stty.s -tell.s -time.s -cleanup.s -access.s -acct.s -alarm.s -brk.s -chdir.s -chmod.s -chown.s -chroot.s -close.s -creat.s -dup.s -dup2.s -execl.s -execle.s -execv.s -execve.s -fork.s -fstat.s -ftime.s -getegid.s -geteuid.s -getgid.s -getpid.s -getuid.s -ioctl.s -kill.s -link.s -lock.s -lseek.s -mknod.s -mount.s -mpxcall.s -nice.s -open.s -pause.s -pipe.s -prof.s -ptrace.s -read.s -sbrk.s -setgid.s -setuid.s -setsig.s -sigtrp.s -stat.s -stime.s -sync.s -times.s -umask.s -umount.s -unlink.s -utime.s -wait.s -write.s -errno.s -_alarm.s -_brk.s -_close.s -_creat.s -_dup.s -_dup2.s -_execl.s -_execve.s -_exit.s -_fork.s -_fstat.s -_ftime.s -_getpid.s -_gtty.s -_ioctl.s -_kill.s -_link.s -_lseek.s -_open.s -_pause.s -_pipe.s -_read.s -_sbrk.s -_stty.s -_times.s -_unlink.s -_wait.s -_write.s diff --git a/mach/ns/libsys/_alarm.s b/mach/ns/libsys/_alarm.s deleted file mode 100644 index 107f7840f..000000000 --- a/mach/ns/libsys/_alarm.s +++ /dev/null @@ -1,17 +0,0 @@ -.define __alarm -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __alarm -.sect .text -__alarm: -enter[], 0 -movd 8(fp),tos -movd 27,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_brk.s b/mach/ns/libsys/_brk.s deleted file mode 100644 index 69cd0a83b..000000000 --- a/mach/ns/libsys/_brk.s +++ /dev/null @@ -1,14 +0,0 @@ -.define __brk -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __brk -.sect .text -__brk: -enter[], 0 -movd 8(fp),@.reghp -movd 0,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_close.s b/mach/ns/libsys/_close.s deleted file mode 100644 index d4b732403..000000000 --- a/mach/ns/libsys/_close.s +++ /dev/null @@ -1,11 +0,0 @@ -.define __close -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __close -.sect .text -__close: -movd 0, r4 -ret 0 diff --git a/mach/ns/libsys/_creat.s b/mach/ns/libsys/_creat.s deleted file mode 100644 index faffa6726..000000000 --- a/mach/ns/libsys/_creat.s +++ /dev/null @@ -1,24 +0,0 @@ -.define __creat -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __creat -.sect .text -__creat: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 8,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_dup.s b/mach/ns/libsys/_dup.s deleted file mode 100644 index a2376082c..000000000 --- a/mach/ns/libsys/_dup.s +++ /dev/null @@ -1,24 +0,0 @@ -.define __dup -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __dup -.sect .text -__dup: -enter[], 0 -movd 8(fp),tos -movd 8(fp),tos -movd 41,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_dup2.s b/mach/ns/libsys/_dup2.s deleted file mode 100644 index 2ff3f0506..000000000 --- a/mach/ns/libsys/_dup2.s +++ /dev/null @@ -1,26 +0,0 @@ -.define __dup2 -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __dup2 -.sect .text -__dup2: -enter[], 0 -movd 8(fp),r7 -ord 64,r7 -movd 12(fp),tos -movd r7,tos -movd 41,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_execl.s b/mach/ns/libsys/_execl.s deleted file mode 100644 index f006b535d..000000000 --- a/mach/ns/libsys/_execl.s +++ /dev/null @@ -1,20 +0,0 @@ -.define __execl -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __execl -.sect .text -__execl: -enter[], 0 -movd @__penvp,tos -addr 12(fp),tos -movd 8(fp),tos -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_execve.s b/mach/ns/libsys/_execve.s deleted file mode 100644 index f8673092d..000000000 --- a/mach/ns/libsys/_execve.s +++ /dev/null @@ -1,24 +0,0 @@ -.define __execve -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __execve -.sect .text -__execve: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_exit.s b/mach/ns/libsys/_exit.s deleted file mode 100644 index a99c96689..000000000 --- a/mach/ns/libsys/_exit.s +++ /dev/null @@ -1,13 +0,0 @@ -.define __exit -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __exit -.sect .text -__exit: -enter[], 0 -movd 8(fp),tos -movd 1,tos -jsr @.mon diff --git a/mach/ns/libsys/_fork.s b/mach/ns/libsys/_fork.s deleted file mode 100644 index c3e555836..000000000 --- a/mach/ns/libsys/_fork.s +++ /dev/null @@ -1,27 +0,0 @@ -.define __fork -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -__fork: -enter[], 0 -movd 2,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 -I0011: -cmpqd 0,tos -beq I0012 -movd tos,r7 -movd 0,tos -I0012: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_fstat.s b/mach/ns/libsys/_fstat.s deleted file mode 100644 index 923e25f13..000000000 --- a/mach/ns/libsys/_fstat.s +++ /dev/null @@ -1,25 +0,0 @@ -.define __fstat -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __fstat -.sect .text -__fstat: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 28,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_ftime.s b/mach/ns/libsys/_ftime.s deleted file mode 100644 index 4044b13f3..000000000 --- a/mach/ns/libsys/_ftime.s +++ /dev/null @@ -1,15 +0,0 @@ -.define __ftime -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __ftime -.sect .text -__ftime: -enter[], 0 -movd 8(fp),tos -movd 35,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/_getpid.s b/mach/ns/libsys/_getpid.s deleted file mode 100644 index 6c5a11518..000000000 --- a/mach/ns/libsys/_getpid.s +++ /dev/null @@ -1,16 +0,0 @@ -.define __getpid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __getpid -.sect .text -__getpid: -enter[], 0 -movd 20,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_gtty.s b/mach/ns/libsys/_gtty.s deleted file mode 100644 index ef688caae..000000000 --- a/mach/ns/libsys/_gtty.s +++ /dev/null @@ -1,17 +0,0 @@ -.define __gtty -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __gtty -.sect .text -__gtty: -enter[], 0 -movd 12(fp),tos -movd 29704,tos -movd 8(fp),tos -jsr @__ioctl -adjspd -12 -exit [] -ret 0 diff --git a/mach/ns/libsys/_ioctl.s b/mach/ns/libsys/_ioctl.s deleted file mode 100644 index b88a104cd..000000000 --- a/mach/ns/libsys/_ioctl.s +++ /dev/null @@ -1,30 +0,0 @@ -.define __ioctl -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __ioctl -.sect .text -__ioctl: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 54,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_kill.s b/mach/ns/libsys/_kill.s deleted file mode 100644 index ab52a3b92..000000000 --- a/mach/ns/libsys/_kill.s +++ /dev/null @@ -1,25 +0,0 @@ -.define __kill -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __kill -.sect .text -__kill: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 37,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_link.s b/mach/ns/libsys/_link.s deleted file mode 100644 index 295e7594a..000000000 --- a/mach/ns/libsys/_link.s +++ /dev/null @@ -1,25 +0,0 @@ -.define __link -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __link -.sect .text -__link: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 9,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_lseek.s b/mach/ns/libsys/_lseek.s deleted file mode 100644 index aa2fc9375..000000000 --- a/mach/ns/libsys/_lseek.s +++ /dev/null @@ -1,29 +0,0 @@ -.define __lseek -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __lseek -.sect .text -__lseek: -enter[], 0 -addr 8(fp),r7 -movd 16,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 19,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r4 -movd tos,r5 -exit [] -ret 0 diff --git a/mach/ns/libsys/_open.s b/mach/ns/libsys/_open.s deleted file mode 100644 index 95196b82e..000000000 --- a/mach/ns/libsys/_open.s +++ /dev/null @@ -1,24 +0,0 @@ -.define __open -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __open -.sect .text -__open: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 5,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_pause.s b/mach/ns/libsys/_pause.s deleted file mode 100644 index 54d8fd6fb..000000000 --- a/mach/ns/libsys/_pause.s +++ /dev/null @@ -1,14 +0,0 @@ -.define __pause -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __pause -.sect .text -__pause: -enter[], 0 -movd 29,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/_pipe.s b/mach/ns/libsys/_pipe.s deleted file mode 100644 index f5df62c59..000000000 --- a/mach/ns/libsys/_pipe.s +++ /dev/null @@ -1,28 +0,0 @@ -.define __pipe -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __pipe -.sect .text -__pipe: -enter[], 0 -movd 42,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 -I0011: -movd 8(fp),r7 -movd tos,r6 -movd r6,4(r7) -movd tos,r6 -movd r6,0(8(fp)) -movd 0,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_read.s b/mach/ns/libsys/_read.s deleted file mode 100644 index 9757ee00a..000000000 --- a/mach/ns/libsys/_read.s +++ /dev/null @@ -1,20 +0,0 @@ -.define __read -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __read -.sect .text -__read: -enter[], 0 -save [r0,r1,r2,r3] -movd 3,r0 -movd 12(fp),r1 -movd 16(fp),r2 -movd 0,r3 -svc -movd 16(fp),r4 -restore [r0,r1,r2,r3] -exit[] -ret 0 diff --git a/mach/ns/libsys/_sbrk.s b/mach/ns/libsys/_sbrk.s deleted file mode 100644 index 49ca74592..000000000 --- a/mach/ns/libsys/_sbrk.s +++ /dev/null @@ -1,16 +0,0 @@ -.define __sbrk -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __sbrk -.sect .text -__sbrk: -enter[], 0 -movd @.reghp,r7 -addd 8(fp),r7 -movd r7,@.reghp -movd @.reghp,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_stty.s b/mach/ns/libsys/_stty.s deleted file mode 100644 index 93e00076f..000000000 --- a/mach/ns/libsys/_stty.s +++ /dev/null @@ -1,17 +0,0 @@ -.define __stty -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __stty -.sect .text -__stty: -enter[], 0 -movd 12(fp),tos -movd 29705,tos -movd 8(fp),tos -jsr @__ioctl -adjspd -12 -exit [] -ret 0 diff --git a/mach/ns/libsys/_times.s b/mach/ns/libsys/_times.s deleted file mode 100644 index 7321081e5..000000000 --- a/mach/ns/libsys/_times.s +++ /dev/null @@ -1,15 +0,0 @@ -.define __times -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __times -.sect .text -__times: -enter[], 0 -movd 8(fp),tos -movd 43,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/_unlink.s b/mach/ns/libsys/_unlink.s deleted file mode 100644 index 44d0dc091..000000000 --- a/mach/ns/libsys/_unlink.s +++ /dev/null @@ -1,24 +0,0 @@ -.define __unlink -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __unlink -.sect .text -__unlink: -enter[], 0 -movd 8(fp),tos -movd 10,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_wait.s b/mach/ns/libsys/_wait.s deleted file mode 100644 index 444e22437..000000000 --- a/mach/ns/libsys/_wait.s +++ /dev/null @@ -1,34 +0,0 @@ -.define __wait -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __wait -.sect .text -__wait: -enter[], 0 -movd 7,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -cmpqd 0,8(fp) -beq I0012 -movd tos,r7 -movd r7,0(8(fp)) -movd tos,r6 -movd r6,r4 -exit [] -ret 0 -I0012: -adjspd -4 -movd tos,r7 -movd r7,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/_write.s b/mach/ns/libsys/_write.s deleted file mode 100644 index 1f1c7d244..000000000 --- a/mach/ns/libsys/_write.s +++ /dev/null @@ -1,20 +0,0 @@ -.define __write -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __write -.sect .text -__write: -enter[], 0 -save [r0,r1,r2,r3] -movd 4,r0 -movd 12(fp),r1 -movd 16(fp),r2 -movd 0,r3 -svc -movd 16(fp),r4 -restore [r0,r1,r2,r3] -exit[] -ret 0 diff --git a/mach/ns/libsys/access.s b/mach/ns/libsys/access.s deleted file mode 100644 index 28b183afe..000000000 --- a/mach/ns/libsys/access.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _access -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _access -.sect .text -_access: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 33,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/acct.s b/mach/ns/libsys/acct.s deleted file mode 100644 index 7a1981262..000000000 --- a/mach/ns/libsys/acct.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _acct -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _acct -.sect .text -_acct: -enter[], 0 -movd 8(fp),tos -movd 51,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/alarm.s b/mach/ns/libsys/alarm.s deleted file mode 100644 index e00b78319..000000000 --- a/mach/ns/libsys/alarm.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _alarm -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _alarm -.sect .text -_alarm: -enter[], 0 -movd 8(fp),tos -movd 27,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/brk.s b/mach/ns/libsys/brk.s deleted file mode 100644 index b11758c81..000000000 --- a/mach/ns/libsys/brk.s +++ /dev/null @@ -1,14 +0,0 @@ -.define _brk -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _brk -.sect .text -_brk: -enter[], 0 -movd 8(fp),@.reghp -movd 0,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/chdir.s b/mach/ns/libsys/chdir.s deleted file mode 100644 index ab4c2a674..000000000 --- a/mach/ns/libsys/chdir.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _chdir -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _chdir -.sect .text -_chdir: -enter[], 0 -movd 8(fp),tos -movd 12,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/chmod.s b/mach/ns/libsys/chmod.s deleted file mode 100644 index 5c6293d91..000000000 --- a/mach/ns/libsys/chmod.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _chmod -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _chmod -.sect .text -_chmod: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 15,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/chown.s b/mach/ns/libsys/chown.s deleted file mode 100644 index ddc979211..000000000 --- a/mach/ns/libsys/chown.s +++ /dev/null @@ -1,30 +0,0 @@ -.define _chown -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _chown -.sect .text -_chown: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 16,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/chroot.s b/mach/ns/libsys/chroot.s deleted file mode 100644 index a8d8ab58a..000000000 --- a/mach/ns/libsys/chroot.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _chroot -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _chroot -.sect .text -_chroot: -enter[], 0 -movd 8(fp),tos -movd 61,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/cleanup.s b/mach/ns/libsys/cleanup.s deleted file mode 100644 index 0d1db44f3..000000000 --- a/mach/ns/libsys/cleanup.s +++ /dev/null @@ -1,12 +0,0 @@ -.define __cleanup -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern __cleanup -.sect .text -__cleanup: -enter[], 0 -exit [] -ret 0 diff --git a/mach/ns/libsys/close.s b/mach/ns/libsys/close.s deleted file mode 100644 index dbe9297fe..000000000 --- a/mach/ns/libsys/close.s +++ /dev/null @@ -1,11 +0,0 @@ -.define _close -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _close -.sect .text -_close: -movd 0, r4 -ret 0 diff --git a/mach/ns/libsys/creat.s b/mach/ns/libsys/creat.s deleted file mode 100644 index a9efa4c2e..000000000 --- a/mach/ns/libsys/creat.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _creat -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _creat -.sect .text -_creat: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 8,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/dup.s b/mach/ns/libsys/dup.s deleted file mode 100644 index 607d2e3af..000000000 --- a/mach/ns/libsys/dup.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _dup -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _dup -.sect .text -_dup: -enter[], 0 -movd 8(fp),tos -movd 8(fp),tos -movd 41,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/dup2.s b/mach/ns/libsys/dup2.s deleted file mode 100644 index d35a47f66..000000000 --- a/mach/ns/libsys/dup2.s +++ /dev/null @@ -1,26 +0,0 @@ -.define _dup2 -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _dup2 -.sect .text -_dup2: -enter[], 0 -movd 8(fp),r7 -ord 64,r7 -movd 12(fp),tos -movd r7,tos -movd 41,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/errno.s b/mach/ns/libsys/errno.s deleted file mode 100644 index 914836a9c..000000000 --- a/mach/ns/libsys/errno.s +++ /dev/null @@ -1,10 +0,0 @@ -.define _errno -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _errno -.sect .bss -_errno:.space 4 -.sect .text diff --git a/mach/ns/libsys/execl.s b/mach/ns/libsys/execl.s deleted file mode 100644 index 7c0432848..000000000 --- a/mach/ns/libsys/execl.s +++ /dev/null @@ -1,20 +0,0 @@ -.define _execl -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _execl -.sect .text -_execl: -enter[], 0 -movd @__penvp,tos -addr 12(fp),tos -movd 8(fp),tos -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/execle.s b/mach/ns/libsys/execle.s deleted file mode 100644 index 2e4cb954c..000000000 --- a/mach/ns/libsys/execle.s +++ /dev/null @@ -1,31 +0,0 @@ -.define _execle -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _execle -.sect .text -_execle: -enter[], 0 -addr 12(fp),tos -I0011: -movd tos,r7 -movd r7,tos -cmpd 0(r7),0 -beq I0012 -movd tos,r7 -addr 4(r7),tos -br I0011 -I0012: -movd tos,r7 -movd 4(r7),tos -addr 12(fp),tos -movd 8(fp),tos -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/execv.s b/mach/ns/libsys/execv.s deleted file mode 100644 index 9f93526b8..000000000 --- a/mach/ns/libsys/execv.s +++ /dev/null @@ -1,20 +0,0 @@ -.define _execv -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _execv -.sect .text -_execv: -enter[], 0 -movd @__penvp,tos -movd 12(fp),tos -movd 8(fp),tos -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/execve.s b/mach/ns/libsys/execve.s deleted file mode 100644 index cb663fbda..000000000 --- a/mach/ns/libsys/execve.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _execve -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _execve -.sect .text -_execve: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 59,tos -jsr @.mon -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/exit.s b/mach/ns/libsys/exit.s deleted file mode 100644 index 39d032322..000000000 --- a/mach/ns/libsys/exit.s +++ /dev/null @@ -1,16 +0,0 @@ -.define _exit -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _exit -.sect .text -_exit: -enter[], 0 -jsr @__cleanup -movd 8(fp),tos -jsr @__exit -adjspd -4 -exit [] -ret 0 diff --git a/mach/ns/libsys/fork.s b/mach/ns/libsys/fork.s deleted file mode 100644 index 29d01addd..000000000 --- a/mach/ns/libsys/fork.s +++ /dev/null @@ -1,34 +0,0 @@ -.define _fork -.define _par_uid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _par_uid -.sect .bss -_par_uid:.space 4 -.extern _fork -.sect .text -_fork: -enter[], 0 -movd 2,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 -I0011: -cmpqd 0,tos -beq I0012 -movd tos,r7 -movd r7,@_par_uid -movd 0,tos -I0012: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/fstat.s b/mach/ns/libsys/fstat.s deleted file mode 100644 index 7a23edd65..000000000 --- a/mach/ns/libsys/fstat.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _fstat -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _fstat -.sect .text -_fstat: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 28,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/ftime.s b/mach/ns/libsys/ftime.s deleted file mode 100644 index 306cc7bb0..000000000 --- a/mach/ns/libsys/ftime.s +++ /dev/null @@ -1,15 +0,0 @@ -.define _ftime -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _ftime -.sect .text -_ftime: -enter[], 0 -movd 8(fp),tos -movd 35,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/getegid.s b/mach/ns/libsys/getegid.s deleted file mode 100644 index 80a379b68..000000000 --- a/mach/ns/libsys/getegid.s +++ /dev/null @@ -1,16 +0,0 @@ -.define _getegid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _getegid -.sect .text -_getegid: -enter[], 0 -movd 47,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/geteuid.s b/mach/ns/libsys/geteuid.s deleted file mode 100644 index dd7bc0bc3..000000000 --- a/mach/ns/libsys/geteuid.s +++ /dev/null @@ -1,16 +0,0 @@ -.define _geteuid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _geteuid -.sect .text -_geteuid: -enter[], 0 -movd 24,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/getgid.s b/mach/ns/libsys/getgid.s deleted file mode 100644 index 3f63ec42c..000000000 --- a/mach/ns/libsys/getgid.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _getgid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _getgid -.sect .text -_getgid: -enter[], 0 -movd 47,tos -jsr @.mon -adjspd -4 -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/getpid.s b/mach/ns/libsys/getpid.s deleted file mode 100644 index 9dfbd9cf8..000000000 --- a/mach/ns/libsys/getpid.s +++ /dev/null @@ -1,16 +0,0 @@ -.define _getpid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _getpid -.sect .text -_getpid: -enter[], 0 -movd 20,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/getuid.s b/mach/ns/libsys/getuid.s deleted file mode 100644 index 78473a4ed..000000000 --- a/mach/ns/libsys/getuid.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _getuid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _getuid -.sect .text -_getuid: -enter[], 0 -movd 24,tos -jsr @.mon -adjspd -4 -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/gtty.s b/mach/ns/libsys/gtty.s deleted file mode 100644 index 473c54f93..000000000 --- a/mach/ns/libsys/gtty.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _gtty -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _gtty -.sect .text -_gtty: -enter[], 0 -movd 12(fp),tos -movd 29704,tos -movd 8(fp),tos -jsr @_ioctl -adjspd -12 -exit [] -ret 0 diff --git a/mach/ns/libsys/head_em.s b/mach/ns/libsys/head_em.s deleted file mode 100644 index 01bd631f4..000000000 --- a/mach/ns/libsys/head_em.s +++ /dev/null @@ -1,55 +0,0 @@ -.define hol0,argv,.reghp,.limhp,envp,begbss -.define .ignmask, .trpreg -.define .stop -.define ERANGE,EILLINS,ECASE -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text - -topmem = 0xFFFFFF - -ERANGE = 1 -EILLINS = 18 -ECASE = 20 - - .sect .text - - movd begbss, r7 - movd endbss, r6 -1: - movqd 0, 0(r7) - addqd 4, r7 - cmpd r6,r7 - bgt 1b - - movd envp,tos - movd argv,tos - movd 1,tos - jsr @__m_a_i_n -.stop: - movb 0x7f,tos - jsr @.putchar - bpt - -.sect .bss -begbss: -.sect .data -hol0: - .data4 0 - .data4 0 -argv: - .data4 3f -envp: - .data4 0 -3: - .asciz 'PROGRAM' -.reghp: - .data4 endbss -.limhp: - .data4 endbss -.ignmask: - .data2 0 -.trpreg: - .data4 0 diff --git a/mach/ns/libsys/ioctl.s b/mach/ns/libsys/ioctl.s deleted file mode 100644 index 4ca67f826..000000000 --- a/mach/ns/libsys/ioctl.s +++ /dev/null @@ -1,30 +0,0 @@ -.define _ioctl -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _ioctl -.sect .text -_ioctl: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 54,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/kill.s b/mach/ns/libsys/kill.s deleted file mode 100644 index 57b39284e..000000000 --- a/mach/ns/libsys/kill.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _kill -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _kill -.sect .text -_kill: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 37,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/link.s b/mach/ns/libsys/link.s deleted file mode 100644 index a8a433542..000000000 --- a/mach/ns/libsys/link.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _link -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _link -.sect .text -_link: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 9,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/lock.s b/mach/ns/libsys/lock.s deleted file mode 100644 index 848e5c06b..000000000 --- a/mach/ns/libsys/lock.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _lock -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _lock -.sect .text -_lock: -enter[], 0 -movd 8(fp),tos -movd 53,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/lseek.s b/mach/ns/libsys/lseek.s deleted file mode 100644 index 0dc530d9f..000000000 --- a/mach/ns/libsys/lseek.s +++ /dev/null @@ -1,29 +0,0 @@ -.define _lseek -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _lseek -.sect .text -_lseek: -enter[], 0 -addr 8(fp),r7 -movd 16,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 19,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r4 -movd tos,r5 -exit [] -ret 0 diff --git a/mach/ns/libsys/mknod.s b/mach/ns/libsys/mknod.s deleted file mode 100644 index 0e01edd82..000000000 --- a/mach/ns/libsys/mknod.s +++ /dev/null @@ -1,30 +0,0 @@ -.define _mknod -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _mknod -.sect .text -_mknod: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 14,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/mount.s b/mach/ns/libsys/mount.s deleted file mode 100644 index ed9565482..000000000 --- a/mach/ns/libsys/mount.s +++ /dev/null @@ -1,30 +0,0 @@ -.define _mount -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _mount -.sect .text -_mount: -enter[], 0 -addr 8(fp),r7 -movd 12,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 21,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/mpxcall.s b/mach/ns/libsys/mpxcall.s deleted file mode 100644 index 23401da8d..000000000 --- a/mach/ns/libsys/mpxcall.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _mpxcall -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _mpxcall -.sect .text -_mpxcall: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 56,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/nice.s b/mach/ns/libsys/nice.s deleted file mode 100644 index 7a31fce77..000000000 --- a/mach/ns/libsys/nice.s +++ /dev/null @@ -1,15 +0,0 @@ -.define _nice -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _nice -.sect .text -_nice: -enter[], 0 -movd 8(fp),tos -movd 34,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/open.s b/mach/ns/libsys/open.s deleted file mode 100644 index c883882cd..000000000 --- a/mach/ns/libsys/open.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _open -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _open -.sect .text -_open: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 5,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/pause.s b/mach/ns/libsys/pause.s deleted file mode 100644 index 59d2cc354..000000000 --- a/mach/ns/libsys/pause.s +++ /dev/null @@ -1,14 +0,0 @@ -.define _pause -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _pause -.sect .text -_pause: -enter[], 0 -movd 29,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/pipe.s b/mach/ns/libsys/pipe.s deleted file mode 100644 index f8b6ee30b..000000000 --- a/mach/ns/libsys/pipe.s +++ /dev/null @@ -1,28 +0,0 @@ -.define _pipe -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _pipe -.sect .text -_pipe: -enter[], 0 -movd 42,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 -I0011: -movd 8(fp),r7 -movd tos,r6 -movd r6,4(r7) -movd tos,r6 -movd r6,0(8(fp)) -movd 0,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/prof.s b/mach/ns/libsys/prof.s deleted file mode 100644 index 61a6e0142..000000000 --- a/mach/ns/libsys/prof.s +++ /dev/null @@ -1,21 +0,0 @@ -.define _profil -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _profil -.sect .text -_profil: -enter[], 0 -addr 8(fp),r7 -movd 16,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 44,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/ptrace.s b/mach/ns/libsys/ptrace.s deleted file mode 100644 index e1d73aea0..000000000 --- a/mach/ns/libsys/ptrace.s +++ /dev/null @@ -1,30 +0,0 @@ -.define _ptrace -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _ptrace -.sect .text -_ptrace: -enter[], 0 -xord @_errno,@_errno -addr 8(fp),r7 -movd 16,r0 -addd r0,r7 -1: -subd 4,r7 -movd 0(r7),tos -acbd -4,r0,1b -movd 26,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/read.s b/mach/ns/libsys/read.s deleted file mode 100644 index 941d9c05e..000000000 --- a/mach/ns/libsys/read.s +++ /dev/null @@ -1,20 +0,0 @@ -.define _read -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _read -.sect .text -_read: -enter[], 0 -save [r0,r1,r2,r3] -movd 3,r0 -movd 12(fp),r1 -movd 16(fp),r2 -movd 0,r3 -svc -movd 16(fp),r4 -restore [r0,r1,r2,r3] -exit[] -ret 0 diff --git a/mach/ns/libsys/sbrk.s b/mach/ns/libsys/sbrk.s deleted file mode 100644 index 3171463be..000000000 --- a/mach/ns/libsys/sbrk.s +++ /dev/null @@ -1,16 +0,0 @@ -.define _sbrk -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _sbrk -.sect .text -_sbrk: -enter[], 0 -movd @.reghp,r7 -addd 8(fp),r7 -movd r7,@.reghp -movd @.reghp,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/setgid.s b/mach/ns/libsys/setgid.s deleted file mode 100644 index 97a79254b..000000000 --- a/mach/ns/libsys/setgid.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _setgid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _setgid -.sect .text -_setgid: -enter[], 0 -movd 8(fp),tos -movd 46,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/setsig.s b/mach/ns/libsys/setsig.s deleted file mode 100644 index 4522e77e0..000000000 --- a/mach/ns/libsys/setsig.s +++ /dev/null @@ -1,44 +0,0 @@ -.define __setsig -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.sect .bss -_save:.space 4 -_trf:.space 4 -.extern __setsig -.sect .text -__setsig: -enter[], 0 -movd 8(fp),@_trf -movd @.trpreg,r0 -movd _catchit,@.trpreg -movd r0,@_save -exit [] -ret 0 -_catchit: -enter[], 0 -movd @.trpreg,r0 -movd _catchit,@.trpreg -movd r0,tos -adjspd -4 -movd @_trf,r7 -movd 8(fp),tos -jsr r7 -cmpqd 0,r4 -bne I0021 -movd @.trpreg,r0 -movd @_save,@.trpreg -movd r0,tos -adjspd -4 -jsr @.trp -movd @.trpreg,r0 -movd _catchit,@.trpreg -movd r0,tos -adjspd -4 -movd tos,r7 -movd r7,@_save -I0021: -exit [] -ret 0 diff --git a/mach/ns/libsys/setuid.s b/mach/ns/libsys/setuid.s deleted file mode 100644 index 25de564b7..000000000 --- a/mach/ns/libsys/setuid.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _setuid -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _setuid -.sect .text -_setuid: -enter[], 0 -movd 8(fp),tos -movd 23,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/signal.s b/mach/ns/libsys/signal.s deleted file mode 100644 index ec2a48c50..000000000 --- a/mach/ns/libsys/signal.s +++ /dev/null @@ -1,164 +0,0 @@ -.define _signal -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.sect .data -_vector: -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -.data4 0 -_mapvec: -.data4 0 -.data4 134219784 -.data4 2048 -.data4 0 -.data4 2827 -.data4 658176 -.data4 3072 -firsttim: -.extern _signal -.data4 1 -.sect .text -_signal: -enter[], 16 -movd 8(fp),r7 -addd -1,r7 -movd r7,-4(fp) -cmpqd 0,-4(fp) -bgt I0014 -cmpd -4(fp),16 -blt I0013 -I0014: -movd -1,tos -br I0011 -I0013: -cmpqd 0,@firsttim -beq I0015 -xord @firsttim,@firsttim -movd catchtrp,tos -jsr @__setsig -adjspd -4 -I0015: -movd -4(fp),r7 -ashd 2,r7 -movd _vector(r7),-12(fp) -cmpd -12(fp),12(fp) -beq I0016 -movd -4(fp),r7 -ashd 2,r7 -movd 12(fp),_vector(r7) -cmpd 12(fp),1 -bne I0017 -movd -3,-16(fp) -br I0018 -I0017: -cmpqd 0,12(fp) -bne I0019 -movd -2,-16(fp) -br I0018 -I0019: -addr 128(8(fp)),-16(fp) -I0018: -movd 8(fp),tos -movd -16(fp),tos -jsr @_sigtrp -adjspd -8 -cmpd r4,-1 -bne I0016 -movd -1,tos -br I0011 -I0016: -movd -12(fp),tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 -catchtrp: -enter[], 0 -cmpd 8(fp),128 -ble I0023 -cmpd 8(fp),144 -bgt I0023 -movd 8(fp),r7 -subd 128,r7 -movd r7,tos -jsr @procesig -adjspd -4 -movd r4,tos -br I0021 -I0023: -cmpqd 0,8(fp) -bgt I0024 -cmpd 8(fp),28 -bge I0024 -movd _mapvec,r7 -addd 8(fp),r7 -movzbd 0(r7),r6 -cmpqd 0,r6 -beq I0024 -movd _mapvec,r7 -addd 8(fp),r7 -movzbd 0(r7),tos -jsr @procesig -adjspd -4 -movd r4,tos -br I0021 -I0024: -movd 0,tos -I0021: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 -procesig: -enter[], 8 -movd 8(fp),r7 -addd -1,r7 -movd r7,-4(fp) -movd -4(fp),r6 -ashd 2,r6 -movd _vector(r6),-8(fp) -cmpd -8(fp),1 -bne I0033 -movd 1,tos -br I0031 -I0033: -cmpd 8(fp),4 -beq I0034 -cmpd 8(fp),5 -beq I0034 -movd -4(fp),r7 -ashd 2,r7 -movd 1,_vector(r7) -I0034: -cmpqd 0,-8(fp) -bne I0035 -movd 0,tos -br I0031 -I0035: -movd -8(fp),r7 -movd 8(fp),tos -jsr r7 -adjspd -4 -movd 1,tos -I0031: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/sigtrp.s b/mach/ns/libsys/sigtrp.s deleted file mode 100644 index 183a59705..000000000 --- a/mach/ns/libsys/sigtrp.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _sigtrp -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _sigtrp -.sect .text -_sigtrp: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 48,tos -jsr @.mon -cmpqd 0,tos -beq I0011 -movd tos,r7 -movd r7,@_errno -movd -1,tos -I0011: -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/stat.s b/mach/ns/libsys/stat.s deleted file mode 100644 index 7abe35040..000000000 --- a/mach/ns/libsys/stat.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _stat -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _stat -.sect .text -_stat: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 18,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/stime.s b/mach/ns/libsys/stime.s deleted file mode 100644 index 7e2a9fd26..000000000 --- a/mach/ns/libsys/stime.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _stime -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _stime -.sect .text -_stime: -enter[], 0 -movd 0(8(fp)),tos -movd 25,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/stty.s b/mach/ns/libsys/stty.s deleted file mode 100644 index 57266bac0..000000000 --- a/mach/ns/libsys/stty.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _stty -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _stty -.sect .text -_stty: -enter[], 0 -movd 12(fp),tos -movd 29705,tos -movd 8(fp),tos -jsr @_ioctl -adjspd -12 -exit [] -ret 0 diff --git a/mach/ns/libsys/sync.s b/mach/ns/libsys/sync.s deleted file mode 100644 index b4d528bdb..000000000 --- a/mach/ns/libsys/sync.s +++ /dev/null @@ -1,14 +0,0 @@ -.define _sync -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _sync -.sect .text -_sync: -enter[], 0 -movd 36,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/tell.s b/mach/ns/libsys/tell.s deleted file mode 100644 index 6456247c2..000000000 --- a/mach/ns/libsys/tell.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _tell -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _tell -.sect .text -_tell: -enter[], 0 -movd 1,tos -movd 0,tos -movd 8(fp),tos -jsr @_lseek -adjspd -12 -exit [] -ret 0 diff --git a/mach/ns/libsys/time.s b/mach/ns/libsys/time.s deleted file mode 100644 index c7b5b6e0e..000000000 --- a/mach/ns/libsys/time.s +++ /dev/null @@ -1,20 +0,0 @@ -.define _time -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _time -.sect .text -_time: -enter[], 12 -addr -12(fp),tos -jsr @_ftime -adjspd -4 -cmpqd 0,8(fp) -beq I0013 -movd -12(fp),0(8(fp)) -I0013: -movd -12(fp),r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/times.s b/mach/ns/libsys/times.s deleted file mode 100644 index 3f55a40ce..000000000 --- a/mach/ns/libsys/times.s +++ /dev/null @@ -1,15 +0,0 @@ -.define _times -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _times -.sect .text -_times: -enter[], 0 -movd 8(fp),tos -movd 43,tos -jsr @.mon -exit [] -ret 0 diff --git a/mach/ns/libsys/umask.s b/mach/ns/libsys/umask.s deleted file mode 100644 index 7696dc7c0..000000000 --- a/mach/ns/libsys/umask.s +++ /dev/null @@ -1,17 +0,0 @@ -.define _umask -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _umask -.sect .text -_umask: -enter[], 0 -movd 8(fp),tos -movd 60,tos -jsr @.mon -movd tos,r7 -movd r7,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/umount.s b/mach/ns/libsys/umount.s deleted file mode 100644 index 430ec986a..000000000 --- a/mach/ns/libsys/umount.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _umount -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _umount -.sect .text -_umount: -enter[], 0 -movd 8(fp),tos -movd 22,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/unlink.s b/mach/ns/libsys/unlink.s deleted file mode 100644 index 0cdade02b..000000000 --- a/mach/ns/libsys/unlink.s +++ /dev/null @@ -1,24 +0,0 @@ -.define _unlink -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _unlink -.sect .text -_unlink: -enter[], 0 -movd 8(fp),tos -movd 10,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/utime.s b/mach/ns/libsys/utime.s deleted file mode 100644 index 8ce393076..000000000 --- a/mach/ns/libsys/utime.s +++ /dev/null @@ -1,25 +0,0 @@ -.define _utime -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _utime -.sect .text -_utime: -enter[], 0 -movd 12(fp),tos -movd 8(fp),tos -movd 30,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -movd 0,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/wait.s b/mach/ns/libsys/wait.s deleted file mode 100644 index dd8eae054..000000000 --- a/mach/ns/libsys/wait.s +++ /dev/null @@ -1,34 +0,0 @@ -.define _wait -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _wait -.sect .text -_wait: -enter[], 0 -movd 7,tos -jsr @.mon -cmpqd 0,tos -bne I0011 -cmpqd 0,8(fp) -beq I0012 -movd tos,r7 -movd r7,0(8(fp)) -movd tos,r6 -movd r6,r4 -exit [] -ret 0 -I0012: -adjspd -4 -movd tos,r7 -movd r7,r4 -exit [] -ret 0 -I0011: -movd tos,r7 -movd r7,@_errno -movd -1,r4 -exit [] -ret 0 diff --git a/mach/ns/libsys/write.s b/mach/ns/libsys/write.s deleted file mode 100644 index 43866f271..000000000 --- a/mach/ns/libsys/write.s +++ /dev/null @@ -1,20 +0,0 @@ -.define _write -.sect .text -.sect .rom -.sect .data -.sect .bss -.sect .text -.extern _write -.sect .text -_write: -enter[], 0 -save [r0,r1,r2,r3] -movd 4,r0 -movd 12(fp),r1 -movd 16(fp),r2 -movd 0,r3 -svc -movd 16(fp),r4 -restore [r0,r1,r2,r3] -exit[] -ret 0 diff --git a/mach/pdp/libbc/.distr b/mach/pdp/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/pdp/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/pdp/libbc/Makefile b/mach/pdp/libbc/Makefile deleted file mode 100644 index 59ea7dc83..000000000 --- a/mach/pdp/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=pdp" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/pdp/libbc/compmodule b/mach/pdp/libbc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/pdp/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/pdp/libcc/.distr b/mach/pdp/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/pdp/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/pdp/libcc/Makefile b/mach/pdp/libcc/Makefile deleted file mode 100644 index 4c68d2dd7..000000000 --- a/mach/pdp/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=pdp" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/pdp/libcc/compmodule b/mach/pdp/libcc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/pdp/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/pdp/libm2/.distr b/mach/pdp/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/pdp/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/pdp/libm2/Makefile b/mach/pdp/libm2/Makefile deleted file mode 100644 index d94da5891..000000000 --- a/mach/pdp/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=pdp" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/pdp/libm2/compmodule b/mach/pdp/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/pdp/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/pdp/liboc/.distr b/mach/pdp/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/pdp/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/pdp/liboc/Makefile b/mach/pdp/liboc/Makefile deleted file mode 100644 index 7d91a8af3..000000000 --- a/mach/pdp/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=pdp" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/pdp/liboc/compmodule b/mach/pdp/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/pdp/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/pdp/libpc/.distr b/mach/pdp/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/pdp/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/pdp/libpc/Makefile b/mach/pdp/libpc/Makefile deleted file mode 100644 index 0e5132e19..000000000 --- a/mach/pdp/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=pdp -Rbe-p2" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/pdp/libpc/compmodule b/mach/pdp/libpc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/pdp/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/sun2/libcc/.distr b/mach/sun2/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun2/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun2/libcc/Makefile b/mach/sun2/libcc/Makefile deleted file mode 100644 index b473983e1..000000000 --- a/mach/sun2/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=sun2" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun2/libcc/compmodule b/mach/sun2/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/sun2/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/sun2/libm2/.distr b/mach/sun2/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun2/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun2/libm2/Makefile b/mach/sun2/libm2/Makefile deleted file mode 100644 index 5d3c508e7..000000000 --- a/mach/sun2/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=sun2" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun2/libm2/compmodule b/mach/sun2/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/sun2/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/sun2/liboc/.distr b/mach/sun2/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun2/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun2/liboc/Makefile b/mach/sun2/liboc/Makefile deleted file mode 100644 index 90b208035..000000000 --- a/mach/sun2/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=sun2" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun2/liboc/compmodule b/mach/sun2/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/sun2/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/sun3/libcc.ansi/.distr b/mach/sun3/libcc.ansi/.distr deleted file mode 100644 index dce239425..000000000 --- a/mach/sun3/libcc.ansi/.distr +++ /dev/null @@ -1,2 +0,0 @@ -makefile -homefromsubdir diff --git a/mach/sun3/libcc.ansi/homefromsubdir b/mach/sun3/libcc.ansi/homefromsubdir deleted file mode 100755 index 8a159a073..000000000 --- a/mach/sun3/libcc.ansi/homefromsubdir +++ /dev/null @@ -1,15 +0,0 @@ -if [ $# = 1 ] -then - NAM=`expr $1 : '^\(\/.*\)'` - if [ X$NAM != X ] - then - NAM=$1 - else - NAM=../$1 - fi - echo $NAM - exit 0 -else - echo PATH_ERROR - exit 1 -fi diff --git a/mach/sun3/libcc.ansi/makefile b/mach/sun3/libcc.ansi/makefile deleted file mode 100644 index f1c703cb8..000000000 --- a/mach/sun3/libcc.ansi/makefile +++ /dev/null @@ -1,40 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=Makefile -MACHDEF="MACH=sun3" "SUF=$(SUF)" "ASAR=aal" "DEFS=-DNFS" -PREF=ac -SUB= -LIBC="PREF=$(PREF)" "SUB=$(SUB)" -OLIB=tail_$(PREF)$(SUB) - -install: cplibc cphead - -cplibc: libsrc - make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=`homefromsubdir $(EMHOME)`" tailcp - -cphead: head_$(PREF).e - make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=$(EMHOME)" headcp - -head_$(PREF).e: libsrc - -libsrc: $(EMHOME)/lang/cem/libcc.ansi/libsrc . - tar xf $(EMHOME)/lang/cem/libcc.ansi/libsrc - touch libsrc - -cmp: cmplibc cmphead - -../../compare $(OLIB) - -cmplibc: libsrc - make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=`homefromsubdir $(EMHOME)`" tail - -cmphead: head_$(PREF).e - make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=$(EMHOME)" head - -clean: - rm -rf `cat LIST` LIST OLIST MakeArch Makefile make.proto libsrc head_$(PREF).[e$(SUF)] - -opr: - make pr | opr - -pr: - @pr makefile diff --git a/mach/sun3/libcc/.distr b/mach/sun3/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun3/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun3/libcc/Makefile b/mach/sun3/libcc/Makefile deleted file mode 100644 index fe518d9eb..000000000 --- a/mach/sun3/libcc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=sun3" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun3/libcc/compmodule b/mach/sun3/libcc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/sun3/libcc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/sun3/libm2/.distr b/mach/sun3/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun3/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun3/libm2/Makefile b/mach/sun3/libm2/Makefile deleted file mode 100644 index 70ea36b88..000000000 --- a/mach/sun3/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=sun3" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun3/libm2/compmodule b/mach/sun3/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/sun3/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/sun3/liboc/.distr b/mach/sun3/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/sun3/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/sun3/liboc/Makefile b/mach/sun3/liboc/Makefile deleted file mode 100644 index 921625e4f..000000000 --- a/mach/sun3/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=sun3" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/sun3/liboc/compmodule b/mach/sun3/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/sun3/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/vax4/libbc/.distr b/mach/vax4/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/vax4/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/vax4/libbc/Makefile b/mach/vax4/libbc/Makefile deleted file mode 100644 index 07ee3fe10..000000000 --- a/mach/vax4/libbc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=vax4" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/vax4/libbc/compmodule b/mach/vax4/libbc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/vax4/libbc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/vax4/libcc/.distr b/mach/vax4/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/vax4/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/vax4/libcc/Makefile b/mach/vax4/libcc/Makefile deleted file mode 100644 index aba31a1e7..000000000 --- a/mach/vax4/libcc/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=vax4" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" -LIBM="PREF=m" "SRC=lang/cem/libcc/math" -LIBLN="PREF=ln" "SRC=lang/cem/libcc/libln" - -install: cpstdio cpgen cplibm - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp -cplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tailcp -cplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmplibm - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon -cmplibm: - make -f $(MAKEFILE) $(LIBM) $(MACHDEF) tail - -../../compare tail_m -cmplibln: - make -f $(MAKEFILE) $(LIBLN) $(MACHDEF) tail - -../../compare tail_ln - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/vax4/libcc/compmodule b/mach/vax4/libcc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/vax4/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/vax4/libm2/.distr b/mach/vax4/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/vax4/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/vax4/libm2/Makefile b/mach/vax4/libm2/Makefile deleted file mode 100644 index d5e810fae..000000000 --- a/mach/vax4/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=vax4" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/vax4/libm2/compmodule b/mach/vax4/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/vax4/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/vax4/liboc/.distr b/mach/vax4/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/vax4/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/vax4/liboc/Makefile b/mach/vax4/liboc/Makefile deleted file mode 100644 index 8193808e3..000000000 --- a/mach/vax4/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=vax4" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/vax4/liboc/compmodule b/mach/vax4/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/vax4/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/vax4/libpc/.distr b/mach/vax4/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/vax4/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/vax4/libpc/Makefile b/mach/vax4/libpc/Makefile deleted file mode 100644 index e8b43d4f8..000000000 --- a/mach/vax4/libpc/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=vax4" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -all: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/vax4/libpc/compmodule b/mach/vax4/libpc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/vax4/libpc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/z80/int/doas b/mach/z80/int/doas deleted file mode 100644 index 5d30eae68..000000000 --- a/mach/z80/int/doas +++ /dev/null @@ -1,3 +0,0 @@ -/usr/em/mach/z80/as/as -d em.s atof.s fpp.s mli4.s dvu4.s dvi4.s eb.s >em.list -dl a.out int.hex -dosort int.hex diff --git a/mach/z80/libbc/.distr b/mach/z80/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z80/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z80/libbc/Makefile b/mach/z80/libbc/Makefile deleted file mode 100644 index 2286d7bc3..000000000 --- a/mach/z80/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z80" "SUF=$(SUF)" "ASAR=aal" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z80/libbc/compmodule b/mach/z80/libbc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/z80/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/z80/libcc/.distr b/mach/z80/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z80/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z80/libcc/Makefile b/mach/z80/libcc/Makefile deleted file mode 100644 index 10b6fea69..000000000 --- a/mach/z80/libcc/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z80" "SUF=$(SUF)" "ASAR=aal" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" - -install: cpstdio cpgen cpmon - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z80/libcc/compmodule b/mach/z80/libcc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/z80/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/z80/libm2/.distr b/mach/z80/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z80/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z80/libm2/Makefile b/mach/z80/libm2/Makefile deleted file mode 100644 index 352fd5ac9..000000000 --- a/mach/z80/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=o -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=z80" "SUF=$(SUF)" "ASAR=aal" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z80/libm2/compmodule b/mach/z80/libm2/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/z80/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/z80/liboc/.distr b/mach/z80/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z80/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z80/liboc/Makefile b/mach/z80/liboc/Makefile deleted file mode 100644 index 5d0f79d6c..000000000 --- a/mach/z80/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z80" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z80/liboc/compmodule b/mach/z80/liboc/compmodule deleted file mode 100755 index 6327cb991..000000000 --- a/mach/z80/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.o -else - exit 1 -fi diff --git a/mach/z80/libpc/.distr b/mach/z80/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z80/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z80/libpc/Makefile b/mach/z80/libpc/Makefile deleted file mode 100644 index d56deb59a..000000000 --- a/mach/z80/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=o -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z80" "SUF=$(SUF)" "ASAR=aal" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z80/libpc/compmodule b/mach/z80/libpc/compmodule deleted file mode 100755 index a794a2257..000000000 --- a/mach/z80/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.o -else exit 1 -fi diff --git a/mach/z8000/libbc/.distr b/mach/z8000/libbc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z8000/libbc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z8000/libbc/Makefile b/mach/z8000/libbc/Makefile deleted file mode 100644 index acb32f20e..000000000 --- a/mach/z8000/libbc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z8000" "SUF=$(SUF)" -BCDEF="PREF=bc" "SUB=" "SRC=lang/basic/lib" - -install: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(BCDEF) $(MACHDEF) tail - -../../compare head_bc - -../../compare tail_bc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z8000/libbc/compmodule b/mach/z8000/libbc/compmodule deleted file mode 100755 index 081a97551..000000000 --- a/mach/z8000/libbc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/z8000/libcc/.distr b/mach/z8000/libcc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z8000/libcc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z8000/libcc/Makefile b/mach/z8000/libcc/Makefile deleted file mode 100644 index 04e48c749..000000000 --- a/mach/z8000/libcc/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z8000" "SUF=$(SUF)" -STDIO="PREF=cc" "SUB=.1s" "SRC=lang/cem/libcc/stdio" -GEN="PREF=cc" "SUB=.2g" "SRC=lang/cem/libcc/gen" -MON="PREF=mon" "SRC=lang/cem/libcc/mon" - -install: cpstdio cpgen cpmon - -cpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tailcp -cpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) cp -cpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tailcp - -cmp: cmpstdio cmpgen cmpmon - -cmpstdio: - make -f $(MAKEFILE) $(STDIO) $(MACHDEF) tail - -../../compare tail_cc.1s -cmpgen: - make -f $(MAKEFILE) $(GEN) $(MACHDEF) head - -../../compare head_cc - make -f $(MAKEFILE) $(GEN) $(MACHDEF) tail - -../../compare tail_cc.2g -cmpmon: - make -f $(MAKEFILE) $(MON) $(MACHDEF) tail - -../../compare tail_mon - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z8000/libcc/compmodule b/mach/z8000/libcc/compmodule deleted file mode 100755 index 081a97551..000000000 --- a/mach/z8000/libcc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/z8000/libm2/.distr b/mach/z8000/libm2/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z8000/libm2/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z8000/libm2/Makefile b/mach/z8000/libm2/Makefile deleted file mode 100644 index 483aa3067..000000000 --- a/mach/z8000/libm2/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SUF=s -EMHOME=../../.. -MAKEFILE=$(EMHOME)/mach/proto/libg/Makefile -MACHDEF="MACH=z8000" "SUF=$(SUF)" "ASAR=arch" -M2LIB = lang/m2/libm2 -MOD="PREF=m2" "SUB=" "SRC=$(M2LIB)" - -all: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -install: cpmod - -cpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) cp - -cmp: cmpmod - -cmpmod: - make -f $(MAKEFILE) $(MOD) $(MACHDEF) all - -$(EMHOME)/mach/compare tail_m2 - -$(EMHOME)/mach/compare head_m2 - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z8000/libm2/compmodule b/mach/z8000/libm2/compmodule deleted file mode 100755 index 881f78da9..000000000 --- a/mach/z8000/libm2/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/mach/z8000/liboc/.distr b/mach/z8000/liboc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z8000/liboc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z8000/liboc/Makefile b/mach/z8000/liboc/Makefile deleted file mode 100644 index 47930326a..000000000 --- a/mach/z8000/liboc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z8000" "SUF=$(SUF)" -PCDEF="PREF=ocm" "SUB=" "SRC=lang/occam/lib" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tailcp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) tail - -../../compare tail_ocm - -clean: - -rm -f *.old *.[ce$(SUF)] tail* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z8000/liboc/compmodule b/mach/z8000/liboc/compmodule deleted file mode 100755 index 8dba8a441..000000000 --- a/mach/z8000/liboc/compmodule +++ /dev/null @@ -1,6 +0,0 @@ -if ${MACH?} -I../../../h ${MACHFL?} $1 1>&2 -then - echo `basename $1 $2`.s -else - exit 1 -fi diff --git a/mach/z8000/libpc/.distr b/mach/z8000/libpc/.distr deleted file mode 100644 index 37100a8aa..000000000 --- a/mach/z8000/libpc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -compmodule diff --git a/mach/z8000/libpc/Makefile b/mach/z8000/libpc/Makefile deleted file mode 100644 index f99b28c37..000000000 --- a/mach/z8000/libpc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SUF=s -MAKEFILE=../../proto/libg/Makefile -MACHDEF="MACH=z8000" "SUF=$(SUF)" -PCDEF="PREF=pc" "SUB=" "SRC=lang/pc/libpc" - -install: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) cp - -cmp: - make -f $(MAKEFILE) $(PCDEF) $(MACHDEF) all - -../../compare head_pc - -../../compare tail_pc - -clean: - -rm -f *.old *.[ce$(SUF)] tail* head* - -opr: - make pr | opr - -pr: - @pr Makefile diff --git a/mach/z8000/libpc/compmodule b/mach/z8000/libpc/compmodule deleted file mode 100755 index 081a97551..000000000 --- a/mach/z8000/libpc/compmodule +++ /dev/null @@ -1,4 +0,0 @@ -if ${MACH?ack} -I../../../h ${MACHFL?} $1 1>&2 -then echo `basename $1 $2`.s -else exit 1 -fi diff --git a/util/ack/pc/.distr b/util/ack/pc/.distr deleted file mode 100644 index df8c6bb91..000000000 --- a/util/ack/pc/.distr +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -em_pc.c diff --git a/util/ack/pc/Makefile b/util/ack/pc/Makefile deleted file mode 100644 index 777a53f63..000000000 --- a/util/ack/pc/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -EMHOME=../../.. -h=$(EMHOME)/h - -PC_PATH=$(EMHOME)/lib/em_pc - -LDFLAGS = -i - -em_pc: em_pc.c $h/local.h $h/em_path.h - $(CC) $(LDFLAGS) -o em_pc -O -I$h em_pc.c - -cmp: em_pc - cmp em_pc $(PC_PATH) - -install: em_pc - rm -f $(PC_PATH) - cp em_pc $(PC_PATH) - -lint: - lint -hpxc -I$h em_pc.c - -clean: - rm -f *.o *.old em_pc - -opr: - make pr ^ opr - -pr: - pr -n em_pc.c diff --git a/util/ack/pc/em_pc.c b/util/ack/pc/em_pc.c deleted file mode 100644 index 04f88f7e5..000000000 --- a/util/ack/pc/em_pc.c +++ /dev/null @@ -1,705 +0,0 @@ -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - * - */ - -/* $Header$ */ - -/* - * put all the pieces of the pascal part of the EM project together - * original author: Johan Stevenson, Vrije Universiteit, Amsterdam - * heavily modified by: Ed Keizer, Vrije Universiteit, Amsterdam - */ - -#include -#include -#include -#include -#include -#include -#include - -#define MAX_FLAG 40 /* The Max. no of '{' flags allowed */ - -#define void int - -char *pc_path; -char *err_path; - -int toterr; -int parent; - -char *eeflag; -int no_pemflag = 0 ; -char *pemflag[MAX_FLAG]; -char *eflag; -char *wflag; - -int sizes[sz_last+1] = { - 4, /* sz_addr */ - 8, /* sz_real */ - 0, /* sz_head */ - 512, /* sz_buff */ - 4096, /* sz_mset */ - 4, /* sz_iset */ - 4, /* sz_word */ - 4, /* sz_int */ - 4, /* sz_long */ -}; - -#define CALLSIZE 60 -char *callvector[CALLSIZE]; -char **av; -int ac; -int fileargs; /* number of recognized, processed args */ -int flagargs; -char *progname; -char *source; - -#define CHARSIZE 2500 -#define CHARMARG 50 -char charbuf[CHARSIZE]; -char *charp = charbuf; - -char *tmp_dir = TMP_DIR; -char *unique = "pcXXXXXX"; - -char sigs[] = { - SIGHUP, - SIGINT, - SIGTERM, - 0 -}; - -/* - * forward function declarations - */ -void finish(); -void pem(); -int list(); -char *flag(); -char *tempfile(); -char **initvector(); -char *basename(); - -/* - * used library routines and data - */ - -extern char *sys_errlist[]; -extern int errno; - -int atoi(); -void exit(); -void sleep(); -void execv(); -char *malloc(); -int chdir(); -int fork(); -int wait(); -int getpid(); -int open(); -int close(); -int read(); - -main(argc,argv) char **argv; { - register char *p; - char *files[3] ; - - for (p = sigs; *p; p++) - if (signal(*p,finish) == SIG_IGN) - signal(*p,SIG_IGN); - ac = argc; - av = argv; - progname = *av++; - init(); - while ( --ac>0 ) { - p = *av++; - if (*p == '-') { - flagargs++; - p = flag(p); - } else { - if ( fileargs>=3 ) fatal("Too many file arguments") ; - files[fileargs++]= p; - } - } - if ( fileargs!=3 ) fatal("Not enough arguments") ; - source=files[2] ; - pem(files[0],files[1]) ; - finish(); -} - -char *flag(f) char *f; { - register char *p; - - p = f+1; - switch (*p++) { - case 'e': - eflag = f; - break; - case 'E': - eeflag = f; - break; - case 'w': - wflag = f; - break; - case 'V': - initsizes(f+2); - return(0); - case '{': - if ( no_pemflag>=MAX_FLAG ) { - ermess("too many flags, ignored %s",f) ; - } else { - pemflag[no_pemflag++] = p; - } - return(0); - case 'R': - pc_path= p ; - return 0 ; - case 'r' : - err_path= p ; - return 0 ; - default: - return(f); - } - if (*p) - fatal("bad flag %s",f); - return(0); -} - -initsizes(vvflag) char *vvflag; { - register c, i; - register char *p = vvflag; - - while (c = *p++) { - i = atoi(p); - while (*p >= '0' && *p <= '9') - p++; - switch (c) { - case 'p': sz_addr = i; continue; - case 'f': sz_real = i; continue; - case 'h': sz_head = i; continue; - case 'b': sz_buff = i; continue; - case 'm': sz_mset = i; continue; - case 'j': sz_iset = i; continue; - case 'w': sz_word = i; continue; - case 'i': sz_int = i; continue; - case 'l': sz_long = i; continue; - } - fatal("bad V-flag %s",vvflag); - } - if (sz_word != sz_int || - (sz_int != 2 && sz_int != 4) || - (sz_long != 4)) { - fatal("bad V-flag %s",vvflag); - } -} - -/* ------------------ calling sequences -------------------- */ - -pem(p,q) char *p,*q; { - register char **v,*d; - int i; - FILE *erfil; - - if ( !pc_path ) fatal("Missing compiler pathname specification\n") ; - v = initvector(pc_path); - d = tempfile('d'); - if ((erfil = fopen(d,"w")) == NULL) - syserr(d); - if (sz_head == 0) - sz_head = 6*sz_word + 2*sz_addr; - for (i = 0; i <= sz_last; i++) - fprintf(erfil, "%d\n",sizes[i]); - fprintf(erfil,"%s\n",basename(source)); - for ( i=0 ; i 3) { -/* - if ((status & 0200) && tflag==0) - unlink("core"); -*/ - fatal("signal %d in %s. Ask an expert for help", - status&0177,callvector[0]); - } - if (status & 0177400) - toterr++; -} - -char **initvector(path) char *path; { - register char *p,**v; - - v = callvector; - p = path; - *v++ = p; - *v++ = basename(p); - return(v); -} - -finish() { - register char *p,*q; - register fd; - struct direct dir; - - signal(SIGINT,SIG_IGN); - if (parent != 0) { - chdir(tmp_dir); - fd = open(".",0); - while (read(fd,(char *) &dir,sizeof dir) == sizeof dir) { - if (dir.d_ino == 0) - continue; - p = unique; - q = dir.d_name; - while (*p++ == *q++) - if (*p == '\0') { - unlink(dir.d_name); - break; - } - } - close(fd); - } - exit(toterr ? -1 : 0); -} - - -donewith(p) char *p; { - - if (p >= charbuf && p < &charbuf[CHARSIZE]) - unlink(p); -} - -init() { - register char *p; - register i,fd; - - if ((fd = open(tmp_dir,0)) < 0) - tmp_dir = "."; - close(fd); - p = unique+2; - parent = i = getpid(); - do - *p++ = i % 10 + '0'; - while (i /= 10); - *p++ = '.'; *p = '\0'; -} - -/* ------------------- pascal listing ----------------------- */ - -#define MAXERNO 300 -#define MAXERRLIST 10 -#define IDMAX 8 - -struct errec { - int erno; - char mess[IDMAX+1]; - int mesi; - int chno; - int lino; -}; - -struct errec curr; -struct errec next; - -int *index = 0; -int maxerno; - -int errerr; -int errfat; - -int listlino; -int listorig; -int listrela; -char *listfnam; - -FILE *inpfil; -FILE *mesfil; -FILE *errfil; - -int errorline(); -int geterrec(); -int nexterror(); - -int list(p,q) char *p,*q; { - - if ((errfil = fopen(q,"r")) == NULL) - syserr(q); - if (geterrec() == 0) - if (eeflag==0) { - fclose(errfil); - return(0); - } - if (index == 0) { - index = (int *) malloc(MAXERNO * sizeof index[0]); - fillindex(); - } - if ((inpfil = fopen(p,"r")) == NULL) - syserr(p); - errerr = 0; - errfat = 0; - listlino = 0; - listorig = 0; - listrela = 0; - listfnam = source; - if (eeflag) - listfull(); - else if (eflag) - listpartial(); - else - listshort(); - fclose(errfil); - fclose(inpfil); - fflush(stdout); - return(errfat ? -1 : 1); -} - -listshort() { - - while (nexterror()) { - while (listlino < curr.lino) - nextline(0); - printf("%s, line %d: ",listfnam,listrela); - string(&curr); - } -} - -listfull() { - - if (nexterror()) - do { - do { - nextline(1); - } while (listlino < curr.lino); - } while (errorline()); - while (nextline(1)) - ; -} - -listpartial() { - - if (nexterror()) - do { - do { - nextline(listlino >= curr.lino-2); - } while (listlino < curr.lino); - } while (errorline()); -} - -int nextline(printing) { - register ch; - - listlino++; - ch = getc(inpfil); - while (ch == '#') { - if (lineline(printing) == 1) - return(1); - ch = getc(inpfil); - } - listrela++; - if (listfnam == source) - listorig++; - if (ch != EOF) { - if (printing) - printf("%5d\t",listorig); - do { - if (printing) - putchar(ch); - if (ch == '\n') - return(1); - } while ((ch = getc(inpfil)) != EOF); - } - return(0); -} - -lineline(printing) { - register ch; - register char *p,*q; - static char line[100]; - int ln; - - p = line; - while ((ch = getc(inpfil)) != '\n') { - if (ch == EOF || p == &line[100-1]) { - *p = 0; - listlino++; - listrela++; - if (listfnam == source) - listorig++; - if (printing) { - printf("%5d\t#%s", listorig, p); - putchar(ch); - } - while (ch != EOF && ch != '\n') { - ch = getc(inpfil); - if (ch != EOF && printing) putchar(ch); - } - return(0); - } - *p++ = ch; - } - *p = '\0'; p = line; - ln = atoi(p)-1; - if (ln >= 0) { - while ((ch = *p++) != '"' && ch != '\0') - ; - if (ch == '"') { - q = p; - while (ch = *p++) { - if (ch == '"') { - *--p = '\0'; - listrela = ln; - if ( source ) { - listfnam = strcmp(q,source)==0 ? source : q; - } - else { - source=q ; listfnam=q ; - } - listlino++; - if (printing) - printf("\t#%s\n",p); - return 1 ; - } - if (ch == '/') - q = p; - } - } - } - listlino++; - listrela++; - if (listfnam == source) - listorig++; - if (printing) - printf("%5d\t#%s\n",listorig, p); - return(0); -} - -int errorline() { - register c; - register struct errec *p,*q; - struct errec lerr[MAXERRLIST]; - int goon; - - printf("*** ***"); - p = lerr; - c = 0; - do { - if (c < curr.chno) { - printf("%*c",curr.chno-c,'^'); - c = curr.chno; - } - if (p < &lerr[MAXERRLIST]) - *p++ = curr; - goon = nexterror(); - } while (goon && curr.lino==listlino); - putchar('\n'); - for (q = lerr; q < p; q++) - string(q); - putchar('\n'); - return(goon); -} - -int geterrec() { - register ch; - register char *p; - - ch = getc(errfil); - next.erno = 0; - next.mesi = -1; - next.mess[0] = '\0'; - if (ch == EOF) - return(0); - if (ch >= '0' && ch <= '9') { - ch = getnum(ch,&next.mesi); - } else if (ch == '\'') { - p = next.mess; - while ((ch = getc(errfil)) != ' ' && ch != EOF) - if (p < &next.mess[IDMAX]) - *p++ = ch; - *p = '\0'; - } - ch = getnum(ch, &next.erno); - ch = getnum(ch, &next.lino); - ch = getnum(ch, &next.chno); - if (ch != '\n') - fatal("bad error line"); - return(1); -} - -int getnum(ch, ip) register ch; register *ip; { - register neg; - - *ip = 0; - while (ch == ' ') - ch = getc(errfil); - if (neg = ch=='-') - ch = getc(errfil); - while (ch >= '0' && ch <= '9') { - *ip = *ip * 10 - '0' + ch; - ch = getc(errfil); - } - if (neg) - *ip = -(*ip); - return(ch); -} - -int nexterror() { - - do { /* skip warnings if wflag */ - curr = next; - if (curr.erno == 0) - return(0); - for (;;) { - if (geterrec() == 0) - break; - if (next.lino != curr.lino || next.chno != curr.chno) - break; - if (curr.erno < 0 && next.erno > 0) - /* promote warnings if they cause fatals */ - curr.erno = -curr.erno; - if (next.mess[0] != '\0' || next.mesi != -1) - /* give all parameterized errors */ - break; - if (curr.mess[0] != '\0' || curr.mesi != -1) - /* and at least a non-parameterized one */ - break; - } - } while (curr.erno < 0 && wflag != 0); - return(1); -} - -fillindex() { - register *ip,n,c; - - if ( !err_path ) fatal("Missing error file name\n") ; - if ((mesfil = fopen(err_path,"r")) == NULL) - syserr(err_path); - ip = index; - *ip++ = 0; - n = 0; - while ((c = getc(mesfil)) != EOF) { - n++; - if (c == '\n') { - *ip++ = n; - if (ip > &index[MAXERNO]) - fatal("too many errors on %s",err_path); - } - } - maxerno = ip - index; -} - -string(ep) register struct errec *ep; { - register i,n; - - errerr++; - if ((i = ep->erno) < 0) { - i = -i; - printf("Warning: "); - } else - errfat++; - if (i == 0 || i >= maxerno) - fatal("bad error number %d",i); - n = index[i] - index[i-1]; - fseek(mesfil,(long)index[i-1],0); - while (--n >= 0) { - i = getc(mesfil); - if (i == '%' && --n>=0) { - i = getc(mesfil); - if (i == 'i') - printf("%d", ep->mesi); - else if (i == 's') - printf("%s", ep->mess); - else - putchar(i); - } else - putchar(i); - } -} - -/* ------------------- error routines -------------------------- */ - -/* VARARGS1 */ -void ermess(s,a1,a2,a3,a4) char *s; { - - fprintf(stderr,"%s: ",progname); - fprintf(stderr,s,a1,a2,a3,a4); - fprintf(stderr,"\n"); -} - -syserr(s) char *s; { - fatal("%s: %s",s,sys_errlist[errno]); -} - -/* VARARGS1 */ -void fatal(s,a1,a2,a3,a4) char *s; { - - ermess(s,a1,a2,a3,a4); - toterr++; - finish(); -}