Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.2
 
1.3
 
MAIN:gmcgarry:20071116001740
 
macdefs.h
_>3535  * Machine-dependent defines for both passes.
 3636  */
 3737 
<> 38+#if TARGOS == netbsd
  39+#define USE_GAS
  40+#endif
  41+
3842 /*
 3943  * Convert (multi-)character constant to integer.
 4044  * Assume: If only one value; store at left side (char size), otherwise
 4145  * treat it as an integer.
 4246  */
 4347 #define makecc(val,i)   lastcon = (lastcon<<8)|((val<<24)>>24);
 4448 
<>45 -#define ARGINIT         (8*8)   /* # bits above fp where arguments start */
 46 -#define AUTOINIT        0       /* # bits below fp where automatics start */
  49+#define ARGINIT         (12*8)  /* # bits above fp where arguments start */
  50+#define AUTOINIT        (0)     /* # bits below fp where automatics start */
4751 
 4852 /*
 4953  * Storage space requirements
     
 !
5357 #define SZINT           32
 5458 #define SZFLOAT         32
 5559 #define SZDOUBLE        64
<>56 -#define SZLDOUBLE       96
  60+#define SZLDOUBLE       128
5761 #define SZLONG          32
 5862 #define SZSHORT         16
 5963 #define SZLONGLONG      64
     
 !
107111 typedef long long OFFSZ;
 108112 
 109113 #define CONFMT  "%lld"          /* format for printing constants */
<> 114+#ifdef USE_GAS
  115+#define LABFMT  "$L%d"          /* format for printing labels */
  116+#define STABLBL "$LL%d"         /* format for stab (debugging) labels */
  117+#else
110118 #define LABFMT  "L%d"           /* format for printing labels */
 111119 #define STABLBL "LL%d"          /* format for stab (debugging) labels */
<>112 -#ifdef FORTRAN
 113 -#define XL 8
 114 -#define FLABELFMT "%s:\n"
 115 -#define USETEXT ".text"
 116 -#define USECONST ".data\t0"     /* XXX - fix */
 117 -#define USEBSS  ".data\t1"      /* XXX - fix */
 118 -#define USEINIT ".data\t2"      /* XXX - fix */
 119 -#define MAXREGVAR 3             /* XXX - fix */
 120 -#define BLANKCOMMON "_BLNK_"
 121 -#define MSKIREG  (M(TYSHORT)|M(TYLONG))
 122 -#define TYIREG TYLONG
 123 -#define FSZLENG  FSZLONG
 124 -#define FUDGEOFFSET 1
 125 -#define AUTOREG EBP
 126 -#define ARGREG  EBP
 127 -#define ARGOFFSET 4
128120 #endif
 129121 
 130122 #define BACKAUTO                /* stack grows negatively for automatics */
 131123 #define BACKTEMP                /* stack grows negatively for temporaries */
 132124 
<>133 -#define MYP2TREE(p) myp2tree(p);
 134 -
135125 #undef  FIELDOPS                /* no bit-field instructions */
 136126 #define RTOLBYTES               /* bytes are numbered right to left */
 137127 
     
 !
140130 /* Definitions mostly used in pass2 */
 141131 
 142132 #define BYTEOFF(x)      ((x)&03)
<>143 -#define wdal(k)         (BYTEOFF(k)==0)
 144 -#define BITOOR(x)       ((x)/SZCHAR)    /* bit offset to oreg offset */
  133+#define BITOOR(x)       (x)     /* bit offset to oreg offset */
145134 
<>146 -#define STOARG(p)
 147 -#define STOFARG(p)
 148 -#define STOSTARG(p)
 149 -#define genfcall(a,b)   gencall(a,b)
 150 -
151135 #define szty(t) (((t) == DOUBLE || (t) == FLOAT || \
 152136         (t) == LONGLONG || (t) == ULONGLONG) ? 2 : 1)
 153137 
 154138 /*
 155139  * Register names.  These must match rnames[] and rstatus[] in local2.c.
<>156 - * The crazy order of the registers are due to the current register
 157 - * allocations strategy and should be fixed.
158140  */
<>159 -#define T0 0    
 160 -#define T1 1    
 161 -#define T2 2    
 162 -#define T3 3    
 163 -#define T4 4    
 164 -#define T5 5    
 165 -#define T6 6    
 166 -#define T7 7
 167 -#define T8 8
 168 -#define T9 9
  141+#define ZERO    0
  142+#define AT      1
  143+#define V0      2
  144+#define V1      3
  145+#define A0      4
  146+#define A1      5
  147+#define A2      6
  148+#define A3      7
  149+#if defined(MIPS_N32) || defined(MIPS_N64)
  150+#define A4      8
  151+#define A5      9
  152+#define A6      10
  153+#define A7      11
  154+#define T0      12
  155+#define T1      13
  156+#define T2      14
  157+#define T3      15
  158+#else
  159+#define T0      8
  160+#define T1      9
  161+#define T2      10
  162+#define T3      11
  163+#define T4      12
  164+#define T5      13
  165+#define T6      14
  166+#define T7      15
  167+#endif
  168+#define S0      16
  169+#define S1      17
  170+#define S2      18
  171+#define S3      19
  172+#define S4      20
  173+#define S5      21
  174+#define S6      22
  175+#define S7      23
  176+#define T8      24
  177+#define T9      25
  178+#define K0      26
  179+#define K1      27
  180+#define GP      28
  181+#define SP      29
  182+#define FP      30
  183+#define RA      31
