1*24417Smckusick /* mac2defs.h 4.2 85/08/23 */ 218403Sralph 318403Sralph /* 418403Sralph * VAX-11/780 Registers 518403Sralph */ 618403Sralph 718403Sralph /* 818403Sralph * Scratch registers 918403Sralph */ 1018403Sralph #define R0 0 1118403Sralph #define R1 1 1218403Sralph #define R2 2 1318403Sralph #define R3 3 1418403Sralph #define R4 4 1518403Sralph #define R5 5 1618403Sralph 1718403Sralph /* 1818403Sralph * Register variables 1918403Sralph */ 2018403Sralph #define R6 6 2118403Sralph #define R7 7 2218403Sralph #define R8 8 2318403Sralph #define R9 9 2418403Sralph #define R10 10 2518403Sralph #define R11 11 2618403Sralph 2718403Sralph /* 2818403Sralph * Special purpose registers 2918403Sralph */ 3018403Sralph #define AP 12 /* argument pointer */ 3118403Sralph #define FP 13 /* frame pointer */ 3218403Sralph #define SP 14 /* stack pointer */ 3318403Sralph #define PC 15 /* program counter */ 3418403Sralph 3518403Sralph #define REGSZ 16 3618403Sralph #define TMPREG FP 3718403Sralph 3818403Sralph #define R2REGS 1 /* permit double indexing */ 3918403Sralph 4018403Sralph extern int fregs; 4118403Sralph extern int maxargs; 4218403Sralph 4318403Sralph #define BYTEOFF(x) ((x)&03) 4418403Sralph #define wdal(k) (BYTEOFF(k)==0) /* word align */ 4518403Sralph #define BITOOR(x) ((x)>>3) /* bit offset to oreg offset */ 4618403Sralph 4718403Sralph /* 4818403Sralph * Some macros used in store(): 4918403Sralph * just evaluate the arguments, and be done with it... 5018403Sralph */ 5118403Sralph #define STOARG(p) 5218403Sralph #define STOFARG(p) 5318403Sralph #define STOSTARG(p) 5418403Sralph #define genfcall(a,b) gencall(a,b) 5518403Sralph 56*24417Smckusick /* 57*24417Smckusick * Some short routines that get called an awful lot are actually macros. 58*24417Smckusick */ 59*24417Smckusick #if defined(FORT) || defined(SPRECC) 60*24417Smckusick #define szty(t) ((t) == DOUBLE ? 2 : 1) 61*24417Smckusick #else 62*24417Smckusick #define szty(t) (((t) == DOUBLE || (t) == FLOAT) ? 2 : 1) 63*24417Smckusick #endif 64*24417Smckusick #define shltype(o, p) \ 65*24417Smckusick ((o) == REG || (o) == NAME || (o) == ICON || \ 66*24417Smckusick (o) == OREG || ((o) == UNARY MUL && shumul((p)->in.left))) 67*24417Smckusick #define ncopy(q, p) ((q)->in = (p)->in) 68*24417Smckusick 6918403Sralph #define MYREADER(p) myreader(p) 7018403Sralph int optim2(); 7118403Sralph 7218403Sralph /* This indicates there are no additional special shapes, see match.c */ 7318403Sralph #define special(a, b) 0 74