Mercurial > hg > CbC > old > device
annotate mc.h @ 607:e055df7c1082
*** empty log message ***
author | kono |
---|---|
date | Mon, 06 Feb 2006 16:01:32 +0900 |
parents | 429ec87e03e7 |
children | af6b9ae79583 |
rev | line source |
---|---|
0 | 1 /* Micro-C header file */ |
2 | |
607 | 3 |
4 /************************************************************************ | |
5 ** Copyright (C) 2006 Shinji Kono | |
6 ** 連絡先: 琉球大学情報工学科 河野 真治 | |
7 ** (E-Mail Address: kono@ie.u-ryukyu.ac.jp) | |
8 ** | |
9 ** このソースのいかなる複写,改変,修正も許諾します。ただし、 | |
10 ** その際には、誰が貢献したを示すこの部分を残すこと。 | |
11 ** 再配布や雑誌の付録などの問い合わせも必要ありません。 | |
12 ** 営利利用も上記に反しない範囲で許可します。 | |
13 ** バイナリの配布の際にはversion messageを保存することを条件とします。 | |
14 ** このプログラムについては特に何の保証もしない、悪しからず。 | |
15 ** | |
16 ** Everyone is permitted to do anything on this program | |
17 ** including copying, modifying, improving, | |
18 ** as long as you don't try to pretend that you wrote it. | |
19 ** i.e., the above copyright notice has to appear in all copies. | |
20 ** Binary distribution requires original version messages. | |
21 ** You don't have to ask before copying, redistribution or publishing. | |
22 ** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. | |
23 ***********************************************************************/ | |
24 | |
195 | 25 #define FLOAT_CODE 1 |
237 | 26 #define LONGLONG_CODE 1 |
292 | 27 #define CASE_CODE 1 |
316 | 28 #define ASM_CODE 1 |
329 | 29 #define BIT_FIELD_CODE 1 |
195 | 30 |
164 | 31 /* reserved word start */ |
32 | |
482 | 33 /* type ( keyword ) */ |
34 | |
327 | 35 #define INT (-1) |
36 #define UNSIGNED (-2) | |
37 #define CHAR (-3) | |
38 #define UCHAR (-4) | |
162 | 39 #define POINTER (-5) |
327 | 40 #define ARRAY (-6) |
41 #define STRUCT (-7) | |
42 #define UNION (-8) | |
43 #define FUNCTION (-9) | |
0 | 44 |
482 | 45 #define SIGNED (-10) |
46 #define LONG (-11) | |
47 #define SHORT (-12) | |
48 #define USHORT (-13) | |
49 #define VOID (-14) | |
50 #define CODE (-15) | |
51 #define ENUM (-16) | |
52 | |
53 #define FLOAT (-17) | |
54 #define DOUBLE (-18) | |
55 #define LONGLONG (-19) | |
56 #define ULONGLONG (-20) | |
57 | |
58 /* type qualifier */ | |
59 | |
60 #define KONST (-21) | |
61 #define STATIC (-22) | |
62 #define EXTRN (-23) | |
63 #define EXTRN1 (-24) | |
64 #define VOLATILE (-25) | |
65 #define RESTRICT (-26) | |
66 #define INLINE (-27) | |
67 #define REGISTER (-28) | |
68 #define FREGISTER (-29) | |
69 #define DREGISTER (-30) | |
70 #define LREGISTER (-31) | |
71 | |
72 #define DOTS (-32) | |
0 | 73 |
482 | 74 /* keyword */ |
75 | |
76 #define GOTO (-33) | |
77 #define RETURN (-34) | |
78 #define BREAK (-35) | |
79 #define CONTINUE (-36) | |
80 #define IF (-37) | |
81 #define ELSE (-38) | |
82 #define FOR (-39) | |
83 #define DO (-40) | |
84 #define WHILE (-41) | |
85 #define SWITCH (-42) | |
86 #define CASE (-43) | |
87 #define DEFAULT (-44) | |
88 #define RESERVE (-45) | |
89 #define TAG (-46) | |
90 #define FIELD (-47) | |
91 #define IDENT (-48) | |
92 #define MACRO (-49) | |
93 #define BLABEL (-50) | |
94 #define FLABEL (-51) | |
95 #define TYPEDEF (-52) | |
96 #define SIZEOF (-53) | |
97 #define TYPE (-54) | |
98 #define DEFINED (-55) | |
99 | |
100 #define ENVIRONMENT (-56) | |
101 | |
102 #define FMACRO (-57) | |
103 #define LMACRO (-58) | |
104 | |
461 | 105 #define TYPEOF (-59) |
106 #define ASM (-60) | |
164 | 107 |
544 | 108 #define C_FILE (-61) |
109 #define C_FUNCTION (-62) | |
110 #define C_LINE (-63) | |
111 | |
164 | 112 /* reserved word end */ |
78 | 113 |
327 | 114 #define EMPTY (-99) |
103 | 115 |
164 | 116 /* mode start */ |
327 | 117 #define TOP 0 |
118 #define GDECL 1 | |
119 #define GSDECL 2 | |
120 #define GUDECL 3 | |
121 #define ADECL 4 | |
122 #define LDECL 5 | |
123 #define LSDECL 6 | |
124 #define LUDECL 7 | |
0 | 125 #define STADECL 8 |
327 | 126 #define STAT 9 |
127 #define GTDECL 10 | |
128 #define LTDECL 11 | |
129 #define IFDEF 12 | |
130 #define MDECL 13 | |
176 | 131 #define GEDECL 14 |
132 #define LEDECL 15 | |
362 | 133 #define LLDECL 16 |
134 #define SFDINIT 17 | |
164 | 135 /* mode end */ |
136 | |
327 | 137 #define US 1 |
138 #define AS 10000 | |
139 #define SOP 200 | |
140 #define COP 400 | |
141 #define DOP 600 | |
142 #define FOP 800 | |
143 #define LOP 1000 | |
164 | 144 |
145 /* tree node tags start */ | |
146 | |
316 | 147 #define LIST_ARGS(i) (i==FUNCTION||i==CODE||i==ASM) |
599 | 148 #define OP(i) (i%SOP) /* tag value without attribute */ |
149 #define OP_TAG(i) (((i)/SOP)*SOP) /* attribute of tag */ | |
164 | 150 |
151 /* nullary argments */ | |
0 | 152 |
327 | 153 #define GVAR 1 |
154 #define RGVAR 2 | |
155 #define URGVAR 3 | |
156 #define LVAR 4 | |
157 #define RLVAR 5 | |
158 #define URLVAR 6 | |
159 #define CRGVAR (COP+RGVAR) | |
160 #define CURGVAR (COP+URGVAR) | |
161 #define CRLVAR (COP+RLVAR) | |
162 #define CURLVAR (COP+URLVAR) | |
163 #define FRGVAR (FOP+RGVAR) | |
164 #define FRLVAR (FOP+RLVAR) | |
165 #define DRGVAR (DOP+RGVAR) | |
166 #define DRLVAR (DOP+RLVAR) | |
167 #define SRGVAR (SOP+RGVAR) | |
168 #define SURGVAR (SOP+URGVAR) | |
169 #define SRLVAR (SOP+RLVAR) | |
170 #define SURLVAR (SOP+URLVAR) | |
171 #define LRGVAR (LOP+RGVAR) | |
172 #define LURGVAR (LOP+URGVAR) | |
173 #define LRLVAR (LOP+RLVAR) | |
174 #define LURLVAR (LOP+URLVAR) | |
164 | 175 |
327 | 176 #define CONST 7 |
177 #define DCONST (DOP+CONST) | |
178 #define FCONST (FOP+CONST) | |
179 #define LCONST (LOP+CONST) | |
180 #define STRING 8 | |
181 #define FNAME 9 | |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
182 #define LCALL 10 |
452 | 183 #define COMMENT 11 |
184 #define DECL 12 | |
185 #define COMP 13 | |
602 | 186 #define IVAR 14 |
187 #define RIVAR 15 | |
188 #define LABEL 16 | |
164 | 189 |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
190 #define NULLARY_ARGS(i) (i==RETURN||i==ENVIRONMENT||i==LCALL||i==REGISTER||i==DREGISTER||i==FREGISTER||i==LREGISTER||(GVAR<=(i%SOP)&&(i%SOP)<=LABEL)) |
164 | 191 |
192 /* unary argments */ | |
193 | |
602 | 194 #define ADDRESS 17 |
195 #define MINUS 18 | |
196 #define LNOT 19 | |
197 #define BNOT 20 | |
198 #define INC 21 | |
199 #define POSTINC 22 | |
200 #define UPOSTINC 23 | |
201 #define PREINC 24 | |
202 #define UPREINC 25 | |
203 #define POSTDEC 26 | |
204 #define UPOSTDEC 27 | |
205 #define PREDEC 28 | |
206 #define UPREDEC 29 | |
207 #define DEC 30 | |
196 | 208 #define CPOSTINC (COP+POSTINC) |
209 #define CUPOSTINC (COP+UPOSTINC) | |
210 #define CPREINC (COP+PREINC) | |
211 #define CUPREINC (COP+UPREINC) | |
212 #define CPOSTDEC (COP+POSTDEC) | |
213 #define CUPOSTDEC (COP+UPOSTDEC) | |
214 #define CPREDEC (COP+CPREDEC) | |
215 #define CUPREDEC (COP+UPREDEC) | |
216 #define SPOSTINC (SOP+POSTINC) | |
217 #define SUPOSTINC (SOP+UPOSTINC) | |
218 #define SPREINC (SOP+PREINC) | |
219 #define SUPREINC (SOP+UPREINC) | |
220 #define SPOSTDEC (SOP+POSTDEC) | |
221 #define SUPOSTDEC (SOP+UPOSTDEC) | |
222 #define SPREDEC (SOP+PREDEC) | |
223 #define SUPREDEC (SOP+UPREDEC) | |
327 | 224 #define FPOSTINC (FOP+POSTINC) |
225 #define FPREINC (FOP+PREINC) | |
226 #define DPOSTINC (DOP+POSTINC) | |
227 #define DPREINC (DOP+PREINC) | |
228 #define LPOSTINC (LOP+POSTINC) | |
229 #define LPREINC (LOP+PREINC) | |
230 #define LUPOSTINC (LOP+UPOSTINC) | |
231 #define LUPREINC (LOP+UPREINC) | |
602 | 232 #define INDIRECT 31 |
233 #define RINDIRECT 32 | |
234 #define URINDIRECT 33 | |
327 | 235 #define CRINDIRECT (COP+RINDIRECT) |
236 #define CURINDIRECT (COP+URINDIRECT) | |
237 #define SRINDIRECT (SOP+RINDIRECT) | |
238 #define SURINDIRECT (SOP+URINDIRECT) | |
239 #define FRINDIRECT (FOP+RINDIRECT) | |
240 #define DRINDIRECT (DOP+RINDIRECT) | |
241 #define LRINDIRECT (LOP+RINDIRECT) | |
242 #define LURINDIRECT (LOP+URINDIRECT) | |
602 | 243 #define RSTRUCT 34 |
244 #define ALLOCA 35 | |
245 #define BUILTINP 36 | |
246 #define BUILTIN_EXPECT 37 | |
247 #define ATTRIBUTE 38 | |
248 #define BIT_FIELD 39 | |
249 #define RBIT_FIELD 40 | |
250 #define BPREINC 41 | |
251 #define BPOSTINC 42 | |
252 #define RPERIOD 43 | |
253 #define RARROW 44 | |
254 #define CONV 45 | |
164 | 255 |
256 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV) | |
257 | |
258 /* binary argments */ | |
259 | |
602 | 260 #define MUL 46 |
261 #define UMUL 47 | |
262 #define DIV 48 | |
263 #define UDIV 49 | |
264 #define MOD 50 | |
265 #define UMOD 51 | |
266 #define ADD 52 | |
267 #define SUB 53 | |
268 #define CMP 54 | |
269 #define RSHIFT 55 | |
270 #define URSHIFT 56 | |
271 #define LSHIFT 57 | |
272 #define ULSHIFT 58 | |
273 #define GT 59 | |
274 #define UGT 60 | |
275 #define GE 61 | |
276 #define UGE 62 | |
277 #define LT 63 | |
278 #define ULT 64 | |
279 #define LE 65 | |
280 #define ULE 66 | |
281 #define EQ 67 | |
282 #define NEQ 68 | |
283 #define BAND 69 | |
284 #define EOR 70 | |
285 #define BOR 71 | |
286 #define LAND 72 | |
287 #define LOR 73 | |
288 #define ASS 74 | |
289 #define UCMP 75 | |
290 #define UCMPGE 76 | |
291 #define CMPGE 77 | |
292 #define CMPEQ 78 | |
293 #define CMPNEQ 79 | |
294 #define ASSOP 80 | |
295 #define COMMA 81 | |
164 | 296 |
602 | 297 #define CASS 82 |
298 #define CASSOP 83 | |
299 #define CUASSOP 84 | |
0 | 300 |
327 | 301 #define SASS (SOP+CASS) |
164 | 302 #define SASSOP (SOP+CASSOP) |
303 #define SUASSOP (SOP+CUASSOP) | |
304 | |
327 | 305 #define DASS (DOP+ASS) |
306 #define DCMPGE (DOP+CMPGE) | |
307 #define DCMPEQ (DOP+CMPEQ) | |
308 #define DCMPNEQ (DOP+CMPNEQ) | |
309 #define DASSOP (DOP+ASSOP) | |
310 #define DCMP (DOP+CMP) | |
311 #define DMINUS (DOP+MINUS) | |
312 #define DMUL (DOP+MUL) | |
313 #define DDIV (DOP+DIV) | |
314 #define DADD (DOP+ADD) | |
315 #define DSUB (DOP+SUB) | |
164 | 316 |
327 | 317 #define FASS (FOP+ASS) |
318 #define FCMPGE (FOP+CMPGE) | |
319 #define FCMPEQ (FOP+CMPEQ) | |
320 #define FCMPNEQ (FOP+CMPNEQ) | |
321 #define FASSOP (FOP+ASSOP) | |
322 #define FCMP (FOP+CMP) | |
323 #define FMINUS (FOP+MINUS) | |
324 #define FMUL (FOP+MUL) | |
325 #define FDIV (FOP+DIV) | |
326 #define FADD (FOP+ADD) | |
327 #define FSUB (FOP+SUB) | |
78 | 328 |
327 | 329 #define LASS (LOP+CASS) |
330 #define LCMPGE (LOP+CMPGE) | |
331 #define LCMPEQ (LOP+CMPEQ) | |
332 #define LCMPNEQ (LOP+CMPNEQ) | |
195 | 333 #define LASSOP (LOP+CASSOP) |
164 | 334 #define LUASSOP (LOP+CUASSOP) |
327 | 335 #define LCMP (LOP+CMP) |
336 #define LMINUS (LOP+MINUS) | |
337 #define LMUL (LOP+MUL) | |
338 #define LDIV (LOP+DIV) | |
339 #define LUMUL (LOP+UMUL) | |
340 #define LUDIV (LOP+UDIV) | |
341 #define LADD (LOP+ADD) | |
342 #define LSUB (LOP+SUB) | |
81 | 343 |
195 | 344 |
327 | 345 #define LMOD (LOP+MOD) |
346 #define LUMOD (LOP+UMOD) | |
347 #define LLSHIFT (LOP+LSHIFT) | |
348 #define LULSHIFT (LOP+ULSHIFT) | |
349 #define LRSHIFT (LOP+RSHIFT) | |
350 #define LURSHIFT (LOP+URSHIFT) | |
351 #define LBAND (LOP+BAND) | |
352 #define LEOR (LOP+EOR) | |
353 #define LBOR (LOP+BOR) | |
195 | 354 |
602 | 355 #define BASS 85 |
356 #define BASSOP 86 | |
357 #define BFD_REPL 87 | |
195 | 358 |
602 | 359 #define STASS 88 |
326 | 360 |
164 | 361 |
362 #define BINARY_ARGS(i) (MUL<=(i%SOP)&&(i%SOP)<=STASS) | |
363 | |
364 /* tarnary argments */ | |
365 | |
602 | 366 #define COND 89 |
367 #define UCOND 90 | |
327 | 368 #define SCOND (SOP+COND) |
490 | 369 #define SUCOND (SOP+UCOND) |
327 | 370 #define DCOND (DOP+COND) |
371 #define FCOND (FOP+COND) | |
372 #define LCOND (LOP+COND) | |
490 | 373 #define LUCOND (LOP+UCOND) |
164 | 374 |
491 | 375 #define TARNARY_ARGS(i) (COND==(i%SOP)||UCOND==(i%SOP)) |
164 | 376 |
377 /* not appeared as tags */ | |
81 | 378 |
602 | 379 #define LPAR 91 |
380 #define RPAR 92 | |
381 #define LBRA 93 | |
382 #define RBRA 94 | |
383 #define LC 95 | |
384 #define RC 96 | |
385 #define COLON 97 | |
386 #define SM 98 | |
387 #define PERIOD 99 | |
388 #define ARROW 100 | |
389 #define CNAME 101 | |
194 | 390 |
602 | 391 #define I2C 102 |
392 #define I2S 103 | |
393 #define I2I 104 | |
394 #define I2U 105 | |
395 #define I2D 106 | |
396 #define I2F 107 | |
397 #define I2LL 108 | |
398 #define I2ULL 109 | |
353 | 399 |
602 | 400 #define U2UC 110 |
401 #define U2US 111 | |
402 #define U2I 112 | |
403 #define U2U 113 | |
404 #define U2D 114 | |
405 #define U2F 115 | |
406 #define U2LL 116 | |
407 #define U2ULL 117 | |
353 | 408 |
194 | 409 |
327 | 410 #define D2I (DOP+I2I) |
411 #define D2U (DOP+I2U) | |
412 #define D2D (DOP+I2D) | |
413 #define D2F (DOP+I2F) | |
414 #define D2LL (DOP+I2LL) | |
415 #define D2ULL (DOP+I2ULL) | |
164 | 416 |
327 | 417 #define F2I (FOP+I2I) |
418 #define F2U (FOP+I2U) | |
419 #define F2D (FOP+I2D) | |
420 #define F2F (FOP+I2F) | |
421 #define F2LL (FOP+I2LL) | |
422 #define F2ULL (FOP+I2ULL) | |
194 | 423 |
327 | 424 #define LL2I (LOP+I2I) |
425 #define LL2U (LOP+I2U) | |
426 #define LL2D (LOP+I2D) | |
427 #define LL2F (LOP+I2F) | |
428 #define LL2LL (LOP+I2LL) | |
429 #define LL2ULL (LOP+I2ULL) | |
194 | 430 |
327 | 431 #define ULL2I (LOP+U2I) |
432 #define ULL2U (LOP+U2U) | |
433 #define ULL2D (LOP+U2D) | |
434 #define ULL2F (LOP+U2F) | |
435 #define ULL2LL (LOP+U2LL) | |
436 #define ULL2ULL (LOP+U2ULL) | |
194 | 437 |
164 | 438 /* tree node tags end */ |
439 | |
453 | 440 /* statement start */ |
441 | |
602 | 442 #define ST_DECL 118 |
443 #define ST_IF 119 | |
444 #define ST_DO 120 | |
445 #define ST_WHILE 121 | |
446 #define ST_FOR 122 | |
447 #define ST_SWITCH 123 | |
448 #define ST_COMP 124 | |
449 #define ST_BREAK 125 | |
450 #define ST_CONTINUE 126 | |
451 #define ST_CASE 127 | |
452 #define ST_DEFAULT 128 | |
453 #define ST_RETURN 129 | |
454 #define ST_GOTO 130 | |
455 #define ST_ASM 131 | |
456 #define ST_LABEL 132 | |
457 #define ST_OP 133 | |
458 #define ST_COMMENT 134 | |
453 | 459 |
509 | 460 #define IS_STATEMENT(i) (i==INLINE||(ST_DECL<=i&&i<=ST_COMMENT)) |
453 | 461 |
602 | 462 #define HAS_ADDRESS 135 |
526 | 463 |
453 | 464 /* statement end */ |
465 | |
164 | 466 /* error number start */ |
0 | 467 |
327 | 468 #define FILERR 1 |
469 #define DCERR 2 | |
470 #define RDERR 3 | |
471 #define STERR 4 | |
472 #define EXERR 5 | |
473 #define CNERR 6 | |
474 #define CHERR 7 | |
475 #define GSERR 8 | |
476 #define LSERR 9 | |
477 #define STRERR 10 | |
478 #define LNERR 11 | |
479 #define EOFERR 12 | |
480 #define MCERR 13 | |
481 #define INCERR 14 | |
482 #define HPERR 15 | |
483 #define TYERR 16 | |
484 #define LVERR 17 | |
485 #define UDERR 18 | |
486 #define OPTION 19 | |
487 #define REG_ERR 20 | |
389 | 488 #define RGERR 21 |
489 #define CODE_ERR 22 | |
490 #define MSERR 23 | |
491 #define BTERR 24 | |
492 #define HSERR 25 | |
493 #define NMERR 26 | |
494 #define MMERR 27 | |
495 #define INERR 28 | |
523 | 496 #define AGERR 29 |
497 #define ILERR 30 | |
558 | 498 #define CSERR 31 |
572 | 499 #define GTERR 32 |
500 #define FNERR 33 | |
501 #define UCERR 34 | |
502 #define UFERR 35 | |
574 | 503 #define ENERR 36 |
504 #define SIERR 37 | |
327 | 505 |
164 | 506 /* error number end */ |
0 | 507 |
526 | 508 /* ctmode bit */ |
509 | |
461 | 510 #define KONST_BIT 1 |
511 #define VOLATILE_BIT 2 | |
512 #define RESTRICT_BIT 4 | |
513 | |
25 | 514 #define FILES 10 |
327 | 515 #define MAX_INCLUDE_PATH_COUNT 10 |
448 | 516 /* |
517 For this comiler 8192*2 is Ok. Linux kernel requires 8192*4. | |
518 */ | |
447 | 519 #define GSYMS (8192*4) |
358 | 520 #define HEAPSIZE 30000 |
452 | 521 #define CHEAPSIZE (sizeof(NMTBL)*8192) |
327 | 522 #define LBUFSIZE 4096 |
347 | 523 #define STRSIZE 4096 |
254 | 524 |
0 | 525 typedef struct nametable { |
327 | 526 char *nm; |
348 | 527 struct nametable *next; |
445 | 528 int sc,attr; |
529 int ty,dsp; } NMTBL; | |
0 | 530 |
452 | 531 extern int *heap; /* heap area (in cheap ) */ |
532 extern NMTBL *global_list; /* list of all global NMTBL */ | |
533 extern NMTBL *local_static_list; /* list of local static variable */ | |
0 | 534 |
195 | 535 #if FLOAT_CODE |
81 | 536 extern int dlist2(int e1, double e2); |
195 | 537 #endif |
538 #if LONGLONG_CODE | |
539 extern int llist2(int e1, long long e2); | |
540 #endif | |
61 | 541 extern int list2(int e1, int e2); |
542 extern int list3(int e1, int e2, int e3); | |
543 extern int list4(int e1, int e2, int e3,int e4); | |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
544 extern int list5(int e1, int e2, int e3,int e4,int e5); |
318 | 545 extern int length(int e1); |
464 | 546 extern int getfree(int size); |
318 | 547 extern int nth(int n,int e1); |
61 | 548 extern int reverse0(int t1); |
549 extern int append4(int p,int a1,int a2,int a3); | |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
550 extern int append5(int p,int a1,int a2,int a3,int a4); |
309 | 551 extern int insert_ascend(int p,int e,int eq()); |
61 | 552 |
347 | 553 extern void free_nptr(NMTBL *n); |
554 extern NMTBL *get_nptr(); | |
346 | 555 |
590 | 556 #if 1 |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
557 extern int heapsize; |
467 | 558 #define CHECK_HEAP(b) ({int _k=(int)(b);if(_k>heapsize||_k<0)error(-1);_k;}) |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
559 #else |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
560 #define CHECK_HEAP(b) (b) |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
561 #endif |
33 | 562 |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
563 #define car(e) (heap[(int)(CHECK_HEAP(e))]) |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
564 |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
565 #define cadr(e) (heap[((int)(CHECK_HEAP(e)))+1]) |
33 | 566 |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
567 #define caddr(e) (heap[((int)(CHECK_HEAP(e)))+2]) |
33 | 568 |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
569 #define cadddr(e) (heap[((int)(CHECK_HEAP(e)))+3]) |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
570 |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
571 #define caddddr(e) (heap[((int)(CHECK_HEAP(e)))+4]) |
449 | 572 |
195 | 573 #if FLOAT_CODE |
81 | 574 #define dcadr(e) (*(double*)&heap[((int)(e))+1]) |
575 #define dcaddr(e) (*(double*)&heap[((int)(e))+2]) | |
195 | 576 #endif |
577 | |
578 #if LONGLONG_CODE | |
579 #define lcadr(e) (*(long long*)&heap[((int)(e))+1]) | |
580 #define lcaddr(e) (*(long long*)&heap[((int)(e))+2]) | |
581 #endif | |
81 | 582 |
33 | 583 /* end */ |