Go to the documentation of this file.
21 #ifndef AVUTIL_X86_ASM_H
22 #define AVUTIL_X86_ASM_H
31 # define FF_OPSIZE "q"
32 # define FF_REG_a "rax"
33 # define FF_REG_b "rbx"
34 # define FF_REG_c "rcx"
35 # define FF_REG_d "rdx"
36 # define FF_REG_D "rdi"
37 # define FF_REG_S "rsi"
38 # define FF_PTR_SIZE "8"
41 # define FF_REG_SP "rsp"
42 # define FF_REG_BP "rbp"
52 # define FF_OPSIZE "l"
53 # define FF_REG_a "eax"
54 # define FF_REG_b "ebx"
55 # define FF_REG_c "ecx"
56 # define FF_REG_d "edx"
57 # define FF_REG_D "edi"
58 # define FF_REG_S "esi"
59 # define FF_PTR_SIZE "4"
62 # define FF_REG_SP "esp"
63 # define FF_REG_BP "ebp"
74 #if ARCH_X86_64 && defined(PIC)
75 # define BROKEN_RELOCATIONS 1
91 # define XMM_CLOBBERS(...) __VA_ARGS__
92 # define XMM_CLOBBERS_ONLY(...) : __VA_ARGS__
94 # define XMM_CLOBBERS(...)
95 # define XMM_CLOBBERS_ONLY(...)
99 #define LABEL_MANGLE(a) EXTERN_PREFIX #a
102 #if ARCH_X86_64 && defined(PIC)
103 # define LOCAL_MANGLE(a) #a "(%%rip)"
105 # define LOCAL_MANGLE(a) #a
108 #if HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS
109 # define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
110 # define NAMED_CONSTRAINTS_ADD(...)
111 # define NAMED_CONSTRAINTS(...)
112 # define NAMED_CONSTRAINTS_ARRAY_ADD(...)
113 # define NAMED_CONSTRAINTS_ARRAY(...)
123 # define MANGLE(a) "%["#a"]"
125 # define FE_0(P,X) P(X)
126 # define FE_1(P,X,X1) P(X), FE_0(P,X1)
127 # define FE_2(P,X,X1,X2) P(X), FE_1(P,X1,X2)
128 # define FE_3(P,X,X1,X2,X3) P(X), FE_2(P,X1,X2,X3)
129 # define FE_4(P,X,X1,X2,X3,X4) P(X), FE_3(P,X1,X2,X3,X4)
130 # define FE_5(P,X,X1,X2,X3,X4,X5) P(X), FE_4(P,X1,X2,X3,X4,X5)
131 # define FE_6(P,X,X1,X2,X3,X4,X5,X6) P(X), FE_5(P,X1,X2,X3,X4,X5,X6)
132 # define FE_7(P,X,X1,X2,X3,X4,X5,X6,X7) P(X), FE_6(P,X1,X2,X3,X4,X5,X6,X7)
133 # define FE_8(P,X,X1,X2,X3,X4,X5,X6,X7,X8) P(X), FE_7(P,X1,X2,X3,X4,X5,X6,X7,X8)
134 # define FE_9(P,X,X1,X2,X3,X4,X5,X6,X7,X8,X9) P(X), FE_8(P,X1,X2,X3,X4,X5,X6,X7,X8,X9)
135 # define GET_FE_IMPL(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME
136 # define GET_FE(A) GET_FE_IMPL A
137 # define GET_FE_GLUE(x, y) x y
138 # define FOR_EACH_VA(P,...) GET_FE_GLUE(GET_FE((__VA_ARGS__,FE_9,FE_8,FE_7,FE_6,FE_5,FE_4,FE_3,FE_2,FE_1,FE_0)), (P,__VA_ARGS__))
139 # define NAME_CONSTRAINT(x) [x] "m"(x)
141 # define NAMED_CONSTRAINTS_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__)
143 # define NAMED_CONSTRAINTS(...) FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__)
145 # define NAME_CONSTRAINT_ARRAY(x) [x] "m"(*x)
146 # define NAMED_CONSTRAINTS_ARRAY_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__)
147 # define NAMED_CONSTRAINTS_ARRAY(...) FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__)