Commit | Line | Data |
---|---|---|
fea4baa6 | 1 | /* mac2defs.h 1.3 86/07/27 */ |
9162c98f | 2 | |
0b9890e3 SL |
3 | /* |
4 | * Tahoe Registers | |
5 | */ | |
9162c98f | 6 | |
0b9890e3 SL |
7 | /* |
8 | * Scratch registers | |
9 | */ | |
10 | #define R0 0 | |
11 | #define R1 1 | |
12 | #define R2 2 | |
13 | #define R3 3 | |
14 | #define R4 4 | |
15 | #define R5 5 | |
9162c98f | 16 | |
0b9890e3 SL |
17 | /* |
18 | * Register variables | |
19 | */ | |
20 | #define R6 6 | |
21 | #define R7 7 | |
22 | #define R8 8 | |
23 | #define R9 9 | |
24 | #define R10 10 | |
25 | #define R11 11 | |
26 | #define R12 12 | |
9162c98f | 27 | |
0b9890e3 SL |
28 | /* |
29 | * Special purpose registers | |
30 | */ | |
31 | #define FP 13 /* frame pointer */ | |
32 | #define SP 14 /* stack pointer */ | |
33 | #define PC 15 /* program counter */ | |
9162c98f | 34 | |
0b9890e3 SL |
35 | /* |
36 | * Floating registers | |
37 | */ | |
38 | #define ACC 16 /* accumulator */ | |
9162c98f | 39 | |
0b9890e3 SL |
40 | #define TMPREG FP /* reg off which temporaries are referenced */ |
41 | #define REGSZ 16 /* size of register set */ | |
9162c98f | 42 | |
0b9890e3 | 43 | #define R2REGS 1 /* permit double indexing */ |
9162c98f | 44 | |
0b9890e3 SL |
45 | extern int fregs; |
46 | extern int maxargs; | |
9162c98f | 47 | |
0b9890e3 SL |
48 | #define BYTEOFF(x) ((x)&03) |
49 | #define wdal(k) (BYTEOFF(k)==0) /* word align */ | |
50 | #define BITOOR(x) ((x)>>3) /* bit offset to oreg offset */ | |
9162c98f | 51 | |
0b9890e3 SL |
52 | /* |
53 | * Some macros used in store(): | |
54 | * just evaluate the arguments, and be done with it... | |
55 | */ | |
56 | #define STOARG(p) | |
57 | #define STOFARG(p) | |
58 | #define STOSTARG(p) | |
9162c98f | 59 | |
0b9890e3 SL |
60 | /* |
61 | * Some short routines that get called an awful lot are actually macros. | |
62 | */ | |
0b9890e3 | 63 | #define szty(t) ((t) == DOUBLE ? 2 : 1) |
0b9890e3 SL |
64 | #define shltype(o, p) \ |
65 | ((o) == REG || (o) == NAME || (o) == ICON || \ | |
66 | (o) == OREG || ((o) == UNARY MUL && shumul((p)->in.left))) | |
67 | #define ncopy(q, p) ((q)->in = (p)->in) | |
9162c98f | 68 | |
0b9890e3 SL |
69 | #define MYREADER(p) myreader(p) |
70 | int optim2(); | |
71 | #define SIREG (SPECIAL|6) /* indexed OREG */ | |
72 | int special(); /* additional special shapes */ | |
73 | #define callchk(p) if ((p)->in.op != FORTCALL) allchk() |