tiny_libmaker: fix a comment
[tinycc.git] / i386-tok.h
blobfde386fe97948574d59290d9858b2b726cf1331f
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_WLX(shld)
130 DEF_WLX(shrd)
132 DEF_ASM(pushw)
133 DEF_ASM(pushl)
134 #ifdef TCC_TARGET_X86_64
135 DEF_ASM(pushq)
136 #endif
137 DEF_ASM(push)
139 DEF_ASM(popw)
140 DEF_ASM(popl)
141 #ifdef TCC_TARGET_X86_64
142 DEF_ASM(popq)
143 #endif
144 DEF_ASM(pop)
146 DEF_BWL(in)
147 DEF_BWL(out)
149 DEF_WLX(movzb)
150 DEF_ASM(movzwl)
151 DEF_ASM(movsbw)
152 DEF_ASM(movsbl)
153 DEF_ASM(movswl)
154 #ifdef TCC_TARGET_X86_64
155 DEF_ASM(movsbq)
156 DEF_ASM(movswq)
157 DEF_ASM(movzwq)
158 DEF_ASM(movslq)
159 #endif
161 DEF_WLX(lea)
163 DEF_ASM(les)
164 DEF_ASM(lds)
165 DEF_ASM(lss)
166 DEF_ASM(lfs)
167 DEF_ASM(lgs)
169 DEF_ASM(call)
170 DEF_ASM(jmp)
171 DEF_ASM(lcall)
172 DEF_ASM(ljmp)
174 DEF_ASMTEST(j,)
176 DEF_ASMTEST(set,)
177 DEF_ASMTEST(set,b)
178 DEF_ASMTEST(cmov,)
180 DEF_WLX(bsf)
181 DEF_WLX(bsr)
182 DEF_WLX(bt)
183 DEF_WLX(bts)
184 DEF_WLX(btr)
185 DEF_WLX(btc)
187 DEF_WLX(lsl)
189 /* generic FP ops */
190 DEF_FP(add)
191 DEF_FP(mul)
193 DEF_ASM(fcom)
194 DEF_ASM(fcom_1) /* non existent op, just to have a regular table */
195 DEF_FP1(com)
197 DEF_FP(comp)
198 DEF_FP(sub)
199 DEF_FP(subr)
200 DEF_FP(div)
201 DEF_FP(divr)
203 DEF_BWLX(xadd)
204 DEF_BWLX(cmpxchg)
206 /* string ops */
207 DEF_BWLX(cmps)
208 DEF_BWLX(scmp)
209 DEF_BWL(ins)
210 DEF_BWL(outs)
211 DEF_BWLX(lods)
212 DEF_BWLX(slod)
213 DEF_BWLX(movs)
214 DEF_BWLX(smov)
215 DEF_BWLX(scas)
216 DEF_BWLX(ssca)
217 DEF_BWLX(stos)
218 DEF_BWLX(ssto)
220 /* generic asm ops */
221 #define ALT(x)
222 #define DEF_ASM_OP0(name, opcode) DEF_ASM(name)
223 #define DEF_ASM_OP0L(name, opcode, group, instr_type)
224 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0)
225 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1)
226 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2)
227 #ifdef TCC_TARGET_X86_64
228 # include "x86_64-asm.h"
229 #else
230 # include "i386-asm.h"
231 #endif
233 #define ALT(x)
234 #define DEF_ASM_OP0(name, opcode)
235 #define DEF_ASM_OP0L(name, opcode, group, instr_type) DEF_ASM(name)
236 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0) DEF_ASM(name)
237 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1) DEF_ASM(name)
238 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2) DEF_ASM(name)
239 #ifdef TCC_TARGET_X86_64
240 # include "x86_64-asm.h"
241 #else
242 # include "i386-asm.h"
243 #endif