169184 
<>170 -#define V0 10
 171 -#define V1 11
  185+#define V0V1    32
  186+#define A0A1    33
  187+#define A1A2    34
  188+#define A2A3    35
  189+#if defined(MIPS_N32) || defined(MIPS_N64)
  190+#define A3A4    36
  191+#define A4A5    37
  192+#define A5A6    38
  193+#define A6A7    39
  194+#define T0T1    41
  195+#define T1T2    42
  196+#define T2T3    43
  197+#else
  198+#define T0T1    37
  199+#define T1T2    38
  200+#define T2T3    39
  201+#define T3T4    40
  202+#define T4T5    41
  203+#define T5T6    42
  204+#define T6T7    43
  205+#endif
  206+#define T8T9    44
  207+#define S0S1    45
  208+#define S1S2    46
  209+#define S2S3    47
  210+#define S3S4    48
  211+#define S4S5    49
  212+#define S5S6    50
  213+#define S6S7    51
172214 
<>173 -#define ZERO 12
 174 -#define AT 13
  215+#define F0      52
  216+#define F1      53
  217+#define F2      54
175218 
<>176 -#define A0 14
 177 -#define A1 15
 178 -#define A2 16
 179 -#define A3 17
  219+#define MAXREGS 55
  220+#define NUMCLASS 3
180221 
<>181 -#define S0 18
 182 -#define S1 19
 183 -#define S2 20
 184 -#define S3 21
 185 -#define S4 22
 186 -#define S5 23
 187 -#define S6 24
 188 -#define S7 25
 189 -
 190 -#define K0 26
 191 -#define K1 27
 192 -
 193 -#define GP 28
 194 -#define SP 29
 195 -#define FP 30
 196 -#define RA 31
 197 -
 198 -#define A0A1    32
 199 -#define A1A2    33
 200 -#define A2A3    34
 201 -#define T0T1    35
 202 -#define T1T2    36
 203 -#define T2T3    37
 204 -#define T3T4    38
 205 -#define T4T5    39
 206 -#define T5T6    40
 207 -#define T6T7    41
 208 -
 209 -#define RETREG(x)       V0
  222+#define RETREG(x)       ((x) == ULONGLONG || (x) == LONGLONG ? V0V1 : V0)
210223 #define FPREG   FP      /* frame pointer */
 211224 #define STKREG  SP
 212225 
<>213 -#define MINRVAR S0      /* first register variable */
 214 -#define MAXRVAR S7      /* last register variable */
 215 -#define NREGREG (MAXRVAR-MINRVAR+1)
  226+#if defined(MIPS_N32) || defined(MIPS_N64)
  227+#define MIPS_NARGREGS   8
  228+#else
  229+#define MIPS_NARGREGS   4
  230+#endif
216231 
<>217 -#define MAXREGS 32
 218 -#define NUMCLASS 4
 219 -
220232 #define RSTATUS \
<> 233+        0, 0,                                                           \
  234+        SAREG|TEMPREG, SAREG|TEMPREG,                                   \
221235         SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG,     \
 222236         SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG,     \
 223237         SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG,     \
<>224 -        0, 0,                                                           \
 225 -        SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG,     \
226238         SAREG|PERMREG, SAREG|PERMREG, SAREG|PERMREG, SAREG|PERMREG,     \
 227239         SAREG|PERMREG, SAREG|PERMREG, SAREG|PERMREG, SAREG|PERMREG,     \
<> 240+        SAREG|TEMPREG, SAREG|TEMPREG,                                   \
228241         0, 0,                                                           \
<>229 -        0, 0, 0, 0
  242+        0, 0, 0, 0,                                                     \
  243+        \
  244+        SBREG|TEMPREG,                                                  \
  245+        SBREG|TEMPREG, SBREG|TEMPREG, SBREG|TEMPREG,                    \
  246+        SBREG|TEMPREG, /* only available on n32/n64 */                  \
  247+        SBREG|TEMPREG, SBREG|TEMPREG, SBREG|TEMPREG,                    \
  248+        SBREG|TEMPREG, /* only available on o32 */                      \
  249+        SBREG|TEMPREG,                                                  \
  250+        SBREG|TEMPREG, SBREG|TEMPREG, SBREG|TEMPREG,                    \
  251+        SBREG, SBREG, SBREG, SBREG,                                     \
  252+        SBREG, SBREG, SBREG,                                            \
  253+        SCREG, SCREG, SCREG
