Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.7
 
1.8
 
MAIN:ragge:20140603201950
 
macdefs.h
_>3333  */
 3434 #define makecc(val,i)   lastcon = (lastcon<<8)|(val);
 3535 
<>36 -#define ARGINIT         16      /* adjusted in MD code */
 37 -#define AUTOINIT        16      /* adjusted in MD code */
 38 -
3936 /*
 4037  * Storage space requirements
 4138  */
     
 !
8178 #define MIN_LONG        0x80000000L
 8279 #define MAX_LONG        0x7fffffffL
 8380 #define MAX_ULONG       0xffffffffUL
<>84 -#define MIN_LONGLONG    MIN_LONG
 85 -#define MAX_LONGLONG    MAX_LONG
 86 -#define MAX_ULONGLONG   MAX_ULONG
  81+#define MIN_LONGLONG    0x8000000000000000LL
  82+#define MAX_LONGLONG    0x7fffffffffffffffLL
  83+#define MAX_ULONGLONG   0xffffffffffffffffULL
8784 
 8885 /* Default char is unsigned */
 8986 #define CHAR_UNSIGNED
<>90 -#define WORD_ADDRESSED
  87+#define WORD_ADDRESSED
9188 #define BOOL_TYPE       UCHAR
 9289 #define MYALIGN         /* provide private alignment function */
 9390 
     
 !
9895 typedef unsigned long U_CONSZ;
 9996 typedef long OFFSZ;
 10097 
<>101 -#define CONFMT  "%ld"           /* format for printing constants */
 102 -#define LABFMT  ".L%d"          /* format for printing labels */
 103 -#define STABLBL ".LL%d"         /* format for stab (debugging) labels */
 104 -#ifdef FORTRAN
 105 -#define XL 8
 106 -#define FLABELFMT "%s:\n"
 107 -#define USETEXT ".text"
 108 -#define USECONST ".data\t0"     /* XXX - fix */
 109 -#define USEBSS  ".data\t1"      /* XXX - fix */
 110 -#define USEINIT ".data\t2"      /* XXX - fix */
 111 -#define MAXREGVAR 3             /* XXX - fix */
 112 -#define BLANKCOMMON "_BLNK_"
 113 -#define MSKIREG  (M(TYSHORT)|M(TYLONG))
 114 -#define TYIREG TYLONG
 115 -#define FSZLENG  FSZLONG
 116 -#define FUDGEOFFSET 1
 117 -#define AUTOREG EBP
 118 -#define ARGREG  EBP
 119 -#define ARGOFFSET 4
 120 -#endif
  98+#define CONFMT  "0%lo"          /* format for printing constants */
  99+#define LABFMT  "L%d"           /* format for printing labels */
  100+#define STABLBL "LL%d"          /* format for stab (debugging) labels */
121101 
 122102 #define BACKAUTO                /* stack grows negatively for automatics */
 123103 #define BACKTEMP                /* stack grows negatively for temporaries */
<> 104+#define ARGINIT         0       /* first arg at 0 offset */
  105+#define AUTOINIT        32      /* first var below 32-bit offset */
124106 
<>125 -#undef  FIELDOPS                /* no bit-field instructions */
 126 -#define TARGET_ENDIAN TARGET_LE
127107 
<> 108+#undef  FIELDOPS        /* no bit-field instructions */
  109+#define TARGET_ENDIAN   TARGET_BE
  110+
128111 /* Definitions mostly used in pass2 */
 129112 
 130113 #define BYTEOFF(x)      ((x)&01)
 131114 #define wdal(k)         (BYTEOFF(k)==0)
 132115 
<>133 -#define STOARG(p)
 134 -#define STOFARG(p)
 135 -#define STOSTARG(p)
 136 -#define genfcall(a,b)   gencall(a,b)
  116+#define szty(t) ((t) == DOUBLE || (t) == LDOUBLE || \
  117+        (t) == LONGLONG || (t) == ULONGLONG ? 4 : \
  118+        ((t) == LONG || (t) == ULONG || (t) == FLOAT) ? 2 : 1)
137119 
<>138 -#define szty(t) (((t) == DOUBLE || (t) == LDOUBLE) ? 4 : \
 139 -        ((t) == LONGLONG || (t) == ULONGLONG || \
 140 -         (t) == LONG || (t) == ULONG) ? 2 : 1)
 141 -
