Fix some groff warnings. adapt mkdispatch to ANSI C.
This commit is contained in:
parent
ccfd8a3e18
commit
7a642d6df3
|
@ -405,7 +405,7 @@ The code rule section is the largest section in the table.
|
||||||
They specify EM patterns, stack patterns, code to be generated,
|
They specify EM patterns, stack patterns, code to be generated,
|
||||||
etc.
|
etc.
|
||||||
The syntax is:
|
The syntax is:
|
||||||
.IP code rule:
|
.IP "code rule:"
|
||||||
EM pattern '|' stack pattern '|' code '|'
|
EM pattern '|' stack pattern '|' code '|'
|
||||||
stack replacement '|' EM replacement '|'
|
stack replacement '|' EM replacement '|'
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
. if t .ds <, ,\
|
. if t .ds <, ,\
|
||||||
\}\
|
\}\
|
||||||
\}
|
\}
|
||||||
.cs 5 22u
|
|
||||||
.ND
|
.ND
|
||||||
.EQ
|
.EQ
|
||||||
delim @@
|
delim @@
|
||||||
|
|
47
doc/cg.doc
47
doc/cg.doc
|
@ -1333,23 +1333,20 @@ Tables.c
|
||||||
Tables.c contains a large number of initialized array's of all sorts.
|
Tables.c contains a large number of initialized array's of all sorts.
|
||||||
Description of each follows:
|
Description of each follows:
|
||||||
.br
|
.br
|
||||||
.in 1i
|
.IP "byte code rules[]"
|
||||||
.ti -0.5i
|
|
||||||
byte code rules[]
|
|
||||||
.br
|
.br
|
||||||
Pseudo code interpreted by the code generator.
|
Pseudo code interpreted by the code generator.
|
||||||
Always starts with some opcode followed by operands depending
|
Always starts with some opcode followed by operands depending
|
||||||
on the opcode.
|
on the opcode.
|
||||||
Integers in this table are between 0 and 32767 and have a one byte
|
Integers in this table are between 0 and 32767 and have a one byte
|
||||||
encoding if between 0 and 127.
|
encoding if between 0 and 127.
|
||||||
.ti -0.5i
|
|
||||||
char stregclass[]
|
.IP "char stregclass[]"
|
||||||
.br
|
.br
|
||||||
Number of computed static register class per register.
|
Number of computed static register class per register.
|
||||||
Two registers are in the same class if they have the same properties
|
Two registers are in the same class if they have the same properties
|
||||||
and don't share a common subregister.
|
and don't share a common subregister.
|
||||||
.ti -0.5i
|
.IP "struct reginfo machregs[]"
|
||||||
struct reginfo machregs[]
|
|
||||||
.br
|
.br
|
||||||
Info per register.
|
Info per register.
|
||||||
Initialized with representation string, size,
|
Initialized with representation string, size,
|
||||||
|
@ -1357,78 +1354,66 @@ members of the register and set of registers affected when this
|
||||||
one is changed.
|
one is changed.
|
||||||
Also contains room for runtime information,
|
Also contains room for runtime information,
|
||||||
like contents and reference count.
|
like contents and reference count.
|
||||||
.ti -0.5i
|
.IP "tkdef_t tokens[]"
|
||||||
tkdef_t tokens[]
|
|
||||||
.br
|
.br
|
||||||
Information per tokentype.
|
Information per tokentype.
|
||||||
Initialized with size, cost, type of operands and formatstring.
|
Initialized with size, cost, type of operands and formatstring.
|
||||||
.ti -0.5i
|
.IP "node_t enodes[]"
|
||||||
node_t enodes[]
|
|
||||||
.br
|
.br
|
||||||
List of triples representing expressions for the code generator.
|
List of triples representing expressions for the code generator.
|
||||||
.ti -0.5i
|
.IP "string code strings[]"
|
||||||
string code strings[]
|
|
||||||
.br
|
.br
|
||||||
List of strings.
|
List of strings.
|
||||||
All strings are put in a list and checked for duplication,
|
All strings are put in a list and checked for duplication,
|
||||||
so only one copy per string will reside here.
|
so only one copy per string will reside here.
|
||||||
.ti -0.5i
|
.IP "set_t machsets[]"
|
||||||
set_t machsets[]
|
|
||||||
.br
|
.br
|
||||||
List of token expression sets.
|
List of token expression sets.
|
||||||
Bit 0 of the set is used for the SCRATCH property of registers,
|
Bit 0 of the set is used for the SCRATCH property of registers,
|
||||||
bit 1 upto NREG are for the corresponding registers
|
bit 1 upto NREG are for the corresponding registers
|
||||||
and bit NREG+1 upto the end are for corresponding tokens.
|
and bit NREG+1 upto the end are for corresponding tokens.
|
||||||
.ti -0.5i
|
.IP "inst_t tokeninstances[]"
|
||||||
inst_t tokeninstances[]
|
|
||||||
.br
|
.br
|
||||||
List of descriptions for building tokens.
|
List of descriptions for building tokens.
|
||||||
Contains type of rule for building one,
|
Contains type of rule for building one,
|
||||||
plus operands depending on the type.
|
plus operands depending on the type.
|
||||||
.ti -0.5i
|
.IP "move_t moves[]"
|
||||||
move_t moves[]
|
|
||||||
.br
|
.br
|
||||||
List of move rules.
|
List of move rules.
|
||||||
Contains token expressions for source and destination
|
Contains token expressions for source and destination
|
||||||
plus cost and index for code rule.
|
plus cost and index for code rule.
|
||||||
.ti -0.5i
|
.IP "byte pattern[]"
|
||||||
byte pattern[]
|
|
||||||
.br
|
.br
|
||||||
EM patterns.
|
EM patterns.
|
||||||
This is structured internally as chains of patterns,
|
This is structured internally as chains of patterns,
|
||||||
each chain pointed at by pathash[].
|
each chain pointed at by pathash[].
|
||||||
After each pattern the list of possible code rules is given.
|
After each pattern the list of possible code rules is given.
|
||||||
.ti -0.5i
|
.IP "int pathash[256]"
|
||||||
int pathash[256]
|
|
||||||
.br
|
.br
|
||||||
Indices into pattern[] for all patterns with a certain low order
|
Indices into pattern[] for all patterns with a certain low order
|
||||||
byte of the hashing function.
|
byte of the hashing function.
|
||||||
.ti -0.5i
|
.IP "c1_t c1coercs[]"
|
||||||
c1_t c1coercs[]
|
|
||||||
.br
|
.br
|
||||||
List of rules to stack tokens.
|
List of rules to stack tokens.
|
||||||
Contains token expressions,
|
Contains token expressions,
|
||||||
register needed,
|
register needed,
|
||||||
cost
|
cost
|
||||||
and code rule.
|
and code rule.
|
||||||
.ti -0.5i
|
.IP "c2_t c2coercs[]"
|
||||||
c2_t c2coercs[]
|
|
||||||
.br
|
.br
|
||||||
List of splitting coercions.
|
List of splitting coercions.
|
||||||
Token expressions,
|
Token expressions,
|
||||||
split factor,
|
split factor,
|
||||||
replacements
|
replacements
|
||||||
and code rule.
|
and code rule.
|
||||||
.ti -0.5i
|
.IP "c3_t c3coercs[]"
|
||||||
c3_t c3coercs[]
|
|
||||||
.br
|
.br
|
||||||
List of one to one coercions.
|
List of one to one coercions.
|
||||||
Token expressions,
|
Token expressions,
|
||||||
register needed,
|
register needed,
|
||||||
replacement
|
replacement
|
||||||
and code rule.
|
and code rule.
|
||||||
.ti -0.5i
|
.IP "struct reginfo **reglist[]"
|
||||||
struct reginfo **reglist[]
|
|
||||||
.br
|
.br
|
||||||
List of lists of pointers to register information.
|
List of lists of pointers to register information.
|
||||||
For every property the list is here
|
For every property the list is here
|
||||||
|
|
|
@ -7,4 +7,3 @@
|
||||||
.ds >, ,
|
.ds >, ,
|
||||||
.ds [. " [
|
.ds [. " [
|
||||||
.ds .] ]
|
.ds .] ]
|
||||||
.cs 5 22
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ Instruction labels are unsigned positive integers.
|
||||||
The scope of an instruction label is its procedure.
|
The scope of an instruction label is its procedure.
|
||||||
.QQ
|
.QQ
|
||||||
The pseudoinstructions CON, ROM and BSS may be preceded by a
|
The pseudoinstructions CON, ROM and BSS may be preceded by a
|
||||||
line containing a
|
line containing a character based data label, the first character of which is a
|
||||||
1\-8 character data label, the first character of which is a
|
|
||||||
letter, period or underscore.
|
letter, period or underscore.
|
||||||
The period may only be followed by
|
The period may only be followed by
|
||||||
digits, the others may be followed by letters, digits and underscores.
|
digits, the others may be followed by letters, digits and underscores.
|
||||||
|
@ -200,7 +199,7 @@ l l l.
|
||||||
<ilb>:\&=:instruction label
|
<ilb>:\&=:instruction label
|
||||||
::'*' followed by an integer in the range 0..32767.
|
::'*' followed by an integer in the range 0..32767.
|
||||||
<pro>:\&=:procedure number ('$' followed by a procedure name)
|
<pro>:\&=:procedure number ('$' followed by a procedure name)
|
||||||
<val>:\&=:<arg>, <con>, <pro> or <ilb>.
|
<val>:\&=:<arg>, <con>, <str>, <pro> or <ilb>.
|
||||||
<par>:\&=:<val> or <str>
|
<par>:\&=:<val> or <str>
|
||||||
<...>*:\&=:zero or more of <...>
|
<...>*:\&=:zero or more of <...>
|
||||||
<...>+:\&=:one or more of <...>
|
<...>+:\&=:one or more of <...>
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ip_spec.h"
|
#include "ip_spec.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
#include "em_spec.h"
|
#include "em_spec.h"
|
||||||
#include "em_flag.h"
|
#include "em_flag.h"
|
||||||
|
|
||||||
|
@ -36,60 +39,91 @@ char esca2[] = "escape2" ;
|
||||||
|
|
||||||
extern char em_flag[];
|
extern char em_flag[];
|
||||||
|
|
||||||
main(argc,argv) char **argv ; {
|
char *ident(void);
|
||||||
if ( argc>1 ) {
|
void check(int);
|
||||||
if ( freopen(argv[1],"r",stdin)==NULL) {
|
int decflag(char *);
|
||||||
|
void checkall(void);
|
||||||
|
void chkc(int, int, int, int);
|
||||||
|
void ckop(int, int, int, int);
|
||||||
|
int readchar(void);
|
||||||
|
void pushback(int);
|
||||||
|
void writeout(void);
|
||||||
|
void prx(register int, int, int);
|
||||||
|
void readin(void);
|
||||||
|
int getmnem(char *);
|
||||||
|
void error(char *str, ...);
|
||||||
|
void mess(char *str, ...);
|
||||||
|
void fatal(char *str, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
if (argc > 1)
|
||||||
|
{
|
||||||
|
if (freopen(argv[1], "r", stdin) == NULL)
|
||||||
|
{
|
||||||
fatal("Cannot open %s", argv[1]);
|
fatal("Cannot open %s", argv[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( argc>2 ) {
|
if (argc > 2)
|
||||||
if ( freopen(argv[2],"w",stdout)==NULL) {
|
{
|
||||||
|
if (freopen(argv[2], "w", stdout) == NULL)
|
||||||
|
{
|
||||||
fatal("Cannot create %s", argv[2]);
|
fatal("Cannot create %s", argv[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( argc>3 ) {
|
if (argc > 3)
|
||||||
|
{
|
||||||
fatal("%s [ file [ file ] ]", argv[0]);
|
fatal("%s [ file [ file ] ]", argv[0]);
|
||||||
}
|
}
|
||||||
atend = 0;
|
atend = 0;
|
||||||
readin();
|
readin();
|
||||||
atend = 1;
|
atend = 1;
|
||||||
checkall();
|
checkall();
|
||||||
if ( nerror==0 ) {
|
if (nerror == 0)
|
||||||
|
{
|
||||||
writeout();
|
writeout();
|
||||||
}
|
}
|
||||||
exit(nerror);
|
exit(nerror);
|
||||||
}
|
}
|
||||||
|
|
||||||
readin() {
|
void readin(void)
|
||||||
|
{
|
||||||
register struct opform *nextform;
|
register struct opform *nextform;
|
||||||
char *ident();
|
|
||||||
char *firstid;
|
char *firstid;
|
||||||
|
|
||||||
for ( nextform=intable ;
|
for (nextform = intable; !feof(stdin) && nextform < &intable[NOTAB];)
|
||||||
!feof(stdin) && nextform<&intable[NOTAB] ; ) {
|
{
|
||||||
firstid = ident();
|
firstid = ident();
|
||||||
if ( *firstid=='\n' || feof(stdin) ) continue ;
|
if (*firstid == '\n' || feof(stdin))
|
||||||
|
continue;
|
||||||
lastform = nextform;
|
lastform = nextform;
|
||||||
nextform->i_opcode = getmnem(firstid);
|
nextform->i_opcode = getmnem(firstid);
|
||||||
nextform->i_flag = decflag(ident());
|
nextform->i_flag = decflag(ident());
|
||||||
switch ( nextform->i_flag&OPTYPE ) {
|
switch (nextform->i_flag & OPTYPE)
|
||||||
|
{
|
||||||
case OPMINI:
|
case OPMINI:
|
||||||
case OPSHORT:
|
case OPSHORT:
|
||||||
nextform->i_num = atoi(ident());
|
nextform->i_num = atoi(ident());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
nextform->i_low = atoi(ident());
|
nextform->i_low = atoi(ident());
|
||||||
if ( *ident()!='\n' ) {
|
if (*ident() != '\n')
|
||||||
|
{
|
||||||
int c;
|
int c;
|
||||||
error("End of line expected");
|
error("End of line expected");
|
||||||
while ( (c=readchar())!='\n' && c!=EOF ) ;
|
while ((c = readchar()) != '\n' && c != EOF)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
nextform++;
|
nextform++;
|
||||||
}
|
}
|
||||||
if ( !feof(stdin) ) fatal("Internal table too small") ;
|
if (!feof(stdin))
|
||||||
|
fatal("Internal table too small");
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ident() {
|
char *ident(void)
|
||||||
|
{
|
||||||
/* skip spaces and tabs, anything up to space,tab or eof is
|
/* skip spaces and tabs, anything up to space,tab or eof is
|
||||||
a identifier.
|
a identifier.
|
||||||
Anything from # to end-of-line is an end-of-line.
|
Anything from # to end-of-line is an end-of-line.
|
||||||
|
@ -100,63 +134,94 @@ char *ident() {
|
||||||
register int c;
|
register int c;
|
||||||
register char *cc;
|
register char *cc;
|
||||||
|
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
c = readchar();
|
c = readchar();
|
||||||
} while (c == ' ' || c == '\t');
|
} while (c == ' ' || c == '\t');
|
||||||
for ( cc=array ; cc<&array[(sizeof array) - 1] ; cc++ ) {
|
for (cc = array; cc < &array[(sizeof array) - 1]; cc++)
|
||||||
if ( c=='#' ) {
|
{
|
||||||
do {
|
if (c == '#')
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
c = readchar();
|
c = readchar();
|
||||||
} while (c != '\n' && c != EOF);
|
} while (c != '\n' && c != EOF);
|
||||||
}
|
}
|
||||||
*cc = c;
|
*cc = c;
|
||||||
if ( c=='\n' && cc==array ) break ;
|
if (c == '\n' && cc == array)
|
||||||
|
break;
|
||||||
c = readchar();
|
c = readchar();
|
||||||
if ( c=='\n' ) {
|
if (c == '\n')
|
||||||
|
{
|
||||||
pushback(c);
|
pushback(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( c==' ' || c=='\t' || c==EOF ) break ;
|
if (c == ' ' || c == '\t' || c == EOF)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
*++cc = 0;
|
*++cc = 0;
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getmnem(str) char *str ; {
|
int getmnem(char *str)
|
||||||
|
{
|
||||||
char (*ptr)[4];
|
char (*ptr)[4];
|
||||||
|
|
||||||
for ( ptr = em_mnem ; *ptr<= &em_mnem[sp_lmnem-sp_fmnem][0] ; ptr++ ) {
|
for (ptr = em_mnem; *ptr <= &em_mnem[sp_lmnem - sp_fmnem][0]; ptr++)
|
||||||
if ( strcmp(*ptr,str)==0 ) return (ptr-em_mnem) ;
|
{
|
||||||
|
if (strcmp(*ptr, str) == 0)
|
||||||
|
return (ptr - em_mnem);
|
||||||
}
|
}
|
||||||
error("Illegal mnemonic");
|
error("Illegal mnemonic");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
error(str,a1,a2,a3,a4,a5,a6) /* VARARGS1 */ char *str ; {
|
void error(char *str, ...)
|
||||||
if ( !atend ) fprintf(stderr,"line %d: ",line) ;
|
/* VARARGS1 */
|
||||||
fprintf(stderr,str,a1,a2,a3,a4,a5,a6) ;
|
{
|
||||||
|
if (!atend)
|
||||||
|
fprintf(stderr, "line %d: ", line);
|
||||||
|
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, str);
|
||||||
|
vfprintf(stderr, str, ap);
|
||||||
|
va_end(ap);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
nerror++;
|
nerror++;
|
||||||
}
|
}
|
||||||
|
|
||||||
mess(str,a1,a2,a3,a4,a5,a6) /* VARARGS1 */ char *str ; {
|
void mess(char *str, ...)
|
||||||
if ( !atend ) fprintf(stderr,"line %d: ",line) ;
|
/* VARARGS1 */
|
||||||
fprintf(stderr,str,a1,a2,a3,a4,a5,a6) ;
|
{
|
||||||
|
if (!atend)
|
||||||
|
fprintf(stderr, "line %d: ", line);
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, str);
|
||||||
|
vfprintf(stderr, str, ap);
|
||||||
|
va_end(ap);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal(str,a1,a2,a3,a4,a5,a6) /* VARARGS1 */ char *str ; {
|
void fatal(char *str, ...)
|
||||||
error(str,a1,a2,a3,a4,a5,a6) ;
|
/* VARARGS1 */
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, str);
|
||||||
|
error(str, ap);
|
||||||
|
va_end(ap);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ILLGL -1
|
#define ILLGL -1
|
||||||
|
|
||||||
check(val) int val ; {
|
void check(int val)
|
||||||
if ( val!=ILLGL ) error("Illegal flag combination") ;
|
{
|
||||||
|
if (val != ILLGL)
|
||||||
|
error("Illegal flag combination");
|
||||||
}
|
}
|
||||||
|
|
||||||
int decflag(str) char *str ; {
|
int decflag(char *str)
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
int escape;
|
int escape;
|
||||||
int range;
|
int range;
|
||||||
|
@ -164,63 +229,105 @@ int decflag(str) char *str ; {
|
||||||
int notzero;
|
int notzero;
|
||||||
|
|
||||||
type = escape = range = wordm = notzero = ILLGL;
|
type = escape = range = wordm = notzero = ILLGL;
|
||||||
while ( *str ) switch ( *str++ ) {
|
while (*str)
|
||||||
|
switch (*str++)
|
||||||
|
{
|
||||||
case 'm':
|
case 'm':
|
||||||
check(type) ; type=OPMINI ; break ;
|
check(type);
|
||||||
|
type = OPMINI;
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
check(type) ; type=OPSHORT ; break ;
|
check(type);
|
||||||
|
type = OPSHORT;
|
||||||
|
break;
|
||||||
case '-':
|
case '-':
|
||||||
check(type) ; type=OPNO ; break ;
|
check(type);
|
||||||
|
type = OPNO;
|
||||||
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
check(type) ; type=OP8 ; break ;
|
check(type);
|
||||||
|
type = OP8;
|
||||||
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
check(type) ; type=OP16 ; break ;
|
check(type);
|
||||||
|
type = OP16;
|
||||||
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
check(type) ; type=OP32 ; break ;
|
check(type);
|
||||||
|
type = OP32;
|
||||||
|
break;
|
||||||
case '8':
|
case '8':
|
||||||
check(type) ; type=OP64 ; break ;
|
check(type);
|
||||||
|
type = OP64;
|
||||||
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
check(type) ; type=OP16U ; break ;
|
check(type);
|
||||||
|
type = OP16U;
|
||||||
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
check(escape) ; escape=0 ; break ;
|
check(escape);
|
||||||
|
escape = 0;
|
||||||
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
check(range) ; range= 2 ; break ;
|
check(range);
|
||||||
|
range = 2;
|
||||||
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
check(range) ; range= 1 ; break ;
|
check(range);
|
||||||
|
range = 1;
|
||||||
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
check(wordm) ; wordm=0 ; break ;
|
check(wordm);
|
||||||
|
wordm = 0;
|
||||||
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
check(notzero) ; notzero=0 ; break ;
|
check(notzero);
|
||||||
|
notzero = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
error("Unknown flag");
|
error("Unknown flag");
|
||||||
}
|
}
|
||||||
if ( type==ILLGL ) error("Type must be specified") ;
|
if (type == ILLGL)
|
||||||
switch ( type ) {
|
error("Type must be specified");
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
case OP64:
|
case OP64:
|
||||||
case OP32:
|
case OP32:
|
||||||
if ( escape!=ILLGL ) error("Conflicting escapes") ;
|
if (escape != ILLGL)
|
||||||
|
error("Conflicting escapes");
|
||||||
escape = ILLGL;
|
escape = ILLGL;
|
||||||
case OP16:
|
case OP16:
|
||||||
case OP16U:
|
case OP16U:
|
||||||
case OP8:
|
case OP8:
|
||||||
case OPSHORT:
|
case OPSHORT:
|
||||||
case OPNO:
|
case OPNO:
|
||||||
if ( notzero!=ILLGL ) mess("Improbable OPNZ") ;
|
if (notzero != ILLGL)
|
||||||
if ( type==OPNO && range!=ILLGL ) {
|
mess("Improbable OPNZ");
|
||||||
|
if (type == OPNO && range != ILLGL)
|
||||||
|
{
|
||||||
mess("No operand in range");
|
mess("No operand in range");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( escape!=ILLGL ) type|=OPESC ;
|
if (escape != ILLGL)
|
||||||
if ( wordm!=ILLGL ) type|=OPWORD ;
|
type |= OPESC;
|
||||||
switch ( range) {
|
if (wordm != ILLGL)
|
||||||
case ILLGL : type|=OP_BOTH ;
|
type |= OPWORD;
|
||||||
|
switch (range)
|
||||||
|
{
|
||||||
|
case ILLGL:
|
||||||
|
type |= OP_BOTH;
|
||||||
if (type == OPMINI || type == OPSHORT)
|
if (type == OPMINI || type == OPSHORT)
|
||||||
error("Minies and shorties must have P or N");
|
error("Minies and shorties must have P or N");
|
||||||
break;
|
break;
|
||||||
case 1 : type|=OP_POS ; break ;
|
case 1:
|
||||||
case 2 : type|=OP_NEG ; break ;
|
type |= OP_POS;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
type |= OP_NEG;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if ( notzero!=ILLGL ) type|=OPNZ ;
|
if (notzero != ILLGL)
|
||||||
|
type |= OPNZ;
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,31 +344,41 @@ int elows[256], lows[256], llows[256];
|
||||||
|
|
||||||
char negc[NMNEM], zc[NMNEM], posc[NMNEM], lnegc[NMNEM], lposc[NMNEM];
|
char negc[NMNEM], zc[NMNEM], posc[NMNEM], lnegc[NMNEM], lposc[NMNEM];
|
||||||
|
|
||||||
checkall() {
|
void checkall(void)
|
||||||
register i,flag ;
|
{
|
||||||
|
register int i, flag;
|
||||||
register struct opform *next;
|
register struct opform *next;
|
||||||
int opc, low;
|
int opc, low;
|
||||||
|
|
||||||
for ( i=0 ; i<NMNEM ; i++ ) negc[i]=zc[i]=posc[i]=0 ;
|
for (i = 0; i < NMNEM; i++)
|
||||||
for ( i=0 ; i<256 ; i++ ) lcodes[i]= codes[i]= ecodes[i]= -1 ;
|
negc[i] = zc[i] = posc[i] = 0;
|
||||||
codes[254]=ESCAP1; codes[255]=ESCAP2;
|
for (i = 0; i < 256; i++)
|
||||||
|
lcodes[i] = codes[i] = ecodes[i] = -1;
|
||||||
|
codes[254] = ESCAP1;
|
||||||
|
codes[255] = ESCAP2;
|
||||||
|
|
||||||
atend=0 ; line=0 ;
|
atend = 0;
|
||||||
for ( next=intable ; next<=lastform ; next++ ) {
|
line = 0;
|
||||||
|
for (next = intable; next <= lastform; next++)
|
||||||
|
{
|
||||||
line++;
|
line++;
|
||||||
flag = next->i_flag & 0377;
|
flag = next->i_flag & 0377;
|
||||||
opc = next->i_opcode & 0377;
|
opc = next->i_opcode & 0377;
|
||||||
low = next->i_low & 0377;
|
low = next->i_low & 0377;
|
||||||
chkc(flag, low, opc, low);
|
chkc(flag, low, opc, low);
|
||||||
switch(flag&OPTYPE) {
|
switch (flag & OPTYPE)
|
||||||
case OPNO : zc[opc]++ ; break ;
|
{
|
||||||
|
case OPNO:
|
||||||
|
zc[opc]++;
|
||||||
|
break;
|
||||||
case OPMINI:
|
case OPMINI:
|
||||||
case OPSHORT:
|
case OPSHORT:
|
||||||
for ( i=1 ; i<((next->i_num)&0377) ; i++ ) {
|
for (i = 1; i < ((next->i_num) & 0377); i++)
|
||||||
|
{
|
||||||
chkc(flag, low + i, opc, low);
|
chkc(flag, low + i, opc, low);
|
||||||
}
|
}
|
||||||
if ( !(em_flag[opc]&PAR_G) &&
|
if (!(em_flag[opc] & PAR_G) && (flag & OPRANGE) == OP_BOTH)
|
||||||
(flag&OPRANGE)==OP_BOTH) {
|
{
|
||||||
mess("Mini's and shorties should have P or N");
|
mess("Mini's and shorties should have P or N");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -288,11 +405,15 @@ checkall() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
atend = 1;
|
atend = 1;
|
||||||
for ( i=0 ; i<256 ; i++ ) if ( codes[i]== -1 ) {
|
for (i = 0; i < 256; i++)
|
||||||
|
if (codes[i] == -1)
|
||||||
|
{
|
||||||
mess("interpreter opcode %d not used", i);
|
mess("interpreter opcode %d not used", i);
|
||||||
}
|
}
|
||||||
for ( opc=0 ; opc<NMNEM ; opc++ ) {
|
for (opc = 0; opc < NMNEM; opc++)
|
||||||
switch(em_flag[opc]&EM_PAR) {
|
{
|
||||||
|
switch (em_flag[opc] & EM_PAR)
|
||||||
|
{
|
||||||
case PAR_NO:
|
case PAR_NO:
|
||||||
ckop(opc, MUST, FORB, FORB);
|
ckop(opc, MUST, FORB, FORB);
|
||||||
break;
|
break;
|
||||||
|
@ -326,20 +447,27 @@ checkall() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
chkc(flag,icode,emc,low) {
|
void chkc(int flag, int icode, int emc, int low)
|
||||||
if ( flag&OPESC ) {
|
{
|
||||||
if ( ecodes[icode]!=-1 ) {
|
if (flag & OPESC)
|
||||||
mess("Escaped opcode %d used by %s and %s",
|
{
|
||||||
icode,ename(emc),ename(ecodes[icode])) ;
|
if (ecodes[icode] != -1)
|
||||||
|
{
|
||||||
|
mess("Escaped opcode %d used by %s and %s", icode, ename(emc),
|
||||||
|
ename(ecodes[icode]));
|
||||||
}
|
}
|
||||||
ecodes[icode] = emc;
|
ecodes[icode] = emc;
|
||||||
eflags[icode] = flag;
|
eflags[icode] = flag;
|
||||||
elows[icode] = low;
|
elows[icode] = low;
|
||||||
} else switch ( flag&OPTYPE ) {
|
}
|
||||||
|
else
|
||||||
|
switch (flag & OPTYPE)
|
||||||
|
{
|
||||||
default:
|
default:
|
||||||
if ( codes[icode]!=-1 ) {
|
if (codes[icode] != -1)
|
||||||
mess("Opcode %d used by %s and %s",
|
{
|
||||||
icode,ename(emc),ename(codes[icode])) ;
|
mess("Opcode %d used by %s and %s", icode, ename(emc),
|
||||||
|
ename(codes[icode]));
|
||||||
}
|
}
|
||||||
codes[icode] = emc;
|
codes[icode] = emc;
|
||||||
flags[icode] = flag;
|
flags[icode] = flag;
|
||||||
|
@ -347,9 +475,10 @@ chkc(flag,icode,emc,low) {
|
||||||
break;
|
break;
|
||||||
case OP32:
|
case OP32:
|
||||||
case OP64:
|
case OP64:
|
||||||
if ( lcodes[icode]!=-1 ) {
|
if (lcodes[icode] != -1)
|
||||||
mess("Long opcode %d used by %s and %s",
|
{
|
||||||
icode,ename(emc),ename(lcodes[icode])) ;
|
mess("Long opcode %d used by %s and %s", icode, ename(emc),
|
||||||
|
ename(lcodes[icode]));
|
||||||
}
|
}
|
||||||
lcodes[icode] = emc;
|
lcodes[icode] = emc;
|
||||||
lflags[icode] = flag;
|
lflags[icode] = flag;
|
||||||
|
@ -358,32 +487,45 @@ chkc(flag,icode,emc,low) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ckop(emc,zf,pf,nf) {
|
void ckop(int emc, int zf, int pf, int nf)
|
||||||
if ( zc[emc]>1 ) mess("More then one OPNO for %s",ename(emc)) ;
|
{
|
||||||
if ( posc[emc]>1 ) mess("More then one OP16(pos) for %s",ename(emc)) ;
|
if (zc[emc] > 1)
|
||||||
if ( negc[emc]>1 ) mess("More then one OP16(neg) for %s",ename(emc)) ;
|
mess("More then one OPNO for %s", ename(emc));
|
||||||
if ( lposc[emc]>1 ) mess("More then one OP32(pos) for %s",ename(emc)) ;
|
if (posc[emc] > 1)
|
||||||
if ( lnegc[emc]>1 ) mess("More then one OP32(neg) for %s",ename(emc)) ;
|
mess("More then one OP16(pos) for %s", ename(emc));
|
||||||
switch(zf) {
|
if (negc[emc] > 1)
|
||||||
|
mess("More then one OP16(neg) for %s", ename(emc));
|
||||||
|
if (lposc[emc] > 1)
|
||||||
|
mess("More then one OP32(pos) for %s", ename(emc));
|
||||||
|
if (lnegc[emc] > 1)
|
||||||
|
mess("More then one OP32(neg) for %s", ename(emc));
|
||||||
|
switch (zf)
|
||||||
|
{
|
||||||
case MUST:
|
case MUST:
|
||||||
if ( zc[emc]==0 ) mess("No OPNO for %s",ename(emc)) ;
|
if (zc[emc] == 0)
|
||||||
|
mess("No OPNO for %s", ename(emc));
|
||||||
break;
|
break;
|
||||||
case FORB:
|
case FORB:
|
||||||
if ( zc[emc]==1 ) mess("Forbidden OPNO for %s",ename(emc)) ;
|
if (zc[emc] == 1)
|
||||||
|
mess("Forbidden OPNO for %s", ename(emc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(pf) {
|
switch (pf)
|
||||||
|
{
|
||||||
case MUST:
|
case MUST:
|
||||||
if ( posc[emc]==0 ) mess("No OP16(pos) for %s",ename(emc)) ;
|
if (posc[emc] == 0)
|
||||||
|
mess("No OP16(pos) for %s", ename(emc));
|
||||||
break;
|
break;
|
||||||
case FORB:
|
case FORB:
|
||||||
if (posc[emc] == 1)
|
if (posc[emc] == 1)
|
||||||
mess("Forbidden OP16(pos) for %s", ename(emc));
|
mess("Forbidden OP16(pos) for %s", ename(emc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(nf) {
|
switch (nf)
|
||||||
|
{
|
||||||
case MUST:
|
case MUST:
|
||||||
if ( negc[emc]==0 ) mess("No OP16(neg) for %s",ename(emc)) ;
|
if (negc[emc] == 0)
|
||||||
|
mess("No OP16(neg) for %s", ename(emc));
|
||||||
break;
|
break;
|
||||||
case FORB:
|
case FORB:
|
||||||
if (negc[emc] == 1)
|
if (negc[emc] == 1)
|
||||||
|
@ -395,72 +537,92 @@ ckop(emc,zf,pf,nf) {
|
||||||
static int pushchar;
|
static int pushchar;
|
||||||
static int pushf;
|
static int pushf;
|
||||||
|
|
||||||
int readchar() {
|
int readchar(void)
|
||||||
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
if ( pushf ) {
|
if (pushf)
|
||||||
|
{
|
||||||
pushf = 0;
|
pushf = 0;
|
||||||
c = pushchar;
|
c = pushchar;
|
||||||
} else {
|
}
|
||||||
if ( feof(stdin) ) return EOF ;
|
else
|
||||||
|
{
|
||||||
|
if (feof(stdin))
|
||||||
|
return EOF;
|
||||||
c = getc(stdin);
|
c = getc(stdin);
|
||||||
}
|
}
|
||||||
if ( c=='\n' ) line++ ;
|
if (c == '\n')
|
||||||
|
line++;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
pushback(c) {
|
void pushback(int c)
|
||||||
if ( pushf ) {
|
{
|
||||||
|
if (pushf)
|
||||||
|
{
|
||||||
fatal("Double pushback");
|
fatal("Double pushback");
|
||||||
}
|
}
|
||||||
pushf++;
|
pushf++;
|
||||||
pushchar = c;
|
pushchar = c;
|
||||||
if ( c=='\n' ) line-- ;
|
if (c == '\n')
|
||||||
|
line--;
|
||||||
}
|
}
|
||||||
|
|
||||||
writeout() {
|
void writeout(void)
|
||||||
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
printf("DISPATCH1");
|
printf("DISPATCH1");
|
||||||
for (i = 0; i < 256;) {
|
for (i = 0; i < 256;)
|
||||||
if (!(i % 8)) printf("\n%d", i);
|
{
|
||||||
|
if (!(i % 8))
|
||||||
|
printf("\n%d", i);
|
||||||
printf("\t%s", ename(codes[i]));
|
printf("\t%s", ename(codes[i]));
|
||||||
if (i < 254) {
|
if (i < 254)
|
||||||
|
{
|
||||||
prx(flags[i], lows[i], i);
|
prx(flags[i], lows[i], i);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\nDISPATCH2");
|
printf("\nDISPATCH2");
|
||||||
for (i = 0; i < 256;) {
|
for (i = 0; i < 256;)
|
||||||
if (ecodes[i] != -1) {
|
{
|
||||||
if (!(i % 8)) printf("\n%d", i);
|
if (ecodes[i] != -1)
|
||||||
|
{
|
||||||
|
if (!(i % 8))
|
||||||
|
printf("\n%d", i);
|
||||||
printf("\t%s", ename(ecodes[i]));
|
printf("\t%s", ename(ecodes[i]));
|
||||||
prx(eflags[i], elows[i], i);
|
prx(eflags[i], elows[i], i);
|
||||||
}
|
}
|
||||||
else break;
|
else
|
||||||
|
break;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\nDISPATCH3");
|
printf("\nDISPATCH3");
|
||||||
i = 0;
|
i = 0;
|
||||||
while (lcodes[i] != -1) {
|
while (lcodes[i] != -1)
|
||||||
if (!(i % 8)) printf("\n%d", i);
|
{
|
||||||
|
if (!(i % 8))
|
||||||
|
printf("\n%d", i);
|
||||||
printf("\t%s", ename(lcodes[i]));
|
printf("\t%s", ename(lcodes[i]));
|
||||||
prx(lflags[i], llows[i], i);
|
prx(lflags[i], llows[i], i);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
while (i++ % 8) putchar('\t');
|
while (i++ % 8)
|
||||||
|
putchar('\t');
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
prx(flg,low,opc)
|
void prx(register int flg, int low, int opc)
|
||||||
register int flg;
|
|
||||||
{
|
{
|
||||||
int arg = opc - low;
|
int arg = opc - low;
|
||||||
|
|
||||||
putchar('.');
|
putchar('.');
|
||||||
switch(flg&OPTYPE) {
|
switch (flg & OPTYPE)
|
||||||
|
{
|
||||||
case OPNO:
|
case OPNO:
|
||||||
putchar('z');
|
putchar('z');
|
||||||
break;
|
break;
|
||||||
|
@ -468,25 +630,38 @@ prx(flg,low,opc)
|
||||||
putchar('u');
|
putchar('u');
|
||||||
break;
|
break;
|
||||||
case OP16:
|
case OP16:
|
||||||
if (flg&OP_POS) putchar('p');
|
if (flg & OP_POS)
|
||||||
else if (flg&OP_NEG) putchar('n');
|
putchar('p');
|
||||||
else putchar('l');
|
else if (flg & OP_NEG)
|
||||||
if (flg&OPWORD) putchar('w');
|
putchar('n');
|
||||||
|
else
|
||||||
|
putchar('l');
|
||||||
|
if (flg & OPWORD)
|
||||||
|
putchar('w');
|
||||||
break;
|
break;
|
||||||
case OP32:
|
case OP32:
|
||||||
if (flg&OP_POS) putchar('P');
|
if (flg & OP_POS)
|
||||||
else if (flg&OP_NEG) putchar('N');
|
putchar('P');
|
||||||
else putchar('L');
|
else if (flg & OP_NEG)
|
||||||
if (flg&OPWORD) putchar('w');
|
putchar('N');
|
||||||
|
else
|
||||||
|
putchar('L');
|
||||||
|
if (flg & OPWORD)
|
||||||
|
putchar('w');
|
||||||
break;
|
break;
|
||||||
case OPSHORT:
|
case OPSHORT:
|
||||||
if (flg & OPWORD) putchar('w');
|
if (flg & OPWORD)
|
||||||
else putchar('s');
|
putchar('w');
|
||||||
|
else
|
||||||
|
putchar('s');
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case OPMINI:
|
case OPMINI:
|
||||||
if (flg & OPNZ) arg++;
|
if (flg & OPNZ)
|
||||||
if (flg & OP_NEG) arg = -arg - 1;
|
arg++;
|
||||||
|
if (flg & OP_NEG)
|
||||||
|
arg = -arg - 1;
|
||||||
printf("%d", arg);
|
printf("%d", arg);
|
||||||
if((flg&OPTYPE) == OPMINI && (flg & OPWORD)) putchar('W');
|
if ((flg & OPTYPE) == OPMINI && (flg & OPWORD))
|
||||||
|
putchar('W');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
273
doc/install.doc
Normal file → Executable file
273
doc/install.doc
Normal file → Executable file
|
@ -1,4 +1,3 @@
|
||||||
.\" $Id$
|
|
||||||
.if n .nr PD 1v
|
.if n .nr PD 1v
|
||||||
.if n .nr LL 78m
|
.if n .nr LL 78m
|
||||||
.if n .ll 78m
|
.if n .ll 78m
|
||||||
|
@ -18,13 +17,6 @@ This document
|
||||||
describes the process of installing the Amsterdam Compiler Kit (ACK).
|
describes the process of installing the Amsterdam Compiler Kit (ACK).
|
||||||
It depends on the combination of hard- and software how
|
It depends on the combination of hard- and software how
|
||||||
hard it will be to install the Kit.
|
hard it will be to install the Kit.
|
||||||
This description is intended for a Sun-3 or SPARC workstation.
|
|
||||||
Installation on VAXen running Berkeley
|
|
||||||
.UX
|
|
||||||
or Ultrix,
|
|
||||||
Sun-2 systems and most System V
|
|
||||||
.UX
|
|
||||||
systems should be easy.
|
|
||||||
As of this distribution, installation on PDP-11's or other
|
As of this distribution, installation on PDP-11's or other
|
||||||
systems with a small address space is no longer supported.
|
systems with a small address space is no longer supported.
|
||||||
See section 8 for installation on other systems.
|
See section 8 for installation on other systems.
|
||||||
|
@ -35,7 +27,7 @@ In the ACK installation process, three directory trees are used:
|
||||||
.IP "-"
|
.IP "-"
|
||||||
the ACK source tree. This is the tree on the ACK distribution medium.
|
the ACK source tree. This is the tree on the ACK distribution medium.
|
||||||
For the rest of this document, we will refer to this directory
|
For the rest of this document, we will refer to this directory
|
||||||
as $SRC_HOME;
|
as $ACK_SRC_HOME;
|
||||||
.IP "-"
|
.IP "-"
|
||||||
a configuration tree. This tree is built by the installation process and
|
a configuration tree. This tree is built by the installation process and
|
||||||
is used to do compilations in. Its structure reflects that of the source tree,
|
is used to do compilations in. Its structure reflects that of the source tree,
|
||||||
|
@ -45,10 +37,10 @@ as $CONFIG;
|
||||||
.IP "-"
|
.IP "-"
|
||||||
an ACK users tree. This tree is also built by the installation process.
|
an ACK users tree. This tree is also built by the installation process.
|
||||||
For the rest of this document, we will refer to this directory
|
For the rest of this document, we will refer to this directory
|
||||||
as $TARGET_HOME;
|
as $ACK_HOME;
|
||||||
.LP
|
.LP
|
||||||
After installation,
|
After installation,
|
||||||
the directories in $TARGET_HOME contain the following information:
|
the directories in $ACK_HOME contain the following information:
|
||||||
.if n .sp 1
|
.if n .sp 1
|
||||||
.if n .nr PD 0
|
.if n .nr PD 0
|
||||||
.IP "bin" 14
|
.IP "bin" 14
|
||||||
|
@ -57,30 +49,41 @@ See the section about "Commands".
|
||||||
.IP "lib"
|
.IP "lib"
|
||||||
root of a tree containing almost all libraries used by
|
root of a tree containing almost all libraries used by
|
||||||
commands.
|
commands.
|
||||||
Files specific to a certain machine are collected in one subtree
|
Files specific to a certain platform are collected in one subtree
|
||||||
per machine. E.g. "lib/pdp", "lib/z8000".
|
per platform. E.g. "lib/cpm", "lib/pdpv7".
|
||||||
The names used here are the same names as used for subtrees
|
The names used here are the same names as used for subtrees
|
||||||
of "$SRC_HOME/mach".
|
of "$ACK_SRC_HOME/plat". Each of the platform specific directory
|
||||||
|
contains the following libraries:
|
||||||
|
.TS
|
||||||
|
l l.
|
||||||
|
libb B run-time system
|
||||||
|
libbc Basic run-time system
|
||||||
|
libc C run-time system
|
||||||
|
libpc Pascal run-time system
|
||||||
|
libm2 Modula-2 run-time system
|
||||||
|
liboc Occam run-time system
|
||||||
|
.TE
|
||||||
|
|
||||||
.IP "lib/descr"
|
.IP "lib/descr"
|
||||||
command descriptor files used by the program ack.
|
command descriptor files used by the program ack to determine utilities to call.
|
||||||
.IP "lib/LLgen"
|
.IP "lib/LLgen"
|
||||||
files used by the LL(1) parser generator.
|
files used by the LL(1) parser generator.
|
||||||
.IP "lib/flex"
|
.IP "lib/flex"
|
||||||
files used by the lexical analyzer generator Flex.
|
files used by the lexical analyzer generator Flex.
|
||||||
.IP "lib/m2"
|
.IP "lib/m2"
|
||||||
definition modules for Modula-2.
|
definition modules for Modula-2.
|
||||||
.IP "lib.bin"
|
.IP "lib/ack"
|
||||||
root of a tree containing almost all binaries used by
|
root of a tree containing almost all binaries used by
|
||||||
commands.
|
commands.
|
||||||
All programs specific to a certain machine are collected in one subtree
|
All programs specific to a certain platform are collected in one subtree
|
||||||
per machine. E.g. "lib.bin/pdp", "lib.bin/z8000".
|
per machine. E.g. "lib/ack/pdpv7", "lib/ack/cpm".
|
||||||
The names used here are the same names as used for subtrees
|
The names used here are the same names as used for subtrees
|
||||||
of "$SRC_HOME/mach".
|
of "$ACK_SRC_HOME/plat".
|
||||||
.IP "lib.bin/ego"
|
.IP "lib/ack/ego"
|
||||||
files used by the global optimizer.
|
files used by the global optimizer.
|
||||||
.IP "lib.bin/lint"
|
.IP "lib/ack/lint"
|
||||||
binaries for the lint passes and lint libraries.
|
binaries for the lint passes and lint libraries.
|
||||||
.IP "lib.bin/ceg"
|
.IP "lib/ack/ceg"
|
||||||
files used by the code-expander-generator.
|
files used by the code-expander-generator.
|
||||||
.IP "etc"
|
.IP "etc"
|
||||||
contains the file "ip_spec.t" needed for EM interpreters and EM documentation.
|
contains the file "ip_spec.t" needed for EM interpreters and EM documentation.
|
||||||
|
@ -120,7 +123,7 @@ em_abs.h contains trap numbers and address for lin and fil
|
||||||
em_ego.h definition of names for some global optimizer
|
em_ego.h definition of names for some global optimizer
|
||||||
messages
|
messages
|
||||||
em_flag.h definition of bits in array em_flag in
|
em_flag.h definition of bits in array em_flag in
|
||||||
$TARGET_HOME/lib.bin/em_data.a. Describes parameters
|
$ACK_HOME/lib.bin/em_data.a. Describes parameters
|
||||||
effect on flow of instructions
|
effect on flow of instructions
|
||||||
em_mes.h definition of names for mes pseudo numbers
|
em_mes.h definition of names for mes pseudo numbers
|
||||||
em_mnem.h instruction => compact mapping
|
em_mnem.h instruction => compact mapping
|
||||||
|
@ -202,30 +205,23 @@ These directories have subdirectories named:
|
||||||
.in +3n
|
.in +3n
|
||||||
.TS
|
.TS
|
||||||
l l.
|
l l.
|
||||||
cg the backend (*.m => *.s)
|
cg the backend code generator (*.m => *.s)
|
||||||
ncg the new backend (*.m => *.s)
|
ncg the new backend code generator (*.m => *.s)
|
||||||
as the assembler (*.s => *.o) or
|
mcg the modified backend code generator (*.m => *.s)
|
||||||
|
as the CPU specific assembler (*.s => *.o) or
|
||||||
assembler/linker (*.s + libraries => a.out)
|
assembler/linker (*.s + libraries => a.out)
|
||||||
cv conversion programs for a.out files
|
cv conversion programs for a.out files. Mostly replaced by "cvmach"
|
||||||
dl down-load programs
|
dl down-load programs
|
||||||
top the target optimizer
|
top the target optimizer
|
||||||
int source for an interpreter
|
int source for an interpreter (requires POSIX compliant host)
|
||||||
|
ce code expander (fast back-end)
|
||||||
|
|
||||||
libbc to create Basic run-time system and libraries
|
libem to create runtime system used by code generators
|
||||||
libcc to create C run-time system and libraries
|
|
||||||
libcc.ansi to create ANSI C run-time system and libraries
|
|
||||||
libpc to create Pascal run-time system and libraries
|
|
||||||
libf77 to create Fortran run-time system and libraries
|
|
||||||
libm2 to create Modula-2 run-time system and libraries
|
|
||||||
liboc to create occam run-time system and libraries
|
|
||||||
libem EM runtime system, only depending on CPU type
|
|
||||||
libend library defining end, edata, etext
|
libend library defining end, edata, etext
|
||||||
libfp to create floating point library
|
libfp to create floating point emulation library
|
||||||
libdb to create debugger support library
|
libdb to create debugger support library
|
||||||
libsys system-dependent EM library
|
|
||||||
libce fast cc-compatible C compiler library support
|
libce fast cc-compatible C compiler library support
|
||||||
|
|
||||||
ce code expander (fast back-end)
|
|
||||||
|
|
||||||
test various tests
|
test various tests
|
||||||
.TE
|
.TE
|
||||||
|
@ -245,6 +241,21 @@ mach/proto/fp floating point package sources
|
||||||
mach/proto/libg makefiles for compiling libraries
|
mach/proto/libg makefiles for compiling libraries
|
||||||
mach/proto/grind machine-independent debugger support
|
mach/proto/grind machine-independent debugger support
|
||||||
.TE
|
.TE
|
||||||
|
|
||||||
|
.IP "plat"
|
||||||
|
Group of directories which are specific to each operating system.
|
||||||
|
These dirctories have subdirectories named:
|
||||||
|
|
||||||
|
.TS
|
||||||
|
l l.
|
||||||
|
cvmach conversion program to convert from a.out to platform specific binaries.
|
||||||
|
emu system specific platform emulator or simulator used for testing.
|
||||||
|
libsys system-dependent library used to interface with the operating system.
|
||||||
|
include/ack system-dependent include files for building libc library, including mandatory "plat.h"
|
||||||
|
include/sys system-dependent include files used with libsys.
|
||||||
|
.TE
|
||||||
|
|
||||||
|
|
||||||
.IP "emtest"
|
.IP "emtest"
|
||||||
contains prototype of em test set.
|
contains prototype of em test set.
|
||||||
.IP "lang"
|
.IP "lang"
|
||||||
|
@ -262,26 +273,26 @@ the Pascal compiler proper.
|
||||||
the C front-end.
|
the C front-end.
|
||||||
.IP "lang/cem/libcc"
|
.IP "lang/cem/libcc"
|
||||||
.br
|
.br
|
||||||
directories with sources of C runtime system, libraries (in EM or C).
|
directories with sources of C runtime system, libraries (in EM or C). \fIObsolete\fP.
|
||||||
.IP "lang/cem/libcc/gen"
|
.IP "lang/cem/libcc/gen"
|
||||||
.br
|
.br
|
||||||
sources for routines in chapter III of
|
sources for routines in chapter III of
|
||||||
.UX
|
.UX
|
||||||
programmers manual,
|
programmers manual,
|
||||||
excluding stdio.
|
excluding stdio. \fIObsolete\fP.
|
||||||
.IP "lang/cem/libcc/stdio"
|
.IP "lang/cem/libcc/stdio"
|
||||||
.br
|
.br
|
||||||
stdio sources.
|
stdio sources. \fIObsolete\fP.
|
||||||
.IP "lang/cem/libcc/math"
|
.IP "lang/cem/libcc/math"
|
||||||
.br
|
.br
|
||||||
sources for mathematical routines, normally available with the
|
sources for mathematical routines, normally available with the
|
||||||
\fB-lm\fP option to \fIcc\fP.
|
\fB-lm\fP option to \fIcc\fP. \fIObsolete\fP.
|
||||||
.IP "lang/cem/libcc/mon"
|
.IP "lang/cem/libcc/mon"
|
||||||
.br
|
.br
|
||||||
sources for routines in chapter II, mostly written in EM.
|
sources for routines in chapter II, mostly written in EM. \fIObsolete\fP.
|
||||||
.IP "lang/cem/cemcom"
|
.IP "lang/cem/cemcom"
|
||||||
.br
|
.br
|
||||||
the compiler proper.
|
the compiler proper. \fIObsolete\fP.
|
||||||
.IP "lang/cem/cemcom.ansi"
|
.IP "lang/cem/cemcom.ansi"
|
||||||
.br
|
.br
|
||||||
the ANSI C compiler proper.
|
the ANSI C compiler proper.
|
||||||
|
@ -290,7 +301,10 @@ the ANSI C compiler proper.
|
||||||
the ANSI C preprocessor.
|
the ANSI C preprocessor.
|
||||||
.IP "lang/cem/libcc.ansi"
|
.IP "lang/cem/libcc.ansi"
|
||||||
.br
|
.br
|
||||||
the ANSI C library sources.
|
Portable part of the ANSI C library sources. The platform specific source code is in
|
||||||
|
libsys.
|
||||||
|
.IP "lang
|
||||||
|
|
||||||
.IP "lang/cem/ctest"
|
.IP "lang/cem/ctest"
|
||||||
.br
|
.br
|
||||||
the C test set.
|
the C test set.
|
||||||
|
@ -388,54 +402,79 @@ contains sub-directories for installing the fast ACK compatible compilers.
|
||||||
contains the sources of the fast ACK compatible compiler drivers.
|
contains the sources of the fast ACK compatible compiler drivers.
|
||||||
.IP "fcc"
|
.IP "fcc"
|
||||||
contains the fast cc-compatible C compiler for SUN-3 and VAX.
|
contains the fast cc-compatible C compiler for SUN-3 and VAX.
|
||||||
|
.IP "modules"
|
||||||
|
root of a tree containing modules (optional install)
|
||||||
|
.IP "modules/src/alloc"
|
||||||
|
Memory management module.
|
||||||
|
.IP "modules/src/data"
|
||||||
|
Data structures and collections module.
|
||||||
|
.IP "modules/src/em_code"
|
||||||
|
EM assembly generator module (*.[km])
|
||||||
|
.IP "modules/src/em_data"
|
||||||
|
EM data managemet module.
|
||||||
|
.IP "modules/src/em_mes"
|
||||||
|
EM Message pseudo-instruction generator module.
|
||||||
|
.IP "modules/src/em_opt"
|
||||||
|
EM Optimizer
|
||||||
|
.IP "modules/src/flt_arith"
|
||||||
|
Floating point support routine module.
|
||||||
|
.IP "modules/src/object"
|
||||||
|
ACK Object file format support reader/writer module.
|
||||||
|
.IP "modules/src/print"
|
||||||
|
Light version of standard output routines. Optimized for space compared to standard C version.
|
||||||
|
.IP "modules/src/read_em"
|
||||||
|
Compact (*.k) EM reader module.
|
||||||
|
.IP "modules/src/string"
|
||||||
|
String utility module.
|
||||||
|
.IP "modules/src/system"
|
||||||
|
Module related to the ACK system in general as well as wrapper over standard C library calls to
|
||||||
|
solve portability issues.
|
||||||
.IP "util"
|
.IP "util"
|
||||||
contains directories with sources for various utilities.
|
contains directories with sources for various utilities.
|
||||||
.IP "util/ack"
|
.IP "util/ack"
|
||||||
the program used for translation with the Kit.
|
the program used for translation with the Kit.
|
||||||
.IP "util/opt"
|
|
||||||
the EM peephole optimizer (*.k => *.m).
|
|
||||||
.IP "util/ego"
|
|
||||||
the global optimizer.
|
|
||||||
.IP "util/topgen"
|
|
||||||
the target optimizer generator.
|
|
||||||
.IP "util/misc"
|
|
||||||
decode (*.[km] => *.e) + encode (*.e => *.k).
|
|
||||||
.IP "util/data"
|
|
||||||
the C-code for $TARGET_HOME/lib.bin/em_data.a.
|
|
||||||
These sources are created by the Makefile in `etc`.
|
|
||||||
.IP "util/ass"
|
|
||||||
the EM assembler (*.[km] + libraries => e.out).
|
|
||||||
.IP "util/arch"
|
|
||||||
the archivers to be used for all EM utilities.
|
|
||||||
.IP "util/cgg"
|
|
||||||
a program needed for compiling backends.
|
|
||||||
.IP "util/ncgg"
|
|
||||||
a program needed for compiling the newest backends.
|
|
||||||
.IP "util/cpp"
|
|
||||||
the C preprocessor.
|
|
||||||
.IP "util/shf"
|
|
||||||
various shell files.
|
|
||||||
.IP "util/LLgen"
|
|
||||||
the extended LL(1) parser generator.
|
|
||||||
.IP "util/amisc"
|
.IP "util/amisc"
|
||||||
contains some programs handling ACK a.out format, such as anm, asize.
|
contains some programs handling ACK a.out format, such as anm, asize.
|
||||||
|
.IP "util/arch"
|
||||||
|
the archivers to be used for all EM utilities.
|
||||||
|
.IP "util/ass"
|
||||||
|
the EM assembler and linker (*.[km] + libraries => e.out).
|
||||||
|
.IP "util/byacc"
|
||||||
|
this is Berkeley yacc, in the public domain. \fIObsolete\fP.
|
||||||
|
.IP "util/ceg"
|
||||||
|
code expander generator.
|
||||||
|
.IP "util/cgg"
|
||||||
|
a program needed for compiling backends.
|
||||||
.IP "util/cmisc"
|
.IP "util/cmisc"
|
||||||
contains some programs to help in resolving name conflicts, and
|
contains some programs to help in resolving name conflicts, and
|
||||||
a dependency generator for makefiles.
|
a dependency generator for makefiles.
|
||||||
.IP "util/led"
|
.IP "util/cpp"
|
||||||
the ACK link-editor, reading ACK relocatable a.out format, and writing
|
the C preprocessor. \fIObsolete\fP.
|
||||||
ACK a.out format.
|
.IP "util/ego"
|
||||||
.IP "util/int"
|
the global optimizer.
|
||||||
an EM interpreter, written in C. Very useful for checking out software,
|
|
||||||
but slow.
|
|
||||||
.IP "util/ceg"
|
|
||||||
code expander generator.
|
|
||||||
.IP "util/grind"
|
.IP "util/grind"
|
||||||
a symbolic debugger.
|
a symbolic debugger.
|
||||||
.IP "util/byacc"
|
.IP "util/int"
|
||||||
this is Berkeley yacc, in the public domain.
|
an EM interpreter, written in C. Very useful for checking out software.
|
||||||
|
.IP "util/led"
|
||||||
|
the ACK link-editor, reading CPU specific ACK relocatable a.out format, and writing
|
||||||
|
ACK a.out format.
|
||||||
|
.IP "util/LLgen"
|
||||||
|
the extended LL(1) parser generator.
|
||||||
|
.IP "util/make"
|
||||||
|
simple make tool.
|
||||||
|
.IP "util/misc"
|
||||||
|
decode (*.[km] => *.e) + encode (*.e => *.k).
|
||||||
|
.IP "util/ncgg"
|
||||||
|
a program needed for compiling the newest backends.
|
||||||
|
.IP "util/opt"
|
||||||
|
the EM peephole optimizer (*.k => *.m).
|
||||||
|
.IP "util/shf"
|
||||||
|
various shell files.
|
||||||
|
.IP "util/topgen"
|
||||||
|
the target optimizer generator.
|
||||||
.IP "util/flex"
|
.IP "util/flex"
|
||||||
this is a replacement for lex. It carries the following copyright notice:
|
this is a replacement for lex. \fIObsolete\fP. It carries the following copyright notice:
|
||||||
.IP ""
|
.IP ""
|
||||||
.nf
|
.nf
|
||||||
Copyright (c) 1990 The Regents of the University of California.
|
Copyright (c) 1990 The Regents of the University of California.
|
||||||
|
@ -469,8 +508,8 @@ PURPOSE.
|
||||||
.if n .nr PD 1v
|
.if n .nr PD 1v
|
||||||
.LP
|
.LP
|
||||||
All path names mentioned in the text of this document are relative to
|
All path names mentioned in the text of this document are relative to
|
||||||
$SRC_HOME, unless they start with '/' or one of $SRC_HOME,
|
$ACK_SRC_HOME, unless they start with '/' or one of $ACK_SRC_HOME,
|
||||||
$TARGET_HOME or $CONFIG.
|
$ACK_HOME or $CONFIG.
|
||||||
.NH
|
.NH
|
||||||
Restoring the ACK tree
|
Restoring the ACK tree
|
||||||
.PP
|
.PP
|
||||||
|
@ -480,7 +519,7 @@ distribution tree structure.
|
||||||
Proceed as follows
|
Proceed as follows
|
||||||
.IP " \-" 10
|
.IP " \-" 10
|
||||||
Create a directory, for example /usr/share/local/src/ack, on a device
|
Create a directory, for example /usr/share/local/src/ack, on a device
|
||||||
with at least 15 Megabytes left. This directory will be $SRC_HOME.
|
with at least 15 Megabytes left. This directory will be $ACK_SRC_HOME.
|
||||||
.IP " \-"
|
.IP " \-"
|
||||||
Change to that directory (cd ...).
|
Change to that directory (cd ...).
|
||||||
.IP " \-"
|
.IP " \-"
|
||||||
|
@ -497,7 +536,7 @@ Adapting ACK to the local system
|
||||||
Before compiling the sources in the Kit some installation dependent
|
Before compiling the sources in the Kit some installation dependent
|
||||||
actions have to be taken.
|
actions have to be taken.
|
||||||
Most of these are performed by an interactive shell script in the file
|
Most of these are performed by an interactive shell script in the file
|
||||||
.I $SRC_HOME/first/first.
|
.I $ACK_SRC_HOME/first/first.
|
||||||
Calling this script should be done
|
Calling this script should be done
|
||||||
from another directory, for instance an empty directory which will later
|
from another directory, for instance an empty directory which will later
|
||||||
become $CONFIG.
|
become $CONFIG.
|
||||||
|
@ -508,8 +547,8 @@ script are:
|
||||||
.if n .sp 1
|
.if n .sp 1
|
||||||
.if n .nr PD 0
|
.if n .nr PD 0
|
||||||
.IP \-
|
.IP \-
|
||||||
Asking for the path names of the ACK source directory ($SRC_HOME), the
|
Asking for the path names of the ACK source directory ($ACK_SRC_HOME), the
|
||||||
configuration directory ($CONFIG), and the ACK users directory ($TARGET_HOME).
|
configuration directory ($CONFIG), and the ACK users directory ($ACK_HOME).
|
||||||
About 5M are needed for the configuration tree. The disk space needed
|
About 5M are needed for the configuration tree. The disk space needed
|
||||||
for the ACK users tree depends on which front-ends and back-ends are to be
|
for the ACK users tree depends on which front-ends and back-ends are to be
|
||||||
installed.
|
installed.
|
||||||
|
@ -566,7 +605,7 @@ on a different machine".
|
||||||
.IP \-
|
.IP \-
|
||||||
Setting the default machine for which code is
|
Setting the default machine for which code is
|
||||||
produced to the local type of system according to the table above.
|
produced to the local type of system according to the table above.
|
||||||
This in done in the file "$TARGET_HOME/config/local.h".
|
This in done in the file "$ACK_HOME/config/local.h".
|
||||||
See also section 9.1.
|
See also section 9.1.
|
||||||
.IP \-
|
.IP \-
|
||||||
Asking for things that don't have to be installed.
|
Asking for things that don't have to be installed.
|
||||||
|
@ -599,7 +638,7 @@ Most configuration directories will have Makefiles
|
||||||
used to compile and install the programs in that
|
used to compile and install the programs in that
|
||||||
directory.
|
directory.
|
||||||
All programs needed for compilation and/or cross compilation
|
All programs needed for compilation and/or cross compilation
|
||||||
with the Kit are installed in $TARGET_HOME by these Makefiles.
|
with the Kit are installed in $ACK_HOME by these Makefiles.
|
||||||
These Makefiles are produced from corresponding files called
|
These Makefiles are produced from corresponding files called
|
||||||
"proto.make" in the source tree. In fact, the "proto.make" files
|
"proto.make" in the source tree. In fact, the "proto.make" files
|
||||||
are almost complete Makefiles, except for some macro definitions that
|
are almost complete Makefiles, except for some macro definitions that
|
||||||
|
@ -618,7 +657,7 @@ Calling the "TakeAction" script.
|
||||||
All these Makefiles do not have to be called separately.
|
All these Makefiles do not have to be called separately.
|
||||||
We wrote a shell script calling the make's needed to install
|
We wrote a shell script calling the make's needed to install
|
||||||
the whole Kit.
|
the whole Kit.
|
||||||
This script consists of the file $SRC_HOME/TakeAction
|
This script consists of the file $ACK_SRC_HOME/TakeAction
|
||||||
and a few files called Action in some configuration directories.
|
and a few files called Action in some configuration directories.
|
||||||
The Action files describe in a very simple form which actions
|
The Action files describe in a very simple form which actions
|
||||||
have to be performed in which directories.
|
have to be performed in which directories.
|
||||||
|
@ -645,7 +684,7 @@ what must be installed.
|
||||||
.LP
|
.LP
|
||||||
If the installation succeeded, the Kit is ready to be used.
|
If the installation succeeded, the Kit is ready to be used.
|
||||||
Read section 6 and the manuals provided
|
Read section 6 and the manuals provided
|
||||||
with the Kit (in the $TARGET_HOME/man directory) on how to use it.
|
with the Kit (in the $ACK_HOME/man directory) on how to use it.
|
||||||
.NH 2
|
.NH 2
|
||||||
Problems
|
Problems
|
||||||
.NH 3
|
.NH 3
|
||||||
|
@ -654,7 +693,7 @@ on Unisoft m68000 systems.
|
||||||
The Unisoft C compiler has a bug which impedes the correct
|
The Unisoft C compiler has a bug which impedes the correct
|
||||||
translation of the peephole optimizer.
|
translation of the peephole optimizer.
|
||||||
For a more detailed description of this phenomenon see
|
For a more detailed description of this phenomenon see
|
||||||
the file "$SRC_HOME/mach/m68k2/Unisoft_bug".
|
the file "$ACK_SRC_HOME/mach/m68k2/Unisoft_bug".
|
||||||
(This observation was made in 1985 or so, so it is probably
|
(This observation was made in 1985 or so, so it is probably
|
||||||
no longer true).
|
no longer true).
|
||||||
.NH 3
|
.NH 3
|
||||||
|
@ -727,7 +766,7 @@ If that directory contains an Action file issue the command
|
||||||
.NH
|
.NH
|
||||||
Commands
|
Commands
|
||||||
.PP
|
.PP
|
||||||
The following commands are available in the $TARGET_HOME/bin directory after compilation
|
The following commands are available in the $ACK_HOME/bin directory after compilation
|
||||||
of the Kit:
|
of the Kit:
|
||||||
.IP "\fIack\fP, \fIacc\fP, \fIabc\fP, \fIapc\fP, \fIocm\fP, \fIm2\fP, \fIf2c\fP and their links" 14
|
.IP "\fIack\fP, \fIacc\fP, \fIabc\fP, \fIapc\fP, \fIocm\fP, \fIm2\fP, \fIf2c\fP and their links" 14
|
||||||
.br
|
.br
|
||||||
|
@ -780,7 +819,7 @@ this is a cc-compatible fast C compiler, available on SUN-3 and VAX
|
||||||
systems. It compiles very fast, but produces slow code.
|
systems. It compiles very fast, but produces slow code.
|
||||||
.LP
|
.LP
|
||||||
We currently make the Kit available to our users by telling
|
We currently make the Kit available to our users by telling
|
||||||
them that they should include the $TARGET_HOME/bin directory in
|
them that they should include the $ACK_HOME/bin directory in
|
||||||
their PATH shell variable.
|
their PATH shell variable.
|
||||||
The programs will still work when moved to a different
|
The programs will still work when moved to a different
|
||||||
directory or linked to.
|
directory or linked to.
|
||||||
|
@ -793,7 +832,7 @@ Any call name not being \fIcc\fP, \fIacc\fP, \fIabc\fP, \fIpc\fP, \fIf2c\fP,
|
||||||
\fIocm\fP, \fIm2\fP, or \fIapc\fP will be
|
\fIocm\fP, \fIm2\fP, or \fIapc\fP will be
|
||||||
interpreted as the name of a 'machine description' and the
|
interpreted as the name of a 'machine description' and the
|
||||||
program will try to find a description file with that name.
|
program will try to find a description file with that name.
|
||||||
The installation process will only touch the utilities in the $TARGET_HOME/bin
|
The installation process will only touch the utilities in the $ACK_HOME/bin
|
||||||
directory, not copies of these utilities.
|
directory, not copies of these utilities.
|
||||||
.NH
|
.NH
|
||||||
Machines
|
Machines
|
||||||
|
@ -802,7 +841,7 @@ Below is a table with entries for all commands in
|
||||||
the bin directory used to (cross)compile for a particular machine.
|
the bin directory used to (cross)compile for a particular machine.
|
||||||
The name in the first column gives the name in the bin directory.
|
The name in the first column gives the name in the bin directory.
|
||||||
The column headed dir indicates which subdirectories of
|
The column headed dir indicates which subdirectories of
|
||||||
$TARGET_HOME/lib and/or $TARGET_HOME/lib.bin are needed for compilation.
|
$ACK_HOME/lib and/or $ACK_HOME/lib.bin are needed for compilation.
|
||||||
The column head i/p contains the integer and pointer size used in units of
|
The column head i/p contains the integer and pointer size used in units of
|
||||||
bytes.
|
bytes.
|
||||||
The subdirectories with the same name in mach contain the sources.
|
The subdirectories with the same name in mach contain the sources.
|
||||||
|
@ -1002,11 +1041,11 @@ the second takes 2/4 and 4/4 files,
|
||||||
and the last one takes 2/2, 2/4 and 4/4.
|
and the last one takes 2/2, 2/4 and 4/4.
|
||||||
The PDP 11 interpreter executes floating point instructions.
|
The PDP 11 interpreter executes floating point instructions.
|
||||||
.LP
|
.LP
|
||||||
The program \fB$TARGET_HOME/bin/em\fP calls the appropriate
|
The program \fB$ACK_HOME/bin/em\fP calls the appropriate
|
||||||
interpreter.
|
interpreter.
|
||||||
The interpreters are looked for in the em22, em24 and em44
|
The interpreters are looked for in the em22, em24 and em44
|
||||||
subdirectories of $TARGET_HOME/lib.bin.
|
subdirectories of $ACK_HOME/lib.bin.
|
||||||
The third interpreter is available as the program \fB$TARGET_HOME/bin/int\fP
|
The third interpreter is available as the program \fB$ACK_HOME/bin/int\fP
|
||||||
in the bin directory.
|
in the bin directory.
|
||||||
.NH
|
.NH
|
||||||
Compilation on a different machine.
|
Compilation on a different machine.
|
||||||
|
@ -1036,7 +1075,7 @@ which is a major undertaking.
|
||||||
.NH 2
|
.NH 2
|
||||||
Universal assembler/loader, link editor
|
Universal assembler/loader, link editor
|
||||||
.PP
|
.PP
|
||||||
For most machines, the description files in $TARGET_HOME/lib/*/descr use our
|
For most machines, the description files in $ACK_HOME/lib/*/descr use our
|
||||||
universal assembler and our link editor.
|
universal assembler and our link editor.
|
||||||
The load file produced is not directly
|
The load file produced is not directly
|
||||||
usable in any system known to us,
|
usable in any system known to us,
|
||||||
|
@ -1046,23 +1085,23 @@ executable files.
|
||||||
The \fIdl\fP programs present for some machines unravel
|
The \fIdl\fP programs present for some machines unravel
|
||||||
our a.out files and transmit commands to load memory
|
our a.out files and transmit commands to load memory
|
||||||
to a microprocessor over a serial line.
|
to a microprocessor over a serial line.
|
||||||
The file $TARGET_HOME/man/man5/ack.out.5 contains a description of the format of
|
The file $ACK_HOME/man/man5/ack.out.5 contains a description of the format of
|
||||||
the universal assembler load file.
|
the universal assembler load file.
|
||||||
It might be useful to those who wish or need to write their
|
It might be useful to those who wish or need to write their
|
||||||
own conversion programs.
|
own conversion programs.
|
||||||
Also, a module is included to read and write our a.out format.
|
Also, a module is included to read and write our a.out format.
|
||||||
See $TARGET_HOME/man/man3/object.3.
|
See $ACK_HOME/man/man3/object.3.
|
||||||
.NH
|
.NH
|
||||||
Options
|
Options
|
||||||
.NH 2
|
.NH 2
|
||||||
Default machine
|
Default machine
|
||||||
.PP
|
.PP
|
||||||
There is one important option in $TARGET_HOME/config/local.h.
|
There is one important option in $ACK_HOME/config/local.h.
|
||||||
The utility \fIack\fP uses a default machine name when called
|
The utility \fIack\fP uses a default machine name when called
|
||||||
as \fIacc\fP, \fIcc\fP, \fIabc\fP, \fIapc\fP, \fIpc\fP, \fIocm\fP,
|
as \fIacc\fP, \fIcc\fP, \fIabc\fP, \fIapc\fP, \fIpc\fP, \fIocm\fP,
|
||||||
\fIm2\fP, \fIf2c\fP, or \fIack\fP.
|
\fIm2\fP, \fIf2c\fP, or \fIack\fP.
|
||||||
The machine name used by default is determined by the
|
The machine name used by default is determined by the
|
||||||
definition of ACKM in $TARGET_HOME/config/local.h.
|
definition of ACKM in $ACK_HOME/config/local.h.
|
||||||
The Kit is distributed with "sun3" as the default machine,
|
The Kit is distributed with "sun3" as the default machine,
|
||||||
but the shell script "first" in the directory "first" alters this
|
but the shell script "first" in the directory "first" alters this
|
||||||
to suit the target system.
|
to suit the target system.
|
||||||
|
@ -1071,14 +1110,14 @@ and by default produce code that can't run on the local system.
|
||||||
.NH 2
|
.NH 2
|
||||||
Pathnames
|
Pathnames
|
||||||
.PP
|
.PP
|
||||||
Absolute path names are concentrated in "$TARGET_HOME/config/em_path.h".
|
Absolute path names are concentrated in "$ACK_HOME/config/em_path.h".
|
||||||
Only the utilities \fIack\fP, \fIflex\fP, and \fILLgen\fP use
|
Only the utilities \fIack\fP, \fIflex\fP, and \fILLgen\fP use
|
||||||
absolute path names to access files in the Kit.
|
absolute path names to access files in the Kit.
|
||||||
The tree is distributed with /usr/em as the working
|
The tree is distributed with /usr/em as the working
|
||||||
directory.
|
directory.
|
||||||
The definition of EM_DIR in em_path.h should be altered to
|
The definition of EM_DIR in em_path.h should be altered to
|
||||||
specify the root
|
specify the root
|
||||||
directory for the Compiler Kit binaries on the local system ($TARGET_HOME).
|
directory for the Compiler Kit binaries on the local system ($ACK_HOME).
|
||||||
This is done automatically by the shell script "first" in the
|
This is done automatically by the shell script "first" in the
|
||||||
directory "first".
|
directory "first".
|
||||||
Em_path.h also specifies which directory should be used for
|
Em_path.h also specifies which directory should be used for
|
||||||
|
@ -1090,7 +1129,7 @@ The shape of the tree should not be altered lightly because
|
||||||
most Makefiles and the
|
most Makefiles and the
|
||||||
utility \fIack\fP know the shape of the ACK tree.
|
utility \fIack\fP know the shape of the ACK tree.
|
||||||
The knowledge of the utility \fIack\fP about the shape of the tree is
|
The knowledge of the utility \fIack\fP about the shape of the tree is
|
||||||
concentrated in the files in the directory $TARGET_HOME/lib/*/descr and $TARGET_HOME/lib/descr/*.
|
concentrated in the files in the directory $ACK_HOME/lib/*/descr and $ACK_HOME/lib/descr/*.
|
||||||
.NH
|
.NH
|
||||||
Makefiles
|
Makefiles
|
||||||
.PP
|
.PP
|
||||||
|
@ -1120,11 +1159,11 @@ Opr should be an off-line printer daemon.
|
||||||
On some systems it exists under another name e.g. lpr.
|
On some systems it exists under another name e.g. lpr.
|
||||||
The easiest way to call such a spooler is using a shell script
|
The easiest way to call such a spooler is using a shell script
|
||||||
with the name opr that calls lpr.
|
with the name opr that calls lpr.
|
||||||
This script should be placed in /usr/bin or $TARGET_HOME/bin or
|
This script should be placed in /usr/bin or $ACK_HOME/bin or
|
||||||
one of the directories in the PATH environment variable.
|
one of the directories in the PATH environment variable.
|
||||||
.IP clean
|
.IP clean
|
||||||
remove all files not needed for day-to-day use,
|
remove all files not needed for day-to-day use,
|
||||||
that is binaries not in $TARGET_HOME/bin or $TARGET_HOME/lib.bin, object files etc.
|
that is binaries not in $ACK_HOME/bin or $ACK_HOME/lib.bin, object files etc.
|
||||||
.LP
|
.LP
|
||||||
Example:
|
Example:
|
||||||
.DS
|
.DS
|
||||||
|
@ -1132,13 +1171,13 @@ make install
|
||||||
.DE
|
.DE
|
||||||
given as command in a configuration directory will cause
|
given as command in a configuration directory will cause
|
||||||
compilation of all programs in the directory and copying of the results
|
compilation of all programs in the directory and copying of the results
|
||||||
to the $TARGET_HOME/bin and $TARGET_HOME/lib.bin directories.
|
to the $ACK_HOME/bin and $ACK_HOME/lib.bin directories.
|
||||||
.NH
|
.NH
|
||||||
Testing
|
Testing
|
||||||
.PP
|
.PP
|
||||||
Test sets are available in Pascal, C, Basic and EM assembly:
|
Test sets are available in Pascal, C, Basic and EM assembly:
|
||||||
.IP EM 8
|
.IP EM 8
|
||||||
the directory $SRC_HOME/emtest contains a few EM test programs.
|
the directory $ACK_SRC_HOME/emtest contains a few EM test programs.
|
||||||
The EM assembly files in these tests must be transformed into
|
The EM assembly files in these tests must be transformed into
|
||||||
load files.
|
load files.
|
||||||
These tests use the LIN and NOP instructions to mark the passing of each
|
These tests use the LIN and NOP instructions to mark the passing of each
|
||||||
|
@ -1151,7 +1190,7 @@ The test finishes normally with 0 as the last number printed
|
||||||
In all other cases a bug showed its
|
In all other cases a bug showed its
|
||||||
existence.
|
existence.
|
||||||
.IP Pascal
|
.IP Pascal
|
||||||
the directory $SRC_HOME/lang/pc/test contains a few Pascal test programs.
|
the directory $ACK_SRC_HOME/lang/pc/test contains a few Pascal test programs.
|
||||||
All these programs print the number of errors found and a
|
All these programs print the number of errors found and a
|
||||||
identification of these errors.
|
identification of these errors.
|
||||||
.sp 1
|
.sp 1
|
||||||
|
@ -1170,7 +1209,7 @@ Easton, Pennsylvania 18042
|
||||||
USA
|
USA
|
||||||
.DE
|
.DE
|
||||||
.IP C
|
.IP C
|
||||||
the sub-directories in $SRC_HOME/lang/cem/ctest contain C test programs.
|
the sub-directories in $ACK_SRC_HOME/lang/cem/ctest contain C test programs.
|
||||||
The idea behind these tests is:
|
The idea behind these tests is:
|
||||||
if there is a program called xx.c, compile it into xx.cem.
|
if there is a program called xx.c, compile it into xx.cem.
|
||||||
Run it with standard output to xx.cem.r, compare this file to
|
Run it with standard output to xx.cem.r, compare this file to
|
||||||
|
@ -1184,7 +1223,7 @@ The contents of the result files depend on the word size,
|
||||||
the xx.cem.g files on the distribution are intended for a
|
the xx.cem.g files on the distribution are intended for a
|
||||||
32-bit machine.
|
32-bit machine.
|
||||||
.IP Basic
|
.IP Basic
|
||||||
the directory $SRC_HOME/lang/basic/test contains some forty Basic programs.
|
the directory $ACK_SRC_HOME/lang/basic/test contains some forty Basic programs.
|
||||||
Not all of these programs are correct, some have syntactic errors,
|
Not all of these programs are correct, some have syntactic errors,
|
||||||
some simply don't work.
|
some simply don't work.
|
||||||
The Makefile in that directory attempts to compile and run
|
The Makefile in that directory attempts to compile and run
|
||||||
|
@ -1198,8 +1237,8 @@ An example of the output of a make is present in the file Out.std.
|
||||||
Documentation
|
Documentation
|
||||||
.PP
|
.PP
|
||||||
After installation, the manual pages for Amsterdam Compiler Kit can be found
|
After installation, the manual pages for Amsterdam Compiler Kit can be found
|
||||||
in the $TARGET_HOME/man directory. Also, the following documents are provided
|
in the $ACK_HOME/man directory. Also, the following documents are provided
|
||||||
in the $TARGET_HOME/doc directory:
|
in the $ACK_HOME/doc directory:
|
||||||
.TS
|
.TS
|
||||||
l l.
|
l l.
|
||||||
toolkit.doc general overview (CACM article)
|
toolkit.doc general overview (CACM article)
|
||||||
|
|
|
@ -514,7 +514,7 @@ contains routines to build the data structure from the input
|
||||||
.BI C_ xxx
|
.BI C_ xxx
|
||||||
routines and place the structure on the pattern queue. These routines are also
|
routines and place the structure on the pattern queue. These routines are also
|
||||||
used to build the data structures when a replacement is constructed.
|
used to build the data structures when a replacement is constructed.
|
||||||
.IP aux.c 10
|
.IP utils.c 10
|
||||||
routines to implement the external functions used in the pattern table.
|
routines to implement the external functions used in the pattern table.
|
||||||
|
|
||||||
.LP
|
.LP
|
||||||
|
|
Loading…
Reference in a new issue