1 | /*
|
---|
2 | * MMX/3DNow!/SSE/SSE2/SSE3/SSSE3/SSE4/PNI support
|
---|
3 | *
|
---|
4 | * Copyright (c) 2005 Fabrice Bellard
|
---|
5 | *
|
---|
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 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
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.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
23 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
24 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
25 | * a choice of LGPL license versions is made available with the language indicating
|
---|
26 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
27 | * of the LGPL is applied is otherwise unspecified.
|
---|
28 | */
|
---|
29 | #if SHIFT == 0
|
---|
30 | #define Reg MMXReg
|
---|
31 | #define SUFFIX _mmx
|
---|
32 | #else
|
---|
33 | #define Reg XMMReg
|
---|
34 | #define SUFFIX _xmm
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | DEF_HELPER(void, glue(helper_psrlw, SUFFIX), (Reg *d, Reg *s))
|
---|
38 | DEF_HELPER(void, glue(helper_psraw, SUFFIX), (Reg *d, Reg *s))
|
---|
39 | DEF_HELPER(void, glue(helper_psllw, SUFFIX), (Reg *d, Reg *s))
|
---|
40 | DEF_HELPER(void, glue(helper_psrld, SUFFIX), (Reg *d, Reg *s))
|
---|
41 | DEF_HELPER(void, glue(helper_psrad, SUFFIX), (Reg *d, Reg *s))
|
---|
42 | DEF_HELPER(void, glue(helper_pslld, SUFFIX), (Reg *d, Reg *s))
|
---|
43 | DEF_HELPER(void, glue(helper_psrlq, SUFFIX), (Reg *d, Reg *s))
|
---|
44 | DEF_HELPER(void, glue(helper_psllq, SUFFIX), (Reg *d, Reg *s))
|
---|
45 |
|
---|
46 | #if SHIFT == 1
|
---|
47 | DEF_HELPER(void, glue(helper_psrldq, SUFFIX), (Reg *d, Reg *s))
|
---|
48 | DEF_HELPER(void, glue(helper_pslldq, SUFFIX), (Reg *d, Reg *s))
|
---|
49 | #endif
|
---|
50 |
|
---|
51 | #define SSE_HELPER_B(name, F)\
|
---|
52 | DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
|
---|
53 |
|
---|
54 | #define SSE_HELPER_W(name, F)\
|
---|
55 | DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
|
---|
56 |
|
---|
57 | #define SSE_HELPER_L(name, F)\
|
---|
58 | DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
|
---|
59 |
|
---|
60 | #define SSE_HELPER_Q(name, F)\
|
---|
61 | DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
|
---|
62 |
|
---|
63 | SSE_HELPER_B(helper_paddb, FADD)
|
---|
64 | SSE_HELPER_W(helper_paddw, FADD)
|
---|
65 | SSE_HELPER_L(helper_paddl, FADD)
|
---|
66 | SSE_HELPER_Q(helper_paddq, FADD)
|
---|
67 |
|
---|
68 | SSE_HELPER_B(helper_psubb, FSUB)
|
---|
69 | SSE_HELPER_W(helper_psubw, FSUB)
|
---|
70 | SSE_HELPER_L(helper_psubl, FSUB)
|
---|
71 | SSE_HELPER_Q(helper_psubq, FSUB)
|
---|
72 |
|
---|
73 | SSE_HELPER_B(helper_paddusb, FADDUB)
|
---|
74 | SSE_HELPER_B(helper_paddsb, FADDSB)
|
---|
75 | SSE_HELPER_B(helper_psubusb, FSUBUB)
|
---|
76 | SSE_HELPER_B(helper_psubsb, FSUBSB)
|
---|
77 |
|
---|
78 | SSE_HELPER_W(helper_paddusw, FADDUW)
|
---|
79 | SSE_HELPER_W(helper_paddsw, FADDSW)
|
---|
80 | SSE_HELPER_W(helper_psubusw, FSUBUW)
|
---|
81 | SSE_HELPER_W(helper_psubsw, FSUBSW)
|
---|
82 |
|
---|
83 | SSE_HELPER_B(helper_pminub, FMINUB)
|
---|
84 | SSE_HELPER_B(helper_pmaxub, FMAXUB)
|
---|
85 |
|
---|
86 | SSE_HELPER_W(helper_pminsw, FMINSW)
|
---|
87 | SSE_HELPER_W(helper_pmaxsw, FMAXSW)
|
---|
88 |
|
---|
89 | SSE_HELPER_Q(helper_pand, FAND)
|
---|
90 | SSE_HELPER_Q(helper_pandn, FANDN)
|
---|
91 | SSE_HELPER_Q(helper_por, FOR)
|
---|
92 | SSE_HELPER_Q(helper_pxor, FXOR)
|
---|
93 |
|
---|
94 | SSE_HELPER_B(helper_pcmpgtb, FCMPGTB)
|
---|
95 | SSE_HELPER_W(helper_pcmpgtw, FCMPGTW)
|
---|
96 | SSE_HELPER_L(helper_pcmpgtl, FCMPGTL)
|
---|
97 |
|
---|
98 | SSE_HELPER_B(helper_pcmpeqb, FCMPEQ)
|
---|
99 | SSE_HELPER_W(helper_pcmpeqw, FCMPEQ)
|
---|
100 | SSE_HELPER_L(helper_pcmpeql, FCMPEQ)
|
---|
101 |
|
---|
102 | SSE_HELPER_W(helper_pmullw, FMULLW)
|
---|
103 | #if SHIFT == 0
|
---|
104 | SSE_HELPER_W(helper_pmulhrw, FMULHRW)
|
---|
105 | #endif
|
---|
106 | SSE_HELPER_W(helper_pmulhuw, FMULHUW)
|
---|
107 | SSE_HELPER_W(helper_pmulhw, FMULHW)
|
---|
108 |
|
---|
109 | SSE_HELPER_B(helper_pavgb, FAVG)
|
---|
110 | SSE_HELPER_W(helper_pavgw, FAVG)
|
---|
111 |
|
---|
112 | DEF_HELPER(void, glue(helper_pmuludq, SUFFIX) , (Reg *d, Reg *s))
|
---|
113 | DEF_HELPER(void, glue(helper_pmaddwd, SUFFIX) , (Reg *d, Reg *s))
|
---|
114 |
|
---|
115 | DEF_HELPER(void, glue(helper_psadbw, SUFFIX) , (Reg *d, Reg *s))
|
---|
116 | DEF_HELPER(void, glue(helper_maskmov, SUFFIX) , (Reg *d, Reg *s, target_ulong a0))
|
---|
117 | DEF_HELPER(void, glue(helper_movl_mm_T0, SUFFIX) , (Reg *d, uint32_t val))
|
---|
118 | #ifdef TARGET_X86_64
|
---|
119 | DEF_HELPER(void, glue(helper_movq_mm_T0, SUFFIX) , (Reg *d, uint64_t val))
|
---|
120 | #endif
|
---|
121 |
|
---|
122 | #if SHIFT == 0
|
---|
123 | DEF_HELPER(void, glue(helper_pshufw, SUFFIX) , (Reg *d, Reg *s, int order))
|
---|
124 | #else
|
---|
125 | DEF_HELPER(void, helper_shufps, (Reg *d, Reg *s, int order))
|
---|
126 | DEF_HELPER(void, helper_shufpd, (Reg *d, Reg *s, int order))
|
---|
127 | DEF_HELPER(void, glue(helper_pshufd, SUFFIX) , (Reg *d, Reg *s, int order))
|
---|
128 | DEF_HELPER(void, glue(helper_pshuflw, SUFFIX) , (Reg *d, Reg *s, int order))
|
---|
129 | DEF_HELPER(void, glue(helper_pshufhw, SUFFIX) , (Reg *d, Reg *s, int order))
|
---|
130 | #endif
|
---|
131 |
|
---|
132 | #if SHIFT == 1
|
---|
133 | /* FPU ops */
|
---|
134 | /* XXX: not accurate */
|
---|
135 |
|
---|
136 | #define SSE_HELPER_S(name, F)\
|
---|
137 | DEF_HELPER(void, helper_ ## name ## ps , (Reg *d, Reg *s)) \
|
---|
138 | DEF_HELPER(void, helper_ ## name ## ss , (Reg *d, Reg *s)) \
|
---|
139 | DEF_HELPER(void, helper_ ## name ## pd , (Reg *d, Reg *s)) \
|
---|
140 | DEF_HELPER(void, helper_ ## name ## sd , (Reg *d, Reg *s))
|
---|
141 |
|
---|
142 | SSE_HELPER_S(add, FPU_ADD)
|
---|
143 | SSE_HELPER_S(sub, FPU_SUB)
|
---|
144 | SSE_HELPER_S(mul, FPU_MUL)
|
---|
145 | SSE_HELPER_S(div, FPU_DIV)
|
---|
146 | SSE_HELPER_S(min, FPU_MIN)
|
---|
147 | SSE_HELPER_S(max, FPU_MAX)
|
---|
148 | SSE_HELPER_S(sqrt, FPU_SQRT)
|
---|
149 |
|
---|
150 |
|
---|
151 | DEF_HELPER(void, helper_cvtps2pd, (Reg *d, Reg *s))
|
---|
152 | DEF_HELPER(void, helper_cvtpd2ps, (Reg *d, Reg *s))
|
---|
153 | DEF_HELPER(void, helper_cvtss2sd, (Reg *d, Reg *s))
|
---|
154 | DEF_HELPER(void, helper_cvtsd2ss, (Reg *d, Reg *s))
|
---|
155 | DEF_HELPER(void, helper_cvtdq2ps, (Reg *d, Reg *s))
|
---|
156 | DEF_HELPER(void, helper_cvtdq2pd, (Reg *d, Reg *s))
|
---|
157 | DEF_HELPER(void, helper_cvtpi2ps, (XMMReg *d, MMXReg *s))
|
---|
158 | DEF_HELPER(void, helper_cvtpi2pd, (XMMReg *d, MMXReg *s))
|
---|
159 | DEF_HELPER(void, helper_cvtsi2ss, (XMMReg *d, uint32_t val))
|
---|
160 | DEF_HELPER(void, helper_cvtsi2sd, (XMMReg *d, uint32_t val))
|
---|
161 |
|
---|
162 | #ifdef TARGET_X86_64
|
---|
163 | DEF_HELPER(void, helper_cvtsq2ss, (XMMReg *d, uint64_t val))
|
---|
164 | DEF_HELPER(void, helper_cvtsq2sd, (XMMReg *d, uint64_t val))
|
---|
165 | #endif
|
---|
166 |
|
---|
167 | DEF_HELPER(void, helper_cvtps2dq, (XMMReg *d, XMMReg *s))
|
---|
168 | DEF_HELPER(void, helper_cvtpd2dq, (XMMReg *d, XMMReg *s))
|
---|
169 | DEF_HELPER(void, helper_cvtps2pi, (MMXReg *d, XMMReg *s))
|
---|
170 | DEF_HELPER(void, helper_cvtpd2pi, (MMXReg *d, XMMReg *s))
|
---|
171 | DEF_HELPER(int32_t, helper_cvtss2si, (XMMReg *s))
|
---|
172 | DEF_HELPER(int32_t, helper_cvtsd2si, (XMMReg *s))
|
---|
173 | #ifdef TARGET_X86_64
|
---|
174 | DEF_HELPER(int64_t, helper_cvtss2sq, (XMMReg *s))
|
---|
175 | DEF_HELPER(int64_t, helper_cvtsd2sq, (XMMReg *s))
|
---|
176 | #endif
|
---|
177 |
|
---|
178 | DEF_HELPER(void, helper_cvttps2dq, (XMMReg *d, XMMReg *s))
|
---|
179 | DEF_HELPER(void, helper_cvttpd2dq, (XMMReg *d, XMMReg *s))
|
---|
180 | DEF_HELPER(void, helper_cvttps2pi, (MMXReg *d, XMMReg *s))
|
---|
181 | DEF_HELPER(void, helper_cvttpd2pi, (MMXReg *d, XMMReg *s))
|
---|
182 | DEF_HELPER(int32_t, helper_cvttss2si, (XMMReg *s))
|
---|
183 | DEF_HELPER(int32_t, helper_cvttsd2si, (XMMReg *s))
|
---|
184 | #ifdef TARGET_X86_64
|
---|
185 | DEF_HELPER(int64_t, helper_cvttss2sq, (XMMReg *s))
|
---|
186 | DEF_HELPER(int64_t, helper_cvttsd2sq, (XMMReg *s))
|
---|
187 | #endif
|
---|
188 |
|
---|
189 | DEF_HELPER(void, helper_rsqrtps, (XMMReg *d, XMMReg *s))
|
---|
190 | DEF_HELPER(void, helper_rsqrtss, (XMMReg *d, XMMReg *s))
|
---|
191 | DEF_HELPER(void, helper_rcpps, (XMMReg *d, XMMReg *s))
|
---|
192 | DEF_HELPER(void, helper_rcpss, (XMMReg *d, XMMReg *s))
|
---|
193 | DEF_HELPER(void, helper_haddps, (XMMReg *d, XMMReg *s))
|
---|
194 | DEF_HELPER(void, helper_haddpd, (XMMReg *d, XMMReg *s))
|
---|
195 | DEF_HELPER(void, helper_hsubps, (XMMReg *d, XMMReg *s))
|
---|
196 | DEF_HELPER(void, helper_hsubpd, (XMMReg *d, XMMReg *s))
|
---|
197 | DEF_HELPER(void, helper_addsubps, (XMMReg *d, XMMReg *s))
|
---|
198 | DEF_HELPER(void, helper_addsubpd, (XMMReg *d, XMMReg *s))
|
---|
199 |
|
---|
200 | #define SSE_HELPER_CMP(name, F)\
|
---|
201 | DEF_HELPER(void, helper_ ## name ## ps , (Reg *d, Reg *s)) \
|
---|
202 | DEF_HELPER(void, helper_ ## name ## ss , (Reg *d, Reg *s)) \
|
---|
203 | DEF_HELPER(void, helper_ ## name ## pd , (Reg *d, Reg *s)) \
|
---|
204 | DEF_HELPER(void, helper_ ## name ## sd , (Reg *d, Reg *s))
|
---|
205 |
|
---|
206 | SSE_HELPER_CMP(cmpeq, FPU_CMPEQ)
|
---|
207 | SSE_HELPER_CMP(cmplt, FPU_CMPLT)
|
---|
208 | SSE_HELPER_CMP(cmple, FPU_CMPLE)
|
---|
209 | SSE_HELPER_CMP(cmpunord, FPU_CMPUNORD)
|
---|
210 | SSE_HELPER_CMP(cmpneq, FPU_CMPNEQ)
|
---|
211 | SSE_HELPER_CMP(cmpnlt, FPU_CMPNLT)
|
---|
212 | SSE_HELPER_CMP(cmpnle, FPU_CMPNLE)
|
---|
213 | SSE_HELPER_CMP(cmpord, FPU_CMPORD)
|
---|
214 |
|
---|
215 | DEF_HELPER(void, helper_ucomiss, (Reg *d, Reg *s))
|
---|
216 | DEF_HELPER(void, helper_comiss, (Reg *d, Reg *s))
|
---|
217 | DEF_HELPER(void, helper_ucomisd, (Reg *d, Reg *s))
|
---|
218 | DEF_HELPER(void, helper_comisd, (Reg *d, Reg *s))
|
---|
219 | DEF_HELPER(uint32_t, helper_movmskps, (Reg *s))
|
---|
220 | DEF_HELPER(uint32_t, helper_movmskpd, (Reg *s))
|
---|
221 | #endif
|
---|
222 |
|
---|
223 | DEF_HELPER(uint32_t, glue(helper_pmovmskb, SUFFIX), (Reg *s))
|
---|
224 | DEF_HELPER(void, glue(helper_packsswb, SUFFIX) , (Reg *d, Reg *s))
|
---|
225 | DEF_HELPER(void, glue(helper_packuswb, SUFFIX) , (Reg *d, Reg *s))
|
---|
226 | DEF_HELPER(void, glue(helper_packssdw, SUFFIX) , (Reg *d, Reg *s))
|
---|
227 | #define UNPCK_OP(base_name, base) \
|
---|
228 | DEF_HELPER(void, glue(helper_punpck ## base_name ## bw, SUFFIX) , (Reg *d, Reg *s)) \
|
---|
229 | DEF_HELPER(void, glue(helper_punpck ## base_name ## wd, SUFFIX) , (Reg *d, Reg *s)) \
|
---|
230 | DEF_HELPER(void, glue(helper_punpck ## base_name ## dq, SUFFIX) , (Reg *d, Reg *s))
|
---|
231 |
|
---|
232 | UNPCK_OP(l, 0)
|
---|
233 | UNPCK_OP(h, 1)
|
---|
234 |
|
---|
235 | #if SHIFT == 1
|
---|
236 | DEF_HELPER(void, glue(helper_punpcklqdq, SUFFIX) , (Reg *d, Reg *s))
|
---|
237 | DEF_HELPER(void, glue(helper_punpckhqdq, SUFFIX) , (Reg *d, Reg *s))
|
---|
238 | #endif
|
---|
239 |
|
---|
240 | /* 3DNow! float ops */
|
---|
241 | #if SHIFT == 0
|
---|
242 | DEF_HELPER(void, helper_pi2fd, (MMXReg *d, MMXReg *s))
|
---|
243 | DEF_HELPER(void, helper_pi2fw, (MMXReg *d, MMXReg *s))
|
---|
244 | DEF_HELPER(void, helper_pf2id, (MMXReg *d, MMXReg *s))
|
---|
245 | DEF_HELPER(void, helper_pf2iw, (MMXReg *d, MMXReg *s))
|
---|
246 | DEF_HELPER(void, helper_pfacc, (MMXReg *d, MMXReg *s))
|
---|
247 | DEF_HELPER(void, helper_pfadd, (MMXReg *d, MMXReg *s))
|
---|
248 | DEF_HELPER(void, helper_pfcmpeq, (MMXReg *d, MMXReg *s))
|
---|
249 | DEF_HELPER(void, helper_pfcmpge, (MMXReg *d, MMXReg *s))
|
---|
250 | DEF_HELPER(void, helper_pfcmpgt, (MMXReg *d, MMXReg *s))
|
---|
251 | DEF_HELPER(void, helper_pfmax, (MMXReg *d, MMXReg *s))
|
---|
252 | DEF_HELPER(void, helper_pfmin, (MMXReg *d, MMXReg *s))
|
---|
253 | DEF_HELPER(void, helper_pfmul, (MMXReg *d, MMXReg *s))
|
---|
254 | DEF_HELPER(void, helper_pfnacc, (MMXReg *d, MMXReg *s))
|
---|
255 | DEF_HELPER(void, helper_pfpnacc, (MMXReg *d, MMXReg *s))
|
---|
256 | DEF_HELPER(void, helper_pfrcp, (MMXReg *d, MMXReg *s))
|
---|
257 | DEF_HELPER(void, helper_pfrsqrt, (MMXReg *d, MMXReg *s))
|
---|
258 | DEF_HELPER(void, helper_pfsub, (MMXReg *d, MMXReg *s))
|
---|
259 | DEF_HELPER(void, helper_pfsubr, (MMXReg *d, MMXReg *s))
|
---|
260 | DEF_HELPER(void, helper_pswapd, (MMXReg *d, MMXReg *s))
|
---|
261 | #endif
|
---|
262 |
|
---|
263 | /* SSSE3 op helpers */
|
---|
264 | DEF_HELPER(void, glue(helper_phaddw, SUFFIX), (Reg *d, Reg *s))
|
---|
265 | DEF_HELPER(void, glue(helper_phaddd, SUFFIX), (Reg *d, Reg *s))
|
---|
266 | DEF_HELPER(void, glue(helper_phaddsw, SUFFIX), (Reg *d, Reg *s))
|
---|
267 | DEF_HELPER(void, glue(helper_phsubw, SUFFIX), (Reg *d, Reg *s))
|
---|
268 | DEF_HELPER(void, glue(helper_phsubd, SUFFIX), (Reg *d, Reg *s))
|
---|
269 | DEF_HELPER(void, glue(helper_phsubsw, SUFFIX), (Reg *d, Reg *s))
|
---|
270 | DEF_HELPER(void, glue(helper_pabsb, SUFFIX), (Reg *d, Reg *s))
|
---|
271 | DEF_HELPER(void, glue(helper_pabsw, SUFFIX), (Reg *d, Reg *s))
|
---|
272 | DEF_HELPER(void, glue(helper_pabsd, SUFFIX), (Reg *d, Reg *s))
|
---|
273 | DEF_HELPER(void, glue(helper_pmaddubsw, SUFFIX), (Reg *d, Reg *s))
|
---|
274 | DEF_HELPER(void, glue(helper_pmulhrsw, SUFFIX), (Reg *d, Reg *s))
|
---|
275 | DEF_HELPER(void, glue(helper_pshufb, SUFFIX), (Reg *d, Reg *s))
|
---|
276 | DEF_HELPER(void, glue(helper_psignb, SUFFIX), (Reg *d, Reg *s))
|
---|
277 | DEF_HELPER(void, glue(helper_psignw, SUFFIX), (Reg *d, Reg *s))
|
---|
278 | DEF_HELPER(void, glue(helper_psignd, SUFFIX), (Reg *d, Reg *s))
|
---|
279 | DEF_HELPER(void, glue(helper_palignr, SUFFIX), (Reg *d, Reg *s, int32_t shift))
|
---|
280 |
|
---|
281 | /* SSE4.1 op helpers */
|
---|
282 | #if SHIFT == 1
|
---|
283 | DEF_HELPER(void, glue(helper_pblendvb, SUFFIX), (Reg *d, Reg *s))
|
---|
284 | DEF_HELPER(void, glue(helper_blendvps, SUFFIX), (Reg *d, Reg *s))
|
---|
285 | DEF_HELPER(void, glue(helper_blendvpd, SUFFIX), (Reg *d, Reg *s))
|
---|
286 | DEF_HELPER(void, glue(helper_ptest, SUFFIX), (Reg *d, Reg *s))
|
---|
287 | DEF_HELPER(void, glue(helper_pmovsxbw, SUFFIX), (Reg *d, Reg *s))
|
---|
288 | DEF_HELPER(void, glue(helper_pmovsxbd, SUFFIX), (Reg *d, Reg *s))
|
---|
289 | DEF_HELPER(void, glue(helper_pmovsxbq, SUFFIX), (Reg *d, Reg *s))
|
---|
290 | DEF_HELPER(void, glue(helper_pmovsxwd, SUFFIX), (Reg *d, Reg *s))
|
---|
291 | DEF_HELPER(void, glue(helper_pmovsxwq, SUFFIX), (Reg *d, Reg *s))
|
---|
292 | DEF_HELPER(void, glue(helper_pmovsxdq, SUFFIX), (Reg *d, Reg *s))
|
---|
293 | DEF_HELPER(void, glue(helper_pmovzxbw, SUFFIX), (Reg *d, Reg *s))
|
---|
294 | DEF_HELPER(void, glue(helper_pmovzxbd, SUFFIX), (Reg *d, Reg *s))
|
---|
295 | DEF_HELPER(void, glue(helper_pmovzxbq, SUFFIX), (Reg *d, Reg *s))
|
---|
296 | DEF_HELPER(void, glue(helper_pmovzxwd, SUFFIX), (Reg *d, Reg *s))
|
---|
297 | DEF_HELPER(void, glue(helper_pmovzxwq, SUFFIX), (Reg *d, Reg *s))
|
---|
298 | DEF_HELPER(void, glue(helper_pmovzxdq, SUFFIX), (Reg *d, Reg *s))
|
---|
299 | DEF_HELPER(void, glue(helper_pmuldq, SUFFIX), (Reg *d, Reg *s))
|
---|
300 | DEF_HELPER(void, glue(helper_pcmpeqq, SUFFIX), (Reg *d, Reg *s))
|
---|
301 | DEF_HELPER(void, glue(helper_packusdw, SUFFIX), (Reg *d, Reg *s))
|
---|
302 | DEF_HELPER(void, glue(helper_pminsb, SUFFIX), (Reg *d, Reg *s))
|
---|
303 | DEF_HELPER(void, glue(helper_pminsd, SUFFIX), (Reg *d, Reg *s))
|
---|
304 | DEF_HELPER(void, glue(helper_pminuw, SUFFIX), (Reg *d, Reg *s))
|
---|
305 | DEF_HELPER(void, glue(helper_pminud, SUFFIX), (Reg *d, Reg *s))
|
---|
306 | DEF_HELPER(void, glue(helper_pmaxsb, SUFFIX), (Reg *d, Reg *s))
|
---|
307 | DEF_HELPER(void, glue(helper_pmaxsd, SUFFIX), (Reg *d, Reg *s))
|
---|
308 | DEF_HELPER(void, glue(helper_pmaxuw, SUFFIX), (Reg *d, Reg *s))
|
---|
309 | DEF_HELPER(void, glue(helper_pmaxud, SUFFIX), (Reg *d, Reg *s))
|
---|
310 | DEF_HELPER(void, glue(helper_pmulld, SUFFIX), (Reg *d, Reg *s))
|
---|
311 | DEF_HELPER(void, glue(helper_phminposuw, SUFFIX), (Reg *d, Reg *s))
|
---|
312 | DEF_HELPER(void, glue(helper_roundps, SUFFIX), (Reg *d, Reg *s, uint32_t mode))
|
---|
313 | DEF_HELPER(void, glue(helper_roundpd, SUFFIX), (Reg *d, Reg *s, uint32_t mode))
|
---|
314 | DEF_HELPER(void, glue(helper_roundss, SUFFIX), (Reg *d, Reg *s, uint32_t mode))
|
---|
315 | DEF_HELPER(void, glue(helper_roundsd, SUFFIX), (Reg *d, Reg *s, uint32_t mode))
|
---|
316 | DEF_HELPER(void, glue(helper_blendps, SUFFIX), (Reg *d, Reg *s, uint32_t imm))
|
---|
317 | DEF_HELPER(void, glue(helper_blendpd, SUFFIX), (Reg *d, Reg *s, uint32_t imm))
|
---|
318 | DEF_HELPER(void, glue(helper_pblendw, SUFFIX), (Reg *d, Reg *s, uint32_t imm))
|
---|
319 | DEF_HELPER(void, glue(helper_dpps, SUFFIX), (Reg *d, Reg *s, uint32_t mask))
|
---|
320 | DEF_HELPER(void, glue(helper_dppd, SUFFIX), (Reg *d, Reg *s, uint32_t mask))
|
---|
321 | DEF_HELPER(void, glue(helper_mpsadbw, SUFFIX), (Reg *d, Reg *s, uint32_t off))
|
---|
322 | #endif
|
---|
323 |
|
---|
324 | /* SSE4.2 op helpers */
|
---|
325 | #if SHIFT == 1
|
---|
326 | DEF_HELPER(void, glue(helper_pcmpgtq, SUFFIX), (Reg *d, Reg *s))
|
---|
327 | DEF_HELPER(void, glue(helper_pcmpestri, SUFFIX), (Reg *d, Reg *s, uint32_t ctl))
|
---|
328 | DEF_HELPER(void, glue(helper_pcmpestrm, SUFFIX), (Reg *d, Reg *s, uint32_t ctl))
|
---|
329 | DEF_HELPER(void, glue(helper_pcmpistri, SUFFIX), (Reg *d, Reg *s, uint32_t ctl))
|
---|
330 | DEF_HELPER(void, glue(helper_pcmpistrm, SUFFIX), (Reg *d, Reg *s, uint32_t ctl))
|
---|
331 | DEF_HELPER(target_ulong, helper_crc32,
|
---|
332 | (uint32_t crc1, target_ulong msg, uint32_t len))
|
---|
333 | DEF_HELPER(target_ulong, helper_popcnt, (target_ulong n, uint32_t type))
|
---|
334 | #endif
|
---|
335 |
|
---|
336 | #undef SHIFT
|
---|
337 | #undef Reg
|
---|
338 | #undef SUFFIX
|
---|
339 |
|
---|
340 | #undef SSE_HELPER_B
|
---|
341 | #undef SSE_HELPER_W
|
---|
342 | #undef SSE_HELPER_L
|
---|
343 | #undef SSE_HELPER_Q
|
---|
344 | #undef SSE_HELPER_S
|
---|
345 | #undef SSE_HELPER_CMP
|
---|
346 | #undef UNPCK_OP
|
---|