142120 /*
<>143 - * The Nova has three register classes.  Note that the space used in
 144 - * zero page is considered registers.
 145 - * Register 28 and 29 are FP and SP.
  121+ * The Nova has two register classes.  Note that the space used in
  122+ * zero page is considered stack.
  123+ * Register 6 and 7 are FP and SP (in zero page).
146124  *
 147125  * The classes used on Nova are:
 148126  *      A - AC0-AC3 (as non-index registers)    : reg 0-3
<>149 - *      B - AC2-AC3 (as index registers)        : reg 2-3
 150 - *      C - address 50-77 in memory             : reg 4-27
  127+ *      B - AC2-AC3 (as index registers)        : reg 4-5
  128+ * FP/SP as 6/7.
151129  */
<>152 -#define MAXREGS 30      /* 0-29 */
  130+#define MAXREGS 8       /* 0-29 */
153131 
 154132 #define RSTATUS \
<>155 -        SAREG|TEMPREG, SAREG|TEMPREG, SAREG|SBREG|TEMPREG, SAREG|SBREG|TEMPREG,\
 156 -        SCREG|TEMPREG, SCREG|TEMPREG, SCREG|TEMPREG, SCREG|TEMPREG,     \
 157 -        SCREG|TEMPREG, SCREG|TEMPREG, SCREG|TEMPREG, SCREG|TEMPREG,     \
 158 -        SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG,     \
 159 -        SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG,     \
 160 -        SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG,     \
 161 -        SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG, SCREG|PERMREG,     \
 162 -        0,      0
  133+        SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG, SAREG|TEMPREG,     \
  134+        SBREG|TEMPREG, SBREG|TEMPREG, 0, 0
163135 
 164136 #define ROVERLAP \
<>165 -        { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, \
 166 -        { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, \
 167 -        { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, \
 168 -        { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 },
  137+        { -1 }, { -1 }, { 4, -1 }, { 5, -1 }, { 2, -1 }, { 3, -1 },     \
  138+        { -1 }, { -1 }
169139 
<>170 -
171140 /* Return a register class based on the type of the node */
<>172 -/* all types in all classes */
 173 -#define PCLASS(p) (SAREG|SBREG|SCREG)
  141+/* Used in tshape, avoid matching fp/sp as reg */
  142+#define PCLASS(p) (p->n_op == REG && regno(p) > 5 ? 0 : \
  143+        ISPTR(p->n_type) ? SBREG : SAREG)
174144 
<>175 -#define NUMCLASS        4       /* highest number of reg classes used */
 176 -                                /* XXX - must be 4 */
  145+#define NUMCLASS        2       /* highest number of reg classes used */
177146 
 178147 int COLORMAP(int c, int *r);
<>179 -#define GCLASS(x) (x < 4 ? CLASSA : CLASSC)
  148+#define GCLASS(x) (x < 4 ? CLASSA : CLASSB)
180149 #define DECRA(x,y)      (((x) >> (y*6)) & 63)   /* decode encoded regs */
 181150 #define ENCRD(x)        (x)             /* Encode dest reg in n_reg */
 182151 #define ENCRA1(x)       ((x) << 6)      /* A1 */
 183152 #define ENCRA2(x)       ((x) << 12)     /* A2 */
 184153 #define ENCRA(x,y)      ((x) << (6+y*6))        /* encode regs in int */
 185154 #define RETREG(x)       (0) /* ? Sanity */
 186155 
<_187 -/* XXX - to die */
 188 -#define FPREG   28      /* frame pointer */
 189 -#define STKREG  29      /* stack pointer */
  156+#define FPREG   6       /* frame pointer */
  157+#define STKREG  7       /* stack pointer */
  158+
  159+#define MAXZP   030     /* number of locations used as stack */
  160+#define ZPOFF   050     /* offset of zero page regs */
  161+
  162+#define MYSTOREMOD
  163+#define MYLONGTEMP(p,w) {                                       \
  164+        if (w->r_class == 0) {                                  \
  165+                w->r_color = freetemp(szty(p->n_type));         \
  166+                w->r_class = FPREG;                             \
  167+        }                                                       \
  168+        if (w->r_color < MAXZP*2) { /* color in bytes */        \
  169+                p->n_op = NAME;                                 \
  170+                p->n_lval = w->r_color/2 + ZPOFF;               \
  171+                p->n_name = "";                                 \
  172+                break;                                          \
  173+        }                                                       \
  174+}
  175+
  176+/*
  177+ * special shapes for sp/fp.
  178+ */
  179+#define SLDFPSP         (MAXSPECIAL+1)  /* load fp or sp */
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-22 09:30 +0100