From 78aaf2fd9dc9d8af2376b75a394c904ca721cb08 Mon Sep 17 00:00:00 2001 From: dick Date: Sat, 13 Dec 1986 20:57:40 +0000 Subject: [PATCH] some small changes, asm() yields error message --- lang/cem/cemcom/Makefile.erik | 73 ++++++++++++++++++----------------- lang/cem/cemcom/asm.c | 5 ++- lang/cem/cemcom/options | 2 +- lang/cem/cemcom/program.g | 2 +- lang/cem/cemcom/statement.g | 2 +- 5 files changed, 44 insertions(+), 40 deletions(-) diff --git a/lang/cem/cemcom/Makefile.erik b/lang/cem/cemcom/Makefile.erik index d7f9352f1..de577f40b 100644 --- a/lang/cem/cemcom/Makefile.erik +++ b/lang/cem/cemcom/Makefile.erik @@ -2,42 +2,45 @@ # M A K E F I L E F O R A C K C - C O M P I L E R # Machine and environ dependent definitions -EM = /usr/em# # ACK tree on this machine -DESTINATION = /user1/$$USER/bin# # where to put the stuff -MKDEP = $(EM)/bin/mkdep# # dependency generator +EMHOME = /usr/em# # ACK tree on this machine +DESTINATION = /user1/$$USER/bin# # where to put the stuff +MKDEP = $(EMHOME)/bin/mkdep# # dependency generator MAP = -#MAP = -DInsertFile=ins_file -DInsertText=ins_text# # bug in m68k2 back end -SIM = /user1/dick/bin/sim# # Dicks sim program -LINT = /usr/new/lint +#MAP = -DInsertFile=ins_file -DInsertText=ins_text# bug in m68k2 back end +SIM = /user1/dick/bin/sim# # Dicks sim program +LINT = /usr/new/lint # Libraries and EM interface definitions -SYSLIB = $(EM)/modules/lib/libsystem.a -EMKLIB = $(EM)/modules/lib/libemk.a -EMELIB = $(EM)/modules/lib/libeme.a -STRLIB = $(EM)/modules/lib/libstr.a -PRTLIB = $(EM)/modules/lib/libprint.a -EMMESLIB = $(EM)/modules/lib/libem_mes.a -INPLIB = $(EM)/modules/lib/libinput.a -#CH3LIB = $(EM)/modules/lib/libch3.a +SYSLIB = $(EMHOME)/modules/lib/libsystem.a +EMKLIB = $(EMHOME)/modules/lib/libemk.a +EMELIB = $(EMHOME)/modules/lib/libeme.a +STRLIB = $(EMHOME)/modules/lib/libstr.a +PRTLIB = $(EMHOME)/modules/lib/libprint.a +EMMESLIB = $(EMHOME)/modules/lib/libem_mes.a +INPLIB = $(EMHOME)/modules/lib/libinput.a +#CH3LIB = $(EMHOME)/modules/lib/libch3.a CH3LIB = -LIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMKLIB) $(PRTLIB) $(STRLIB) $(SYSLIB) -ELIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMELIB) $(PRTLIB) $(STRLIB) $(SYSLIB) -LIB_INCLUDES = -I$(EM)/modules/h -I$(EM)/modules/pkg -EM_INCLUDES = -I$(EM)/h -SYSLLIB = $(EM)/modules/lib/llib-lsys.ln -EMKLLIB = $(EM)/modules/lib/llib-lemk.ln -EMELLIB = $(EM)/modules/lib/llib-leme.ln -STRLLIB = $(EM)/modules/lib/llib-lstr.ln -PRTLLIB = $(EM)/modules/lib/llib-lprint.ln -EMMESLLIB = $(EM)/modules/lib/llib-lmes.ln -INPLLIB = $(EM)/modules/lib/llib-linput.ln -CH3LLIB = $(EM)/modules/lib/llib-lch3.ln +LIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMKLIB) \ + $(PRTLIB) $(STRLIB) $(SYSLIB) +ELIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMELIB) \ + $(PRTLIB) $(STRLIB) $(SYSLIB) +LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg +EM_INCLUDES = -I$(EMHOME)/h +SYSLLIB = $(EMHOME)/modules/lib/llib-lsys.ln +EMKLLIB = $(EMHOME)/modules/lib/llib-lemk.ln +EMELLIB = $(EMHOME)/modules/lib/llib-leme.ln +STRLLIB = $(EMHOME)/modules/lib/llib-lstr.ln +PRTLLIB = $(EMHOME)/modules/lib/llib-lprint.ln +EMMESLLIB = $(EMHOME)/modules/lib/llib-lmes.ln +INPLLIB = $(EMHOME)/modules/lib/llib-linput.ln +CH3LLIB = $(EMHOME)/modules/lib/llib-lch3.ln LINTLIBS = -#LINTLIBS = $(CH3LLIB) $(INPLLIB) $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(SYSLLIB) +#LINTLIBS = $(CH3LLIB) $(INPLLIB) $(EMMESLLIB) $(EMKLLIB) \ +# $(PRTLLIB) $(STRLLIB) $(SYSLLIB) # Where to install the compiler and its driver -CEMCOM = $(DESTINATION)/cemcom -DRIVER = $(DESTINATION)/cem +CEMCOM = $(DESTINATION)/cemcom +DRIVER = $(DESTINATION)/cem # What C compiler to use and how # CC = $(ACK) -.c @@ -46,12 +49,12 @@ DRIVER = $(DESTINATION)/cem COPTIONS = # What parser generator to use and how -GEN = $(EM)/bin/LLgen -GENOPTIONS = -vv +GEN = $(EMHOME)/bin/LLgen +GENOPTIONS = -vv # Special #defines during compilation -CDEFS = $(MAP) $(EM_INCLUDES) $(LIB_INCLUDES) -CFLAGS = $(CDEFS) $(COPTIONS) -O# # we cannot pass the COPTIONS to lint! +CDEFS = $(MAP) $(EM_INCLUDES) $(LIB_INCLUDES) +CFLAGS = $(CDEFS) $(COPTIONS) -O# we cannot pass the COPTIONS to lint! # Grammar files and their objects LSRC = tokenfile.g declar.g statement.g expression.g program.g @@ -76,7 +79,7 @@ GSRC = char.c symbol2str.c next.c \ idf.h macro.h stack.h stmt.h struct.h switch.h type.h # .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE! -GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \ +GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \ idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \ maxincl.h myalloc.h nobitfield.h nofloat.h nopp.h \ nparams.h numsize.h parbufsize.h pathlength.h \ @@ -159,7 +162,7 @@ install: main cem cp main $(CEMCOM) cp cem $(DRIVER) -print: files +print: files pr `cat files` > print tags: cfiles diff --git a/lang/cem/cemcom/asm.c b/lang/cem/cemcom/asm.c index 3b8cd1f9a..56f02e416 100644 --- a/lang/cem/cemcom/asm.c +++ b/lang/cem/cemcom/asm.c @@ -1,11 +1,12 @@ /* $Header$ */ /* A S M */ -asm_seen(s, l) +code_asm(s, l) char *s; int l; { /* 'asm' '(' string ')' ';' */ - warning("\"asm(\"%s\")\" instruction skipped", s); + s = s; l = l; + error("\"asm instruction not implemented", s); } diff --git a/lang/cem/cemcom/options b/lang/cem/cemcom/options index d1faf7cf4..0dce7fa7a 100644 --- a/lang/cem/cemcom/options +++ b/lang/cem/cemcom/options @@ -6,7 +6,7 @@ I expand include table with directory name following M set identifier length n don't generate register messages p generate linenumbers and filename indications - while generating compact EM code + while generating EM code P in running the preprocessor do not output '# line' lines R restricted C T take path following as directory for storing temporary file(s) diff --git a/lang/cem/cemcom/program.g b/lang/cem/cemcom/program.g index c44b44e5e..91b460279 100644 --- a/lang/cem/cemcom/program.g +++ b/lang/cem/cemcom/program.g @@ -89,7 +89,7 @@ program: the declaration in a way different from most other languages: e.g., rather than defining x as a pointer-to-integer, it defines *x as an integer and lets the compiler deduce that x is actually - pointer-to-integer. This has profound consequences, but for the + pointer-to-integer. This has profound consequences, both for the structure of an identifier definition and for the compiler. A definition starts with a decl_specifiers, which contains things diff --git a/lang/cem/cemcom/statement.g b/lang/cem/cemcom/statement.g index 4109ba07e..466bec8b5 100644 --- a/lang/cem/cemcom/statement.g +++ b/lang/cem/cemcom/statement.g @@ -393,6 +393,6 @@ asm_statement } ')' ';' - { asm_seen(asm_bts, asm_len); + { code_asm(asm_bts, asm_len); } ; -- 2.34.1