Adding two more people to the RELICENSING file.
[tinycc.git] / i386-tok.h
blobb0ca3edb3f7aa8be0040aadf3f10b90c0af4a7ab
1 /* ------------------------------------------------------------------ */
2 /* WARNING: relative order of tokens is important. */
4 /* register */
5 DEF_ASM(al)
6 DEF_ASM(cl)
7 DEF_ASM(dl)
8 DEF_ASM(bl)
9 DEF_ASM(ah)
10 DEF_ASM(ch)
11 DEF_ASM(dh)
12 DEF_ASM(bh)
13 DEF_ASM(ax)
14 DEF_ASM(cx)
15 DEF_ASM(dx)
16 DEF_ASM(bx)
17 DEF_ASM(sp)
18 DEF_ASM(bp)
19 DEF_ASM(si)
20 DEF_ASM(di)
21 DEF_ASM(eax)
22 DEF_ASM(ecx)
23 DEF_ASM(edx)
24 DEF_ASM(ebx)
25 DEF_ASM(esp)
26 DEF_ASM(ebp)
27 DEF_ASM(esi)
28 DEF_ASM(edi)
29 #ifdef TCC_TARGET_X86_64
30 DEF_ASM(rax)
31 DEF_ASM(rcx)
32 DEF_ASM(rdx)
33 DEF_ASM(rbx)
34 DEF_ASM(rsp)
35 DEF_ASM(rbp)
36 DEF_ASM(rsi)
37 DEF_ASM(rdi)
38 #endif
39 DEF_ASM(mm0)
40 DEF_ASM(mm1)
41 DEF_ASM(mm2)
42 DEF_ASM(mm3)
43 DEF_ASM(mm4)
44 DEF_ASM(mm5)
45 DEF_ASM(mm6)
46 DEF_ASM(mm7)
47 DEF_ASM(xmm0)
48 DEF_ASM(xmm1)
49 DEF_ASM(xmm2)
50 DEF_ASM(xmm3)
51 DEF_ASM(xmm4)
52 DEF_ASM(xmm5)
53 DEF_ASM(xmm6)
54 DEF_ASM(xmm7)
55 DEF_ASM(cr0)
56 DEF_ASM(cr1)
57 DEF_ASM(cr2)
58 DEF_ASM(cr3)
59 DEF_ASM(cr4)
60 DEF_ASM(cr5)
61 DEF_ASM(cr6)
62 DEF_ASM(cr7)
63 DEF_ASM(tr0)
64 DEF_ASM(tr1)
65 DEF_ASM(tr2)
66 DEF_ASM(tr3)
67 DEF_ASM(tr4)
68 DEF_ASM(tr5)
69 DEF_ASM(tr6)
70 DEF_ASM(tr7)
71 DEF_ASM(db0)
72 DEF_ASM(db1)
73 DEF_ASM(db2)
74 DEF_ASM(db3)
75 DEF_ASM(db4)
76 DEF_ASM(db5)
77 DEF_ASM(db6)
78 DEF_ASM(db7)
79 DEF_ASM(dr0)
80 DEF_ASM(dr1)
81 DEF_ASM(dr2)
82 DEF_ASM(dr3)
83 DEF_ASM(dr4)
84 DEF_ASM(dr5)
85 DEF_ASM(dr6)
86 DEF_ASM(dr7)
87 DEF_ASM(es)
88 DEF_ASM(cs)
89 DEF_ASM(ss)
90 DEF_ASM(ds)
91 DEF_ASM(fs)
92 DEF_ASM(gs)
93 DEF_ASM(st)
95 /* generic two operands */
96 DEF_BWLX(mov)
98 DEF_BWLX(add)
99 DEF_BWLX(or)
100 DEF_BWLX(adc)
101 DEF_BWLX(sbb)
102 DEF_BWLX(and)
103 DEF_BWLX(sub)
104 DEF_BWLX(xor)
105 DEF_BWLX(cmp)
107 /* unary ops */
108 DEF_BWLX(inc)
109 DEF_BWLX(dec)
110 DEF_BWLX(not)
111 DEF_BWLX(neg)
112 DEF_BWLX(mul)
113 DEF_BWLX(imul)
114 DEF_BWLX(div)
115 DEF_BWLX(idiv)
117 DEF_BWLX(xchg)
118 DEF_BWLX(test)
120 /* shifts */
121 DEF_BWLX(rol)
122 DEF_BWLX(ror)
123 DEF_BWLX(rcl)
124 DEF_BWLX(rcr)
125 DEF_BWLX(shl)
126 DEF_BWLX(shr)
127 DEF_BWLX(sar)
129 DEF_ASM(shldw)
130 DEF_ASM(shldl)
131 DEF_ASM(shld)
132 DEF_ASM(shrdw)
133 DEF_ASM(shrdl)
134 DEF_ASM(shrd)
136 DEF_ASM(pushw)
137 DEF_ASM(pushl)
138 #ifdef TCC_TARGET_X86_64
139 DEF_ASM(pushq)
140 #endif
141 DEF_ASM(push)
143 DEF_ASM(popw)
144 DEF_ASM(popl)
145 #ifdef TCC_TARGET_X86_64
146 DEF_ASM(popq)
147 #endif
148 DEF_ASM(pop)
150 DEF_BWL(in)
151 DEF_BWL(out)
153 DEF_WL(movzb)
154 DEF_ASM(movzwl)
155 DEF_ASM(movsbw)
156 DEF_ASM(movsbl)
157 DEF_ASM(movswl)
158 #ifdef TCC_TARGET_X86_64
159 DEF_ASM(movslq)
160 #endif
162 DEF_WLX(lea)
164 DEF_ASM(les)
165 DEF_ASM(lds)
166 DEF_ASM(lss)
167 DEF_ASM(lfs)
168 DEF_ASM(lgs)
170 DEF_ASM(call)
171 DEF_ASM(jmp)
172 DEF_ASM(lcall)
173 DEF_ASM(ljmp)
175 DEF_ASMTEST(j,)
177 DEF_ASMTEST(set,)
178 DEF_ASMTEST(set,b)
179 DEF_ASMTEST(cmov,)
181 DEF_WLX(bsf)
182 DEF_WLX(bsr)
183 DEF_WLX(bt)
184 DEF_WLX(bts)
185 DEF_WLX(btr)
186 DEF_WLX(btc)
188 DEF_WLX(lsl)
190 /* generic FP ops */
191 DEF_FP(add)
192 DEF_FP(mul)
194 DEF_ASM(fcom)
195 DEF_ASM(fcom_1) /* non existent op, just to have a regular table */
196 DEF_FP1(com)
198 DEF_FP(comp)
199 DEF_FP(sub)
200 DEF_FP(subr)
201 DEF_FP(div)
202 DEF_FP(divr)
204 DEF_BWLX(xadd)
205 DEF_BWLX(cmpxchg)
207 /* string ops */
208 DEF_BWLX(cmps)
209 DEF_BWLX(scmp)
210 DEF_BWL(ins)
211 DEF_BWL(outs)
212 DEF_BWLX(lods)
213 DEF_BWLX(slod)
214 DEF_BWLX(movs)
215 DEF_BWLX(smov)
216 DEF_BWLX(scas)
217 DEF_BWLX(ssca)
218 DEF_BWLX(stos)
219 DEF_BWLX(ssto)
221 /* generic asm ops */
222 #define ALT(x)
223 #define DEF_ASM_OP0(name, opcode) DEF_ASM(name)
224 #define DEF_ASM_OP0L(name, opcode, group, instr_type)
225 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0)
226 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1)
227 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2)
228 #ifdef TCC_TARGET_X86_64
229 # include "x86_64-asm.h"
230 #else
231 # include "i386-asm.h"
232 #endif
234 #define ALT(x)
235 #define DEF_ASM_OP0(name, opcode)
236 #define DEF_ASM_OP0L(name, opcode, group, instr_type) DEF_ASM(name)
237 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0) DEF_ASM(name)
238 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1) DEF_ASM(name)
239 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2) DEF_ASM(name)
240 #ifdef TCC_TARGET_X86_64
241 # include "x86_64-asm.h"
242 #else
243 # include "i386-asm.h"
244 #endif