|
|
1.1 root 1: /*
2: * This is the machine specific header file for the iAPX-86 compilers.
3: * It is used in both the SMALL and LARGE models of segmentation.
4: * It contains typedefs, register names and macros for all compiler phases.
5: * This one produces a COHERENT ONLYSMALL DECVAX compiler.
6: */
7: #define DATE "09/19/90" /* Date */
8: #define VERSMWC "V3.1.0" /* MWC version number */
9: #define VERSINT "X324" /* Intel version number */
10:
11: #define EATDOL 0 /* Eat '$' in identifiers? */
12: #define APPENDBAR 1 /* Append '_' to identifiers? */
13: #define IEEE 0 /* IEEE format? */
14: #define DECVAX 1 /* DECVAX format? */
15: #define NATIVEFP 1 /* Host fp == target fp? */
16: #define MCFFP 0 /* Motorola fast floating point? */
17: #define TINY 0 /* No code gen debug info? */
18: #ifndef YATC
19: #define YATC 0 /* Not code table compile */
20: #endif
21: #define RUNNING_LARGE 0 /* Long pointers? */
22: #define SIZEOF_LARGE 0 /* long sizeof_t fields */
23: #define SPLIT_CC1 0 /* CC1A-CC1B? */
24: #define AS_FORMAT 1 /* Coherent/Rainbow .s format? */
25: #define INTEL 0 /* Intel copyright? */
26: #define OMF286 0 /* 286 object format? */
27: #define TEMPBUF 0 /* Memory tempfile buffers? */
28:
29: #define NDP 0 /* 8087? */
30: #define EMUFIXUPS 0 /* M: 8087 emulation fixups? */
31: #define ONLYSMALL 1 /* Just SMALL model? */
32:
33: /*
34: * Types.
35: */
36: #define S8 0 /* Signed byte */
37: #define U8 1 /* Unsigned byte */
38: #define S16 2 /* Signed word */
39: #define U16 3 /* Unsigned word */
40: #define S32 4 /* Signed long */
41: #define U32 5 /* Unsigned long */
42: #define F32 6 /* Short floating point */
43: #define F64 7 /* Long floating point */
44: #define BLK 8 /* Block of bytes */
45: #define FLD8 9 /* Field, byte wide */
46: #define FLD16 10 /* Field, word wide */
47: #define LPTR 11 /* Large (2 word) pointer */
48: #define LPTB 12 /* Large (2 word) pointer to BLK */
49: #define SPTR 13 /* Small (1 word) pointer */
50: #define SPTB 14 /* Small (1 word) pointer to BLK */
51:
52: #define TRUTH S16 /* Type used for truth values */
53: #define LOFS LPTR /* Large, offset LEAF type */
54: #define SOFS SPTR /* Small, offset LEAF type */
55: #define IVAL_T S16 /* Type for ival_t con */
56: #define LVAL_T S32 /* Type for lval_t con */
57: #define DVAL_T F64 /* Type for dval_t con */
58: #define I_FMT "%d" /* printf format for ival_t con */
59: #define I_FMTX "%x" /* printf format for ival_t con */
60: #define NBPBYTE 8 /* # of bits in a "byte" */
61: #define saligntype(ip) 1 /* align structs to char boundaries */
62:
63: /*
64: * For each machine type there is
65: * a flag bit type.
66: */
67: #define FS8 01
68: #define FU8 02
69: #define FS16 04
70: #define FU16 010
71: #define FS32 020
72: #define FU32 040
73: #define FF32 0100
74: #define FF64 0200
75: #define FBLK 0400
76: #define FFLD8 01000
77: #define FFLD16 02000
78: #define FLPTR 04000
79: #define FLPTB 010000
80: #define FSPTR 020000
81: #define FSPTB 040000
82:
83: /*
84: * Allocation types.
85: */
86: #ifdef vax
87: typedef short ival_t; /* 16 bits */
88: typedef int lval_t; /* 32 bits */
89: #else
90: typedef int ival_t; /* ints */
91: typedef long lval_t; /* longs */
92: #endif
93: typedef char dval_t[8]; /* doubles */
94: typedef int sizeof_t; /* sizeof constants */
95:
96: /*
97: * Limits.
98: */
99: #define MAXIV 32767L /* Max integer */
100: #define MAXUV 65535L /* Max unsigned integer */
101: #define MAXUCE 255 /* Max unsigned char enumeration */
102: #define UIMASK 0xFFFF0000L /* Unsigned int check mask */
103: #define SIMASK 0xFFFF8000L /* Signed int check mask */
104: #define SLMASK 0x80000000L /* Signed long check mask */
105: #define ASMASK 0x0000FFFFL /* Address space mask */
106: #define MAXMEMB MAXIV /* Max struct/union member offset */
107: #define MAXESIZE MAXUV /* Max struct/union/array size */
108:
109: /*
110: * Registers.
111: * This list includes the machine's
112: * actual registers, some registers that are
113: * only given names for the benefit of the
114: * code output routines, and the pseudo registers
115: * used by the code generator.
116: */
117: #define AX 0
118: #define DX 1
119: #define BX 2
120: #define CX 3
121:
122: #define SI 4
123: #define DI 5
124: #define SP 6
125: #define BP 7
126:
127: #define FPAC 8
128:
129: #define ES 9
130: #define CS 10
131: #define SS 11
132: #define DS 12
133:
134: #define DXAX 13
135: #define CXBX 14
136:
137: #define SSSP 15
138: #define SSBP 16
139:
140: #define ESAX 17
141: #define ESBX 18
142: #define ESSI 19
143: #define ESDI 20
144:
145: #define DSAX 21
146: #define DSBX 22
147: #define DSSI 23
148: #define DSDI 24
149:
150: #define AL 25
151: #define BL 26
152: #define CL 27
153: #define DL 28
154: #define AH 29
155: #define BH 30
156: #define CH 31
157: #define DH 32
158:
159: #define NONE 33
160: #define ANYR 34
161: #define ANYL 35
162: #define PAIR 36
163: #define TEMP 37
164: #define LOTEMP 38
165: #define HITEMP 39
166:
167: #define NRREG 25 /* Number of real regs */
168: #define NREG 40 /* Number of regs */
169: #define FRREG AX
170:
171: #define BAX 01
172: #define BDX 02
173: #define BBX 04
174: #define BCX 010
175: #define BSI 020
176: #define BDI 040
177: #define BSP 0100
178: #define BBP 0200
179: #define BFPAC 0400
180: #define BES 01000
181: #define BCS 02000
182: #define BSS 04000
183: #define BDS 010000
184:
185: /*
186: * Definitions for the "a_mode"
187: * field of an AFIELD object. Some bits are
188: * used only by the peephole optimizer routines in
189: * the "mregstate" and "sregstate" tables.
190: */
191: #define A_REGM 0x000F /* Register code, etc */
192: #define A_AMOD 0x00F0 /* Address mode */
193: #define A_PREFX 0x0F00 /* Escape prefix needed */
194: #define A_EA 0x1000 /* Flag for peephole; effective address */
195: #define A_OFFS 0x2000 /* Flag for getfield; offset present */
196: #define A_LID 0x4000 /* Flag for getfield; local id present */
197: #define A_GID 0x8000 /* Flag for getfield; global id present */
198:
199: #define A_NONE 0 /* General "none" value */
200:
201: #define A_BR (1<<4) /* Byte register */
202: #define A_WR (2<<4) /* Word register */
203: #define A_SR (3<<4) /* Segment register */
204: #define A_IMM (4<<4) /* Immediate */
205: #define A_DIR (5<<4) /* Direct */
206: #define A_X (6<<4) /* Indexed */
207:
208: #define A_ES (1<<8) /* ES: needed */
209: #define A_CS (2<<8) /* CS: needed */
210: #define A_SS (3<<8) /* SS: needed */
211: #define A_DS (4<<8) /* DS: needed */
212:
213: #define A_XSI (A_X|0x04) /* [si] */
214: #define A_XDI (A_X|0x05) /* [di] */
215: #define A_XBP (A_X|0x06) /* [bp] */
216: #define A_XBX (A_X|0x07) /* [bx] */
217:
218: #define A_RAX (A_WR|0x00) /* ax */
219: #define A_RCX (A_WR|0x01) /* cx */
220: #define A_RDX (A_WR|0x02) /* dx */
221: #define A_RBX (A_WR|0x03) /* bx */
222: #define A_RSP (A_WR|0x04) /* sp */
223: #define A_RBP (A_WR|0x05) /* bp */
224: #define A_RSI (A_WR|0x06) /* si */
225: #define A_RDI (A_WR|0x07) /* di */
226:
227: #define A_RAL (A_BR|0x00) /* al */
228: #define A_RCL (A_BR|0x01) /* cl */
229: #define A_RDL (A_BR|0x02) /* dl */
230: #define A_RBL (A_BR|0x03) /* bl */
231: #define A_RAH (A_BR|0x04) /* ah */
232: #define A_RCH (A_BR|0x05) /* ch */
233: #define A_RDH (A_BR|0x06) /* dh */
234: #define A_RBH (A_BR|0x07) /* bh */
235:
236: #define A_RES (A_SR|0x00) /* es */
237: #define A_RCS (A_SR|0x01) /* cs */
238: #define A_RSS (A_SR|0x02) /* ss */
239: #define A_RDS (A_SR|0x03) /* ds */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.