-
Notifications
You must be signed in to change notification settings - Fork 1
/
hello.c
340 lines (336 loc) · 5.47 KB
/
hello.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
enum tree_code {
ERROR_MARK,
IDENTIFIER_NODE,
TREE_LIST,
TREE_VEC,
GCC_BLOCK,
OFFSET_TYPE,
ENUMERAL_TYPE,
BOOLEAN_TYPE,
INTEGER_TYPE,
REAL_TYPE,
POINTER_TYPE,
FIXED_POINT_TYPE,
REFERENCE_TYPE,
COMPLEX_TYPE,
VECTOR_TYPE,
ARRAY_TYPE,
RECORD_TYPE,
UNION_TYPE,
QUAL_UNION_TYPE,
VOID_TYPE,
FUNCTION_TYPE,
METHOD_TYPE,
LANG_TYPE,
INTEGER_CST,
REAL_CST,
FIXED_CST,
COMPLEX_CST,
VECTOR_CST,
STRING_CST,
FUNCTION_DECL,
LABEL_DECL,
FIELD_DECL,
VAR_DECL,
CONST_DECL,
PARM_DECL,
TYPE_DECL,
RESULT_DECL,
DEBUG_EXPR_DECL,
NAMESPACE_DECL,
IMPORTED_DECL,
TRANSLATION_UNIT_DECL,
COMPONENT_REF,
BIT_FIELD_REF,
REALPART_EXPR,
IMAGPART_EXPR,
ARRAY_REF,
ARRAY_RANGE_REF,
INDIRECT_REF,
ALIGN_INDIRECT_REF,
MISALIGNED_INDIRECT_REF,
OBJ_TYPE_REF,
CONSTRUCTOR,
COMPOUND_EXPR,
MODIFY_EXPR,
INIT_EXPR,
TARGET_EXPR,
COND_EXPR,
VEC_COND_EXPR,
BIND_EXPR,
CALL_EXPR,
WITH_CLEANUP_EXPR,
CLEANUP_POINT_EXPR,
PLACEHOLDER_EXPR,
PLUS_EXPR,
MINUS_EXPR,
MULT_EXPR,
POINTER_PLUS_EXPR,
TRUNC_DIV_EXPR,
CEIL_DIV_EXPR,
FLOOR_DIV_EXPR,
ROUND_DIV_EXPR,
TRUNC_MOD_EXPR,
CEIL_MOD_EXPR,
FLOOR_MOD_EXPR,
ROUND_MOD_EXPR,
RDIV_EXPR,
EXACT_DIV_EXPR,
FIX_TRUNC_EXPR,
FLOAT_EXPR,
NEGATE_EXPR,
MIN_EXPR,
MAX_EXPR,
ABS_EXPR,
LSHIFT_EXPR,
RSHIFT_EXPR,
LROTATE_EXPR,
RROTATE_EXPR,
BIT_IOR_EXPR,
BIT_XOR_EXPR,
BIT_AND_EXPR,
BIT_NOT_EXPR,
TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR,
TRUTH_AND_EXPR,
TRUTH_OR_EXPR,
TRUTH_XOR_EXPR,
TRUTH_NOT_EXPR,
LT_EXPR,
LE_EXPR,
GT_EXPR,
GE_EXPR,
EQ_EXPR,
NE_EXPR,
UNORDERED_EXPR,
ORDERED_EXPR,
UN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_PACK_SAT_EXPR,
VEC_PACK_FIX_TRUNC_EXPR,
VEC_EXTRACT_EVEN_EXPR,
VEC_EXTRACT_ODD_EXPR,
VEC_INTERLEAVE_HIGH_EXPR,
VEC_INTERLEAVE_LOW_EXPR,
PREDICT_EXPR,
OPTIMIZATION_NODE,
TARGET_OPTION_NODE,
LAST_AND_UNUSED_TREE_CODE,
C_MAYBE_CONST_EXPR,
EXCESS_PRECISION_EXPR,
UNCONSTRAINED_ARRAY_TYPE,
UNCONSTRAINED_ARRAY_REF,
NULL_EXPR,
PLUS_NOMOD_EXPR,
MINUS_NOMOD_EXPR,
ATTR_ADDR_EXPR,
STMT_STMT,
LOOP_STMT,
EXIT_STMT,
OFFSET_REF,
PTRMEM_CST,
NEW_EXPR,
VEC_NEW_EXPR,
DELETE_EXPR,
VEC_DELETE_EXPR,
SCOPE_REF,
MEMBER_REF,
TYPE_EXPR,
AGGR_INIT_EXPR,
VEC_INIT_EXPR,
THROW_EXPR,
EMPTY_CLASS_EXPR,
BASELINK,
TEMPLATE_DECL,
TEMPLATE_PARM_INDEX,
TEMPLATE_TEMPLATE_PARM,
TEMPLATE_TYPE_PARM,
TYPENAME_TYPE,
TYPEOF_TYPE,
BOUND_TEMPLATE_TEMPLATE_PARM,
UNBOUND_CLASS_TEMPLATE,
USING_DECL,
USING_STMT,
DEFAULT_ARG,
TEMPLATE_ID_EXPR,
OVERLOAD,
PSEUDO_DTOR_EXPR,
MODOP_EXPR,
CAST_EXPR,
REINTERPRET_CAST_EXPR,
CONST_CAST_EXPR,
STATIC_CAST_EXPR,
DYNAMIC_CAST_EXPR,
DOTSTAR_EXPR,
TYPEID_EXPR,
NON_DEPENDENT_EXPR,
CTOR_INITIALIZER,
TRY_BLOCK,
EH_SPEC_BLOCK,
HANDLER,
MUST_NOT_THROW_EXPR,
CLEANUP_STMT,
IF_STMT,
FOR_STMT,
WHILE_STMT,
DO_STMT,
BREAK_STMT,
CONTINUE_STMT,
SWITCH_STMT,
EXPR_STMT,
TAG_DEFN,
OFFSETOF_EXPR,
SIZEOF_EXPR,
ARROW_EXPR,
ALIGNOF_EXPR,
STMT_EXPR,
UNARY_PLUS_EXPR,
STATIC_ASSERT,
TYPE_ARGUMENT_PACK,
NONTYPE_ARGUMENT_PACK,
TYPE_PACK_EXPANSION,
EXPR_PACK_EXPANSION,
ARGUMENT_PACK_SELECT,
TRAIT_EXPR,
LAMBDA_EXPR,
DECLTYPE_TYPE,
TEMPLATE_INFO,
URSHIFT_EXPR,
COMPARE_EXPR,
COMPARE_L_EXPR,
COMPARE_G_EXPR,
CLASS_INTERFACE_TYPE,
CLASS_IMPLEMENTATION_TYPE,
CATEGORY_INTERFACE_TYPE,
CATEGORY_IMPLEMENTATION_TYPE,
PROTOCOL_INTERFACE_TYPE,
KEYWORD_DECL,
INSTANCE_METHOD_DECL,
CLASS_METHOD_DECL,
MESSAGE_SEND_EXPR,
CLASS_REFERENCE_EXPR,
MAX_TREE_CODES
};
unsigned char tree_contains_struct[MAX_TREE_CODES][64]={};
enum tree_code_class {
tcc_exceptional,
tcc_constant,
tcc_type,
tcc_declaration,
tcc_reference,
tcc_comparison,
tcc_unary,
tcc_binary,
tcc_statement,
tcc_vl_exp,
tcc_expression
};
// this is the format
struct tree_base {
enum tree_code code : 16; // this is normally the tree code, but took it out for now
unsigned side_effects_flag : 1;
unsigned constant_flag : 1;
unsigned addressable_flag : 1;
unsigned volatile_flag : 1;
unsigned readonly_flag : 1;
unsigned unsigned_flag : 1;
unsigned asm_written_flag: 1;
unsigned nowarning_flag : 1;
unsigned used_flag : 1;
unsigned nothrow_flag : 1;
unsigned static_flag : 1;
unsigned public_flag : 1;
unsigned private_flag : 1;
unsigned protected_flag : 1;
unsigned deprecated_flag : 1;
unsigned saturating_flag : 1;
unsigned default_def_flag : 1;
unsigned lang_flag_0 : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_2 : 1;
unsigned lang_flag_3 : 1;
unsigned lang_flag_4 : 1;
unsigned lang_flag_5 : 1;
unsigned lang_flag_6 : 1;
unsigned visited : 1;
unsigned packed_flag : 1;
unsigned user_align : 1;
unsigned nameless_flag : 1;
unsigned spare : 12;
unsigned address_space : 8;
};
struct s{
int x;
};