struct.str
switch.c
switch.str
-tab.c
tokenname.c
tokenname.h
type.c
type.str
util.str
util.c
-acklint
-l_class.h
-l_comment.c
-l_ev_ord.c
-l_lint.c
-l_lint.h
-l_misc.c
-l_outdef.c
-l_outdef.str
-l_state.str
-l_states.c
!File: strsize.h
#define ISTRSIZE 32 /* minimum number of bytes allocated for
storing a string */
-#define RSTRSIZE 8 /* step size in enlarging the memory for
+#define RSTRSIZE 16 /* step size in enlarging the memory for
the storage of a string */
!File: use_tmp.h
-#define USE_TMP 1 /* collect exa, exp, ina and inp commands
- and let them precede the rest of
- the generated compact code */
+#define PREPEND_SCOPES 1 /* collect exa, exp, ina and inp commands
+ and if USE_TMP is defined let them
+ precede the rest of the generated
+ compact code */
+#define USE_TMP 1 /* use C_insertpart, C_endpart mechanism
+ to generate EM-code in the order needed
+ for the code-generators. If not defined,
+ the old-style peephole optimizer is
+ needed. */
!File: parbufsize.h
!File: textsize.h
-#define ITEXTSIZE 8 /* 1st piece of memory for repl. text */
-#define RTEXTSIZE 8 /* stepsize for enlarging repl.text */
+#define ITEXTSIZE 32 /* 1st piece of memory for repl. text */
+#define RTEXTSIZE 16 /* stepsize for enlarging repl.text */
!File: inputtype.h
!File: use_tmp.h
-#undef USE_TMP 1 /* collect exa, exp, ina and inp commands
- and let them precede the rest of
- the generated compact code */
+#undef PREPEND_SCOPES 1 /* collect exa, exp, ina and inp commands
+ and if USE_TMP is defined let them
+ precede the rest of the generated
+ compact code */
+#undef USE_TMP 1 /* use C_insertpart, C_endpart mechanism
+ to generate EM-code in the order needed
+ for the code-generators. If not defined,
+ the old-style peephole optimizer is
+ needed. */
!File: parbufsize.h
EMMESLIB = $(EMHOME)/modules/lib/libem_mes.a
EMMESOLIB = $(EMHOME)/modules/lib/libem_mesO.a
EMMESCELIB = $(EMHOME)/modules/lib/libem_mesCE.a
-MACH = sun3
+MACH = vax4
EMCELIB = $(EMHOME)/lib/$(MACH)/ce.a \
$(EMHOME)/lib/$(MACH)/back.a \
$(EMHOME)/modules/lib/libobject.a $(EMHOME)/lib/em_data.a
HFILES = $(HSRC) $(GHSRC) $(GHSTRSRC)
# generated files, for 'make clean' only
-GENERATED = tab tokenfile.g Lpars.h LLfiles LL.output lint.out \
+GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \
print hfiles Cfiles $(GHSRC) $(GSRC) longnames $(LCSRC)
# include files containing ALLOCDEF specifications
-cmp $(CURRDIR)/cemcom.1 $(EMHOME)/man/em_cemcom.6
pr:
- @pr Makefile make.* tab.c char.tab Parameters $(HSRC) $(STRSRC) $(LSRC) $(CSRC)
+ @pr Makefile make.* char.tab Parameters $(HSRC) $(STRSRC) $(LSRC) $(CSRC)
opr:
make pr | opr
symbol2str.c: tokenname.c make.tokcase
<tokenname.c ./make.tokcase >symbol2str.c
-char.c: tab char.tab
- tab -fchar.tab >char.c
-
-tab:
- $(CC) tab.c -o tab
+char.c: char.tab
+ $(EMHOME)/bin/tabgen -fchar.tab >char.c
next.c: make.next $(STRSRC)
./make.next $(STRSRC) >next.c
reg_count.h
# Other generated files, for 'make clean' only
-GENERATED = tab tokenfile.g Lpars.h LLfiles LL.output lint.out \
+GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \
print Xref lxref hfiles cfiles $(GLCSRC)
# include files containing ALLOCDEF specifications
symbol2str.c: tokenname.c make.tokcase
<tokenname.c ./make.tokcase >symbol2str.c
-char.c: tab char.tab
- tab -fchar.tab >char.c
+char.c: char.tab
+ $(EMHOME)/bin/tabgen -fchar.tab >char.c
next.c: make.next $(NEXTFILES)
./make.next $(NEXTFILES) >next.c
lxref:
lxref $(OBJ) -lc >lxref
-lint: lint.main lint.cem lint.tab
+lint: lint.main lint.cem
lint.main: cfiles
$(LINT) -bx $(CDEFS) $(SRC) $(LINTLIBS) >lint.out
clean:
rm -f $(LCSRC) $(OBJ) $(GENERATED) $(GSRC) $(GHSRC)
-tab:
- $(CC) tab.c -o tab
-
-lint.tab:
- $(LINT) -abx tab.c
-
sim: cfiles
$(SIM) $(SIMFLAGS) $(CSRC) $(GSRC) $(LSRC)
!File: use_tmp.h
-#undef USE_TMP 1 /* collect exa, exp, ina and inp commands
- and let them precede the rest of
- the generated compact code */
+#undef PREPEND_SCOPES 1 /* collect exa, exp, ina and inp commands
+ and if USE_TMP is defined let them
+ precede the rest of the generated
+ compact code */
+#undef USE_TMP 1 /* use C_insertpart, C_endpart mechanism
+ to generate EM-code in the order needed
+ for the code-generators. If not defined,
+ the old-style peephole optimizer is
+ needed. */
!File: parbufsize.h
%
% START OF TOKEN
%
-%C
-STGARB:\000-\200
+%iSTGARB
STSKIP:\r \t\013\f
STNL:\n
STCOMP:-!&+<=>|
C_magic();
C_ms_emx(word_size, pointer_size);
#ifdef USE_TMP
+#ifdef PREPEND_SCOPES
C_insertpart(tmp_id = C_getid());
#endif USE_TMP
+#endif PREPEND_SCOPES
}
#endif LINT
C_close();
}
-#ifdef USE_TMP
+#ifdef PREPEND_SCOPES
prepend_scopes()
{
/* prepend_scopes() runs down the list of global idf's
*/
register struct stack_entry *se = local_level->sl_entry;
+#ifdef USE_TMP
C_beginpart(tmp_id);
+#endif USE_TMP
while (se != 0) {
register struct idf *id = se->se_idf;
register struct def *df = id->id_def;
code_scope(id->id_text, df);
se = se->next;
}
+#ifdef USE_TMP
C_endpart(tmp_id);
+#endif USE_TMP
}
-#endif USE_TMP
+#endif PREPEND_SCOPES
code_scope(text, def)
char *text;
register char *name = idf->id_text;
register struct def *def = idf->id_def;
-#ifndef USE_TMP
+#ifndef PREPEND_SCOPES
code_scope(name, def);
-#endif USE_TMP
+#endif PREPEND_SCOPES
#ifdef DATAFLOW
if (options['d'])
DfaStartFunction(name);
return;
if (sc == EXTERN && expr && !is_anon_idf(idf))
error("%s is extern; cannot initialize", idf->id_text);
-#ifndef USE_TMP
+#ifndef PREPEND_SCOPES
if (def->df_type->tp_fund == FUNCTION) {
code_scope(idf->id_text, def);
}
-#endif
+#endif PREPEND_SCOPES
if (lvl == L_GLOBAL) { /* global variable */
/* is this an allocating declaration? */
if ( (sc == 0 || sc == STATIC)
)
def->df_alloc = ALLOC_SEEN;
if (expr) { /* code only if initialized */
-#ifndef USE_TMP
+#ifndef PREPEND_SCOPES
code_scope(idf->id_text, def);
-#endif USE_TMP
+#endif PREPEND_SCOPES
def->df_alloc = ALLOC_DONE;
C_df_dnam(idf->id_text);
}
case GLOBAL:
case IMPLICIT:
/* we are sure there is no expression */
-#ifndef USE_TMP
+#ifndef PREPEND_SCOPES
code_scope(idf->id_text, def);
-#endif USE_TMP
+#endif PREPEND_SCOPES
break;
case AUTO:
case REGISTER:
*/
arith size = idf->id_def->df_type->tp_size;
-#ifndef USE_TMP
+#ifndef PREPEND_SCOPES
code_scope(idf->id_text, idf->id_def);
-#endif USE_TMP
+#endif PREPEND_SCOPES
/* Since bss() is only called if df_alloc is non-zero, and
since df_alloc is only non-zero if size >= 0, we have:
*/
/* compile the source text */
C_program();
-#ifdef USE_TMP
+#ifdef PREPEND_SCOPES
prepend_scopes();
-#endif USE_TMP
+#endif PREPEND_SCOPES
end_code();
#ifdef DEBUG