1989-02-07 11:04:05 +00:00
|
|
|
!File: lint.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define LINT 1 /* if defined, 'lint' is produced */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: pathlength.h
|
|
|
|
#define PATHLENGTH 1024 /* max. length of path to file */
|
|
|
|
|
|
|
|
|
|
|
|
!File: errout.h
|
|
|
|
#define ERROUT STDERR /* file pointer for writing messages */
|
1989-11-08 16:52:34 +00:00
|
|
|
#define ERR_SHADOW 5 /* a syntax error overshadows error messages
|
|
|
|
until ERR_SHADOW symbols have been
|
|
|
|
accepted without syntax error */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: idfsize.h
|
|
|
|
#define IDFSIZE 64 /* maximum significant length of an identifier */
|
|
|
|
|
|
|
|
|
|
|
|
!File: numsize.h
|
|
|
|
#define NUMSIZE 256 /* maximum length of a numeric constant */
|
|
|
|
|
|
|
|
|
|
|
|
!File: nparams.h
|
1989-10-20 13:06:10 +00:00
|
|
|
#define NPARAMS 32 /* maximum number of parameters */
|
1989-02-14 14:35:38 +00:00
|
|
|
#define STDC_NPARAMS 31 /* ANSI limit on number of parameters */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: ifdepth.h
|
|
|
|
#define IFDEPTH 256 /* maximum number of nested if-constructions */
|
|
|
|
|
|
|
|
|
|
|
|
!File: density.h
|
1991-03-01 13:51:37 +00:00
|
|
|
#define DENSITY 3 /* see switch.[ch] for an explanation */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
1989-11-22 13:58:36 +00:00
|
|
|
!File: macbuf.h
|
|
|
|
#define LAPBUF 128 /* initial size of macro replacement buffer */
|
|
|
|
#define ARGBUF 128 /* initial size of macro parameter buffer(s) */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!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
|
|
|
|
the storage of a string */
|
|
|
|
|
|
|
|
|
1990-03-12 13:35:26 +00:00
|
|
|
!File: trgt_sizes.h
|
1989-02-07 11:04:05 +00:00
|
|
|
#define MAXSIZE 8 /* the maximum of the SZ_* constants */
|
|
|
|
|
|
|
|
/* target machine sizes */
|
1989-11-09 18:07:14 +00:00
|
|
|
#define SZ_CHAR 1
|
|
|
|
#define SZ_SHORT 2
|
|
|
|
#define SZ_WORD 4
|
|
|
|
#define SZ_INT 4
|
|
|
|
#define SZ_LONG 4
|
Begin to add `long long` to C compiler for linux386.
Add long long type, but without literals; you can't say '123LL' yet.
You can try constant operations, like `(long long)123 + 1`, but the
compiler's `arith` type might not be wide enough. Conversions,
shifts, and some other operations don't work in i386 ncg; I am using a
union instead of conversions:
union q {
long long ll;
unsigned long long ull;
int i[2];
};
Hack plat/linux386/descr to enable long long (size 8, alignment 4)
only for this platform. The default for other platforms is to disable
long long (size -1).
In lang/cem/cemcom.ansi,
- BigPars, SmallPars: Add default size, alignment of long long.
- align.h: Add lnglng_align.
- arith.c: Convert arithmetic operands to long long or unsigned long
long when necessary; avoid conversion from long long to long.
Allow long long as an arithmetic, integral, or logical operand.
- ch3.c: Handle long long like int and long when erroneously applying
a selector, like `long long ll; ll.member` or `ll->member`. Add
long long to integral and arithmetic types.
- code.c: Add long long to type stabs for debugging.
- conversion.c: Add long long to integral conversions.
- cstoper.c: Write masks up to full_mask[8]. Add FIXME comment.
- declar.g: Parse `long long` in code.
- decspecs.c: Understand long long in type declarations.
- eval.c: Add long long to operations, to generate code like `adi 8`.
Don't use `ldc` with constant over 4 bytes.
- ival.g: Allow long long in initializations.
- main.c: Set lnglng_type and related values.
- options.c: Add option like `-Vq8.4` to set long long to size 8,
alignment 4. I chose 'q', because Perl's pack and Ruby's
Array#pack use 'q' for 64-bit or long long values; it might be a
reference to BSD's old quad_t alias for long long.
- sizes.h: Add lnglng_size.
- stab.c: Allow long long when writing the type stab for debugging.
Switch from calculating the ranges to hardcoding them in strings;
add 8-byte ranges as a special case. This also hardcodes the
unsigned 4-byte range as "0;-1". Before it was either "0;-1" or
"0;4294967295", depending on sizeof(long) in the compiler.
- struct.c: Try long long bitfield, but it will probably give the
error, "bit field type long long does not fit in a word".
- switch.c: Update comment.
- tokenname.c: Define LNGLNG (long long) like LNGDBL (long double).
- type.c, type.str: Add lnglng_type and ulnglng_type. Add function
no_long_long() to check if long long is disabled.
2019-09-02 15:24:44 +00:00
|
|
|
#define SZ_LNGLNG -1
|
1989-11-09 18:07:14 +00:00
|
|
|
#define SZ_FLOAT 4
|
|
|
|
#define SZ_DOUBLE 8
|
|
|
|
#define SZ_LNGDBL 8 /* for now */
|
|
|
|
#define SZ_POINTER 4
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
/* target machine alignment requirements */
|
|
|
|
#define AL_CHAR 1
|
|
|
|
#define AL_SHORT SZ_SHORT
|
|
|
|
#define AL_WORD SZ_WORD
|
|
|
|
#define AL_INT SZ_WORD
|
|
|
|
#define AL_LONG SZ_WORD
|
Begin to add `long long` to C compiler for linux386.
Add long long type, but without literals; you can't say '123LL' yet.
You can try constant operations, like `(long long)123 + 1`, but the
compiler's `arith` type might not be wide enough. Conversions,
shifts, and some other operations don't work in i386 ncg; I am using a
union instead of conversions:
union q {
long long ll;
unsigned long long ull;
int i[2];
};
Hack plat/linux386/descr to enable long long (size 8, alignment 4)
only for this platform. The default for other platforms is to disable
long long (size -1).
In lang/cem/cemcom.ansi,
- BigPars, SmallPars: Add default size, alignment of long long.
- align.h: Add lnglng_align.
- arith.c: Convert arithmetic operands to long long or unsigned long
long when necessary; avoid conversion from long long to long.
Allow long long as an arithmetic, integral, or logical operand.
- ch3.c: Handle long long like int and long when erroneously applying
a selector, like `long long ll; ll.member` or `ll->member`. Add
long long to integral and arithmetic types.
- code.c: Add long long to type stabs for debugging.
- conversion.c: Add long long to integral conversions.
- cstoper.c: Write masks up to full_mask[8]. Add FIXME comment.
- declar.g: Parse `long long` in code.
- decspecs.c: Understand long long in type declarations.
- eval.c: Add long long to operations, to generate code like `adi 8`.
Don't use `ldc` with constant over 4 bytes.
- ival.g: Allow long long in initializations.
- main.c: Set lnglng_type and related values.
- options.c: Add option like `-Vq8.4` to set long long to size 8,
alignment 4. I chose 'q', because Perl's pack and Ruby's
Array#pack use 'q' for 64-bit or long long values; it might be a
reference to BSD's old quad_t alias for long long.
- sizes.h: Add lnglng_size.
- stab.c: Allow long long when writing the type stab for debugging.
Switch from calculating the ranges to hardcoding them in strings;
add 8-byte ranges as a special case. This also hardcodes the
unsigned 4-byte range as "0;-1". Before it was either "0;-1" or
"0;4294967295", depending on sizeof(long) in the compiler.
- struct.c: Try long long bitfield, but it will probably give the
error, "bit field type long long does not fit in a word".
- switch.c: Update comment.
- tokenname.c: Define LNGLNG (long long) like LNGDBL (long double).
- type.c, type.str: Add lnglng_type and ulnglng_type. Add function
no_long_long() to check if long long is disabled.
2019-09-02 15:24:44 +00:00
|
|
|
#define AL_LNGLNG SZ_WORD
|
1989-02-07 11:04:05 +00:00
|
|
|
#define AL_FLOAT SZ_WORD
|
|
|
|
#define AL_DOUBLE SZ_WORD
|
1989-02-14 14:35:38 +00:00
|
|
|
#define AL_LNGDBL SZ_WORD
|
1989-02-07 11:04:05 +00:00
|
|
|
#define AL_POINTER SZ_WORD
|
|
|
|
#define AL_STRUCT 1
|
|
|
|
#define AL_UNION 1
|
|
|
|
|
|
|
|
|
|
|
|
!File: botch_free.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define BOTCH_FREE 1 /* when defined, botch freed memory, as a check */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: dataflow.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define DATAFLOW 1 /* produce some compile-time xref */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: debug.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define DEBUG 1 /* perform various self-tests */
|
1993-10-22 14:24:31 +00:00
|
|
|
#define NDEBUG 1 /* disable assertions */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: use_tmp.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define PREPEND_SCOPES 1 /* collect exa, exp, ina and inp commands
|
1989-02-07 11:04:05 +00:00
|
|
|
and if USE_TMP is defined let them
|
|
|
|
precede the rest of the generated
|
|
|
|
compact code */
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define USE_TMP 1 /* use C_insertpart, C_endpart mechanism
|
1989-02-07 11:04:05 +00:00
|
|
|
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
|
|
|
|
#define PARBUFSIZE 1024
|
|
|
|
|
|
|
|
|
|
|
|
!File: textsize.h
|
1989-11-22 13:58:36 +00:00
|
|
|
#define ITEXTSIZE 16 /* 1st piece of memory for repl. text */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: inputtype.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define INP_READ_IN_ONE 1 /* read input file in one */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: nobitfield.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define NOBITFIELD 1 /* if NOT defined, implement bitfields */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: spec_arith.h
|
|
|
|
/* describes internal compiler arithmetics */
|
|
|
|
#undef SPECIAL_ARITHMETICS /* something different from native long */
|
|
|
|
|
|
|
|
|
|
|
|
!File: static.h
|
|
|
|
#define GSTATIC /* for large global "static" arrays */
|
|
|
|
|
|
|
|
|
|
|
|
!File: nocross.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define NOCROSS 1 /* if NOT defined, cross compiler */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
!File: regcount.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define REGCOUNT 1 /* count occurrences for register messages */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
|
1990-10-01 15:28:28 +00:00
|
|
|
!File: dbsymtab.h
|
1991-12-16 14:06:09 +00:00
|
|
|
/*#define DBSYMTAB 1 /* ability to produce symbol table for debugger */
|
1990-10-01 15:28:28 +00:00
|
|
|
|
|
|
|
|