1 /* ------------------------------------------------------------------ */
2 /* WARNING: relative order of tokens is important. */
5 DEF(TOK_ASM_ ## x ## b, #x "b") \
6 DEF(TOK_ASM_ ## x ## w, #x "w") \
7 DEF(TOK_ASM_ ## x ## l, #x "l") \
10 DEF(TOK_ASM_ ## x ## w, #x "w") \
11 DEF(TOK_ASM_ ## x ## l, #x "l") \
12 DEF(TOK_ASM_ ## x, #x)
13 #ifdef TCC_TARGET_X86_64
14 # define DEF_BWLQ(x) \
15 DEF(TOK_ASM_ ## x ## b, #x "b") \
16 DEF(TOK_ASM_ ## x ## w, #x "w") \
17 DEF(TOK_ASM_ ## x ## l, #x "l") \
18 DEF(TOK_ASM_ ## x ## q, #x "q") \
19 DEF(TOK_ASM_ ## x, #x)
21 DEF(TOK_ASM_ ## x ## w, #x "w") \
22 DEF(TOK_ASM_ ## x ## l, #x "l") \
23 DEF(TOK_ASM_ ## x ## q, #x "q") \
24 DEF(TOK_ASM_ ## x, #x)
25 # define DEF_BWLX DEF_BWLQ
26 # define DEF_WLX DEF_WLQ
27 /* number of sizes + 1 */
30 # define DEF_BWLX DEF_BWL
31 # define DEF_WLX DEF_WL
32 /* number of sizes + 1 */
37 DEF(TOK_ASM_ ## f ## x ## s, "f" #x "s") \
38 DEF(TOK_ASM_ ## fi ## x ## l, "fi" #x "l") \
39 DEF(TOK_ASM_ ## f ## x ## l, "f" #x "l") \
40 DEF(TOK_ASM_ ## fi ## x ## s, "fi" #x "s")
43 DEF(TOK_ASM_ ## f ## x, "f" #x ) \
44 DEF(TOK_ASM_ ## f ## x ## p, "f" #x "p") \
47 #define DEF_ASMTEST(x,suffix) \
48 DEF_ASM(x ## o ## suffix) \
49 DEF_ASM(x ## no ## suffix) \
50 DEF_ASM(x ## b ## suffix) \
51 DEF_ASM(x ## c ## suffix) \
52 DEF_ASM(x ## nae ## suffix) \
53 DEF_ASM(x ## nb ## suffix) \
54 DEF_ASM(x ## nc ## suffix) \
55 DEF_ASM(x ## ae ## suffix) \
56 DEF_ASM(x ## e ## suffix) \
57 DEF_ASM(x ## z ## suffix) \
58 DEF_ASM(x ## ne ## suffix) \
59 DEF_ASM(x ## nz ## suffix) \
60 DEF_ASM(x ## be ## suffix) \
61 DEF_ASM(x ## na ## suffix) \
62 DEF_ASM(x ## nbe ## suffix) \
63 DEF_ASM(x ## a ## suffix) \
64 DEF_ASM(x ## s ## suffix) \
65 DEF_ASM(x ## ns ## suffix) \
66 DEF_ASM(x ## p ## suffix) \
67 DEF_ASM(x ## pe ## suffix) \
68 DEF_ASM(x ## np ## suffix) \
69 DEF_ASM(x ## po ## suffix) \
70 DEF_ASM(x ## l ## suffix) \
71 DEF_ASM(x ## nge ## suffix) \
72 DEF_ASM(x ## nl ## suffix) \
73 DEF_ASM(x ## ge ## suffix) \
74 DEF_ASM(x ## le ## suffix) \
75 DEF_ASM(x ## ng ## suffix) \
76 DEF_ASM(x ## nle ## suffix) \
77 DEF_ASM(x ## g ## suffix)
79 /* ------------------------------------------------------------------ */
105 #ifdef TCC_TARGET_X86_64
172 #ifdef TCC_TARGET_X86_64
173 /* The four low parts of sp/bp/si/di that exist only on
174 x86-64 (encoding aliased to ah,ch,dh,dh when not using REX). */
180 /* generic two operands */
219 #ifdef TCC_TARGET_X86_64
226 #ifdef TCC_TARGET_X86_64
239 #ifdef TCC_TARGET_X86_64
281 DEF_ASM(fcom_1
) /* non existent op, just to have a regular table */
307 /* generic asm ops */
309 #define DEF_ASM_OP0(name, opcode) DEF_ASM(name)
310 #define DEF_ASM_OP0L(name, opcode, group, instr_type)
311 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0)
312 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1)
313 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2)
314 #ifdef TCC_TARGET_X86_64
315 # include "x86_64-asm.h"
317 # include "i386-asm.h"
321 #define DEF_ASM_OP0(name, opcode)
322 #define DEF_ASM_OP0L(name, opcode, group, instr_type) DEF_ASM(name)
323 #define DEF_ASM_OP1(name, opcode, group, instr_type, op0) DEF_ASM(name)
324 #define DEF_ASM_OP2(name, opcode, group, instr_type, op0, op1) DEF_ASM(name)
325 #define DEF_ASM_OP3(name, opcode, group, instr_type, op0, op1, op2) DEF_ASM(name)
326 #ifdef TCC_TARGET_X86_64
327 # include "x86_64-asm.h"
329 # include "i386-asm.h"