Merge tag 'pull-tcg-20221031-2' of https://gitlab.com/rth7680/qemu into staging
[qemu/ar7.git] / target / i386 / ops_sse_header.h
blob8a7b2f4e2f672070dd3e2e0be25ec962367b0dc1
1 /*
2 * MMX/3DNow!/SSE/SSE2/SSE3/SSSE3/SSE4/PNI support
4 * Copyright (c) 2005 Fabrice Bellard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 #if SHIFT == 0
20 #define Reg MMXReg
21 #define SUFFIX _mmx
22 #else
23 #define Reg ZMMReg
24 #if SHIFT == 1
25 #define SUFFIX _xmm
26 #else
27 #define SUFFIX _ymm
28 #endif
29 #endif
31 #define dh_alias_Reg ptr
32 #define dh_alias_ZMMReg ptr
33 #define dh_alias_MMXReg ptr
34 #define dh_ctype_Reg Reg *
35 #define dh_ctype_ZMMReg ZMMReg *
36 #define dh_ctype_MMXReg MMXReg *
37 #define dh_typecode_Reg dh_typecode_ptr
38 #define dh_typecode_ZMMReg dh_typecode_ptr
39 #define dh_typecode_MMXReg dh_typecode_ptr
41 DEF_HELPER_4(glue(psrlw, SUFFIX), void, env, Reg, Reg, Reg)
42 DEF_HELPER_4(glue(psraw, SUFFIX), void, env, Reg, Reg, Reg)
43 DEF_HELPER_4(glue(psllw, SUFFIX), void, env, Reg, Reg, Reg)
44 DEF_HELPER_4(glue(psrld, SUFFIX), void, env, Reg, Reg, Reg)
45 DEF_HELPER_4(glue(psrad, SUFFIX), void, env, Reg, Reg, Reg)
46 DEF_HELPER_4(glue(pslld, SUFFIX), void, env, Reg, Reg, Reg)
47 DEF_HELPER_4(glue(psrlq, SUFFIX), void, env, Reg, Reg, Reg)
48 DEF_HELPER_4(glue(psllq, SUFFIX), void, env, Reg, Reg, Reg)
50 #if SHIFT >= 1
51 DEF_HELPER_4(glue(psrldq, SUFFIX), void, env, Reg, Reg, Reg)
52 DEF_HELPER_4(glue(pslldq, SUFFIX), void, env, Reg, Reg, Reg)
53 #endif
55 #define SSE_HELPER_B(name, F)\
56 DEF_HELPER_4(glue(name, SUFFIX), void, env, Reg, Reg, Reg)
58 #define SSE_HELPER_W(name, F)\
59 DEF_HELPER_4(glue(name, SUFFIX), void, env, Reg, Reg, Reg)
61 #define SSE_HELPER_L(name, F)\
62 DEF_HELPER_4(glue(name, SUFFIX), void, env, Reg, Reg, Reg)
64 #define SSE_HELPER_Q(name, F)\
65 DEF_HELPER_4(glue(name, SUFFIX), void, env, Reg, Reg, Reg)
67 #if SHIFT == 0
68 DEF_HELPER_3(glue(pmulhrw, SUFFIX), void, env, Reg, Reg)
69 #endif
70 SSE_HELPER_W(pmulhuw, FMULHUW)
71 SSE_HELPER_W(pmulhw, FMULHW)
73 SSE_HELPER_B(pavgb, FAVG)
74 SSE_HELPER_W(pavgw, FAVG)
76 DEF_HELPER_4(glue(pmuludq, SUFFIX), void, env, Reg, Reg, Reg)
77 DEF_HELPER_4(glue(pmaddwd, SUFFIX), void, env, Reg, Reg, Reg)
79 DEF_HELPER_4(glue(psadbw, SUFFIX), void, env, Reg, Reg, Reg)
80 #if SHIFT < 2
81 DEF_HELPER_4(glue(maskmov, SUFFIX), void, env, Reg, Reg, tl)
82 #endif
84 #if SHIFT == 0
85 DEF_HELPER_3(glue(pshufw, SUFFIX), void, Reg, Reg, int)
86 #else
87 DEF_HELPER_3(glue(pshufd, SUFFIX), void, Reg, Reg, int)
88 DEF_HELPER_3(glue(pshuflw, SUFFIX), void, Reg, Reg, int)
89 DEF_HELPER_3(glue(pshufhw, SUFFIX), void, Reg, Reg, int)
90 #endif
92 #if SHIFT >= 1
93 /* FPU ops */
94 /* XXX: not accurate */
96 #define SSE_HELPER_P4(name) \
97 DEF_HELPER_4(glue(name ## ps, SUFFIX), void, env, Reg, Reg, Reg) \
98 DEF_HELPER_4(glue(name ## pd, SUFFIX), void, env, Reg, Reg, Reg)
100 #define SSE_HELPER_P3(name, ...) \
101 DEF_HELPER_3(glue(name ## ps, SUFFIX), void, env, Reg, Reg) \
102 DEF_HELPER_3(glue(name ## pd, SUFFIX), void, env, Reg, Reg)
104 #if SHIFT == 1
105 #define SSE_HELPER_S4(name) \
106 SSE_HELPER_P4(name) \
107 DEF_HELPER_4(name ## ss, void, env, Reg, Reg, Reg) \
108 DEF_HELPER_4(name ## sd, void, env, Reg, Reg, Reg)
109 #define SSE_HELPER_S3(name) \
110 SSE_HELPER_P3(name) \
111 DEF_HELPER_4(name ## ss, void, env, Reg, Reg, Reg) \
112 DEF_HELPER_4(name ## sd, void, env, Reg, Reg, Reg)
113 #else
114 #define SSE_HELPER_S4(name, ...) SSE_HELPER_P4(name)
115 #define SSE_HELPER_S3(name, ...) SSE_HELPER_P3(name)
116 #endif
118 DEF_HELPER_4(glue(shufps, SUFFIX), void, Reg, Reg, Reg, int)
119 DEF_HELPER_4(glue(shufpd, SUFFIX), void, Reg, Reg, Reg, int)
121 SSE_HELPER_S4(add)
122 SSE_HELPER_S4(sub)
123 SSE_HELPER_S4(mul)
124 SSE_HELPER_S4(div)
125 SSE_HELPER_S4(min)
126 SSE_HELPER_S4(max)
128 SSE_HELPER_S3(sqrt)
130 DEF_HELPER_3(glue(cvtps2pd, SUFFIX), void, env, Reg, Reg)
131 DEF_HELPER_3(glue(cvtpd2ps, SUFFIX), void, env, Reg, Reg)
132 DEF_HELPER_3(glue(cvtdq2ps, SUFFIX), void, env, Reg, Reg)
133 DEF_HELPER_3(glue(cvtdq2pd, SUFFIX), void, env, Reg, Reg)
135 DEF_HELPER_3(glue(cvtps2dq, SUFFIX), void, env, ZMMReg, ZMMReg)
136 DEF_HELPER_3(glue(cvtpd2dq, SUFFIX), void, env, ZMMReg, ZMMReg)
138 DEF_HELPER_3(glue(cvttps2dq, SUFFIX), void, env, ZMMReg, ZMMReg)
139 DEF_HELPER_3(glue(cvttpd2dq, SUFFIX), void, env, ZMMReg, ZMMReg)
141 #if SHIFT == 1
142 DEF_HELPER_4(cvtss2sd, void, env, Reg, Reg, Reg)
143 DEF_HELPER_4(cvtsd2ss, void, env, Reg, Reg, Reg)
144 DEF_HELPER_3(cvtpi2ps, void, env, ZMMReg, MMXReg)
145 DEF_HELPER_3(cvtpi2pd, void, env, ZMMReg, MMXReg)
146 DEF_HELPER_3(cvtsi2ss, void, env, ZMMReg, i32)
147 DEF_HELPER_3(cvtsi2sd, void, env, ZMMReg, i32)
149 #ifdef TARGET_X86_64
150 DEF_HELPER_3(cvtsq2ss, void, env, ZMMReg, i64)
151 DEF_HELPER_3(cvtsq2sd, void, env, ZMMReg, i64)
152 #endif
154 DEF_HELPER_3(cvtps2pi, void, env, MMXReg, ZMMReg)
155 DEF_HELPER_3(cvtpd2pi, void, env, MMXReg, ZMMReg)
156 DEF_HELPER_2(cvtss2si, s32, env, ZMMReg)
157 DEF_HELPER_2(cvtsd2si, s32, env, ZMMReg)
158 #ifdef TARGET_X86_64
159 DEF_HELPER_2(cvtss2sq, s64, env, ZMMReg)
160 DEF_HELPER_2(cvtsd2sq, s64, env, ZMMReg)
161 #endif
163 DEF_HELPER_3(cvttps2pi, void, env, MMXReg, ZMMReg)
164 DEF_HELPER_3(cvttpd2pi, void, env, MMXReg, ZMMReg)
165 DEF_HELPER_2(cvttss2si, s32, env, ZMMReg)
166 DEF_HELPER_2(cvttsd2si, s32, env, ZMMReg)
167 #ifdef TARGET_X86_64
168 DEF_HELPER_2(cvttss2sq, s64, env, ZMMReg)
169 DEF_HELPER_2(cvttsd2sq, s64, env, ZMMReg)
170 #endif
171 #endif
173 DEF_HELPER_3(glue(rsqrtps, SUFFIX), void, env, ZMMReg, ZMMReg)
174 DEF_HELPER_3(glue(rcpps, SUFFIX), void, env, ZMMReg, ZMMReg)
176 #if SHIFT == 1
177 DEF_HELPER_4(rsqrtss, void, env, ZMMReg, ZMMReg, ZMMReg)
178 DEF_HELPER_4(rcpss, void, env, ZMMReg, ZMMReg, ZMMReg)
179 DEF_HELPER_3(extrq_r, void, env, ZMMReg, ZMMReg)
180 DEF_HELPER_4(extrq_i, void, env, ZMMReg, int, int)
181 DEF_HELPER_3(insertq_r, void, env, ZMMReg, ZMMReg)
182 DEF_HELPER_5(insertq_i, void, env, ZMMReg, ZMMReg, int, int)
183 #endif
185 SSE_HELPER_P4(hadd)
186 SSE_HELPER_P4(hsub)
187 SSE_HELPER_P4(addsub)
189 #define SSE_HELPER_CMP(name, F, C) SSE_HELPER_S4(name)
191 SSE_HELPER_CMP(cmpeq, FPU_CMPQ, FPU_EQ)
192 SSE_HELPER_CMP(cmplt, FPU_CMPS, FPU_LT)
193 SSE_HELPER_CMP(cmple, FPU_CMPS, FPU_LE)
194 SSE_HELPER_CMP(cmpunord, FPU_CMPQ, FPU_UNORD)
195 SSE_HELPER_CMP(cmpneq, FPU_CMPQ, !FPU_EQ)
196 SSE_HELPER_CMP(cmpnlt, FPU_CMPS, !FPU_LT)
197 SSE_HELPER_CMP(cmpnle, FPU_CMPS, !FPU_LE)
198 SSE_HELPER_CMP(cmpord, FPU_CMPQ, !FPU_UNORD)
200 SSE_HELPER_CMP(cmpequ, FPU_CMPQ, FPU_EQU)
201 SSE_HELPER_CMP(cmpnge, FPU_CMPS, !FPU_GE)
202 SSE_HELPER_CMP(cmpngt, FPU_CMPS, !FPU_GT)
203 SSE_HELPER_CMP(cmpfalse, FPU_CMPQ, FPU_FALSE)
204 SSE_HELPER_CMP(cmpnequ, FPU_CMPQ, !FPU_EQU)
205 SSE_HELPER_CMP(cmpge, FPU_CMPS, FPU_GE)
206 SSE_HELPER_CMP(cmpgt, FPU_CMPS, FPU_GT)
207 SSE_HELPER_CMP(cmptrue, FPU_CMPQ, !FPU_FALSE)
209 SSE_HELPER_CMP(cmpeqs, FPU_CMPS, FPU_EQ)
210 SSE_HELPER_CMP(cmpltq, FPU_CMPQ, FPU_LT)
211 SSE_HELPER_CMP(cmpleq, FPU_CMPQ, FPU_LE)
212 SSE_HELPER_CMP(cmpunords, FPU_CMPS, FPU_UNORD)
213 SSE_HELPER_CMP(cmpneqq, FPU_CMPS, !FPU_EQ)
214 SSE_HELPER_CMP(cmpnltq, FPU_CMPQ, !FPU_LT)
215 SSE_HELPER_CMP(cmpnleq, FPU_CMPQ, !FPU_LE)
216 SSE_HELPER_CMP(cmpords, FPU_CMPS, !FPU_UNORD)
218 SSE_HELPER_CMP(cmpequs, FPU_CMPS, FPU_EQU)
219 SSE_HELPER_CMP(cmpngeq, FPU_CMPQ, !FPU_GE)
220 SSE_HELPER_CMP(cmpngtq, FPU_CMPQ, !FPU_GT)
221 SSE_HELPER_CMP(cmpfalses, FPU_CMPS, FPU_FALSE)
222 SSE_HELPER_CMP(cmpnequs, FPU_CMPS, !FPU_EQU)
223 SSE_HELPER_CMP(cmpgeq, FPU_CMPQ, FPU_GE)
224 SSE_HELPER_CMP(cmpgtq, FPU_CMPQ, FPU_GT)
225 SSE_HELPER_CMP(cmptrues, FPU_CMPS, !FPU_FALSE)
227 #if SHIFT == 1
228 DEF_HELPER_3(ucomiss, void, env, Reg, Reg)
229 DEF_HELPER_3(comiss, void, env, Reg, Reg)
230 DEF_HELPER_3(ucomisd, void, env, Reg, Reg)
231 DEF_HELPER_3(comisd, void, env, Reg, Reg)
232 #endif
234 DEF_HELPER_2(glue(movmskps, SUFFIX), i32, env, Reg)
235 DEF_HELPER_2(glue(movmskpd, SUFFIX), i32, env, Reg)
236 #endif
238 DEF_HELPER_4(glue(packsswb, SUFFIX), void, env, Reg, Reg, Reg)
239 DEF_HELPER_4(glue(packuswb, SUFFIX), void, env, Reg, Reg, Reg)
240 DEF_HELPER_4(glue(packssdw, SUFFIX), void, env, Reg, Reg, Reg)
241 #define UNPCK_OP(name, base) \
242 DEF_HELPER_4(glue(punpck ## name ## bw, SUFFIX), void, env, Reg, Reg, Reg) \
243 DEF_HELPER_4(glue(punpck ## name ## wd, SUFFIX), void, env, Reg, Reg, Reg) \
244 DEF_HELPER_4(glue(punpck ## name ## dq, SUFFIX), void, env, Reg, Reg, Reg)
246 UNPCK_OP(l, 0)
247 UNPCK_OP(h, 1)
249 #if SHIFT >= 1
250 DEF_HELPER_4(glue(punpcklqdq, SUFFIX), void, env, Reg, Reg, Reg)
251 DEF_HELPER_4(glue(punpckhqdq, SUFFIX), void, env, Reg, Reg, Reg)
252 #endif
254 /* 3DNow! float ops */
255 #if SHIFT == 0
256 DEF_HELPER_3(pi2fd, void, env, MMXReg, MMXReg)
257 DEF_HELPER_3(pi2fw, void, env, MMXReg, MMXReg)
258 DEF_HELPER_3(pf2id, void, env, MMXReg, MMXReg)
259 DEF_HELPER_3(pf2iw, void, env, MMXReg, MMXReg)
260 DEF_HELPER_3(pfacc, void, env, MMXReg, MMXReg)
261 DEF_HELPER_3(pfadd, void, env, MMXReg, MMXReg)
262 DEF_HELPER_3(pfcmpeq, void, env, MMXReg, MMXReg)
263 DEF_HELPER_3(pfcmpge, void, env, MMXReg, MMXReg)
264 DEF_HELPER_3(pfcmpgt, void, env, MMXReg, MMXReg)
265 DEF_HELPER_3(pfmax, void, env, MMXReg, MMXReg)
266 DEF_HELPER_3(pfmin, void, env, MMXReg, MMXReg)
267 DEF_HELPER_3(pfmul, void, env, MMXReg, MMXReg)
268 DEF_HELPER_3(pfnacc, void, env, MMXReg, MMXReg)
269 DEF_HELPER_3(pfpnacc, void, env, MMXReg, MMXReg)
270 DEF_HELPER_3(pfrcp, void, env, MMXReg, MMXReg)
271 DEF_HELPER_3(pfrsqrt, void, env, MMXReg, MMXReg)
272 DEF_HELPER_3(pfsub, void, env, MMXReg, MMXReg)
273 DEF_HELPER_3(pfsubr, void, env, MMXReg, MMXReg)
274 DEF_HELPER_3(pswapd, void, env, MMXReg, MMXReg)
275 #endif
277 /* SSSE3 op helpers */
278 DEF_HELPER_4(glue(phaddw, SUFFIX), void, env, Reg, Reg, Reg)
279 DEF_HELPER_4(glue(phaddd, SUFFIX), void, env, Reg, Reg, Reg)
280 DEF_HELPER_4(glue(phaddsw, SUFFIX), void, env, Reg, Reg, Reg)
281 DEF_HELPER_4(glue(phsubw, SUFFIX), void, env, Reg, Reg, Reg)
282 DEF_HELPER_4(glue(phsubd, SUFFIX), void, env, Reg, Reg, Reg)
283 DEF_HELPER_4(glue(phsubsw, SUFFIX), void, env, Reg, Reg, Reg)
284 DEF_HELPER_4(glue(pmaddubsw, SUFFIX), void, env, Reg, Reg, Reg)
285 DEF_HELPER_4(glue(pmulhrsw, SUFFIX), void, env, Reg, Reg, Reg)
286 DEF_HELPER_4(glue(pshufb, SUFFIX), void, env, Reg, Reg, Reg)
287 DEF_HELPER_4(glue(psignb, SUFFIX), void, env, Reg, Reg, Reg)
288 DEF_HELPER_4(glue(psignw, SUFFIX), void, env, Reg, Reg, Reg)
289 DEF_HELPER_4(glue(psignd, SUFFIX), void, env, Reg, Reg, Reg)
290 DEF_HELPER_5(glue(palignr, SUFFIX), void, env, Reg, Reg, Reg, i32)
292 /* SSE4.1 op helpers */
293 #if SHIFT >= 1
294 DEF_HELPER_5(glue(pblendvb, SUFFIX), void, env, Reg, Reg, Reg, Reg)
295 DEF_HELPER_5(glue(blendvps, SUFFIX), void, env, Reg, Reg, Reg, Reg)
296 DEF_HELPER_5(glue(blendvpd, SUFFIX), void, env, Reg, Reg, Reg, Reg)
297 DEF_HELPER_3(glue(ptest, SUFFIX), void, env, Reg, Reg)
298 DEF_HELPER_3(glue(pmovsxbw, SUFFIX), void, env, Reg, Reg)
299 DEF_HELPER_3(glue(pmovsxbd, SUFFIX), void, env, Reg, Reg)
300 DEF_HELPER_3(glue(pmovsxbq, SUFFIX), void, env, Reg, Reg)
301 DEF_HELPER_3(glue(pmovsxwd, SUFFIX), void, env, Reg, Reg)
302 DEF_HELPER_3(glue(pmovsxwq, SUFFIX), void, env, Reg, Reg)
303 DEF_HELPER_3(glue(pmovsxdq, SUFFIX), void, env, Reg, Reg)
304 DEF_HELPER_3(glue(pmovzxbw, SUFFIX), void, env, Reg, Reg)
305 DEF_HELPER_3(glue(pmovzxbd, SUFFIX), void, env, Reg, Reg)
306 DEF_HELPER_3(glue(pmovzxbq, SUFFIX), void, env, Reg, Reg)
307 DEF_HELPER_3(glue(pmovzxwd, SUFFIX), void, env, Reg, Reg)
308 DEF_HELPER_3(glue(pmovzxwq, SUFFIX), void, env, Reg, Reg)
309 DEF_HELPER_3(glue(pmovzxdq, SUFFIX), void, env, Reg, Reg)
310 DEF_HELPER_3(glue(pmovsldup, SUFFIX), void, env, Reg, Reg)
311 DEF_HELPER_3(glue(pmovshdup, SUFFIX), void, env, Reg, Reg)
312 DEF_HELPER_3(glue(pmovdldup, SUFFIX), void, env, Reg, Reg)
313 DEF_HELPER_4(glue(pmuldq, SUFFIX), void, env, Reg, Reg, Reg)
314 DEF_HELPER_4(glue(packusdw, SUFFIX), void, env, Reg, Reg, Reg)
315 #if SHIFT == 1
316 DEF_HELPER_3(glue(phminposuw, SUFFIX), void, env, Reg, Reg)
317 #endif
318 DEF_HELPER_4(glue(roundps, SUFFIX), void, env, Reg, Reg, i32)
319 DEF_HELPER_4(glue(roundpd, SUFFIX), void, env, Reg, Reg, i32)
320 #if SHIFT == 1
321 DEF_HELPER_5(roundss_xmm, void, env, Reg, Reg, Reg, i32)
322 DEF_HELPER_5(roundsd_xmm, void, env, Reg, Reg, Reg, i32)
323 #endif
324 DEF_HELPER_5(glue(blendps, SUFFIX), void, env, Reg, Reg, Reg, i32)
325 DEF_HELPER_5(glue(blendpd, SUFFIX), void, env, Reg, Reg, Reg, i32)
326 DEF_HELPER_5(glue(pblendw, SUFFIX), void, env, Reg, Reg, Reg, i32)
327 DEF_HELPER_5(glue(dpps, SUFFIX), void, env, Reg, Reg, Reg, i32)
328 #if SHIFT == 1
329 DEF_HELPER_5(glue(dppd, SUFFIX), void, env, Reg, Reg, Reg, i32)
330 #endif
331 DEF_HELPER_5(glue(mpsadbw, SUFFIX), void, env, Reg, Reg, Reg, i32)
332 #endif
334 /* SSE4.2 op helpers */
335 #if SHIFT == 1
336 DEF_HELPER_4(glue(pcmpestri, SUFFIX), void, env, Reg, Reg, i32)
337 DEF_HELPER_4(glue(pcmpestrm, SUFFIX), void, env, Reg, Reg, i32)
338 DEF_HELPER_4(glue(pcmpistri, SUFFIX), void, env, Reg, Reg, i32)
339 DEF_HELPER_4(glue(pcmpistrm, SUFFIX), void, env, Reg, Reg, i32)
340 DEF_HELPER_3(crc32, tl, i32, tl, i32)
341 #endif
343 /* AES-NI op helpers */
344 #if SHIFT >= 1
345 DEF_HELPER_4(glue(aesdec, SUFFIX), void, env, Reg, Reg, Reg)
346 DEF_HELPER_4(glue(aesdeclast, SUFFIX), void, env, Reg, Reg, Reg)
347 DEF_HELPER_4(glue(aesenc, SUFFIX), void, env, Reg, Reg, Reg)
348 DEF_HELPER_4(glue(aesenclast, SUFFIX), void, env, Reg, Reg, Reg)
349 #if SHIFT == 1
350 DEF_HELPER_3(glue(aesimc, SUFFIX), void, env, Reg, Reg)
351 DEF_HELPER_4(glue(aeskeygenassist, SUFFIX), void, env, Reg, Reg, i32)
352 #endif
353 DEF_HELPER_5(glue(pclmulqdq, SUFFIX), void, env, Reg, Reg, Reg, i32)
354 #endif
356 /* F16C helpers */
357 #if SHIFT >= 1
358 DEF_HELPER_3(glue(cvtph2ps, SUFFIX), void, env, Reg, Reg)
359 DEF_HELPER_4(glue(cvtps2ph, SUFFIX), void, env, Reg, Reg, int)
360 #endif
362 /* FMA3 helpers */
363 #if SHIFT == 1
364 DEF_HELPER_6(fma4ss, void, env, Reg, Reg, Reg, Reg, int)
365 DEF_HELPER_6(fma4sd, void, env, Reg, Reg, Reg, Reg, int)
366 #endif
368 #if SHIFT >= 1
369 DEF_HELPER_7(glue(fma4ps, SUFFIX), void, env, Reg, Reg, Reg, Reg, int, int)
370 DEF_HELPER_7(glue(fma4pd, SUFFIX), void, env, Reg, Reg, Reg, Reg, int, int)
371 #endif
373 /* AVX helpers */
374 #if SHIFT >= 1
375 DEF_HELPER_4(glue(vpermilpd, SUFFIX), void, env, Reg, Reg, Reg)
376 DEF_HELPER_4(glue(vpermilps, SUFFIX), void, env, Reg, Reg, Reg)
377 DEF_HELPER_3(glue(vpermilpd_imm, SUFFIX), void, Reg, Reg, i32)
378 DEF_HELPER_3(glue(vpermilps_imm, SUFFIX), void, Reg, Reg, i32)
379 DEF_HELPER_4(glue(vpsrlvd, SUFFIX), void, env, Reg, Reg, Reg)
380 DEF_HELPER_4(glue(vpsravd, SUFFIX), void, env, Reg, Reg, Reg)
381 DEF_HELPER_4(glue(vpsllvd, SUFFIX), void, env, Reg, Reg, Reg)
382 DEF_HELPER_4(glue(vpsrlvq, SUFFIX), void, env, Reg, Reg, Reg)
383 DEF_HELPER_4(glue(vpsravq, SUFFIX), void, env, Reg, Reg, Reg)
384 DEF_HELPER_4(glue(vpsllvq, SUFFIX), void, env, Reg, Reg, Reg)
385 DEF_HELPER_3(glue(vtestps, SUFFIX), void, env, Reg, Reg)
386 DEF_HELPER_3(glue(vtestpd, SUFFIX), void, env, Reg, Reg)
387 DEF_HELPER_4(glue(vpmaskmovd_st, SUFFIX), void, env, Reg, Reg, tl)
388 DEF_HELPER_4(glue(vpmaskmovq_st, SUFFIX), void, env, Reg, Reg, tl)
389 DEF_HELPER_4(glue(vpmaskmovd, SUFFIX), void, env, Reg, Reg, Reg)
390 DEF_HELPER_4(glue(vpmaskmovq, SUFFIX), void, env, Reg, Reg, Reg)
391 DEF_HELPER_6(glue(vpgatherdd, SUFFIX), void, env, Reg, Reg, Reg, tl, i32)
392 DEF_HELPER_6(glue(vpgatherdq, SUFFIX), void, env, Reg, Reg, Reg, tl, i32)
393 DEF_HELPER_6(glue(vpgatherqd, SUFFIX), void, env, Reg, Reg, Reg, tl, i32)
394 DEF_HELPER_6(glue(vpgatherqq, SUFFIX), void, env, Reg, Reg, Reg, tl, i32)
395 #if SHIFT == 2
396 DEF_HELPER_3(vpermd_ymm, void, Reg, Reg, Reg)
397 DEF_HELPER_4(vpermdq_ymm, void, Reg, Reg, Reg, i32)
398 DEF_HELPER_3(vpermq_ymm, void, Reg, Reg, i32)
399 #endif
400 #endif
402 #undef SHIFT
403 #undef Reg
404 #undef SUFFIX
406 #undef SSE_HELPER_B
407 #undef SSE_HELPER_W
408 #undef SSE_HELPER_L
409 #undef SSE_HELPER_Q
410 #undef SSE_HELPER_S3
411 #undef SSE_HELPER_S4
412 #undef SSE_HELPER_P3
413 #undef SSE_HELPER_P4
414 #undef SSE_HELPER_CMP
415 #undef UNPCK_OP