1984-06-21 10:57:59 +00:00
|
|
|
# (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
1984-10-04 10:47:03 +00:00
|
|
|
# $Header$
|
1990-06-06 17:04:46 +00:00
|
|
|
#
|
|
|
|
# Don't generate line updating code by default (i.e.: -L flag provided to cem).
|
|
|
|
# To put it on again: use -NL
|
|
|
|
var LFLAG=-L
|
1990-11-21 16:51:49 +00:00
|
|
|
var C_INCLUDES=-I{EM}/include/_tail_cc
|
|
|
|
var ANSI_C_INCLUDES=-I{EM}/include/tail_ac
|
1990-06-06 17:04:46 +00:00
|
|
|
|
1984-09-10 17:34:04 +00:00
|
|
|
callname ack
|
1984-06-21 10:57:59 +00:00
|
|
|
name cpp
|
1984-10-04 10:47:03 +00:00
|
|
|
# no from, this is a preprocessor
|
1984-06-21 10:57:59 +00:00
|
|
|
to .i
|
1990-11-21 16:51:49 +00:00
|
|
|
program {EM}/lib/cpp{ANSI_C?}
|
1984-06-21 10:57:59 +00:00
|
|
|
mapflag -I* CPP_F={CPP_F?} -I*
|
|
|
|
mapflag -U* CPP_F={CPP_F?} -U*
|
|
|
|
mapflag -D* CPP_F={CPP_F?} -D*
|
1987-03-30 13:20:05 +00:00
|
|
|
mapflag -P CPP_F={CPP_F?} -P
|
|
|
|
mapflag -C CPP_F={CPP_F?} -C
|
1990-11-21 16:51:49 +00:00
|
|
|
mapflag -wo CPP_F={CPP_F?} -o
|
|
|
|
mapflag -ansi ANSI_C=.ansi
|
1987-02-26 12:45:37 +00:00
|
|
|
args {CPP_F?} ({SUFFIX?}:.ocm=-I{EM}/include/occam) \
|
1990-11-21 16:51:49 +00:00
|
|
|
({ANSI_C?}:.ansi={ANSI_C_INCLUDES} {INCLUDES?}) \
|
|
|
|
({ANSI_C?.c}:{SUFFIX}={C_INCLUDES} {INCLUDES?}) \
|
1989-10-12 16:57:37 +00:00
|
|
|
-D{NAME} \
|
1990-11-21 16:51:49 +00:00
|
|
|
({ANSI_C?.xx}:.xx=-DEM_WSIZE={w} -DEM_PSIZE={p} \
|
|
|
|
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d}) \
|
1990-03-28 17:14:35 +00:00
|
|
|
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
|
|
|
|
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
|
1989-10-12 16:57:37 +00:00
|
|
|
<
|
1984-10-04 10:47:03 +00:00
|
|
|
stdout
|
|
|
|
prep is
|
1984-06-21 10:57:59 +00:00
|
|
|
end
|
|
|
|
name cem
|
|
|
|
from .c
|
|
|
|
to .k
|
1990-11-21 16:51:49 +00:00
|
|
|
program {EM}/lib/em_cemcom{ANSI_C?}
|
|
|
|
mapflag -ansi ANSI=ansi
|
1987-05-11 12:47:59 +00:00
|
|
|
# mapflag -I* CPP_F={CPP_F?} -I*
|
|
|
|
# mapflag -U* CPP_F={CPP_F?} -U*
|
|
|
|
# mapflag -D* CPP_F={CPP_F?} -D*
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -M* CEM_F={CEM_F?} -M*
|
|
|
|
mapflag -L CEM_F={CEM_F?} -L
|
1990-11-21 16:51:49 +00:00
|
|
|
mapflag -A CEM_F={CEM_F?} -A
|
1990-06-06 17:04:46 +00:00
|
|
|
mapflag -NL LFLAG=
|
1987-04-03 13:18:38 +00:00
|
|
|
mapflag -KR CEM_F={CEM_F?} -R
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -w CEM_F={CEM_F?} -w
|
1990-11-21 16:51:49 +00:00
|
|
|
mapflag -wa CEM_F={CEM_F?} -a
|
|
|
|
mapflag -wo CEM_F={CEM_F?} -o
|
|
|
|
mapflag -ws CEM_F={CEM_F?} -s
|
1990-10-01 15:42:10 +00:00
|
|
|
mapflag -g CEM_F={CEM_F?} -g
|
1988-07-04 13:39:15 +00:00
|
|
|
mapflag -p CEM_F={CEM_F?} -p
|
|
|
|
mapflag -V* CEM_F={CEM_F?} -V*
|
1990-11-21 16:51:49 +00:00
|
|
|
rts .c
|
|
|
|
need .c
|
1987-03-26 12:44:04 +00:00
|
|
|
args \
|
1990-11-21 16:51:49 +00:00
|
|
|
{CPP_F?} \
|
|
|
|
({ANSI_C?}:.ansi={ANSI_C_INCLUDES}) \
|
|
|
|
({ANSI_C?.c}:.c={C_INCLUDES}) \
|
|
|
|
{INCLUDES?} \
|
1989-10-12 16:57:37 +00:00
|
|
|
-D{NAME} \
|
1990-03-28 17:14:35 +00:00
|
|
|
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
|
|
|
|
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
|
1989-10-12 16:57:37 +00:00
|
|
|
-Vw{w}.{w}i{w}.{w}p{p}.{w}f{f}.{w}s{s}.{s}l{l}.{w}d{d}.{w} \
|
|
|
|
{CC_ALIGN?} \
|
1990-06-06 17:04:46 +00:00
|
|
|
{CEM_F?} {LFLAG?} < >
|
1984-09-10 17:34:04 +00:00
|
|
|
callname acc
|
|
|
|
callname cc
|
1984-06-21 10:57:59 +00:00
|
|
|
end
|
|
|
|
name pc
|
|
|
|
from .p
|
|
|
|
to .k
|
|
|
|
program {EM}/lib/em_pc
|
1989-04-18 13:34:50 +00:00
|
|
|
mapflag -L PC_F={PC_F?} -L
|
|
|
|
# mapflag -s PC_F={PC_F?} -s
|
1989-06-09 15:07:54 +00:00
|
|
|
mapflag -_ PC_F={PC_F?} -U
|
1984-06-21 10:57:59 +00:00
|
|
|
mapflag -w PC_F={PC_F?} -w
|
1987-03-25 12:42:12 +00:00
|
|
|
mapflag -V* PC_F={PC_F?} -V*
|
1989-04-18 13:34:50 +00:00
|
|
|
mapflag -M* PC_F={PC_F?} -M*
|
|
|
|
# mapflag -i* PC_F={PC_F?} -i*
|
|
|
|
mapflag -A PC_F={PC_F?} -A
|
|
|
|
# mapflag -R PC_F={PC_F?} -R
|
|
|
|
mapflag --* PC_F={PC_F?} -*
|
|
|
|
#range checks can only be disabled through comments
|
1989-10-12 16:57:37 +00:00
|
|
|
args \
|
|
|
|
-Vw{w}.{w}i{w}.{w}l{l}.{w}p{p}.{w}f{d}.{w}S{w}.{w} \
|
|
|
|
{PC_F?} < > {SOURCE}
|
1984-10-04 10:47:03 +00:00
|
|
|
prep cond
|
1984-06-21 10:57:59 +00:00
|
|
|
rts .p
|
|
|
|
need .p
|
1984-09-10 17:34:04 +00:00
|
|
|
callname apc
|
|
|
|
callname pc
|
1987-02-26 12:45:37 +00:00
|
|
|
end
|
|
|
|
name m2
|
1988-04-11 12:45:45 +00:00
|
|
|
from .mod.def
|
1987-02-26 12:45:37 +00:00
|
|
|
to .k
|
|
|
|
program {EM}/lib/em_m2
|
1987-03-25 12:42:12 +00:00
|
|
|
mapflag -I* M2_INCL={M2_INCL?} -I*
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -L M2_F={M2_F?} -L
|
1990-08-01 14:46:07 +00:00
|
|
|
mapflag -g M2_F={M2_F?} -g
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -w* M2_F={M2_F?} -w*
|
|
|
|
mapflag -W* M2_F={M2_F?} -W*
|
1989-06-09 15:07:54 +00:00
|
|
|
mapflag -_ M2_F={M2_F?} -U
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -M* M2_F={M2_F?} -M*
|
|
|
|
mapflag -x M2_F={M2_F?} -x
|
1987-07-22 13:30:06 +00:00
|
|
|
mapflag -Xs M2_F={M2_F?} -s
|
1987-03-25 12:42:12 +00:00
|
|
|
mapflag -V* M2_F={M2_F?} -V*
|
1989-06-09 15:07:54 +00:00
|
|
|
mapflag --* M2_F={M2_F?} -*
|
1989-10-12 16:57:37 +00:00
|
|
|
args \
|
|
|
|
{M2_INCL?} -I{EM}/lib/m2 {M2SYSLIB?} \
|
|
|
|
-Vw{w}.{w}i{w}.{w}p{p}.{w}l{l}.{w}f{f}.{w}d{d}.{w} \
|
|
|
|
{M2_ALIGN?} {M2_F?} < >
|
1987-05-11 12:31:51 +00:00
|
|
|
prep cond
|
1987-02-26 12:45:37 +00:00
|
|
|
rts .mod
|
|
|
|
need .mod
|
|
|
|
callname m2
|
|
|
|
end
|
|
|
|
name ocm
|
|
|
|
from .ocm
|
|
|
|
to .k
|
|
|
|
program {EM}/lib/em_occam
|
|
|
|
mapflag -L OCM_F={OCM_F?} -L
|
1987-03-25 12:42:12 +00:00
|
|
|
mapflag -V* OCM_F={OCM_F?} -V*
|
|
|
|
args -Vw{w}p{p}l{l} {OCM_F?}
|
1987-02-26 12:45:37 +00:00
|
|
|
stdin
|
|
|
|
stdout
|
|
|
|
rts .ocm
|
|
|
|
need .ocm
|
|
|
|
prep cond
|
|
|
|
callname ocm
|
|
|
|
end
|
|
|
|
name abc
|
1984-09-10 17:34:04 +00:00
|
|
|
from .b
|
1988-07-04 13:39:15 +00:00
|
|
|
to .k
|
1984-11-27 23:59:28 +00:00
|
|
|
program {EM}/lib/em_bem
|
1984-09-10 17:34:04 +00:00
|
|
|
mapflag -h ABC_F={ABC_F?} -h
|
|
|
|
mapflag -w ABC_F={ABC_F?} -w
|
|
|
|
mapflag -L ABC_F={ABC_F?} -L
|
|
|
|
mapflag -E ABC_F={ABC_F?} -E
|
1984-10-04 10:47:03 +00:00
|
|
|
# mapflag -d ABC_F={ABC_F?} -d
|
1988-07-13 18:04:01 +00:00
|
|
|
args -Vw{w}p{p}f{d} {ABC_F?} < > {SOURCE}
|
1988-07-04 13:39:15 +00:00
|
|
|
prep cond
|
1984-09-10 17:34:04 +00:00
|
|
|
rts .b
|
|
|
|
need .b
|
|
|
|
callname abc
|
|
|
|
end
|
1989-02-09 13:46:32 +00:00
|
|
|
var A68INIT={EM}/lib/em_a68s_init
|
|
|
|
name a68s
|
|
|
|
from .8.a68
|
|
|
|
to .k
|
|
|
|
program {EM}/lib/em_a68s{w}{p}
|
|
|
|
mapflag -PA* A68INIT=*
|
|
|
|
args < > {SOURCE}.lst {A68INIT}{w}{p} /dev/null
|
|
|
|
prep cond
|
|
|
|
rts .8
|
|
|
|
need .8
|
|
|
|
callname a68s
|
|
|
|
end
|
1984-09-10 17:34:04 +00:00
|
|
|
name encode
|
1984-06-21 10:57:59 +00:00
|
|
|
from .e
|
|
|
|
to .k
|
|
|
|
program {EM}/lib/em_encode
|
|
|
|
args <
|
1984-10-04 10:47:03 +00:00
|
|
|
prep cond
|
|
|
|
stdout
|
1984-06-21 10:57:59 +00:00
|
|
|
end
|
|
|
|
name opt
|
|
|
|
from .k
|
|
|
|
to .m
|
|
|
|
program {EM}/lib/em_opt
|
|
|
|
mapflag -LIB OPT_F={OPT_F?} -L
|
|
|
|
args {OPT_F?} <
|
1984-10-04 10:47:03 +00:00
|
|
|
stdout
|
|
|
|
optimizer
|
1984-09-10 17:34:04 +00:00
|
|
|
end
|
1989-04-18 13:34:50 +00:00
|
|
|
var EGO={EM}/lib/em_ego
|
1987-02-26 12:45:37 +00:00
|
|
|
name ego
|
|
|
|
from .m.ma
|
|
|
|
to .gk
|
|
|
|
program /bin/sh
|
1989-04-18 13:34:50 +00:00
|
|
|
mapflag -EGO-* EGO_F={EGO_F?} -*
|
|
|
|
mapflag -EGO=* EGO=*
|
1989-02-09 13:46:32 +00:00
|
|
|
# The following lines are obsolete, but here for backwards compatibility.
|
|
|
|
# They should be removed some day.
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -IL* EGO_F={EGO_F?} -IL*
|
|
|
|
mapflag -CS* EGO_F={EGO_F?} -CS*
|
|
|
|
mapflag -SR* EGO_F={EGO_F?} -SR*
|
|
|
|
mapflag -UD* EGO_F={EGO_F?} -UD*
|
|
|
|
mapflag -LV* EGO_F={EGO_F?} -LV*
|
|
|
|
mapflag -SA* EGO_F={EGO_F?} -RA*
|
|
|
|
mapflag -SP* EGO_F={EGO_F?} -SP*
|
|
|
|
mapflag -BO* EGO_F={EGO_F?} -BO*
|
|
|
|
mapflag -CJ* EGO_F={EGO_F?} -CJ*
|
1989-02-09 13:46:32 +00:00
|
|
|
mapflag -EV EGO_F={EGO_F?} -V
|
|
|
|
# End of obsolete lines
|
1987-02-26 12:45:37 +00:00
|
|
|
mapflag -Q* EGO_F={EGO_F?} -Q*
|
|
|
|
mapflag -T* EGO_F={EGO_F?} -T*
|
|
|
|
mapflag -S* EGO_F={EGO_F?} -S*
|
|
|
|
mapflag -s* EGO_F={EGO_F?} -s*
|
1990-11-21 16:51:49 +00:00
|
|
|
mapflag -a EGO_F={EGO_F?} -a
|
1989-02-09 13:46:32 +00:00
|
|
|
mapflag -O* EGO_F={EGO_F?} -O*
|
1989-10-12 16:57:37 +00:00
|
|
|
args \
|
|
|
|
{EGO} {EM} {EGO_F?} -P {EM}/lib/ego \
|
|
|
|
-M{EM}/lib/ego/{M}descr <
|
1989-02-09 13:46:32 +00:00
|
|
|
optimizer 2
|
1987-02-26 12:45:37 +00:00
|
|
|
stdout
|
|
|
|
combiner
|
|
|
|
end
|
|
|
|
name opt2
|
|
|
|
# output of the global optimizer is processed by a stripped version
|
|
|
|
# of the em peephole optimizer
|
|
|
|
from .gk
|
|
|
|
to .g
|
|
|
|
program {EM}/lib/em_opt2
|
1987-05-20 14:51:02 +00:00
|
|
|
# mapflag -LIB OPT_F={OPT_F?} -L
|
1987-02-26 12:45:37 +00:00
|
|
|
args {OPT_F?} <
|
|
|
|
optimizer
|
|
|
|
stdout
|
|
|
|
end
|
1984-06-21 10:57:59 +00:00
|
|
|
name decode
|
1990-08-01 14:46:07 +00:00
|
|
|
from .k.m.g.gk
|
1984-06-21 10:57:59 +00:00
|
|
|
to .e
|
|
|
|
program {EM}/lib/em_decode
|
|
|
|
args <
|
1984-10-04 10:47:03 +00:00
|
|
|
stdout
|
1984-06-21 10:57:59 +00:00
|
|
|
end
|