Mercurial > hg > CbC > old > device
comparison mc.h @ 452:8e3284b0a8c9
minor update
author | kono |
---|---|
date | Mon, 29 Nov 2004 04:15:38 +0900 (2004-11-28) |
parents | 656ec59cd79f |
children | 1e5ca85d3f97 |
comparison
equal
deleted
inserted
replaced
451:656ec59cd79f | 452:8e3284b0a8c9 |
---|---|
137 #define FCONST (FOP+CONST) | 137 #define FCONST (FOP+CONST) |
138 #define LCONST (LOP+CONST) | 138 #define LCONST (LOP+CONST) |
139 #define STRING 8 | 139 #define STRING 8 |
140 #define FNAME 9 | 140 #define FNAME 9 |
141 #define LCALL 10 | 141 #define LCALL 10 |
142 #define LABEL 11 | 142 #define COMMENT 11 |
143 #define DECL 12 | |
144 #define COMP 13 | |
145 #define LABEL 14 | |
143 | 146 |
144 #define NULLARY_ARGS(i) (i==RETURN||i==ENVIRONMENT||i==LCALL||i==REGISTER||i==DREGISTER||i==FREGISTER||i==LREGISTER||(GVAR<=(i%SOP)&&(i%SOP)<=LABEL)) | 147 #define NULLARY_ARGS(i) (i==RETURN||i==ENVIRONMENT||i==LCALL||i==REGISTER||i==DREGISTER||i==FREGISTER||i==LREGISTER||(GVAR<=(i%SOP)&&(i%SOP)<=LABEL)) |
145 | 148 |
146 /* unary argments */ | 149 /* unary argments */ |
147 | 150 |
148 #define ADDRESS 12 | 151 #define ADDRESS 15 |
149 #define MINUS 13 | 152 #define MINUS 16 |
150 #define LNOT 14 | 153 #define LNOT 17 |
151 #define BNOT 15 | 154 #define BNOT 18 |
152 #define INC 16 | 155 #define INC 19 |
153 #define POSTINC 17 | 156 #define POSTINC 20 |
154 #define UPOSTINC 18 | 157 #define UPOSTINC 21 |
155 #define PREINC 19 | 158 #define PREINC 22 |
156 #define UPREINC 20 | 159 #define UPREINC 23 |
157 #define POSTDEC 21 | 160 #define POSTDEC 24 |
158 #define UPOSTDEC 22 | 161 #define UPOSTDEC 25 |
159 #define PREDEC 23 | 162 #define PREDEC 26 |
160 #define UPREDEC 24 | 163 #define UPREDEC 27 |
161 #define DEC 25 | 164 #define DEC 28 |
162 #define CPOSTINC (COP+POSTINC) | 165 #define CPOSTINC (COP+POSTINC) |
163 #define CUPOSTINC (COP+UPOSTINC) | 166 #define CUPOSTINC (COP+UPOSTINC) |
164 #define CPREINC (COP+PREINC) | 167 #define CPREINC (COP+PREINC) |
165 #define CUPREINC (COP+UPREINC) | 168 #define CUPREINC (COP+UPREINC) |
166 #define CPOSTDEC (COP+POSTDEC) | 169 #define CPOSTDEC (COP+POSTDEC) |
181 #define DPREINC (DOP+PREINC) | 184 #define DPREINC (DOP+PREINC) |
182 #define LPOSTINC (LOP+POSTINC) | 185 #define LPOSTINC (LOP+POSTINC) |
183 #define LPREINC (LOP+PREINC) | 186 #define LPREINC (LOP+PREINC) |
184 #define LUPOSTINC (LOP+UPOSTINC) | 187 #define LUPOSTINC (LOP+UPOSTINC) |
185 #define LUPREINC (LOP+UPREINC) | 188 #define LUPREINC (LOP+UPREINC) |
186 #define INDIRECT 26 | 189 #define INDIRECT 29 |
187 #define RINDIRECT 27 | 190 #define RINDIRECT 30 |
188 #define URINDIRECT 28 | 191 #define URINDIRECT 31 |
189 #define CRINDIRECT (COP+RINDIRECT) | 192 #define CRINDIRECT (COP+RINDIRECT) |
190 #define CURINDIRECT (COP+URINDIRECT) | 193 #define CURINDIRECT (COP+URINDIRECT) |
191 #define SRINDIRECT (SOP+RINDIRECT) | 194 #define SRINDIRECT (SOP+RINDIRECT) |
192 #define SURINDIRECT (SOP+URINDIRECT) | 195 #define SURINDIRECT (SOP+URINDIRECT) |
193 #define FRINDIRECT (FOP+RINDIRECT) | 196 #define FRINDIRECT (FOP+RINDIRECT) |
194 #define DRINDIRECT (DOP+RINDIRECT) | 197 #define DRINDIRECT (DOP+RINDIRECT) |
195 #define LRINDIRECT (LOP+RINDIRECT) | 198 #define LRINDIRECT (LOP+RINDIRECT) |
196 #define LURINDIRECT (LOP+URINDIRECT) | 199 #define LURINDIRECT (LOP+URINDIRECT) |
197 #define RSTRUCT 29 | 200 #define RSTRUCT 32 |
198 #define ALLOCA 30 | 201 #define ALLOCA 33 |
199 #define BIT_FIELD 31 | 202 #define BIT_FIELD 34 |
200 #define RBIT_FIELD 32 | 203 #define RBIT_FIELD 35 |
201 #define BPREINC 33 | 204 #define BPREINC 36 |
202 #define BPOSTINC 34 | 205 #define BPOSTINC 37 |
203 #define CONV 35 | 206 #define CONV 38 |
204 | 207 |
205 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV) | 208 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV) |
206 | 209 |
207 /* binary argments */ | 210 /* binary argments */ |
208 | 211 |
209 #define MUL 36 | 212 #define MUL 39 |
210 #define UMUL 37 | 213 #define UMUL 40 |
211 #define DIV 38 | 214 #define DIV 41 |
212 #define UDIV 39 | 215 #define UDIV 42 |
213 #define MOD 40 | 216 #define MOD 43 |
214 #define UMOD 41 | 217 #define UMOD 44 |
215 #define ADD 42 | 218 #define ADD 45 |
216 #define SUB 43 | 219 #define SUB 46 |
217 #define CMP 44 | 220 #define CMP 47 |
218 #define RSHIFT 45 | 221 #define RSHIFT 48 |
219 #define URSHIFT 46 | 222 #define URSHIFT 49 |
220 #define LSHIFT 47 | 223 #define LSHIFT 50 |
221 #define ULSHIFT 48 | 224 #define ULSHIFT 51 |
222 #define GT 49 | 225 #define GT 52 |
223 #define UGT 50 | 226 #define UGT 53 |
224 #define GE 51 | 227 #define GE 54 |
225 #define UGE 52 | 228 #define UGE 55 |
226 #define LT 53 | 229 #define LT 56 |
227 #define ULT 54 | 230 #define ULT 57 |
228 #define LE 55 | 231 #define LE 58 |
229 #define ULE 56 | 232 #define ULE 59 |
230 #define EQ 57 | 233 #define EQ 60 |
231 #define NEQ 58 | 234 #define NEQ 61 |
232 #define BAND 59 | 235 #define BAND 62 |
233 #define EOR 60 | 236 #define EOR 63 |
234 #define BOR 61 | 237 #define BOR 64 |
235 #define LAND 62 | 238 #define LAND 65 |
236 #define LOR 63 | 239 #define LOR 66 |
237 #define ASS 64 | 240 #define ASS 67 |
238 #define UCMP 65 | 241 #define UCMP 68 |
239 #define UCMPGE 66 | 242 #define UCMPGE 69 |
240 #define CMPGE 67 | 243 #define CMPGE 70 |
241 #define CMPEQ 68 | 244 #define CMPEQ 71 |
242 #define CMPNEQ 69 | 245 #define CMPNEQ 72 |
243 #define ASSOP 70 | 246 #define ASSOP 73 |
244 #define COMMA 71 | 247 #define COMMA 74 |
245 | 248 |
246 #define CASS 72 | 249 #define CASS 75 |
247 #define CASSOP 73 | 250 #define CASSOP 76 |
248 #define CUASSOP 74 | 251 #define CUASSOP 77 |
249 | 252 |
250 #define SASS (SOP+CASS) | 253 #define SASS (SOP+CASS) |
251 #define SASSOP (SOP+CASSOP) | 254 #define SASSOP (SOP+CASSOP) |
252 #define SUASSOP (SOP+CUASSOP) | 255 #define SUASSOP (SOP+CUASSOP) |
253 | 256 |
299 #define LURSHIFT (LOP+URSHIFT) | 302 #define LURSHIFT (LOP+URSHIFT) |
300 #define LBAND (LOP+BAND) | 303 #define LBAND (LOP+BAND) |
301 #define LEOR (LOP+EOR) | 304 #define LEOR (LOP+EOR) |
302 #define LBOR (LOP+BOR) | 305 #define LBOR (LOP+BOR) |
303 | 306 |
304 #define BASS 75 | 307 #define BASS 78 |
305 #define BASSOP 76 | 308 #define BASSOP 79 |
306 #define BFD_REPL 77 | 309 #define BFD_REPL 80 |
307 | 310 |
308 #define STASS 78 | 311 #define STASS 81 |
309 | 312 |
310 | 313 |
311 #define BINARY_ARGS(i) (MUL<=(i%SOP)&&(i%SOP)<=STASS) | 314 #define BINARY_ARGS(i) (MUL<=(i%SOP)&&(i%SOP)<=STASS) |
312 | 315 |
313 /* tarnary argments */ | 316 /* tarnary argments */ |
314 | 317 |
315 #define COND 79 | 318 #define COND 82 |
316 #define SCOND (SOP+COND) | 319 #define SCOND (SOP+COND) |
317 #define DCOND (DOP+COND) | 320 #define DCOND (DOP+COND) |
318 #define FCOND (FOP+COND) | 321 #define FCOND (FOP+COND) |
319 #define LCOND (LOP+COND) | 322 #define LCOND (LOP+COND) |
320 | 323 |
321 #define TARNARY_ARGS(i) (COND==(i%SOP)) | 324 #define TARNARY_ARGS(i) (COND==(i%SOP)) |
322 | 325 |
323 /* not appeared as tags */ | 326 /* not appeared as tags */ |
324 | 327 |
325 #define LPAR 80 | 328 #define LPAR 83 |
326 #define RPAR 81 | 329 #define RPAR 84 |
327 #define LBRA 82 | 330 #define LBRA 85 |
328 #define RBRA 83 | 331 #define RBRA 86 |
329 #define LC 84 | 332 #define LC 87 |
330 #define RC 85 | 333 #define RC 88 |
331 #define COLON 86 | 334 #define COLON 89 |
332 #define SM 87 | 335 #define SM 90 |
333 #define PERIOD 88 | 336 #define PERIOD 91 |
334 #define ARROW 89 | 337 #define ARROW 92 |
335 #define CNAME 90 | 338 #define CNAME 93 |
336 | 339 |
337 #define I2C 91 | 340 #define I2C 94 |
338 #define I2S 92 | 341 #define I2S 95 |
339 #define I2I 93 | 342 #define I2I 96 |
340 #define I2U 94 | 343 #define I2U 97 |
341 #define I2D 95 | 344 #define I2D 98 |
342 #define I2F 96 | 345 #define I2F 99 |
343 #define I2LL 97 | 346 #define I2LL 100 |
344 #define I2ULL 98 | 347 #define I2ULL 101 |
345 | 348 |
346 #define U2UC 99 | 349 #define U2UC 102 |
347 #define U2US 100 | 350 #define U2US 103 |
348 #define U2I 101 | 351 #define U2I 104 |
349 #define U2U 102 | 352 #define U2U 105 |
350 #define U2D 103 | 353 #define U2D 106 |
351 #define U2F 104 | 354 #define U2F 107 |
352 #define U2LL 105 | 355 #define U2LL 108 |
353 #define U2ULL 106 | 356 #define U2ULL 109 |
354 | 357 |
355 | 358 |
356 #define D2I (DOP+I2I) | 359 #define D2I (DOP+I2I) |
357 #define D2U (DOP+I2U) | 360 #define D2U (DOP+I2U) |
358 #define D2D (DOP+I2D) | 361 #define D2D (DOP+I2D) |
421 /* | 424 /* |
422 For this comiler 8192*2 is Ok. Linux kernel requires 8192*4. | 425 For this comiler 8192*2 is Ok. Linux kernel requires 8192*4. |
423 */ | 426 */ |
424 #define GSYMS (8192*4) | 427 #define GSYMS (8192*4) |
425 #define HEAPSIZE 30000 | 428 #define HEAPSIZE 30000 |
426 #define CHEAPSIZE (sizeof(NMTBL)*GSYMS) | 429 #define CHEAPSIZE (sizeof(NMTBL)*8192) |
427 #define LBUFSIZE 4096 | 430 #define LBUFSIZE 4096 |
428 #define STRSIZE 4096 | 431 #define STRSIZE 4096 |
429 | 432 |
430 typedef struct nametable { | 433 typedef struct nametable { |
431 char *nm; | 434 char *nm; |
432 struct nametable *next; | 435 struct nametable *next; |
433 int sc,attr; | 436 int sc,attr; |
434 int ty,dsp; } NMTBL; | 437 int ty,dsp; } NMTBL; |
435 | 438 |
436 extern int *heap; | 439 extern int *heap; /* heap area (in cheap ) */ |
437 extern NMTBL *global_list,*local_static_list; | 440 extern NMTBL *global_list; /* list of all global NMTBL */ |
441 extern NMTBL *local_static_list; /* list of local static variable */ | |
438 | 442 |
439 #if FLOAT_CODE | 443 #if FLOAT_CODE |
440 extern int dlist2(int e1, double e2); | 444 extern int dlist2(int e1, double e2); |
441 #endif | 445 #endif |
442 #if LONGLONG_CODE | 446 #if LONGLONG_CODE |