root / target-i386 / ops_sse_header.h @ 067d01de
History | View | Annotate | Download (11.4 kB)
1 | 5af45186 | bellard | /*
|
---|---|---|---|
2 | 222a3336 | balrog | * MMX/3DNow!/SSE/SSE2/SSE3/SSSE3/SSE4/PNI support
|
3 | 5af45186 | bellard | *
|
4 | 5af45186 | bellard | * Copyright (c) 2005 Fabrice Bellard
|
5 | 5af45186 | bellard | *
|
6 | 5af45186 | bellard | * This library is free software; you can redistribute it and/or
|
7 | 5af45186 | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | 5af45186 | bellard | * License as published by the Free Software Foundation; either
|
9 | 5af45186 | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | 5af45186 | bellard | *
|
11 | 5af45186 | bellard | * This library is distributed in the hope that it will be useful,
|
12 | 5af45186 | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 5af45186 | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 5af45186 | bellard | * Lesser General Public License for more details.
|
15 | 5af45186 | bellard | *
|
16 | 5af45186 | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | 8167ee88 | Blue Swirl | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
18 | 5af45186 | bellard | */
|
19 | 5af45186 | bellard | #if SHIFT == 0 |
20 | 5af45186 | bellard | #define Reg MMXReg
|
21 | 5af45186 | bellard | #define SUFFIX _mmx
|
22 | 5af45186 | bellard | #else
|
23 | 5af45186 | bellard | #define Reg XMMReg
|
24 | 5af45186 | bellard | #define SUFFIX _xmm
|
25 | 5af45186 | bellard | #endif
|
26 | 5af45186 | bellard | |
27 | a7812ae4 | pbrook | #define dh_alias_Reg ptr
|
28 | a7812ae4 | pbrook | #define dh_alias_XMMReg ptr
|
29 | a7812ae4 | pbrook | #define dh_alias_MMXReg ptr
|
30 | a7812ae4 | pbrook | #define dh_ctype_Reg Reg *
|
31 | a7812ae4 | pbrook | #define dh_ctype_XMMReg XMMReg *
|
32 | a7812ae4 | pbrook | #define dh_ctype_MMXReg MMXReg *
|
33 | a7812ae4 | pbrook | |
34 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psrlw, SUFFIX), void, Reg, Reg)
|
35 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psraw, SUFFIX), void, Reg, Reg)
|
36 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psllw, SUFFIX), void, Reg, Reg)
|
37 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psrld, SUFFIX), void, Reg, Reg)
|
38 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psrad, SUFFIX), void, Reg, Reg)
|
39 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pslld, SUFFIX), void, Reg, Reg)
|
40 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psrlq, SUFFIX), void, Reg, Reg)
|
41 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psllq, SUFFIX), void, Reg, Reg)
|
42 | 5af45186 | bellard | |
43 | 5af45186 | bellard | #if SHIFT == 1 |
44 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psrldq, SUFFIX), void, Reg, Reg)
|
45 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pslldq, SUFFIX), void, Reg, Reg)
|
46 | 5af45186 | bellard | #endif
|
47 | 5af45186 | bellard | |
48 | 5af45186 | bellard | #define SSE_HELPER_B(name, F)\
|
49 | a7812ae4 | pbrook | DEF_HELPER_2(glue(name, SUFFIX), void, Reg, Reg)
|
50 | 5af45186 | bellard | |
51 | 5af45186 | bellard | #define SSE_HELPER_W(name, F)\
|
52 | a7812ae4 | pbrook | DEF_HELPER_2(glue(name, SUFFIX), void, Reg, Reg)
|
53 | 5af45186 | bellard | |
54 | 5af45186 | bellard | #define SSE_HELPER_L(name, F)\
|
55 | a7812ae4 | pbrook | DEF_HELPER_2(glue(name, SUFFIX), void, Reg, Reg)
|
56 | 5af45186 | bellard | |
57 | 5af45186 | bellard | #define SSE_HELPER_Q(name, F)\
|
58 | a7812ae4 | pbrook | DEF_HELPER_2(glue(name, SUFFIX), void, Reg, Reg)
|
59 | 5af45186 | bellard | |
60 | a7812ae4 | pbrook | SSE_HELPER_B(paddb, FADD) |
61 | a7812ae4 | pbrook | SSE_HELPER_W(paddw, FADD) |
62 | a7812ae4 | pbrook | SSE_HELPER_L(paddl, FADD) |
63 | a7812ae4 | pbrook | SSE_HELPER_Q(paddq, FADD) |
64 | 5af45186 | bellard | |
65 | a7812ae4 | pbrook | SSE_HELPER_B(psubb, FSUB) |
66 | a7812ae4 | pbrook | SSE_HELPER_W(psubw, FSUB) |
67 | a7812ae4 | pbrook | SSE_HELPER_L(psubl, FSUB) |
68 | a7812ae4 | pbrook | SSE_HELPER_Q(psubq, FSUB) |
69 | 5af45186 | bellard | |
70 | a7812ae4 | pbrook | SSE_HELPER_B(paddusb, FADDUB) |
71 | a7812ae4 | pbrook | SSE_HELPER_B(paddsb, FADDSB) |
72 | a7812ae4 | pbrook | SSE_HELPER_B(psubusb, FSUBUB) |
73 | a7812ae4 | pbrook | SSE_HELPER_B(psubsb, FSUBSB) |
74 | 5af45186 | bellard | |
75 | a7812ae4 | pbrook | SSE_HELPER_W(paddusw, FADDUW) |
76 | a7812ae4 | pbrook | SSE_HELPER_W(paddsw, FADDSW) |
77 | a7812ae4 | pbrook | SSE_HELPER_W(psubusw, FSUBUW) |
78 | a7812ae4 | pbrook | SSE_HELPER_W(psubsw, FSUBSW) |
79 | 5af45186 | bellard | |
80 | a7812ae4 | pbrook | SSE_HELPER_B(pminub, FMINUB) |
81 | a7812ae4 | pbrook | SSE_HELPER_B(pmaxub, FMAXUB) |
82 | 5af45186 | bellard | |
83 | a7812ae4 | pbrook | SSE_HELPER_W(pminsw, FMINSW) |
84 | a7812ae4 | pbrook | SSE_HELPER_W(pmaxsw, FMAXSW) |
85 | 5af45186 | bellard | |
86 | a7812ae4 | pbrook | SSE_HELPER_Q(pand, FAND) |
87 | a7812ae4 | pbrook | SSE_HELPER_Q(pandn, FANDN) |
88 | a7812ae4 | pbrook | SSE_HELPER_Q(por, FOR) |
89 | a7812ae4 | pbrook | SSE_HELPER_Q(pxor, FXOR) |
90 | 5af45186 | bellard | |
91 | a7812ae4 | pbrook | SSE_HELPER_B(pcmpgtb, FCMPGTB) |
92 | a7812ae4 | pbrook | SSE_HELPER_W(pcmpgtw, FCMPGTW) |
93 | a7812ae4 | pbrook | SSE_HELPER_L(pcmpgtl, FCMPGTL) |
94 | 5af45186 | bellard | |
95 | a7812ae4 | pbrook | SSE_HELPER_B(pcmpeqb, FCMPEQ) |
96 | a7812ae4 | pbrook | SSE_HELPER_W(pcmpeqw, FCMPEQ) |
97 | a7812ae4 | pbrook | SSE_HELPER_L(pcmpeql, FCMPEQ) |
98 | 5af45186 | bellard | |
99 | a7812ae4 | pbrook | SSE_HELPER_W(pmullw, FMULLW) |
100 | 5af45186 | bellard | #if SHIFT == 0 |
101 | a7812ae4 | pbrook | SSE_HELPER_W(pmulhrw, FMULHRW) |
102 | 5af45186 | bellard | #endif
|
103 | a7812ae4 | pbrook | SSE_HELPER_W(pmulhuw, FMULHUW) |
104 | a7812ae4 | pbrook | SSE_HELPER_W(pmulhw, FMULHW) |
105 | 5af45186 | bellard | |
106 | a7812ae4 | pbrook | SSE_HELPER_B(pavgb, FAVG) |
107 | a7812ae4 | pbrook | SSE_HELPER_W(pavgw, FAVG) |
108 | 5af45186 | bellard | |
109 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmuludq, SUFFIX), void, Reg, Reg)
|
110 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaddwd, SUFFIX), void, Reg, Reg)
|
111 | 5af45186 | bellard | |
112 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psadbw, SUFFIX), void, Reg, Reg)
|
113 | a7812ae4 | pbrook | DEF_HELPER_3(glue(maskmov, SUFFIX), void, Reg, Reg, tl)
|
114 | a7812ae4 | pbrook | DEF_HELPER_2(glue(movl_mm_T0, SUFFIX), void, Reg, i32)
|
115 | 5af45186 | bellard | #ifdef TARGET_X86_64
|
116 | a7812ae4 | pbrook | DEF_HELPER_2(glue(movq_mm_T0, SUFFIX), void, Reg, i64)
|
117 | 5af45186 | bellard | #endif
|
118 | 5af45186 | bellard | |
119 | 5af45186 | bellard | #if SHIFT == 0 |
120 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pshufw, SUFFIX), void, Reg, Reg, int) |
121 | 5af45186 | bellard | #else
|
122 | a7812ae4 | pbrook | DEF_HELPER_3(shufps, void, Reg, Reg, int) |
123 | a7812ae4 | pbrook | DEF_HELPER_3(shufpd, void, Reg, Reg, int) |
124 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pshufd, SUFFIX), void, Reg, Reg, int) |
125 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pshuflw, SUFFIX), void, Reg, Reg, int) |
126 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pshufhw, SUFFIX), void, Reg, Reg, int) |
127 | 5af45186 | bellard | #endif
|
128 | 5af45186 | bellard | |
129 | 5af45186 | bellard | #if SHIFT == 1 |
130 | 5af45186 | bellard | /* FPU ops */
|
131 | 5af45186 | bellard | /* XXX: not accurate */
|
132 | 5af45186 | bellard | |
133 | 5af45186 | bellard | #define SSE_HELPER_S(name, F)\
|
134 | a7812ae4 | pbrook | DEF_HELPER_2(name ## ps , void, Reg, Reg) \ |
135 | a7812ae4 | pbrook | DEF_HELPER_2(name ## ss , void, Reg, Reg) \ |
136 | a7812ae4 | pbrook | DEF_HELPER_2(name ## pd , void, Reg, Reg) \ |
137 | a7812ae4 | pbrook | DEF_HELPER_2(name ## sd , void, Reg, Reg) |
138 | 437a88a5 | bellard | |
139 | 437a88a5 | bellard | SSE_HELPER_S(add, FPU_ADD) |
140 | 437a88a5 | bellard | SSE_HELPER_S(sub, FPU_SUB) |
141 | 437a88a5 | bellard | SSE_HELPER_S(mul, FPU_MUL) |
142 | 437a88a5 | bellard | SSE_HELPER_S(div, FPU_DIV) |
143 | 437a88a5 | bellard | SSE_HELPER_S(min, FPU_MIN) |
144 | 437a88a5 | bellard | SSE_HELPER_S(max, FPU_MAX) |
145 | 437a88a5 | bellard | SSE_HELPER_S(sqrt, FPU_SQRT) |
146 | 437a88a5 | bellard | |
147 | 437a88a5 | bellard | |
148 | a7812ae4 | pbrook | DEF_HELPER_2(cvtps2pd, void, Reg, Reg)
|
149 | a7812ae4 | pbrook | DEF_HELPER_2(cvtpd2ps, void, Reg, Reg)
|
150 | a7812ae4 | pbrook | DEF_HELPER_2(cvtss2sd, void, Reg, Reg)
|
151 | a7812ae4 | pbrook | DEF_HELPER_2(cvtsd2ss, void, Reg, Reg)
|
152 | a7812ae4 | pbrook | DEF_HELPER_2(cvtdq2ps, void, Reg, Reg)
|
153 | a7812ae4 | pbrook | DEF_HELPER_2(cvtdq2pd, void, Reg, Reg)
|
154 | a7812ae4 | pbrook | DEF_HELPER_2(cvtpi2ps, void, XMMReg, MMXReg)
|
155 | a7812ae4 | pbrook | DEF_HELPER_2(cvtpi2pd, void, XMMReg, MMXReg)
|
156 | a7812ae4 | pbrook | DEF_HELPER_2(cvtsi2ss, void, XMMReg, i32)
|
157 | a7812ae4 | pbrook | DEF_HELPER_2(cvtsi2sd, void, XMMReg, i32)
|
158 | 5af45186 | bellard | |
159 | 5af45186 | bellard | #ifdef TARGET_X86_64
|
160 | a7812ae4 | pbrook | DEF_HELPER_2(cvtsq2ss, void, XMMReg, i64)
|
161 | a7812ae4 | pbrook | DEF_HELPER_2(cvtsq2sd, void, XMMReg, i64)
|
162 | 5af45186 | bellard | #endif
|
163 | 5af45186 | bellard | |
164 | a7812ae4 | pbrook | DEF_HELPER_2(cvtps2dq, void, XMMReg, XMMReg)
|
165 | a7812ae4 | pbrook | DEF_HELPER_2(cvtpd2dq, void, XMMReg, XMMReg)
|
166 | a7812ae4 | pbrook | DEF_HELPER_2(cvtps2pi, void, MMXReg, XMMReg)
|
167 | a7812ae4 | pbrook | DEF_HELPER_2(cvtpd2pi, void, MMXReg, XMMReg)
|
168 | a7812ae4 | pbrook | DEF_HELPER_1(cvtss2si, s32, XMMReg) |
169 | a7812ae4 | pbrook | DEF_HELPER_1(cvtsd2si, s32, XMMReg) |
170 | 5af45186 | bellard | #ifdef TARGET_X86_64
|
171 | a7812ae4 | pbrook | DEF_HELPER_1(cvtss2sq, s64, XMMReg) |
172 | a7812ae4 | pbrook | DEF_HELPER_1(cvtsd2sq, s64, XMMReg) |
173 | 5af45186 | bellard | #endif
|
174 | 5af45186 | bellard | |
175 | a7812ae4 | pbrook | DEF_HELPER_2(cvttps2dq, void, XMMReg, XMMReg)
|
176 | a7812ae4 | pbrook | DEF_HELPER_2(cvttpd2dq, void, XMMReg, XMMReg)
|
177 | a7812ae4 | pbrook | DEF_HELPER_2(cvttps2pi, void, MMXReg, XMMReg)
|
178 | a7812ae4 | pbrook | DEF_HELPER_2(cvttpd2pi, void, MMXReg, XMMReg)
|
179 | a7812ae4 | pbrook | DEF_HELPER_1(cvttss2si, s32, XMMReg) |
180 | a7812ae4 | pbrook | DEF_HELPER_1(cvttsd2si, s32, XMMReg) |
181 | 5af45186 | bellard | #ifdef TARGET_X86_64
|
182 | a7812ae4 | pbrook | DEF_HELPER_1(cvttss2sq, s64, XMMReg) |
183 | a7812ae4 | pbrook | DEF_HELPER_1(cvttsd2sq, s64, XMMReg) |
184 | 5af45186 | bellard | #endif
|
185 | 5af45186 | bellard | |
186 | a7812ae4 | pbrook | DEF_HELPER_2(rsqrtps, void, XMMReg, XMMReg)
|
187 | a7812ae4 | pbrook | DEF_HELPER_2(rsqrtss, void, XMMReg, XMMReg)
|
188 | a7812ae4 | pbrook | DEF_HELPER_2(rcpps, void, XMMReg, XMMReg)
|
189 | a7812ae4 | pbrook | DEF_HELPER_2(rcpss, void, XMMReg, XMMReg)
|
190 | a7812ae4 | pbrook | DEF_HELPER_2(haddps, void, XMMReg, XMMReg)
|
191 | a7812ae4 | pbrook | DEF_HELPER_2(haddpd, void, XMMReg, XMMReg)
|
192 | a7812ae4 | pbrook | DEF_HELPER_2(hsubps, void, XMMReg, XMMReg)
|
193 | a7812ae4 | pbrook | DEF_HELPER_2(hsubpd, void, XMMReg, XMMReg)
|
194 | a7812ae4 | pbrook | DEF_HELPER_2(addsubps, void, XMMReg, XMMReg)
|
195 | a7812ae4 | pbrook | DEF_HELPER_2(addsubpd, void, XMMReg, XMMReg)
|
196 | 5af45186 | bellard | |
197 | 5af45186 | bellard | #define SSE_HELPER_CMP(name, F)\
|
198 | a7812ae4 | pbrook | DEF_HELPER_2( name ## ps , void, Reg, Reg) \ |
199 | a7812ae4 | pbrook | DEF_HELPER_2( name ## ss , void, Reg, Reg) \ |
200 | a7812ae4 | pbrook | DEF_HELPER_2( name ## pd , void, Reg, Reg) \ |
201 | a7812ae4 | pbrook | DEF_HELPER_2( name ## sd , void, Reg, Reg) |
202 | 437a88a5 | bellard | |
203 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpeq, FPU_CMPEQ) |
204 | 437a88a5 | bellard | SSE_HELPER_CMP(cmplt, FPU_CMPLT) |
205 | 437a88a5 | bellard | SSE_HELPER_CMP(cmple, FPU_CMPLE) |
206 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpunord, FPU_CMPUNORD) |
207 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpneq, FPU_CMPNEQ) |
208 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpnlt, FPU_CMPNLT) |
209 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpnle, FPU_CMPNLE) |
210 | 437a88a5 | bellard | SSE_HELPER_CMP(cmpord, FPU_CMPORD) |
211 | 437a88a5 | bellard | |
212 | a7812ae4 | pbrook | DEF_HELPER_2(ucomiss, void, Reg, Reg)
|
213 | a7812ae4 | pbrook | DEF_HELPER_2(comiss, void, Reg, Reg)
|
214 | a7812ae4 | pbrook | DEF_HELPER_2(ucomisd, void, Reg, Reg)
|
215 | a7812ae4 | pbrook | DEF_HELPER_2(comisd, void, Reg, Reg)
|
216 | a7812ae4 | pbrook | DEF_HELPER_1(movmskps, i32, Reg) |
217 | a7812ae4 | pbrook | DEF_HELPER_1(movmskpd, i32, Reg) |
218 | 5af45186 | bellard | #endif
|
219 | 5af45186 | bellard | |
220 | a7812ae4 | pbrook | DEF_HELPER_1(glue(pmovmskb, SUFFIX), i32, Reg) |
221 | a7812ae4 | pbrook | DEF_HELPER_2(glue(packsswb, SUFFIX), void, Reg, Reg)
|
222 | a7812ae4 | pbrook | DEF_HELPER_2(glue(packuswb, SUFFIX), void, Reg, Reg)
|
223 | a7812ae4 | pbrook | DEF_HELPER_2(glue(packssdw, SUFFIX), void, Reg, Reg)
|
224 | 5af45186 | bellard | #define UNPCK_OP(base_name, base) \
|
225 | a7812ae4 | pbrook | DEF_HELPER_2(glue(punpck ## base_name ## bw, SUFFIX) , void, Reg, Reg) \ |
226 | a7812ae4 | pbrook | DEF_HELPER_2(glue(punpck ## base_name ## wd, SUFFIX) , void, Reg, Reg) \ |
227 | a7812ae4 | pbrook | DEF_HELPER_2(glue(punpck ## base_name ## dq, SUFFIX) , void, Reg, Reg) |
228 | 5af45186 | bellard | |
229 | 437a88a5 | bellard | UNPCK_OP(l, 0)
|
230 | 437a88a5 | bellard | UNPCK_OP(h, 1)
|
231 | 5af45186 | bellard | |
232 | 5af45186 | bellard | #if SHIFT == 1 |
233 | a7812ae4 | pbrook | DEF_HELPER_2(glue(punpcklqdq, SUFFIX), void, Reg, Reg)
|
234 | a7812ae4 | pbrook | DEF_HELPER_2(glue(punpckhqdq, SUFFIX), void, Reg, Reg)
|
235 | 5af45186 | bellard | #endif
|
236 | 5af45186 | bellard | |
237 | 5af45186 | bellard | /* 3DNow! float ops */
|
238 | 5af45186 | bellard | #if SHIFT == 0 |
239 | a7812ae4 | pbrook | DEF_HELPER_2(pi2fd, void, MMXReg, MMXReg)
|
240 | a7812ae4 | pbrook | DEF_HELPER_2(pi2fw, void, MMXReg, MMXReg)
|
241 | a7812ae4 | pbrook | DEF_HELPER_2(pf2id, void, MMXReg, MMXReg)
|
242 | a7812ae4 | pbrook | DEF_HELPER_2(pf2iw, void, MMXReg, MMXReg)
|
243 | a7812ae4 | pbrook | DEF_HELPER_2(pfacc, void, MMXReg, MMXReg)
|
244 | a7812ae4 | pbrook | DEF_HELPER_2(pfadd, void, MMXReg, MMXReg)
|
245 | a7812ae4 | pbrook | DEF_HELPER_2(pfcmpeq, void, MMXReg, MMXReg)
|
246 | a7812ae4 | pbrook | DEF_HELPER_2(pfcmpge, void, MMXReg, MMXReg)
|
247 | a7812ae4 | pbrook | DEF_HELPER_2(pfcmpgt, void, MMXReg, MMXReg)
|
248 | a7812ae4 | pbrook | DEF_HELPER_2(pfmax, void, MMXReg, MMXReg)
|
249 | a7812ae4 | pbrook | DEF_HELPER_2(pfmin, void, MMXReg, MMXReg)
|
250 | a7812ae4 | pbrook | DEF_HELPER_2(pfmul, void, MMXReg, MMXReg)
|
251 | a7812ae4 | pbrook | DEF_HELPER_2(pfnacc, void, MMXReg, MMXReg)
|
252 | a7812ae4 | pbrook | DEF_HELPER_2(pfpnacc, void, MMXReg, MMXReg)
|
253 | a7812ae4 | pbrook | DEF_HELPER_2(pfrcp, void, MMXReg, MMXReg)
|
254 | a7812ae4 | pbrook | DEF_HELPER_2(pfrsqrt, void, MMXReg, MMXReg)
|
255 | a7812ae4 | pbrook | DEF_HELPER_2(pfsub, void, MMXReg, MMXReg)
|
256 | a7812ae4 | pbrook | DEF_HELPER_2(pfsubr, void, MMXReg, MMXReg)
|
257 | a7812ae4 | pbrook | DEF_HELPER_2(pswapd, void, MMXReg, MMXReg)
|
258 | 5af45186 | bellard | #endif
|
259 | 5af45186 | bellard | |
260 | 4242b1bd | balrog | /* SSSE3 op helpers */
|
261 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phaddw, SUFFIX), void, Reg, Reg)
|
262 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phaddd, SUFFIX), void, Reg, Reg)
|
263 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phaddsw, SUFFIX), void, Reg, Reg)
|
264 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phsubw, SUFFIX), void, Reg, Reg)
|
265 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phsubd, SUFFIX), void, Reg, Reg)
|
266 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phsubsw, SUFFIX), void, Reg, Reg)
|
267 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pabsb, SUFFIX), void, Reg, Reg)
|
268 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pabsw, SUFFIX), void, Reg, Reg)
|
269 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pabsd, SUFFIX), void, Reg, Reg)
|
270 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaddubsw, SUFFIX), void, Reg, Reg)
|
271 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmulhrsw, SUFFIX), void, Reg, Reg)
|
272 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pshufb, SUFFIX), void, Reg, Reg)
|
273 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psignb, SUFFIX), void, Reg, Reg)
|
274 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psignw, SUFFIX), void, Reg, Reg)
|
275 | a7812ae4 | pbrook | DEF_HELPER_2(glue(psignd, SUFFIX), void, Reg, Reg)
|
276 | a7812ae4 | pbrook | DEF_HELPER_3(glue(palignr, SUFFIX), void, Reg, Reg, s32)
|
277 | 4242b1bd | balrog | |
278 | 222a3336 | balrog | /* SSE4.1 op helpers */
|
279 | 222a3336 | balrog | #if SHIFT == 1 |
280 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pblendvb, SUFFIX), void, Reg, Reg)
|
281 | a7812ae4 | pbrook | DEF_HELPER_2(glue(blendvps, SUFFIX), void, Reg, Reg)
|
282 | a7812ae4 | pbrook | DEF_HELPER_2(glue(blendvpd, SUFFIX), void, Reg, Reg)
|
283 | a7812ae4 | pbrook | DEF_HELPER_2(glue(ptest, SUFFIX), void, Reg, Reg)
|
284 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxbw, SUFFIX), void, Reg, Reg)
|
285 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxbd, SUFFIX), void, Reg, Reg)
|
286 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxbq, SUFFIX), void, Reg, Reg)
|
287 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxwd, SUFFIX), void, Reg, Reg)
|
288 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxwq, SUFFIX), void, Reg, Reg)
|
289 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovsxdq, SUFFIX), void, Reg, Reg)
|
290 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxbw, SUFFIX), void, Reg, Reg)
|
291 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxbd, SUFFIX), void, Reg, Reg)
|
292 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxbq, SUFFIX), void, Reg, Reg)
|
293 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxwd, SUFFIX), void, Reg, Reg)
|
294 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxwq, SUFFIX), void, Reg, Reg)
|
295 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmovzxdq, SUFFIX), void, Reg, Reg)
|
296 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmuldq, SUFFIX), void, Reg, Reg)
|
297 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pcmpeqq, SUFFIX), void, Reg, Reg)
|
298 | a7812ae4 | pbrook | DEF_HELPER_2(glue(packusdw, SUFFIX), void, Reg, Reg)
|
299 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pminsb, SUFFIX), void, Reg, Reg)
|
300 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pminsd, SUFFIX), void, Reg, Reg)
|
301 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pminuw, SUFFIX), void, Reg, Reg)
|
302 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pminud, SUFFIX), void, Reg, Reg)
|
303 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaxsb, SUFFIX), void, Reg, Reg)
|
304 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaxsd, SUFFIX), void, Reg, Reg)
|
305 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaxuw, SUFFIX), void, Reg, Reg)
|
306 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmaxud, SUFFIX), void, Reg, Reg)
|
307 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pmulld, SUFFIX), void, Reg, Reg)
|
308 | a7812ae4 | pbrook | DEF_HELPER_2(glue(phminposuw, SUFFIX), void, Reg, Reg)
|
309 | a7812ae4 | pbrook | DEF_HELPER_3(glue(roundps, SUFFIX), void, Reg, Reg, i32)
|
310 | a7812ae4 | pbrook | DEF_HELPER_3(glue(roundpd, SUFFIX), void, Reg, Reg, i32)
|
311 | a7812ae4 | pbrook | DEF_HELPER_3(glue(roundss, SUFFIX), void, Reg, Reg, i32)
|
312 | a7812ae4 | pbrook | DEF_HELPER_3(glue(roundsd, SUFFIX), void, Reg, Reg, i32)
|
313 | a7812ae4 | pbrook | DEF_HELPER_3(glue(blendps, SUFFIX), void, Reg, Reg, i32)
|
314 | a7812ae4 | pbrook | DEF_HELPER_3(glue(blendpd, SUFFIX), void, Reg, Reg, i32)
|
315 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pblendw, SUFFIX), void, Reg, Reg, i32)
|
316 | a7812ae4 | pbrook | DEF_HELPER_3(glue(dpps, SUFFIX), void, Reg, Reg, i32)
|
317 | a7812ae4 | pbrook | DEF_HELPER_3(glue(dppd, SUFFIX), void, Reg, Reg, i32)
|
318 | a7812ae4 | pbrook | DEF_HELPER_3(glue(mpsadbw, SUFFIX), void, Reg, Reg, i32)
|
319 | 222a3336 | balrog | #endif
|
320 | 222a3336 | balrog | |
321 | 222a3336 | balrog | /* SSE4.2 op helpers */
|
322 | 222a3336 | balrog | #if SHIFT == 1 |
323 | a7812ae4 | pbrook | DEF_HELPER_2(glue(pcmpgtq, SUFFIX), void, Reg, Reg)
|
324 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pcmpestri, SUFFIX), void, Reg, Reg, i32)
|
325 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pcmpestrm, SUFFIX), void, Reg, Reg, i32)
|
326 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pcmpistri, SUFFIX), void, Reg, Reg, i32)
|
327 | a7812ae4 | pbrook | DEF_HELPER_3(glue(pcmpistrm, SUFFIX), void, Reg, Reg, i32)
|
328 | a7812ae4 | pbrook | DEF_HELPER_3(crc32, tl, i32, tl, i32) |
329 | a7812ae4 | pbrook | DEF_HELPER_2(popcnt, tl, tl, i32) |
330 | 222a3336 | balrog | #endif
|
331 | 222a3336 | balrog | |
332 | 5af45186 | bellard | #undef SHIFT
|
333 | 5af45186 | bellard | #undef Reg
|
334 | 5af45186 | bellard | #undef SUFFIX
|
335 | 5af45186 | bellard | |
336 | 5af45186 | bellard | #undef SSE_HELPER_B
|
337 | 5af45186 | bellard | #undef SSE_HELPER_W
|
338 | 5af45186 | bellard | #undef SSE_HELPER_L
|
339 | 5af45186 | bellard | #undef SSE_HELPER_Q
|
340 | 5af45186 | bellard | #undef SSE_HELPER_S
|
341 | 5af45186 | bellard | #undef SSE_HELPER_CMP
|
342 | 5af45186 | bellard | #undef UNPCK_OP |