annotate mc.h @ 604:ff033b46cac5

*** empty log message ***
author kono
date Mon, 30 Jan 2006 13:42:12 +0900
parents 429ec87e03e7
children e055df7c1082
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 /* Micro-C header file */
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
3 #define FLOAT_CODE 1
237
1933266f1efa long long ia32 (imcomplete)
kono
parents: 235
diff changeset
4 #define LONGLONG_CODE 1
292
6d4231b6f9fe switch statement prepare
kono
parents: 278
diff changeset
5 #define CASE_CODE 1
316
22d92986c7f7 asm, valued statement, local decls continue...
kono
parents: 313
diff changeset
6 #define ASM_CODE 1
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
7 #define BIT_FIELD_CODE 1
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
8
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
9 /* reserved word start */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
10
482
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
11 /* type ( keyword ) */
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
12
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
13 #define INT (-1)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
14 #define UNSIGNED (-2)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
15 #define CHAR (-3)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
16 #define UCHAR (-4)
162
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
17 #define POINTER (-5)
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
18 #define ARRAY (-6)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
19 #define STRUCT (-7)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
20 #define UNION (-8)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
21 #define FUNCTION (-9)
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
22
482
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
23 #define SIGNED (-10)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
24 #define LONG (-11)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
25 #define SHORT (-12)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
26 #define USHORT (-13)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
27 #define VOID (-14)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
28 #define CODE (-15)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
29 #define ENUM (-16)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
30
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
31 #define FLOAT (-17)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
32 #define DOUBLE (-18)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
33 #define LONGLONG (-19)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
34 #define ULONGLONG (-20)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
35
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
36 /* type qualifier */
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
37
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
38 #define KONST (-21)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
39 #define STATIC (-22)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
40 #define EXTRN (-23)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
41 #define EXTRN1 (-24)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
42 #define VOLATILE (-25)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
43 #define RESTRICT (-26)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
44 #define INLINE (-27)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
45 #define REGISTER (-28)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
46 #define FREGISTER (-29)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
47 #define DREGISTER (-30)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
48 #define LREGISTER (-31)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
49
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
50 #define DOTS (-32)
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
51
482
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
52 /* keyword */
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
53
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
54 #define GOTO (-33)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
55 #define RETURN (-34)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
56 #define BREAK (-35)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
57 #define CONTINUE (-36)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
58 #define IF (-37)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
59 #define ELSE (-38)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
60 #define FOR (-39)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
61 #define DO (-40)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
62 #define WHILE (-41)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
63 #define SWITCH (-42)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
64 #define CASE (-43)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
65 #define DEFAULT (-44)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
66 #define RESERVE (-45)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
67 #define TAG (-46)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
68 #define FIELD (-47)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
69 #define IDENT (-48)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
70 #define MACRO (-49)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
71 #define BLABEL (-50)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
72 #define FLABEL (-51)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
73 #define TYPEDEF (-52)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
74 #define SIZEOF (-53)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
75 #define TYPE (-54)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
76 #define DEFINED (-55)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
77
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
78 #define ENVIRONMENT (-56)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
79
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
80 #define FMACRO (-57)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
81 #define LMACRO (-58)
8370ba6e8557 *** empty log message ***
kono
parents: 467
diff changeset
82
461
2a49dfe59540 attribute
kono
parents: 456
diff changeset
83 #define TYPEOF (-59)
2a49dfe59540 attribute
kono
parents: 456
diff changeset
84 #define ASM (-60)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
85
544
dbfd6e88e2c3 s-dandy compile OK
kono
parents: 526
diff changeset
86 #define C_FILE (-61)
dbfd6e88e2c3 s-dandy compile OK
kono
parents: 526
diff changeset
87 #define C_FUNCTION (-62)
dbfd6e88e2c3 s-dandy compile OK
kono
parents: 526
diff changeset
88 #define C_LINE (-63)
dbfd6e88e2c3 s-dandy compile OK
kono
parents: 526
diff changeset
89
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
90 /* reserved word end */
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
91
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
92 #define EMPTY (-99)
103
f849af4b5ea9 *** empty log message ***
kono
parents: 101
diff changeset
93
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
94 /* mode start */
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
95 #define TOP 0
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
96 #define GDECL 1
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
97 #define GSDECL 2
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
98 #define GUDECL 3
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
99 #define ADECL 4
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
100 #define LDECL 5
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
101 #define LSDECL 6
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
102 #define LUDECL 7
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
103 #define STADECL 8
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
104 #define STAT 9
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
105 #define GTDECL 10
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
106 #define LTDECL 11
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
107 #define IFDEF 12
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
108 #define MDECL 13
176
kono
parents: 174
diff changeset
109 #define GEDECL 14
kono
parents: 174
diff changeset
110 #define LEDECL 15
362
5cf12c7a3274 local label first try
kono
parents: 358
diff changeset
111 #define LLDECL 16
5cf12c7a3274 local label first try
kono
parents: 358
diff changeset
112 #define SFDINIT 17
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
113 /* mode end */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
114
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
115 #define US 1
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
116 #define AS 10000
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
117 #define SOP 200
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
118 #define COP 400
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
119 #define DOP 600
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
120 #define FOP 800
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
121 #define LOP 1000
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
122
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
123 /* tree node tags start */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
124
316
22d92986c7f7 asm, valued statement, local decls continue...
kono
parents: 313
diff changeset
125 #define LIST_ARGS(i) (i==FUNCTION||i==CODE||i==ASM)
599
df04bc5fd5fe *** empty log message ***
kono
parents: 590
diff changeset
126 #define OP(i) (i%SOP) /* tag value without attribute */
df04bc5fd5fe *** empty log message ***
kono
parents: 590
diff changeset
127 #define OP_TAG(i) (((i)/SOP)*SOP) /* attribute of tag */
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
128
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
129 /* nullary argments */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
130
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
131 #define GVAR 1
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
132 #define RGVAR 2
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
133 #define URGVAR 3
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
134 #define LVAR 4
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
135 #define RLVAR 5
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
136 #define URLVAR 6
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
137 #define CRGVAR (COP+RGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
138 #define CURGVAR (COP+URGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
139 #define CRLVAR (COP+RLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
140 #define CURLVAR (COP+URLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
141 #define FRGVAR (FOP+RGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
142 #define FRLVAR (FOP+RLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
143 #define DRGVAR (DOP+RGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
144 #define DRLVAR (DOP+RLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
145 #define SRGVAR (SOP+RGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
146 #define SURGVAR (SOP+URGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
147 #define SRLVAR (SOP+RLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
148 #define SURLVAR (SOP+URLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
149 #define LRGVAR (LOP+RGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
150 #define LURGVAR (LOP+URGVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
151 #define LRLVAR (LOP+RLVAR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
152 #define LURLVAR (LOP+URLVAR)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
153
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
154 #define CONST 7
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
155 #define DCONST (DOP+CONST)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
156 #define FCONST (FOP+CONST)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
157 #define LCONST (LOP+CONST)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
158 #define STRING 8
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
159 #define FNAME 9
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
160 #define LCALL 10
452
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
161 #define COMMENT 11
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
162 #define DECL 12
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
163 #define COMP 13
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
164 #define IVAR 14
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
165 #define RIVAR 15
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
166 #define LABEL 16
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
167
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
168 #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
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
169
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
170 /* unary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
171
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
172 #define ADDRESS 17
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
173 #define MINUS 18
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
174 #define LNOT 19
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
175 #define BNOT 20
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
176 #define INC 21
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
177 #define POSTINC 22
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
178 #define UPOSTINC 23
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
179 #define PREINC 24
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
180 #define UPREINC 25
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
181 #define POSTDEC 26
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
182 #define UPOSTDEC 27
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
183 #define PREDEC 28
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
184 #define UPREDEC 29
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
185 #define DEC 30
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
186 #define CPOSTINC (COP+POSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
187 #define CUPOSTINC (COP+UPOSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
188 #define CPREINC (COP+PREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
189 #define CUPREINC (COP+UPREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
190 #define CPOSTDEC (COP+POSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
191 #define CUPOSTDEC (COP+UPOSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
192 #define CPREDEC (COP+CPREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
193 #define CUPREDEC (COP+UPREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
194 #define SPOSTINC (SOP+POSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
195 #define SUPOSTINC (SOP+UPOSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
196 #define SPREINC (SOP+PREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
197 #define SUPREINC (SOP+UPREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
198 #define SPOSTDEC (SOP+POSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
199 #define SUPOSTDEC (SOP+UPOSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
200 #define SPREDEC (SOP+PREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
201 #define SUPREDEC (SOP+UPREDEC)
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
202 #define FPOSTINC (FOP+POSTINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
203 #define FPREINC (FOP+PREINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
204 #define DPOSTINC (DOP+POSTINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
205 #define DPREINC (DOP+PREINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
206 #define LPOSTINC (LOP+POSTINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
207 #define LPREINC (LOP+PREINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
208 #define LUPOSTINC (LOP+UPOSTINC)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
209 #define LUPREINC (LOP+UPREINC)
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
210 #define INDIRECT 31
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
211 #define RINDIRECT 32
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
212 #define URINDIRECT 33
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
213 #define CRINDIRECT (COP+RINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
214 #define CURINDIRECT (COP+URINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
215 #define SRINDIRECT (SOP+RINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
216 #define SURINDIRECT (SOP+URINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
217 #define FRINDIRECT (FOP+RINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
218 #define DRINDIRECT (DOP+RINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
219 #define LRINDIRECT (LOP+RINDIRECT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
220 #define LURINDIRECT (LOP+URINDIRECT)
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
221 #define RSTRUCT 34
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
222 #define ALLOCA 35
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
223 #define BUILTINP 36
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
224 #define BUILTIN_EXPECT 37
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
225 #define ATTRIBUTE 38
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
226 #define BIT_FIELD 39
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
227 #define RBIT_FIELD 40
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
228 #define BPREINC 41
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
229 #define BPOSTINC 42
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
230 #define RPERIOD 43
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
231 #define RARROW 44
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
232 #define CONV 45
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
233
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
234 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
235
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
236 /* binary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
237
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
238 #define MUL 46
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
239 #define UMUL 47
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
240 #define DIV 48
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
241 #define UDIV 49
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
242 #define MOD 50
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
243 #define UMOD 51
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
244 #define ADD 52
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
245 #define SUB 53
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
246 #define CMP 54
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
247 #define RSHIFT 55
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
248 #define URSHIFT 56
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
249 #define LSHIFT 57
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
250 #define ULSHIFT 58
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
251 #define GT 59
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
252 #define UGT 60
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
253 #define GE 61
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
254 #define UGE 62
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
255 #define LT 63
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
256 #define ULT 64
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
257 #define LE 65
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
258 #define ULE 66
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
259 #define EQ 67
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
260 #define NEQ 68
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
261 #define BAND 69
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
262 #define EOR 70
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
263 #define BOR 71
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
264 #define LAND 72
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
265 #define LOR 73
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
266 #define ASS 74
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
267 #define UCMP 75
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
268 #define UCMPGE 76
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
269 #define CMPGE 77
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
270 #define CMPEQ 78
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
271 #define CMPNEQ 79
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
272 #define ASSOP 80
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
273 #define COMMA 81
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
274
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
275 #define CASS 82
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
276 #define CASSOP 83
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
277 #define CUASSOP 84
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
278
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
279 #define SASS (SOP+CASS)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
280 #define SASSOP (SOP+CASSOP)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
281 #define SUASSOP (SOP+CUASSOP)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
282
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
283 #define DASS (DOP+ASS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
284 #define DCMPGE (DOP+CMPGE)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
285 #define DCMPEQ (DOP+CMPEQ)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
286 #define DCMPNEQ (DOP+CMPNEQ)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
287 #define DASSOP (DOP+ASSOP)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
288 #define DCMP (DOP+CMP)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
289 #define DMINUS (DOP+MINUS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
290 #define DMUL (DOP+MUL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
291 #define DDIV (DOP+DIV)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
292 #define DADD (DOP+ADD)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
293 #define DSUB (DOP+SUB)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
294
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
295 #define FASS (FOP+ASS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
296 #define FCMPGE (FOP+CMPGE)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
297 #define FCMPEQ (FOP+CMPEQ)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
298 #define FCMPNEQ (FOP+CMPNEQ)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
299 #define FASSOP (FOP+ASSOP)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
300 #define FCMP (FOP+CMP)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
301 #define FMINUS (FOP+MINUS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
302 #define FMUL (FOP+MUL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
303 #define FDIV (FOP+DIV)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
304 #define FADD (FOP+ADD)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
305 #define FSUB (FOP+SUB)
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
306
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
307 #define LASS (LOP+CASS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
308 #define LCMPGE (LOP+CMPGE)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
309 #define LCMPEQ (LOP+CMPEQ)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
310 #define LCMPNEQ (LOP+CMPNEQ)
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
311 #define LASSOP (LOP+CASSOP)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
312 #define LUASSOP (LOP+CUASSOP)
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
313 #define LCMP (LOP+CMP)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
314 #define LMINUS (LOP+MINUS)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
315 #define LMUL (LOP+MUL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
316 #define LDIV (LOP+DIV)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
317 #define LUMUL (LOP+UMUL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
318 #define LUDIV (LOP+UDIV)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
319 #define LADD (LOP+ADD)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
320 #define LSUB (LOP+SUB)
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
321
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
322
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
323 #define LMOD (LOP+MOD)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
324 #define LUMOD (LOP+UMOD)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
325 #define LLSHIFT (LOP+LSHIFT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
326 #define LULSHIFT (LOP+ULSHIFT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
327 #define LRSHIFT (LOP+RSHIFT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
328 #define LURSHIFT (LOP+URSHIFT)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
329 #define LBAND (LOP+BAND)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
330 #define LEOR (LOP+EOR)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
331 #define LBOR (LOP+BOR)
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
332
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
333 #define BASS 85
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
334 #define BASSOP 86
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
335 #define BFD_REPL 87
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
336
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
337 #define STASS 88
326
e5d40f8c4cce bit-field continue.
kono
parents: 318
diff changeset
338
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
339
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
340 #define BINARY_ARGS(i) (MUL<=(i%SOP)&&(i%SOP)<=STASS)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
341
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
342 /* tarnary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
343
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
344 #define COND 89
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
345 #define UCOND 90
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
346 #define SCOND (SOP+COND)
490
95fcc858fd1c cond unsigned fix.
kono
parents: 482
diff changeset
347 #define SUCOND (SOP+UCOND)
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
348 #define DCOND (DOP+COND)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
349 #define FCOND (FOP+COND)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
350 #define LCOND (LOP+COND)
490
95fcc858fd1c cond unsigned fix.
kono
parents: 482
diff changeset
351 #define LUCOND (LOP+UCOND)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
352
491
a379da780856 cond signed/unsigned
kono
parents: 490
diff changeset
353 #define TARNARY_ARGS(i) (COND==(i%SOP)||UCOND==(i%SOP))
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
354
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
355 /* not appeared as tags */
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
356
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
357 #define LPAR 91
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
358 #define RPAR 92
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
359 #define LBRA 93
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
360 #define RBRA 94
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
361 #define LC 95
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
362 #define RC 96
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
363 #define COLON 97
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
364 #define SM 98
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
365 #define PERIOD 99
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
366 #define ARROW 100
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
367 #define CNAME 101
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
368
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
369 #define I2C 102
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
370 #define I2S 103
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
371 #define I2I 104
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
372 #define I2U 105
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
373 #define I2D 106
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
374 #define I2F 107
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
375 #define I2LL 108
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
376 #define I2ULL 109
353
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 351
diff changeset
377
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
378 #define U2UC 110
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
379 #define U2US 111
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
380 #define U2I 112
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
381 #define U2U 113
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
382 #define U2D 114
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
383 #define U2F 115
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
384 #define U2LL 116
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
385 #define U2ULL 117
353
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 351
diff changeset
386
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
387
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
388 #define D2I (DOP+I2I)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
389 #define D2U (DOP+I2U)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
390 #define D2D (DOP+I2D)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
391 #define D2F (DOP+I2F)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
392 #define D2LL (DOP+I2LL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
393 #define D2ULL (DOP+I2ULL)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
394
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
395 #define F2I (FOP+I2I)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
396 #define F2U (FOP+I2U)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
397 #define F2D (FOP+I2D)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
398 #define F2F (FOP+I2F)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
399 #define F2LL (FOP+I2LL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
400 #define F2ULL (FOP+I2ULL)
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
401
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
402 #define LL2I (LOP+I2I)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
403 #define LL2U (LOP+I2U)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
404 #define LL2D (LOP+I2D)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
405 #define LL2F (LOP+I2F)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
406 #define LL2LL (LOP+I2LL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
407 #define LL2ULL (LOP+I2ULL)
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
408
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
409 #define ULL2I (LOP+U2I)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
410 #define ULL2U (LOP+U2U)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
411 #define ULL2D (LOP+U2D)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
412 #define ULL2F (LOP+U2F)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
413 #define ULL2LL (LOP+U2LL)
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
414 #define ULL2ULL (LOP+U2ULL)
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
415
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
416 /* tree node tags end */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
417
453
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
418 /* statement start */
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
419
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
420 #define ST_DECL 118
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
421 #define ST_IF 119
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
422 #define ST_DO 120
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
423 #define ST_WHILE 121
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
424 #define ST_FOR 122
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
425 #define ST_SWITCH 123
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
426 #define ST_COMP 124
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
427 #define ST_BREAK 125
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
428 #define ST_CONTINUE 126
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
429 #define ST_CASE 127
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
430 #define ST_DEFAULT 128
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
431 #define ST_RETURN 129
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
432 #define ST_GOTO 130
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
433 #define ST_ASM 131
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
434 #define ST_LABEL 132
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
435 #define ST_OP 133
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
436 #define ST_COMMENT 134
453
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
437
509
e58848f6ebc1 inline continue...
kono
parents: 500
diff changeset
438 #define IS_STATEMENT(i) (i==INLINE||(ST_DECL<=i&&i<=ST_COMMENT))
453
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
439
602
429ec87e03e7 *** empty log message ***
kono
parents: 599
diff changeset
440 #define HAS_ADDRESS 135
526
9ff5cd7afe2f *** empty log message ***
kono
parents: 523
diff changeset
441
453
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
442 /* statement end */
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
443
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
444 /* error number start */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
445
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
446 #define FILERR 1
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
447 #define DCERR 2
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
448 #define RDERR 3
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
449 #define STERR 4
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
450 #define EXERR 5
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
451 #define CNERR 6
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
452 #define CHERR 7
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
453 #define GSERR 8
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
454 #define LSERR 9
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
455 #define STRERR 10
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
456 #define LNERR 11
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
457 #define EOFERR 12
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
458 #define MCERR 13
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
459 #define INCERR 14
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
460 #define HPERR 15
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
461 #define TYERR 16
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
462 #define LVERR 17
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
463 #define UDERR 18
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
464 #define OPTION 19
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
465 #define REG_ERR 20
389
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
466 #define RGERR 21
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
467 #define CODE_ERR 22
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
468 #define MSERR 23
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
469 #define BTERR 24
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
470 #define HSERR 25
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
471 #define NMERR 26
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
472 #define MMERR 27
68fb244e0e3c mc-arm generates code-gen-all.s with no error,
kono
parents: 363
diff changeset
473 #define INERR 28
523
009289571b54 *** empty log message ***
kono
parents: 509
diff changeset
474 #define AGERR 29
009289571b54 *** empty log message ***
kono
parents: 509
diff changeset
475 #define ILERR 30
558
528fed826f17 const value switch statement prune.
kono
parents: 544
diff changeset
476 #define CSERR 31
572
388baa7d4bee more strict errors.
kono
parents: 566
diff changeset
477 #define GTERR 32
388baa7d4bee more strict errors.
kono
parents: 566
diff changeset
478 #define FNERR 33
388baa7d4bee more strict errors.
kono
parents: 566
diff changeset
479 #define UCERR 34
388baa7d4bee more strict errors.
kono
parents: 566
diff changeset
480 #define UFERR 35
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
481 #define ENERR 36
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
482 #define SIERR 37
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
483
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
484 /* error number end */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
485
526
9ff5cd7afe2f *** empty log message ***
kono
parents: 523
diff changeset
486 /* ctmode bit */
9ff5cd7afe2f *** empty log message ***
kono
parents: 523
diff changeset
487
461
2a49dfe59540 attribute
kono
parents: 456
diff changeset
488 #define KONST_BIT 1
2a49dfe59540 attribute
kono
parents: 456
diff changeset
489 #define VOLATILE_BIT 2
2a49dfe59540 attribute
kono
parents: 456
diff changeset
490 #define RESTRICT_BIT 4
2a49dfe59540 attribute
kono
parents: 456
diff changeset
491
25
b7a94557bf92 *** empty log message ***
kono
parents: 20
diff changeset
492 #define FILES 10
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
493 #define MAX_INCLUDE_PATH_COUNT 10
448
422415e15eb8 *** empty log message ***
kono
parents: 447
diff changeset
494 /*
422415e15eb8 *** empty log message ***
kono
parents: 447
diff changeset
495 For this comiler 8192*2 is Ok. Linux kernel requires 8192*4.
422415e15eb8 *** empty log message ***
kono
parents: 447
diff changeset
496 */
447
818505dd6e1f TYPEOF fix. Hash function opt. Array in decl_data.
kono
parents: 445
diff changeset
497 #define GSYMS (8192*4)
358
4f1fe3731ff0 realloc heap
kono
parents: 357
diff changeset
498 #define HEAPSIZE 30000
452
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
499 #define CHEAPSIZE (sizeof(NMTBL)*8192)
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
500 #define LBUFSIZE 4096
347
cef4d8eb9a26 name table reconfigure continue...
kono
parents: 346
diff changeset
501 #define STRSIZE 4096
254
5aaca4f9d96b *** empty log message ***
kono
parents: 250
diff changeset
502
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
503 typedef struct nametable {
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 326
diff changeset
504 char *nm;
348
e77b3a7002ad name table reconfigure compiled. debug start.
kono
parents: 347
diff changeset
505 struct nametable *next;
445
kono
parents: 435
diff changeset
506 int sc,attr;
kono
parents: 435
diff changeset
507 int ty,dsp; } NMTBL;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
508
452
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
509 extern int *heap; /* heap area (in cheap ) */
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
510 extern NMTBL *global_list; /* list of all global NMTBL */
8e3284b0a8c9 minor update
kono
parents: 451
diff changeset
511 extern NMTBL *local_static_list; /* list of local static variable */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
512
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
513 #if FLOAT_CODE
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
514 extern int dlist2(int e1, double e2);
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
515 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
516 #if LONGLONG_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
517 extern int llist2(int e1, long long e2);
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
518 #endif
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
519 extern int list2(int e1, int e2);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
520 extern int list3(int e1, int e2, int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
521 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
522 extern int list5(int e1, int e2, int e3,int e4,int e5);
318
9fe0b32a7d57 asm continue...
kono
parents: 316
diff changeset
523 extern int length(int e1);
464
d88f08d81bba inline continue....
kono
parents: 461
diff changeset
524 extern int getfree(int size);
318
9fe0b32a7d57 asm continue...
kono
parents: 316
diff changeset
525 extern int nth(int n,int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
526 extern int reverse0(int t1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
527 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
528 extern int append5(int p,int a1,int a2,int a3,int a4);
309
a86612cf1a19 struct partial initialization (local struct copy)
kono
parents: 308
diff changeset
529 extern int insert_ascend(int p,int e,int eq());
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
530
347
cef4d8eb9a26 name table reconfigure continue...
kono
parents: 346
diff changeset
531 extern void free_nptr(NMTBL *n);
cef4d8eb9a26 name table reconfigure continue...
kono
parents: 346
diff changeset
532 extern NMTBL *get_nptr();
346
969089695850 name reconfigure.... continue...
kono
parents: 331
diff changeset
533
590
cc2a83f98188 ia32 reorganization etc.
kono
parents: 574
diff changeset
534 #if 1
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
535 extern int heapsize;
467
32737bad7489 fix list/tag interference
kono
parents: 464
diff changeset
536 #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
537 #else
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
538 #define CHECK_HEAP(b) (b)
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
539 #endif
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
540
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
541 #define car(e) (heap[(int)(CHECK_HEAP(e))])
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
542
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
543 #define cadr(e) (heap[((int)(CHECK_HEAP(e)))+1])
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
544
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
545 #define caddr(e) (heap[((int)(CHECK_HEAP(e)))+2])
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
546
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
547 #define cadddr(e) (heap[((int)(CHECK_HEAP(e)))+3])
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
548
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
549 #define caddddr(e) (heap[((int)(CHECK_HEAP(e)))+4])
449
c55363eff5e5 parallel assignment (modify not completed)
kono
parents: 448
diff changeset
550
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
551 #if FLOAT_CODE
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
552 #define dcadr(e) (*(double*)&heap[((int)(e))+1])
f94ca1168520 float first try...
kono
parents: 78
diff changeset
553 #define dcaddr(e) (*(double*)&heap[((int)(e))+2])
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
554 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
555
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
556 #if LONGLONG_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
557 #define lcadr(e) (*(long long*)&heap[((int)(e))+1])
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
558 #define lcaddr(e) (*(long long*)&heap[((int)(e))+2])
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
559 #endif
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
560
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
561 /* end */