7 DEF(TOK_WHILE
, "while")
8 DEF(TOK_BREAK
, "break")
9 DEF(TOK_RETURN
, "return")
11 DEF(TOK_EXTERN
, "extern")
12 DEF(TOK_STATIC
, "static")
13 DEF(TOK_UNSIGNED
, "unsigned")
16 DEF(TOK_CONTINUE
, "continue")
17 DEF(TOK_SWITCH
, "switch")
20 DEF(TOK_CONST1
, "const")
21 DEF(TOK_CONST2
, "__const") /* gcc keyword */
22 DEF(TOK_CONST3
, "__const__") /* gcc keyword */
23 DEF(TOK_VOLATILE1
, "volatile")
24 DEF(TOK_VOLATILE2
, "__volatile") /* gcc keyword */
25 DEF(TOK_VOLATILE3
, "__volatile__") /* gcc keyword */
27 DEF(TOK_REGISTER
, "register")
28 DEF(TOK_SIGNED1
, "signed")
29 DEF(TOK_SIGNED2
, "__signed") /* gcc keyword */
30 DEF(TOK_SIGNED3
, "__signed__") /* gcc keyword */
32 DEF(TOK_INLINE1
, "inline")
33 DEF(TOK_INLINE2
, "__inline") /* gcc keyword */
34 DEF(TOK_INLINE3
, "__inline__") /* gcc keyword */
35 DEF(TOK_RESTRICT1
, "restrict")
36 DEF(TOK_RESTRICT2
, "__restrict")
37 DEF(TOK_RESTRICT3
, "__restrict__")
38 DEF(TOK_EXTENSION
, "__extension__") /* gcc keyword */
40 DEF(TOK_FLOAT
, "float")
41 DEF(TOK_DOUBLE
, "double")
42 DEF(TOK_BOOL
, "_Bool")
43 DEF(TOK_SHORT
, "short")
44 DEF(TOK_STRUCT
, "struct")
45 DEF(TOK_UNION
, "union")
46 DEF(TOK_TYPEDEF
, "typedef")
47 DEF(TOK_DEFAULT
, "default")
49 DEF(TOK_SIZEOF
, "sizeof")
50 DEF(TOK_ATTRIBUTE1
, "__attribute")
51 DEF(TOK_ATTRIBUTE2
, "__attribute__")
52 DEF(TOK_ALIGNOF1
, "__alignof")
53 DEF(TOK_ALIGNOF2
, "__alignof__")
54 DEF(TOK_TYPEOF1
, "typeof")
55 DEF(TOK_TYPEOF2
, "__typeof")
56 DEF(TOK_TYPEOF3
, "__typeof__")
57 DEF(TOK_LABEL
, "__label__")
59 DEF(TOK_ASM2
, "__asm")
60 DEF(TOK_ASM3
, "__asm__")
62 /*********************************************************************/
63 /* the following are not keywords. They are included to ease parsing */
64 /* preprocessor only */
65 DEF(TOK_DEFINE
, "define")
66 DEF(TOK_INCLUDE
, "include")
67 DEF(TOK_IFDEF
, "ifdef")
68 DEF(TOK_IFNDEF
, "ifndef")
70 DEF(TOK_ENDIF
, "endif")
71 DEF(TOK_DEFINED
, "defined")
72 DEF(TOK_UNDEF
, "undef")
73 DEF(TOK_ERROR
, "error")
74 DEF(TOK_WARNING
, "warning")
76 DEF(TOK_PRAGMA
, "pragma")
77 DEF(TOK___LINE__
, "__LINE__")
78 DEF(TOK___FILE__
, "__FILE__")
79 DEF(TOK___DATE__
, "__DATE__")
80 DEF(TOK___TIME__
, "__TIME__")
81 DEF(TOK___FUNCTION__
, "__FUNCTION__")
82 DEF(TOK___VA_ARGS__
, "__VA_ARGS__")
84 /* special identifiers */
85 DEF(TOK___FUNC__
, "__func__")
87 /* attribute identifiers */
88 /* XXX: handle all tokens generically since speed is not critical */
89 DEF(TOK_SECTION1
, "section")
90 DEF(TOK_SECTION2
, "__section__")
91 DEF(TOK_ALIGNED1
, "aligned")
92 DEF(TOK_ALIGNED2
, "__aligned__")
93 DEF(TOK_PACKED1
, "packed")
94 DEF(TOK_PACKED2
, "__packed__")
95 DEF(TOK_UNUSED1
, "unused")
96 DEF(TOK_UNUSED2
, "__unused__")
97 DEF(TOK_CDECL1
, "cdecl")
98 DEF(TOK_CDECL2
, "__cdecl")
99 DEF(TOK_CDECL3
, "__cdecl__")
100 DEF(TOK_STDCALL1
, "stdcall")
101 DEF(TOK_STDCALL2
, "__stdcall")
102 DEF(TOK_STDCALL3
, "__stdcall__")
103 DEF(TOK_NORETURN1
, "noreturn")
104 DEF(TOK_NORETURN2
, "__noreturn__")
105 DEF(TOK_builtin_types_compatible_p
, "__builtin_types_compatible_p")
106 DEF(TOK_builtin_constant_p
, "__builtin_constant_p")
107 DEF(TOK_REGPARM1
, "regparm")
108 DEF(TOK_REGPARM2
, "__regparm__")
110 /* builtin functions or variables */
111 DEF(TOK_memcpy
, "memcpy")
112 DEF(TOK_memset
, "memset")
113 DEF(TOK_alloca
, "alloca")
114 DEF(TOK___divdi3
, "__divdi3")
115 DEF(TOK___moddi3
, "__moddi3")
116 DEF(TOK___udivdi3
, "__udivdi3")
117 DEF(TOK___umoddi3
, "__umoddi3")
118 #if defined(TCC_TARGET_ARM)
119 DEF(TOK___divsi3
, "__divsi3")
120 DEF(TOK___modsi3
, "__modsi3")
121 DEF(TOK___udivsi3
, "__udivsi3")
122 DEF(TOK___umodsi3
, "__umodsi3")
123 DEF(TOK___sardi3
, "__ashrdi3")
124 DEF(TOK___shrdi3
, "__lshrdi3")
125 DEF(TOK___shldi3
, "__ashldi3")
126 DEF(TOK___slltold
, "__slltold")
127 DEF(TOK___fixunssfsi
, "__fixunssfsi")
128 DEF(TOK___fixunsdfsi
, "__fixunsdfsi")
129 DEF(TOK___fixunsxfsi
, "__fixunsxfsi")
130 DEF(TOK___fixsfdi
, "__fixsfdi")
131 DEF(TOK___fixdfdi
, "__fixdfdi")
132 DEF(TOK___fixxfdi
, "__fixxfdi")
133 #elif defined(TCC_TARGET_C67)
134 DEF(TOK__divi
, "_divi")
135 DEF(TOK__divu
, "_divu")
136 DEF(TOK__divf
, "_divf")
137 DEF(TOK__divd
, "_divd")
138 DEF(TOK__remi
, "_remi")
139 DEF(TOK__remu
, "_remu")
140 DEF(TOK___sardi3
, "__sardi3")
141 DEF(TOK___shrdi3
, "__shrdi3")
142 DEF(TOK___shldi3
, "__shldi3")
144 /* XXX: same names on i386 ? */
145 DEF(TOK___sardi3
, "__sardi3")
146 DEF(TOK___shrdi3
, "__shrdi3")
147 DEF(TOK___shldi3
, "__shldi3")
149 DEF(TOK___tcc_int_fpu_control
, "__tcc_int_fpu_control")
150 DEF(TOK___tcc_fpu_control
, "__tcc_fpu_control")
151 DEF(TOK___ulltof
, "__ulltof")
152 DEF(TOK___ulltod
, "__ulltod")
153 DEF(TOK___ulltold
, "__ulltold")
154 DEF(TOK___fixunssfdi
, "__fixunssfdi")
155 DEF(TOK___fixunsdfdi
, "__fixunsdfdi")
156 DEF(TOK___fixunsxfdi
, "__fixunsxfdi")
158 /* bound checking symbols */
159 #ifdef CONFIG_TCC_BCHECK
160 DEF(TOK___bound_ptr_add
, "__bound_ptr_add")
161 DEF(TOK___bound_ptr_indir1
, "__bound_ptr_indir1")
162 DEF(TOK___bound_ptr_indir2
, "__bound_ptr_indir2")
163 DEF(TOK___bound_ptr_indir4
, "__bound_ptr_indir4")
164 DEF(TOK___bound_ptr_indir8
, "__bound_ptr_indir8")
165 DEF(TOK___bound_ptr_indir12
, "__bound_ptr_indir12")
166 DEF(TOK___bound_ptr_indir16
, "__bound_ptr_indir16")
167 DEF(TOK___bound_local_new
, "__bound_local_new")
168 DEF(TOK___bound_local_delete
, "__bound_local_delete")
169 DEF(TOK_malloc
, "malloc")
170 DEF(TOK_free
, "free")
171 DEF(TOK_realloc
, "realloc")
172 DEF(TOK_memalign
, "memalign")
173 DEF(TOK_calloc
, "calloc")
174 DEF(TOK_memmove
, "memmove")
175 DEF(TOK_strlen
, "strlen")
176 DEF(TOK_strcpy
, "strcpy")
198 #ifdef TCC_TARGET_I386
200 /* WARNING: relative order of tokens is important. */
283 /* generic two operands */
370 DEF_ASM(fcom_1
) /* non existant op, just to have a regular table */
396 /* generic asm ops */
399 #define DEF_ASM_OP0(name, opcode) DEF_ASM(name)
400 #define DEF_ASM_OP0L(name, opcode, group, instr_type)
401 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0)
402 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1)
403 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2)
404 #include "i386-asm.h"
407 #define DEF_ASM_OP0(name, opcode)
408 #define DEF_ASM_OP0L(name, opcode, group, instr_type) DEF_ASM(name)
409 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0) DEF_ASM(name)
410 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1) DEF_ASM(name)
411 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2) DEF_ASM(name)
412 #include "i386-asm.h"