230254 
 231255 #define ROVERLAP \
<> 256+        { -1 }, { -1 },                                                 \
  257+        { V0V1, -1 }, { V0V1, -1 },                                     \
  258+        { A0A1, -1 },                                                   \
  259+        { A0A1, A1A2, -1 },                                             \
  260+        { A1A2, A2A3, -1 },                                             \
  261+        { A2A3, -1 },                                                   \
  262+        \
  263+        { T0T1, -1 },                                                   \
  264+        { T0T1, T1T2, -1 },                                             \
  265+        { T1T2, T2T3, -1 },                                             \
  266+        { T2T3, T3T4, -1 },                                             \
  267+        { T3T4, T4T5, -1 },                                             \
  268+        { T4T5, T5T6, -1 },                                             \
  269+        { T5T6, T6T7, -1 },                                             \
  270+        { T6T7, -1 },                                                   \
  271+        \
  272+        { S0S1, -1 },                                                   \
  273+        { S0S1, S1S2, -1 },                                             \
  274+        { S1S2, S2S3, -1 },                                             \
  275+        { S2S3, S3S4, -1 },                                             \
  276+        { S3S4, S4S5, -1 },                                             \
  277+        { S4S5, S5S6, -1 },                                             \
  278+        { S5S6, S6S7, -1 },                                             \
  279+        { S6S7, -1 },                                                   \
  280+        \
  281+        { T8T9, -1 },                                                   \
  282+        { T8T9, -1 },                                                   \
  283+        \
  284+        { -1 }, { -1 },                                                 \
232285         { -1 }, { -1 }, { -1 }, { -1 },                                 \
<>233 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 234 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 235 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 236 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 237 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 238 -        { -1 }, { -1 }, { -1 }, { -1 },                                 \
 239 -        { -1 }, { -1 }, { -1 }, { -1 }
  286+        \
  287+        { V0, V1, -1 },                                                 \
  288+        \
  289+        { A0, A1, -1 },                                                 \
  290+        { A1, A2, -1 },                                                 \
  291+        { A2, A3, -1 },                                                 \
  292+        \
  293+        { -1 }, /* only useful on n32/n64 */                            \
  294+        { T0, T1, T1T2, -1 },                                           \
  295+        { T1, T2, T0T1, T2T3, -1 },                                     \
  296+        { T2, T3, T1T2, T3T4, -1 },                                     \
  297+        { T3, T4, T2T3, T4T5, -1 }, /* only useful on o32 */            \
  298+        { T4, T5, T3T4, T5T6, -1 },                                     \
  299+        { T5, T6, T4T5, T6T7, -1 },                                     \
  300+        { T6, T7, T5T6, -1 },                                           \
  301+        \
  302+        { T8, T9, -1 },                                                 \
  303+        \
  304+        { S0, S1, S1S2, -1 },                                           \
  305+        { S1, S2, S0S1, S2S3, -1 },                                     \
  306+        { S2, S3, S1S2, S3S4, -1 },                                     \
  307+        { S3, S4, S2S3, S4S5, -1 },                                     \
  308+        { S4, S5, S3S4, S5S6, -1 },                                     \
  309+        { S5, S6, S4S5, S6S7, -1 },                                     \
  310+        { S6, S7, S5S6, -1 },                                           \
  311+        \
  312+        { -1 },                                                         \
  313+        { -1 },                                                         \
  314+        { -1 },
240315 
<>241 -#define GCLASS(x)       CLASSA
 242 -#define PCLASS(p)       SAREG
  316+
  317+#define GCLASS(x)       (x < 32 ? CLASSA : (x < 52 ? CLASSB : CLASSC))
  318+#define PCLASS(p) (p->n_type == LONGLONG || p->n_type == ULONGLONG ? SBREG : \
  319+                  (p->n_type >= FLOAT && p->n_type <= LDOUBLE ? SCREG : SAREG))
243320 #define DECRA(x,y)      (((x) >> (y*6)) & 63)   /* decode encoded regs */
 244321 #define ENCRA(x,y)      ((x) << (6+y*6))        /* encode regs in int */
<>245 -#if 0
 246 -#define GCLASS(x)       CLASSA
 247 -#define ENCRD(x)        (x)             /* Encode dest reg in n_reg */
 248 -#define ENCRA1(x)       ((x) << 6)      /* A1 */
 249 -#define ENCRA2(x)       ((x) << 12)     /* A2 */
 250 -#endif
251322 
 252323 int COLORMAP(int c, int *r);
<_253 -
 254 -#define MYREADER(p) myreader(p)
 255 -#define MYCANON(p) mycanon(p)
 256 -#define MYOPTIM
 257 -
 258 -#define special(a, b)   SRNOPE
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-02 11:19 +0200