1
2#include <stdio.h>
3#include <stdlib.h>
4#include <assert.h>
5#include <malloc.h>
6
7typedef  unsigned char           UChar;
8typedef  unsigned int            UInt;
9typedef  unsigned long int       UWord;
10typedef  unsigned long long int  ULong;
11
12#define IS_32_ALIGNED(_ptr) (0 == (0x1F & (UWord)(_ptr)))
13
14typedef  union { UChar u8[32];  UInt u32[8];  }  YMM;
15
16typedef  struct {  YMM a1; YMM a2; YMM a3; YMM a4; ULong u64; }  Block;
17
18void showYMM ( YMM* vec )
19{
20   int i;
21   assert(IS_32_ALIGNED(vec));
22   for (i = 31; i >= 0; i--) {
23      printf("%02x", (UInt)vec->u8[i]);
24      if (i > 0 && 0 == ((i+0) & 7)) printf(".");
25   }
26}
27
28void showBlock ( char* msg, Block* block )
29{
30   printf("  %s\n", msg);
31   printf("    "); showYMM(&block->a1); printf("\n");
32   printf("    "); showYMM(&block->a2); printf("\n");
33   printf("    "); showYMM(&block->a3); printf("\n");
34   printf("    "); showYMM(&block->a4); printf("\n");
35   printf("    %016llx\n", block->u64);
36}
37
38UChar randUChar ( void )
39{
40   static UInt seed = 80021;
41   seed = 1103515245 * seed + 12345;
42   return (seed >> 17) & 0xFF;
43}
44
45void randBlock ( Block* b )
46{
47   int i;
48   UChar* p = (UChar*)b;
49   for (i = 0; i < sizeof(Block); i++)
50      p[i] = randUChar();
51}
52
53
54/* Generate a function test_NAME, that tests the given insn, in both
55   its mem and reg forms.  The reg form of the insn may mention, as
56   operands only %ymm6, %ymm7, %ymm8, %ymm9 and %r14.  The mem form of
57   the insn may mention as operands only (%rax), %ymm7, %ymm8, %ymm9
58   and %r14.  It's OK for the insn to clobber ymm0, as this is needed
59   for testing PCMPxSTRx. */
60
61#define GEN_test_RandM(_name, _reg_form, _mem_form)   \
62    \
63    __attribute__ ((noinline)) static void test_##_name ( void )   \
64    { \
65       Block* b = memalign(32, sizeof(Block)); \
66       randBlock(b); \
67       printf("%s(reg)\n", #_name); \
68       showBlock("before", b); \
69       __asm__ __volatile__( \
70          "vmovdqa   0(%0),%%ymm7"  "\n\t" \
71          "vmovdqa  32(%0),%%ymm8"  "\n\t" \
72          "vmovdqa  64(%0),%%ymm6"  "\n\t" \
73          "vmovdqa  96(%0),%%ymm9"  "\n\t" \
74          "movq    128(%0),%%r14"   "\n\t" \
75          _reg_form   "\n\t" \
76          "vmovdqa %%ymm7,  0(%0)"  "\n\t" \
77          "vmovdqa %%ymm8, 32(%0)"  "\n\t" \
78          "vmovdqa %%ymm6, 64(%0)"  "\n\t" \
79          "vmovdqa %%ymm9, 96(%0)"  "\n\t" \
80          "movq    %%r14, 128(%0)"  "\n\t" \
81          : /*OUT*/  \
82          : /*IN*/"r"(b) \
83          : /*TRASH*/"xmm0","xmm7","xmm8","xmm6","xmm9","r14","memory","cc" \
84       ); \
85       showBlock("after", b); \
86       randBlock(b); \
87       printf("%s(mem)\n", #_name); \
88       showBlock("before", b); \
89       __asm__ __volatile__( \
90          "leaq      0(%0),%%rax"  "\n\t" \
91          "vmovdqa  32(%0),%%ymm8"  "\n\t" \
92          "vmovdqa  64(%0),%%ymm7"  "\n\t" \
93          "vmovdqa  96(%0),%%ymm9"  "\n\t" \
94          "movq    128(%0),%%r14"   "\n\t" \
95          _mem_form   "\n\t" \
96          "vmovdqa %%ymm8, 32(%0)"  "\n\t" \
97          "vmovdqa %%ymm7, 64(%0)"  "\n\t" \
98          "vmovdqa %%ymm9, 96(%0)"  "\n\t" \
99          "movq    %%r14, 128(%0)"  "\n\t" \
100          : /*OUT*/  \
101          : /*IN*/"r"(b) \
102          : /*TRASH*/"xmm0","xmm8","xmm7","xmm9","r14","rax","memory","cc" \
103       ); \
104       showBlock("after", b); \
105       printf("\n"); \
106       free(b); \
107    }
108
109#define GEN_test_Ronly(_name, _reg_form) \
110   GEN_test_RandM(_name, _reg_form, "")
111#define GEN_test_Monly(_name, _mem_form) \
112   GEN_test_RandM(_name, "", _mem_form)
113
114
115GEN_test_RandM(VPOR_128,
116               "vpor %%xmm6,  %%xmm8, %%xmm7",
117               "vpor (%%rax), %%xmm8, %%xmm7")
118
119GEN_test_RandM(VPXOR_128,
120               "vpxor %%xmm6,  %%xmm8, %%xmm7",
121               "vpxor (%%rax), %%xmm8, %%xmm7")
122
123GEN_test_RandM(VPSUBB_128,
124               "vpsubb %%xmm6,  %%xmm8, %%xmm7",
125               "vpsubb (%%rax), %%xmm8, %%xmm7")
126
127GEN_test_RandM(VPSUBD_128,
128               "vpsubd %%xmm6,  %%xmm8, %%xmm7",
129               "vpsubd (%%rax), %%xmm8, %%xmm7")
130
131GEN_test_RandM(VPADDD_128,
132               "vpaddd %%xmm6,  %%xmm8, %%xmm7",
133               "vpaddd (%%rax), %%xmm8, %%xmm7")
134
135GEN_test_RandM(VPMOVZXWD_128,
136               "vpmovzxwd %%xmm6,  %%xmm8",
137               "vpmovzxwd (%%rax), %%xmm8")
138
139GEN_test_RandM(VPMOVZXBW_128,
140               "vpmovzxbw %%xmm6,  %%xmm8",
141               "vpmovzxbw (%%rax), %%xmm8")
142
143GEN_test_RandM(VPBLENDVB_128,
144               "vpblendvb %%xmm9, %%xmm6,  %%xmm8, %%xmm7",
145               "vpblendvb %%xmm9, (%%rax), %%xmm8, %%xmm7")
146
147GEN_test_RandM(VPMINSD_128,
148               "vpminsd %%xmm6,  %%xmm8, %%xmm7",
149               "vpminsd (%%rax), %%xmm8, %%xmm7")
150
151GEN_test_RandM(VPMAXSD_128,
152               "vpmaxsd %%xmm6,  %%xmm8, %%xmm7",
153               "vpmaxsd (%%rax), %%xmm8, %%xmm7")
154
155GEN_test_RandM(VANDPD_128,
156               "vandpd %%xmm6,  %%xmm8, %%xmm7",
157               "vandpd (%%rax), %%xmm8, %%xmm7")
158
159GEN_test_RandM(VCVTSI2SD_32,
160               "vcvtsi2sdl %%r14d,  %%xmm8, %%xmm7",
161               "vcvtsi2sdl (%%rax), %%xmm8, %%xmm7")
162
163GEN_test_RandM(VCVTSI2SD_64,
164               "vcvtsi2sdq %%r14,   %%xmm8, %%xmm7",
165               "vcvtsi2sdq (%%rax), %%xmm8, %%xmm7")
166
167GEN_test_RandM(VCVTSI2SS_64,
168               "vcvtsi2ssq %%r14,   %%xmm8, %%xmm7",
169               "vcvtsi2ssq (%%rax), %%xmm8, %%xmm7")
170
171GEN_test_RandM(VCVTTSD2SI_32,
172               "vcvttsd2si %%xmm8,  %%r14d",
173               "vcvttsd2si (%%rax), %%r14d")
174
175GEN_test_RandM(VCVTTSD2SI_64,
176               "vcvttsd2si %%xmm8,  %%r14",
177               "vcvttsd2si (%%rax), %%r14")
178
179GEN_test_RandM(VCVTSD2SI_32,
180               "vcvtsd2si %%xmm8,  %%r14d",
181               "vcvtsd2si (%%rax), %%r14d")
182
183GEN_test_RandM(VCVTSD2SI_64,
184               "vcvtsd2si %%xmm8,  %%r14",
185               "vcvtsd2si (%%rax), %%r14")
186
187GEN_test_RandM(VPSHUFB_128,
188               "vpshufb %%xmm6,  %%xmm8, %%xmm7",
189               "vpshufb (%%rax), %%xmm8, %%xmm7")
190
191GEN_test_RandM(VCMPSD_128_0x0,
192               "vcmpsd $0, %%xmm6,  %%xmm8, %%xmm7",
193               "vcmpsd $0, (%%rax), %%xmm8, %%xmm7")
194GEN_test_RandM(VCMPSD_128_0x1,
195               "vcmpsd $1, %%xmm6,  %%xmm8, %%xmm7",
196               "vcmpsd $1, (%%rax), %%xmm8, %%xmm7")
197GEN_test_RandM(VCMPSD_128_0x2,
198               "vcmpsd $2, %%xmm6,  %%xmm8, %%xmm7",
199               "vcmpsd $2, (%%rax), %%xmm8, %%xmm7")
200GEN_test_RandM(VCMPSD_128_0x3,
201               "vcmpsd $3, %%xmm6,  %%xmm8, %%xmm7",
202               "vcmpsd $3, (%%rax), %%xmm8, %%xmm7")
203GEN_test_RandM(VCMPSD_128_0x4,
204               "vcmpsd $4, %%xmm6,  %%xmm8, %%xmm7",
205               "vcmpsd $4, (%%rax), %%xmm8, %%xmm7")
206GEN_test_RandM(VCMPSD_128_0x5,
207               "vcmpsd $5, %%xmm6,  %%xmm8, %%xmm7",
208               "vcmpsd $5, (%%rax), %%xmm8, %%xmm7")
209GEN_test_RandM(VCMPSD_128_0x6,
210               "vcmpsd $6, %%xmm6,  %%xmm8, %%xmm7",
211               "vcmpsd $6, (%%rax), %%xmm8, %%xmm7")
212GEN_test_RandM(VCMPSD_128_0x7,
213               "vcmpsd $7, %%xmm6,  %%xmm8, %%xmm7",
214               "vcmpsd $7, (%%rax), %%xmm8, %%xmm7")
215GEN_test_RandM(VCMPSD_128_0x8,
216               "vcmpsd $8, %%xmm6,  %%xmm8, %%xmm7",
217               "vcmpsd $8, (%%rax), %%xmm8, %%xmm7")
218GEN_test_RandM(VCMPSD_128_0xA,
219               "vcmpsd $0xA, %%xmm6,  %%xmm8, %%xmm7",
220               "vcmpsd $0xA, (%%rax), %%xmm8, %%xmm7")
221GEN_test_RandM(VCMPSD_128_0xC,
222               "vcmpsd $0xC, %%xmm6,  %%xmm8, %%xmm7",
223               "vcmpsd $0xC, (%%rax), %%xmm8, %%xmm7")
224GEN_test_RandM(VCMPSD_128_0xD,
225               "vcmpsd $0xD, %%xmm6,  %%xmm8, %%xmm7",
226               "vcmpsd $0xD, (%%rax), %%xmm8, %%xmm7")
227GEN_test_RandM(VCMPSD_128_0xE,
228               "vcmpsd $0xE, %%xmm6,  %%xmm8, %%xmm7",
229               "vcmpsd $0xE, (%%rax), %%xmm8, %%xmm7")
230GEN_test_RandM(VCMPSD_128_0x11,
231               "vcmpsd $0x11, %%xmm6,  %%xmm8, %%xmm7",
232               "vcmpsd $0x11, (%%rax), %%xmm8, %%xmm7")
233GEN_test_RandM(VCMPSD_128_0x12,
234               "vcmpsd $0x12, %%xmm6,  %%xmm8, %%xmm7",
235               "vcmpsd $0x12, (%%rax), %%xmm8, %%xmm7")
236GEN_test_RandM(VCMPSD_128_0x16,
237               "vcmpsd $0x16, %%xmm6,  %%xmm8, %%xmm7",
238               "vcmpsd $0x16, (%%rax), %%xmm8, %%xmm7")
239GEN_test_RandM(VCMPSD_128_0x1E,
240               "vcmpsd $0x1E, %%xmm6,  %%xmm8, %%xmm7",
241               "vcmpsd $0x1E, (%%rax), %%xmm8, %%xmm7")
242
243GEN_test_RandM(VSQRTSD_128,
244               "vsqrtsd %%xmm6,  %%xmm8, %%xmm7",
245               "vsqrtsd (%%rax), %%xmm8, %%xmm7")
246
247GEN_test_RandM(VORPS_128,
248               "vorps %%xmm6,  %%xmm8, %%xmm7",
249               "vorps (%%rax), %%xmm8, %%xmm7")
250
251GEN_test_RandM(VANDNPS_128,
252               "vandnps %%xmm6,  %%xmm8, %%xmm7",
253               "vandnps (%%rax), %%xmm8, %%xmm7")
254
255GEN_test_RandM(VMAXSS_128,
256               "vmaxss %%xmm6,  %%xmm8, %%xmm7",
257               "vmaxss (%%rax), %%xmm8, %%xmm7")
258
259GEN_test_RandM(VMINSS_128,
260               "vminss %%xmm6,  %%xmm8, %%xmm7",
261               "vminss (%%rax), %%xmm8, %%xmm7")
262
263GEN_test_RandM(VANDPS_128,
264               "vandps %%xmm6,  %%xmm8, %%xmm7",
265               "vandps (%%rax), %%xmm8, %%xmm7")
266
267GEN_test_RandM(VCVTSI2SS_128,
268               "vcvtsi2ssl %%r14d,  %%xmm8, %%xmm7",
269               "vcvtsi2ssl (%%rax), %%xmm8, %%xmm7")
270
271GEN_test_RandM(VUNPCKLPS_128,
272               "vunpcklps %%xmm6,  %%xmm8, %%xmm7",
273               "vunpcklps (%%rax), %%xmm8, %%xmm7")
274
275GEN_test_RandM(VDIVSS_128,
276               "vdivss %%xmm6,  %%xmm8, %%xmm7",
277               "vdivss (%%rax), %%xmm8, %%xmm7")
278
279GEN_test_RandM(VADDSS_128,
280               "vaddss %%xmm6,  %%xmm8, %%xmm7",
281               "vaddss (%%rax), %%xmm8, %%xmm7")
282
283GEN_test_RandM(VSUBSS_128,
284               "vsubss %%xmm6,  %%xmm8, %%xmm7",
285               "vsubss (%%rax), %%xmm8, %%xmm7")
286
287GEN_test_RandM(VMULSS_128,
288               "vmulss %%xmm6,  %%xmm8, %%xmm7",
289               "vmulss (%%rax), %%xmm8, %%xmm7")
290
291GEN_test_RandM(VPUNPCKLBW_128,
292               "vpunpcklbw %%xmm6,  %%xmm8, %%xmm7",
293               "vpunpcklbw (%%rax), %%xmm8, %%xmm7")
294
295GEN_test_RandM(VPUNPCKHBW_128,
296               "vpunpckhbw %%xmm6,  %%xmm8, %%xmm7",
297               "vpunpckhbw (%%rax), %%xmm8, %%xmm7")
298
299GEN_test_RandM(VCVTTSS2SI_32,
300               "vcvttss2si %%xmm8,  %%r14d",
301               "vcvttss2si (%%rax), %%r14d")
302
303GEN_test_RandM(VCVTSS2SI_32,
304               "vcvtss2si %%xmm8,  %%r14d",
305               "vcvtss2si (%%rax), %%r14d")
306
307GEN_test_RandM(VMOVQ_XMMorMEM64_to_XMM,
308               "vmovq %%xmm7,  %%xmm8",
309               "vmovq (%%rax), %%xmm8")
310
311/* NB tests the reg form only */
312GEN_test_Ronly(VMOVQ_XMM_to_IREG64,
313               "vmovq %%xmm7, %%r14")
314
315/* This insn only exists in the reg-reg-reg form. */
316GEN_test_Ronly(VMOVHLPS_128,
317               "vmovhlps %%xmm6, %%xmm8, %%xmm7")
318
319GEN_test_RandM(VPABSD_128,
320               "vpabsd %%xmm6,  %%xmm8",
321               "vpabsd (%%rax), %%xmm8")
322
323/* This insn only exists in the reg-reg-reg form. */
324GEN_test_Ronly(VMOVLHPS_128,
325               "vmovlhps %%xmm6, %%xmm8, %%xmm7")
326
327GEN_test_Monly(VMOVNTDQ_128,
328               "vmovntdq %%xmm8, (%%rax)")
329
330GEN_test_Monly(VMOVNTDQ_256,
331               "vmovntdq %%ymm8, (%%rax)")
332
333GEN_test_RandM(VMOVUPS_XMM_to_XMMorMEM,
334               "vmovups %%xmm8, %%xmm7",
335               "vmovups %%xmm9, (%%rax)")
336
337GEN_test_RandM(VMOVQ_IREGorMEM64_to_XMM,
338               "vmovq %%r14, %%xmm7",
339               "vmovq (%%rax), %%xmm9")
340
341GEN_test_RandM(VPCMPESTRM_0x45_128,
342               "vpcmpestrm $0x45, %%xmm7, %%xmm8;  movapd %%xmm0, %%xmm9",
343               "vpcmpestrm $0x45, (%%rax), %%xmm8; movapd %%xmm0, %%xmm9")
344
345/* NB tests the reg form only */
346GEN_test_Ronly(VMOVD_XMM_to_IREG32,
347               "vmovd %%xmm7, %%r14d")
348
349GEN_test_RandM(VCVTSD2SS_128,
350               "vcvtsd2ss %%xmm9,  %%xmm8, %%xmm7",
351               "vcvtsd2ss (%%rax), %%xmm8, %%xmm7")
352
353GEN_test_RandM(VCVTSS2SD_128,
354               "vcvtss2sd %%xmm9,  %%xmm8, %%xmm7",
355               "vcvtss2sd (%%rax), %%xmm8, %%xmm7")
356
357GEN_test_RandM(VPACKUSWB_128,
358               "vpackuswb %%xmm9,  %%xmm8, %%xmm7",
359               "vpackuswb (%%rax), %%xmm8, %%xmm7")
360
361GEN_test_RandM(VCVTTSS2SI_64,
362               "vcvttss2si %%xmm8,  %%r14",
363               "vcvttss2si (%%rax), %%r14")
364
365GEN_test_RandM(VCVTSS2SI_64,
366               "vcvtss2si %%xmm8,  %%r14",
367               "vcvtss2si (%%rax), %%r14")
368
369GEN_test_Ronly(VPMOVMSKB_128,
370               "vpmovmskb %%xmm8, %%r14")
371
372GEN_test_RandM(VPAND_128,
373               "vpand %%xmm9,  %%xmm8, %%xmm7",
374               "vpand (%%rax), %%xmm8, %%xmm7")
375
376GEN_test_Monly(VMOVHPD_128_StoreForm,
377               "vmovhpd %%xmm8, (%%rax)")
378
379GEN_test_Monly(VMOVHPS_128_StoreForm,
380               "vmovhps %%xmm8, (%%rax)")
381
382GEN_test_RandM(VPCMPEQB_128,
383               "vpcmpeqb %%xmm9,  %%xmm8, %%xmm7",
384               "vpcmpeqb (%%rax), %%xmm8, %%xmm7")
385
386GEN_test_RandM(VSHUFPS_0x39_128,
387               "vshufps $0x39, %%xmm9,  %%xmm8, %%xmm7",
388               "vshufps $0xC6, (%%rax), %%xmm8, %%xmm7")
389
390GEN_test_RandM(VMULPS_128,
391               "vmulps %%xmm9,  %%xmm8, %%xmm7",
392               "vmulps (%%rax), %%xmm8, %%xmm7")
393
394GEN_test_RandM(VSUBPS_128,
395               "vsubps %%xmm9,  %%xmm8, %%xmm7",
396               "vsubps (%%rax), %%xmm8, %%xmm7")
397
398GEN_test_RandM(VADDPS_128,
399               "vaddps %%xmm9,  %%xmm8, %%xmm7",
400               "vaddps (%%rax), %%xmm8, %%xmm7")
401
402GEN_test_RandM(VMAXPS_128,
403               "vmaxps %%xmm9,  %%xmm8, %%xmm7",
404               "vmaxps (%%rax), %%xmm8, %%xmm7")
405
406GEN_test_RandM(VMAXPS_256,
407               "vmaxps %%ymm9,  %%ymm8, %%ymm7",
408               "vmaxps (%%rax), %%ymm8, %%ymm7")
409
410GEN_test_RandM(VMAXPD_128,
411               "vmaxpd %%xmm9,  %%xmm8, %%xmm7",
412               "vmaxpd (%%rax), %%xmm8, %%xmm7")
413
414GEN_test_RandM(VMAXPD_256,
415               "vmaxpd %%ymm9,  %%ymm8, %%ymm7",
416               "vmaxpd (%%rax), %%ymm8, %%ymm7")
417
418GEN_test_RandM(VMINPS_128,
419               "vminps %%xmm9,  %%xmm8, %%xmm7",
420               "vminps (%%rax), %%xmm8, %%xmm7")
421
422GEN_test_RandM(VMINPS_256,
423               "vminps %%ymm9,  %%ymm8, %%ymm7",
424               "vminps (%%rax), %%ymm8, %%ymm7")
425
426GEN_test_RandM(VMINPD_128,
427               "vminpd %%xmm9,  %%xmm8, %%xmm7",
428               "vminpd (%%rax), %%xmm8, %%xmm7")
429
430GEN_test_RandM(VMINPD_256,
431               "vminpd %%ymm9,  %%ymm8, %%ymm7",
432               "vminpd (%%rax), %%ymm8, %%ymm7")
433
434GEN_test_RandM(VCVTPS2DQ_128,
435               "vcvtps2dq %%xmm8, %%xmm7",
436               "vcvtps2dq (%%rax), %%xmm8")
437
438GEN_test_RandM(VPSHUFLW_0x39_128,
439               "vpshuflw $0x39, %%xmm9,  %%xmm7",
440               "vpshuflw $0xC6, (%%rax), %%xmm8")
441
442GEN_test_RandM(VPSHUFHW_0x39_128,
443               "vpshufhw $0x39, %%xmm9,  %%xmm7",
444               "vpshufhw $0xC6, (%%rax), %%xmm8")
445
446GEN_test_RandM(VPMULLW_128,
447               "vpmullw %%xmm9,  %%xmm8, %%xmm7",
448               "vpmullw (%%rax), %%xmm8, %%xmm7")
449
450GEN_test_RandM(VPADDUSW_128,
451               "vpaddusw %%xmm9,  %%xmm8, %%xmm7",
452               "vpaddusw (%%rax), %%xmm8, %%xmm7")
453
454GEN_test_RandM(VPMULHUW_128,
455               "vpmulhuw %%xmm9,  %%xmm8, %%xmm7",
456               "vpmulhuw (%%rax), %%xmm8, %%xmm7")
457
458GEN_test_RandM(VPADDUSB_128,
459               "vpaddusb %%xmm9,  %%xmm8, %%xmm7",
460               "vpaddusb (%%rax), %%xmm8, %%xmm7")
461
462GEN_test_RandM(VPUNPCKLWD_128,
463               "vpunpcklwd %%xmm6,  %%xmm8, %%xmm7",
464               "vpunpcklwd (%%rax), %%xmm8, %%xmm7")
465
466GEN_test_RandM(VPUNPCKHWD_128,
467               "vpunpckhwd %%xmm6,  %%xmm8, %%xmm7",
468               "vpunpckhwd (%%rax), %%xmm8, %%xmm7")
469
470GEN_test_Ronly(VPSLLD_0x05_128,
471               "vpslld $0x5, %%xmm9,  %%xmm7")
472
473GEN_test_Ronly(VPSRLD_0x05_128,
474               "vpsrld $0x5, %%xmm9,  %%xmm7")
475
476GEN_test_Ronly(VPSRAD_0x05_128,
477               "vpsrad $0x5, %%xmm9,  %%xmm7")
478
479GEN_test_RandM(VPSUBUSB_128,
480               "vpsubusb %%xmm9,  %%xmm8, %%xmm7",
481               "vpsubusb (%%rax), %%xmm8, %%xmm7")
482
483GEN_test_RandM(VPSUBSB_128,
484               "vpsubsb %%xmm9,  %%xmm8, %%xmm7",
485               "vpsubsb (%%rax), %%xmm8, %%xmm7")
486
487GEN_test_Ronly(VPSRLDQ_0x05_128,
488               "vpsrldq $0x5, %%xmm9,  %%xmm7")
489
490GEN_test_Ronly(VPSLLDQ_0x05_128,
491               "vpslldq $0x5, %%xmm9,  %%xmm7")
492
493GEN_test_RandM(VPANDN_128,
494               "vpandn %%xmm9,  %%xmm8, %%xmm7",
495               "vpandn (%%rax), %%xmm8, %%xmm7")
496
497/* NB tests the mem form only */
498GEN_test_Monly(VMOVD_XMM_to_MEM32,
499               "vmovd %%xmm7, (%%rax)")
500
501GEN_test_RandM(VPINSRD_128,
502               "vpinsrd $0, %%r14d,  %%xmm8, %%xmm7",
503               "vpinsrd $3, (%%rax), %%xmm8, %%xmm7")
504
505GEN_test_RandM(VPUNPCKLQDQ_128,
506               "vpunpcklqdq %%xmm6,  %%xmm8, %%xmm7",
507               "vpunpcklqdq (%%rax), %%xmm8, %%xmm7")
508
509GEN_test_Ronly(VPSRLW_0x05_128,
510               "vpsrlw $0x5, %%xmm9,  %%xmm7")
511
512GEN_test_Ronly(VPSLLW_0x05_128,
513               "vpsllw $0x5, %%xmm9,  %%xmm7")
514
515GEN_test_RandM(VPADDW_128,
516               "vpaddw %%xmm6,  %%xmm8, %%xmm7",
517               "vpaddw (%%rax), %%xmm8, %%xmm7")
518
519GEN_test_RandM(VPACKSSDW_128,
520               "vpackssdw %%xmm9,  %%xmm8, %%xmm7",
521               "vpackssdw (%%rax), %%xmm8, %%xmm7")
522
523GEN_test_RandM(VPUNPCKLDQ_128,
524               "vpunpckldq %%xmm6,  %%xmm8, %%xmm7",
525               "vpunpckldq (%%rax), %%xmm8, %%xmm7")
526
527GEN_test_RandM(VINSERTPS_0x39_128,
528               "vinsertps $0x39, %%xmm6,  %%xmm8, %%xmm7",
529               "vinsertps $0xC6, (%%rax), %%xmm8, %%xmm7")
530
531GEN_test_Monly(VMOVSD_M64_XMM, "vmovsd (%%rax), %%xmm8")
532
533GEN_test_Monly(VMOVSS_M64_XMM, "vmovss (%%rax), %%xmm8")
534
535GEN_test_Monly(VMOVSD_XMM_M64, "vmovsd %%xmm8, (%%rax)")
536
537GEN_test_Monly(VMOVSS_XMM_M32, "vmovss %%xmm8, (%%rax)")
538
539GEN_test_RandM(VMOVUPD_GtoE_128,
540               "vmovupd %%xmm9,  %%xmm6",
541               "vmovupd %%xmm7, (%%rax)")
542
543GEN_test_RandM(VMOVAPD_EtoG_128,
544               "vmovapd %%xmm6,  %%xmm8",
545               "vmovapd (%%rax), %%xmm9")
546
547GEN_test_RandM(VMOVAPD_EtoG_256,
548               "vmovapd %%ymm6,  %%ymm8",
549               "vmovapd (%%rax), %%ymm9")
550
551GEN_test_RandM(VMOVAPS_EtoG_128,
552               "vmovaps %%xmm6,  %%xmm8",
553               "vmovaps (%%rax), %%xmm9")
554
555GEN_test_RandM(VMOVAPS_GtoE_128,
556               "vmovaps %%xmm9,  %%xmm6",
557               "vmovaps %%xmm7, (%%rax)")
558
559GEN_test_RandM(VMOVAPS_GtoE_256,
560               "vmovaps %%ymm9,  %%ymm6",
561               "vmovaps %%ymm7, (%%rax)")
562
563GEN_test_RandM(VMOVAPD_GtoE_128,
564               "vmovapd %%xmm9,  %%xmm6",
565               "vmovapd %%xmm7, (%%rax)")
566
567GEN_test_RandM(VMOVAPD_GtoE_256,
568               "vmovapd %%ymm9,  %%ymm6",
569               "vmovapd %%ymm7, (%%rax)")
570
571GEN_test_RandM(VMOVDQU_EtoG_128,
572               "vmovdqu %%xmm6,  %%xmm8",
573               "vmovdqu (%%rax), %%xmm9")
574
575GEN_test_RandM(VMOVDQA_EtoG_128,
576               "vmovdqa %%xmm6,  %%xmm8",
577               "vmovdqa (%%rax), %%xmm9")
578
579GEN_test_RandM(VMOVDQA_EtoG_256,
580               "vmovdqa %%ymm6,  %%ymm8",
581               "vmovdqa (%%rax), %%ymm9")
582
583GEN_test_RandM(VMOVDQU_GtoE_128,
584               "vmovdqu %%xmm9,  %%xmm6",
585               "vmovdqu %%xmm7, (%%rax)")
586
587GEN_test_RandM(VMOVDQA_GtoE_128,
588               "vmovdqa %%xmm9,  %%xmm6",
589               "vmovdqa %%xmm7, (%%rax)")
590
591GEN_test_RandM(VMOVDQA_GtoE_256,
592               "vmovdqa %%ymm9,  %%ymm6",
593               "vmovdqa %%ymm7, (%%rax)")
594
595GEN_test_Monly(VMOVQ_XMM_MEM64, "vmovq %%xmm8, (%%rax)")
596
597GEN_test_RandM(VMOVD_IREGorMEM32_to_XMM,
598               "vmovd %%r14d, %%xmm7",
599               "vmovd (%%rax), %%xmm9")
600
601GEN_test_RandM(VMOVDDUP_XMMorMEM64_to_XMM,
602               "vmovddup %%xmm8,  %%xmm7",
603               "vmovddup (%%rax), %%xmm9")
604
605GEN_test_RandM(VCMPSS_128_0x0,
606               "vcmpss $0, %%xmm6,  %%xmm8, %%xmm7",
607               "vcmpss $0, (%%rax), %%xmm8, %%xmm7")
608GEN_test_RandM(VCMPSS_128_0x1,
609               "vcmpss $1, %%xmm6,  %%xmm8, %%xmm7",
610               "vcmpss $1, (%%rax), %%xmm8, %%xmm7")
611GEN_test_RandM(VCMPSS_128_0x2,
612               "vcmpss $2, %%xmm6,  %%xmm8, %%xmm7",
613               "vcmpss $2, (%%rax), %%xmm8, %%xmm7")
614GEN_test_RandM(VCMPSS_128_0x3,
615               "vcmpss $3, %%xmm6,  %%xmm8, %%xmm7",
616               "vcmpss $3, (%%rax), %%xmm8, %%xmm7")
617GEN_test_RandM(VCMPSS_128_0x4,
618               "vcmpss $4, %%xmm6,  %%xmm8, %%xmm7",
619               "vcmpss $4, (%%rax), %%xmm8, %%xmm7")
620GEN_test_RandM(VCMPSS_128_0x5,
621               "vcmpss $5, %%xmm6,  %%xmm8, %%xmm7",
622               "vcmpss $5, (%%rax), %%xmm8, %%xmm7")
623GEN_test_RandM(VCMPSS_128_0x6,
624               "vcmpss $6, %%xmm6,  %%xmm8, %%xmm7",
625               "vcmpss $6, (%%rax), %%xmm8, %%xmm7")
626GEN_test_RandM(VCMPSS_128_0x7,
627               "vcmpss $7, %%xmm6,  %%xmm8, %%xmm7",
628               "vcmpss $7, (%%rax), %%xmm8, %%xmm7")
629GEN_test_RandM(VCMPSS_128_0x8,
630               "vcmpss $8, %%xmm6,  %%xmm8, %%xmm7",
631               "vcmpss $8, (%%rax), %%xmm8, %%xmm7")
632GEN_test_RandM(VCMPSS_128_0xA,
633               "vcmpss $0xA, %%xmm6,  %%xmm8, %%xmm7",
634               "vcmpss $0xA, (%%rax), %%xmm8, %%xmm7")
635GEN_test_RandM(VCMPSS_128_0xC,
636               "vcmpss $0xC, %%xmm6,  %%xmm8, %%xmm7",
637               "vcmpss $0xC, (%%rax), %%xmm8, %%xmm7")
638GEN_test_RandM(VCMPSS_128_0xD,
639               "vcmpss $0xD, %%xmm6,  %%xmm8, %%xmm7",
640               "vcmpss $0xD, (%%rax), %%xmm8, %%xmm7")
641GEN_test_RandM(VCMPSS_128_0xE,
642               "vcmpss $0xE, %%xmm6,  %%xmm8, %%xmm7",
643               "vcmpss $0xE, (%%rax), %%xmm8, %%xmm7")
644GEN_test_RandM(VCMPSS_128_0x11,
645               "vcmpss $0x11, %%xmm6,  %%xmm8, %%xmm7",
646               "vcmpss $0x11, (%%rax), %%xmm8, %%xmm7")
647GEN_test_RandM(VCMPSS_128_0x12,
648               "vcmpss $0x12, %%xmm6,  %%xmm8, %%xmm7",
649               "vcmpss $0x12, (%%rax), %%xmm8, %%xmm7")
650GEN_test_RandM(VCMPSS_128_0x16,
651               "vcmpss $0x16, %%xmm6,  %%xmm8, %%xmm7",
652               "vcmpss $0x16, (%%rax), %%xmm8, %%xmm7")
653GEN_test_RandM(VCMPSS_128_0x1E,
654               "vcmpss $0x1E, %%xmm6,  %%xmm8, %%xmm7",
655               "vcmpss $0x1E, (%%rax), %%xmm8, %%xmm7")
656
657// The x suffix denotes a 128 -> 64 operation
658GEN_test_RandM(VCVTPD2PS_128,
659               "vcvtpd2psx %%xmm8,  %%xmm7",
660               "vcvtpd2psx (%%rax), %%xmm9")
661
662GEN_test_RandM(VEXTRACTF128_0x0,
663               "vextractf128 $0x0, %%ymm7, %%xmm9",
664               "vextractf128 $0x0, %%ymm7, (%%rax)")
665
666GEN_test_RandM(VEXTRACTF128_0x1,
667               "vextractf128 $0x1, %%ymm7, %%xmm9",
668               "vextractf128 $0x1, %%ymm7, (%%rax)")
669
670GEN_test_RandM(VINSERTF128_0x0,
671               "vinsertf128 $0x0, %%xmm9,  %%ymm7, %%ymm8",
672               "vinsertf128 $0x0, (%%rax), %%ymm7, %%ymm8")
673
674GEN_test_RandM(VINSERTF128_0x1,
675               "vinsertf128 $0x1, %%xmm9,  %%ymm7, %%ymm8",
676               "vinsertf128 $0x1, (%%rax), %%ymm7, %%ymm8")
677
678GEN_test_RandM(VPEXTRD_128_0x0,
679               "vpextrd $0x0, %%xmm7, %%r14d",
680               "vpextrd $0x0, %%xmm7, (%%rax)")
681
682GEN_test_RandM(VPEXTRD_128_0x3,
683               "vpextrd $0x3, %%xmm7, %%r14d",
684               "vpextrd $0x3, %%xmm7, (%%rax)")
685
686GEN_test_RandM(VPCMPEQD_128,
687               "vpcmpeqd %%xmm6,  %%xmm8, %%xmm7",
688               "vpcmpeqd (%%rax), %%xmm8, %%xmm7")
689
690GEN_test_RandM(VPSHUFD_0x39_128,
691               "vpshufd $0x39, %%xmm9,  %%xmm8",
692               "vpshufd $0xC6, (%%rax), %%xmm7")
693
694GEN_test_RandM(VMAXSD_128,
695               "vmaxsd %%xmm6,  %%xmm8, %%xmm7",
696               "vmaxsd (%%rax), %%xmm8, %%xmm7")
697
698GEN_test_RandM(VDIVSD_128,
699               "vdivsd %%xmm6,  %%xmm8, %%xmm7",
700               "vdivsd (%%rax), %%xmm8, %%xmm7")
701
702GEN_test_RandM(VMINSD_128,
703               "vminsd %%xmm6,  %%xmm8, %%xmm7",
704               "vminsd (%%rax), %%xmm8, %%xmm7")
705
706GEN_test_RandM(VSUBSD_128,
707               "vsubsd %%xmm6,  %%xmm8, %%xmm7",
708               "vsubsd (%%rax), %%xmm8, %%xmm7")
709
710GEN_test_RandM(VADDSD_128,
711               "vaddsd %%xmm6,  %%xmm8, %%xmm7",
712               "vaddsd (%%rax), %%xmm8, %%xmm7")
713
714GEN_test_RandM(VMULSD_128,
715               "vmulsd %%xmm6,  %%xmm8, %%xmm7",
716               "vmulsd (%%rax), %%xmm8, %%xmm7")
717
718GEN_test_RandM(VXORPS_128,
719               "vxorps %%xmm6,  %%xmm8, %%xmm7",
720               "vxorps (%%rax), %%xmm8, %%xmm7")
721
722GEN_test_RandM(VXORPD_128,
723               "vxorpd %%xmm6,  %%xmm8, %%xmm7",
724               "vxorpd (%%rax), %%xmm8, %%xmm7")
725
726GEN_test_RandM(VORPD_128,
727               "vorpd %%xmm6,  %%xmm8, %%xmm7",
728               "vorpd (%%rax), %%xmm8, %%xmm7")
729
730GEN_test_RandM(VANDNPD_128,
731               "vandnpd %%xmm6,  %%xmm8, %%xmm7",
732               "vandnpd (%%rax), %%xmm8, %%xmm7")
733
734GEN_test_RandM(VCVTPS2PD_128,
735               "vcvtps2pd %%xmm6,  %%xmm8",
736               "vcvtps2pd (%%rax), %%xmm8")
737
738GEN_test_RandM(VUCOMISD_128,
739   "vucomisd %%xmm6,  %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14",
740   "vucomisd (%%rax), %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14")
741
742GEN_test_RandM(VUCOMISS_128,
743   "vucomiss %%xmm6,  %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14",
744   "vucomiss (%%rax), %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14")
745
746GEN_test_RandM(VPINSRQ_128,
747               "vpinsrq $0, %%r14,   %%xmm8, %%xmm7",
748               "vpinsrq $1, (%%rax), %%xmm8, %%xmm7")
749
750GEN_test_RandM(VPADDQ_128,
751               "vpaddq %%xmm6,  %%xmm8, %%xmm7",
752               "vpaddq (%%rax), %%xmm8, %%xmm7")
753
754GEN_test_RandM(VPSUBQ_128,
755               "vpsubq %%xmm6,  %%xmm8, %%xmm7",
756               "vpsubq (%%rax), %%xmm8, %%xmm7")
757
758GEN_test_RandM(VPSUBW_128,
759               "vpsubw %%xmm6,  %%xmm8, %%xmm7",
760               "vpsubw (%%rax), %%xmm8, %%xmm7")
761
762GEN_test_RandM(VMOVUPD_GtoE_256,
763               "vmovupd %%ymm9,  %%ymm6",
764               "vmovupd %%ymm7, (%%rax)")
765
766GEN_test_RandM(VMOVUPD_EtoG_256,
767               "vmovupd %%ymm6,  %%ymm9",
768               "vmovupd (%%rax), %%ymm7")
769
770GEN_test_RandM(VMULPD_256,
771               "vmulpd %%ymm6,  %%ymm8, %%ymm7",
772               "vmulpd (%%rax), %%ymm8, %%ymm7")
773
774GEN_test_RandM(VMOVUPD_EtoG_128,
775               "vmovupd %%xmm6,  %%xmm9",
776               "vmovupd (%%rax), %%xmm7")
777
778GEN_test_RandM(VADDPD_256,
779               "vaddpd %%ymm6,  %%ymm8, %%ymm7",
780               "vaddpd (%%rax), %%ymm8, %%ymm7")
781
782GEN_test_RandM(VSUBPD_256,
783               "vsubpd %%ymm6,  %%ymm8, %%ymm7",
784               "vsubpd (%%rax), %%ymm8, %%ymm7")
785
786GEN_test_RandM(VDIVPD_256,
787               "vdivpd %%ymm6,  %%ymm8, %%ymm7",
788               "vdivpd (%%rax), %%ymm8, %%ymm7")
789
790GEN_test_RandM(VPCMPEQQ_128,
791               "vpcmpeqq %%xmm6,  %%xmm8, %%xmm7",
792               "vpcmpeqq (%%rax), %%xmm8, %%xmm7")
793
794GEN_test_RandM(VSUBPD_128,
795               "vsubpd %%xmm6,  %%xmm8, %%xmm7",
796               "vsubpd (%%rax), %%xmm8, %%xmm7")
797
798GEN_test_RandM(VADDPD_128,
799               "vaddpd %%xmm6,  %%xmm8, %%xmm7",
800               "vaddpd (%%rax), %%xmm8, %%xmm7")
801
802GEN_test_RandM(VUNPCKLPD_128,
803               "vunpcklpd %%xmm6,  %%xmm8, %%xmm7",
804               "vunpcklpd (%%rax), %%xmm8, %%xmm7")
805
806GEN_test_RandM(VUNPCKHPD_128,
807               "vunpckhpd %%xmm6,  %%xmm8, %%xmm7",
808               "vunpckhpd (%%rax), %%xmm8, %%xmm7")
809
810GEN_test_RandM(VUNPCKHPS_128,
811               "vunpckhps %%xmm6,  %%xmm8, %%xmm7",
812               "vunpckhps (%%rax), %%xmm8, %%xmm7")
813
814GEN_test_RandM(VMOVUPS_EtoG_128,
815               "vmovups %%xmm6,  %%xmm8",
816               "vmovups (%%rax), %%xmm9")
817
818GEN_test_RandM(VADDPS_256,
819               "vaddps %%ymm6,  %%ymm8, %%ymm7",
820               "vaddps (%%rax), %%ymm8, %%ymm7")
821
822GEN_test_RandM(VSUBPS_256,
823               "vsubps %%ymm6,  %%ymm8, %%ymm7",
824               "vsubps (%%rax), %%ymm8, %%ymm7")
825
826GEN_test_RandM(VMULPS_256,
827               "vmulps %%ymm6,  %%ymm8, %%ymm7",
828               "vmulps (%%rax), %%ymm8, %%ymm7")
829
830GEN_test_RandM(VDIVPS_256,
831               "vdivps %%ymm6,  %%ymm8, %%ymm7",
832               "vdivps (%%rax), %%ymm8, %%ymm7")
833
834GEN_test_RandM(VPCMPGTQ_128,
835               "vpcmpgtq %%xmm6,  %%xmm8, %%xmm7",
836               "vpcmpgtq (%%rax), %%xmm8, %%xmm7")
837
838GEN_test_RandM(VPEXTRQ_128_0x0,
839               "vpextrq $0x0, %%xmm7, %%r14",
840               "vpextrq $0x0, %%xmm7, (%%rax)")
841
842GEN_test_RandM(VPEXTRQ_128_0x1,
843               "vpextrq $0x1, %%xmm7, %%r14",
844               "vpextrq $0x1, %%xmm7, (%%rax)")
845
846GEN_test_Ronly(VPSRLQ_0x05_128,
847               "vpsrlq $0x5, %%xmm9,  %%xmm7")
848
849GEN_test_RandM(VPMULUDQ_128,
850               "vpmuludq %%xmm6,  %%xmm8, %%xmm7",
851               "vpmuludq (%%rax), %%xmm8, %%xmm7")
852
853GEN_test_RandM(VPMULDQ_128,
854               "vpmuldq %%xmm6,  %%xmm8, %%xmm7",
855               "vpmuldq (%%rax), %%xmm8, %%xmm7")
856
857GEN_test_Ronly(VPSLLQ_0x05_128,
858               "vpsllq $0x5, %%xmm9,  %%xmm7")
859
860GEN_test_RandM(VPMAXUD_128,
861               "vpmaxud %%xmm6,  %%xmm8, %%xmm7",
862               "vpmaxud (%%rax), %%xmm8, %%xmm7")
863
864GEN_test_RandM(VPMINUD_128,
865               "vpminud %%xmm6,  %%xmm8, %%xmm7",
866               "vpminud (%%rax), %%xmm8, %%xmm7")
867
868GEN_test_RandM(VPMULLD_128,
869               "vpmulld %%xmm6,  %%xmm8, %%xmm7",
870               "vpmulld (%%rax), %%xmm8, %%xmm7")
871
872GEN_test_RandM(VPMAXUW_128,
873               "vpmaxuw %%xmm6,  %%xmm8, %%xmm7",
874               "vpmaxuw (%%rax), %%xmm8, %%xmm7")
875
876GEN_test_Ronly(VPEXTRW_128_EregOnly_toG_0x0,
877               "vpextrw $0x0, %%xmm7, %%r14d")
878
879GEN_test_Ronly(VPEXTRW_128_EregOnly_toG_0x7,
880               "vpextrw $0x7, %%xmm7, %%r14d")
881
882GEN_test_RandM(VPMINUW_128,
883               "vpminuw %%xmm6,  %%xmm8, %%xmm7",
884               "vpminuw (%%rax), %%xmm8, %%xmm7")
885
886GEN_test_RandM(VPHMINPOSUW_128,
887               "vphminposuw %%xmm6,  %%xmm8",
888               "vphminposuw (%%rax), %%xmm7")
889
890GEN_test_RandM(VPMAXSW_128,
891               "vpmaxsw %%xmm6,  %%xmm8, %%xmm7",
892               "vpmaxsw (%%rax), %%xmm8, %%xmm7")
893
894GEN_test_RandM(VPMINSW_128,
895               "vpminsw %%xmm6,  %%xmm8, %%xmm7",
896               "vpminsw (%%rax), %%xmm8, %%xmm7")
897
898GEN_test_RandM(VPMAXUB_128,
899               "vpmaxub %%xmm6,  %%xmm8, %%xmm7",
900               "vpmaxub (%%rax), %%xmm8, %%xmm7")
901
902GEN_test_RandM(VPEXTRB_GtoE_128_0x0,
903               "vpextrb $0x0, %%xmm8, %%r14",
904               "vpextrb $0x0, %%xmm8, (%%rax)")
905
906GEN_test_RandM(VPEXTRB_GtoE_128_0x1,
907               "vpextrb $0x1, %%xmm8, %%r14",
908               "vpextrb $0x1, %%xmm8, (%%rax)")
909
910GEN_test_RandM(VPEXTRB_GtoE_128_0x2,
911               "vpextrb $0x2, %%xmm8, %%r14",
912               "vpextrb $0x2, %%xmm8, (%%rax)")
913
914GEN_test_RandM(VPEXTRB_GtoE_128_0x3,
915               "vpextrb $0x3, %%xmm8, %%r14",
916               "vpextrb $0x3, %%xmm8, (%%rax)")
917
918GEN_test_RandM(VPEXTRB_GtoE_128_0x4,
919               "vpextrb $0x4, %%xmm8, %%r14",
920               "vpextrb $0x4, %%xmm8, (%%rax)")
921
922GEN_test_RandM(VPEXTRB_GtoE_128_0x9,
923               "vpextrb $0x9, %%xmm8, %%r14",
924               "vpextrb $0x9, %%xmm8, (%%rax)")
925
926GEN_test_RandM(VPEXTRB_GtoE_128_0xE,
927               "vpextrb $0xE, %%xmm8, %%r14",
928               "vpextrb $0xE, %%xmm8, (%%rax)")
929
930GEN_test_RandM(VPEXTRB_GtoE_128_0xF,
931               "vpextrb $0xF, %%xmm8, %%r14",
932               "vpextrb $0xF, %%xmm8, (%%rax)")
933
934GEN_test_RandM(VPMINUB_128,
935               "vpminub %%xmm6,  %%xmm8, %%xmm7",
936               "vpminub (%%rax), %%xmm8, %%xmm7")
937
938GEN_test_RandM(VPMAXSB_128,
939               "vpmaxsb %%xmm6,  %%xmm8, %%xmm7",
940               "vpmaxsb (%%rax), %%xmm8, %%xmm7")
941
942GEN_test_RandM(VPMINSB_128,
943               "vpminsb %%xmm6,  %%xmm8, %%xmm7",
944               "vpminsb (%%rax), %%xmm8, %%xmm7")
945
946GEN_test_RandM(VPERM2F128_0x00,
947               "vperm2f128 $0x00, %%ymm6,  %%ymm8, %%ymm7",
948               "vperm2f128 $0x00, (%%rax), %%ymm8, %%ymm7")
949GEN_test_RandM(VPERM2F128_0xFF,
950               "vperm2f128 $0xFF, %%ymm6,  %%ymm8, %%ymm7",
951               "vperm2f128 $0xFF, (%%rax), %%ymm8, %%ymm7")
952GEN_test_RandM(VPERM2F128_0x30,
953               "vperm2f128 $0x30, %%ymm6,  %%ymm8, %%ymm7",
954               "vperm2f128 $0x30, (%%rax), %%ymm8, %%ymm7")
955GEN_test_RandM(VPERM2F128_0x21,
956               "vperm2f128 $0x21, %%ymm6,  %%ymm8, %%ymm7",
957               "vperm2f128 $0x21, (%%rax), %%ymm8, %%ymm7")
958GEN_test_RandM(VPERM2F128_0x12,
959               "vperm2f128 $0x12, %%ymm6,  %%ymm8, %%ymm7",
960               "vperm2f128 $0x12, (%%rax), %%ymm8, %%ymm7")
961GEN_test_RandM(VPERM2F128_0x03,
962               "vperm2f128 $0x03, %%ymm6,  %%ymm8, %%ymm7",
963               "vperm2f128 $0x03, (%%rax), %%ymm8, %%ymm7")
964GEN_test_RandM(VPERM2F128_0x85,
965               "vperm2f128 $0x85, %%ymm6,  %%ymm8, %%ymm7",
966               "vperm2f128 $0x85, (%%rax), %%ymm8, %%ymm7")
967GEN_test_RandM(VPERM2F128_0x5A,
968               "vperm2f128 $0x5A, %%ymm6,  %%ymm8, %%ymm7",
969               "vperm2f128 $0x5A, (%%rax), %%ymm8, %%ymm7")
970
971GEN_test_RandM(VPERMILPD_256_0x0,
972               "vpermilpd $0x0, %%ymm6,  %%ymm8",
973               "vpermilpd $0x1, (%%rax), %%ymm8")
974GEN_test_RandM(VPERMILPD_256_0xF,
975               "vpermilpd $0xF, %%ymm6,  %%ymm8",
976               "vpermilpd $0xE, (%%rax), %%ymm8")
977GEN_test_RandM(VPERMILPD_256_0xA,
978               "vpermilpd $0xA, %%ymm6,  %%ymm8",
979               "vpermilpd $0xB, (%%rax), %%ymm8")
980GEN_test_RandM(VPERMILPD_256_0x5,
981               "vpermilpd $0x5, %%ymm6,  %%ymm8",
982               "vpermilpd $0x4, (%%rax), %%ymm8")
983
984GEN_test_RandM(VPERMILPD_128_0x0,
985               "vpermilpd $0x0, %%xmm6,  %%xmm8",
986               "vpermilpd $0x1, (%%rax), %%xmm8")
987GEN_test_RandM(VPERMILPD_128_0x3,
988               "vpermilpd $0x3, %%xmm6,  %%xmm8",
989               "vpermilpd $0x2, (%%rax), %%xmm8")
990
991GEN_test_RandM(VUNPCKLPD_256,
992               "vunpcklpd %%ymm6,  %%ymm8, %%ymm7",
993               "vunpcklpd (%%rax), %%ymm8, %%ymm7")
994
995GEN_test_RandM(VUNPCKHPD_256,
996               "vunpckhpd %%ymm6,  %%ymm8, %%ymm7",
997               "vunpckhpd (%%rax), %%ymm8, %%ymm7")
998
999GEN_test_RandM(VSHUFPS_0x39_256,
1000               "vshufps $0x39, %%ymm9,  %%ymm8, %%ymm7",
1001               "vshufps $0xC6, (%%rax), %%ymm8, %%ymm7")
1002
1003GEN_test_RandM(VUNPCKLPS_256,
1004               "vunpcklps %%ymm6,  %%ymm8, %%ymm7",
1005               "vunpcklps (%%rax), %%ymm8, %%ymm7")
1006
1007GEN_test_RandM(VUNPCKHPS_256,
1008               "vunpckhps %%ymm6,  %%ymm8, %%ymm7",
1009               "vunpckhps (%%rax), %%ymm8, %%ymm7")
1010
1011GEN_test_RandM(VXORPD_256,
1012               "vxorpd %%ymm6,  %%ymm8, %%ymm7",
1013               "vxorpd (%%rax), %%ymm8, %%ymm7")
1014
1015GEN_test_Monly(VBROADCASTSD_256,
1016               "vbroadcastsd (%%rax), %%ymm8")
1017
1018GEN_test_RandM(VCMPPD_128_0x4,
1019               "vcmppd $4, %%xmm6,  %%xmm8, %%xmm7",
1020               "vcmppd $4, (%%rax), %%xmm8, %%xmm7")
1021
1022GEN_test_RandM(VCMPPD_256_0x4,
1023               "vcmppd $4, %%ymm6,  %%ymm8, %%ymm7",
1024               "vcmppd $4, (%%rax), %%ymm8, %%ymm7")
1025
1026GEN_test_RandM(VCMPPS_128_0x4,
1027               "vcmpps $4, %%xmm6,  %%xmm8, %%xmm7",
1028               "vcmpps $4, (%%rax), %%xmm8, %%xmm7")
1029
1030GEN_test_RandM(VCMPPS_256_0x4,
1031               "vcmpps $4, %%ymm6,  %%ymm8, %%ymm7",
1032               "vcmpps $4, (%%rax), %%ymm8, %%ymm7")
1033
1034GEN_test_RandM(VCVTDQ2PD_128,
1035               "vcvtdq2pd %%xmm6,  %%xmm8",
1036               "vcvtdq2pd (%%rax), %%xmm8")
1037
1038GEN_test_RandM(VDIVPD_128,
1039               "vdivpd %%xmm6,  %%xmm8, %%xmm7",
1040               "vdivpd (%%rax), %%xmm8, %%xmm7")
1041
1042GEN_test_RandM(VANDPD_256,
1043               "vandpd %%ymm6,  %%ymm8, %%ymm7",
1044               "vandpd (%%rax), %%ymm8, %%ymm7")
1045
1046GEN_test_RandM(VPMOVSXBW_128,
1047               "vpmovsxbw %%xmm6,  %%xmm8",
1048               "vpmovsxbw (%%rax), %%xmm8")
1049
1050GEN_test_RandM(VPSUBUSW_128,
1051               "vpsubusw %%xmm9,  %%xmm8, %%xmm7",
1052               "vpsubusw (%%rax), %%xmm8, %%xmm7")
1053
1054GEN_test_RandM(VPSUBSW_128,
1055               "vpsubsw %%xmm9,  %%xmm8, %%xmm7",
1056               "vpsubsw (%%rax), %%xmm8, %%xmm7")
1057
1058GEN_test_RandM(VPCMPEQW_128,
1059               "vpcmpeqw %%xmm6,  %%xmm8, %%xmm7",
1060               "vpcmpeqw (%%rax), %%xmm8, %%xmm7")
1061
1062GEN_test_RandM(VPADDB_128,
1063               "vpaddb %%xmm6,  %%xmm8, %%xmm7",
1064               "vpaddb (%%rax), %%xmm8, %%xmm7")
1065
1066GEN_test_RandM(VMOVAPS_EtoG_256,
1067               "vmovaps %%ymm6,  %%ymm8",
1068               "vmovaps (%%rax), %%ymm9")
1069
1070GEN_test_RandM(VCVTDQ2PD_256,
1071               "vcvtdq2pd %%xmm6,  %%ymm8",
1072               "vcvtdq2pd (%%rax), %%ymm8")
1073
1074GEN_test_Monly(VMOVHPD_128_LoadForm,
1075               "vmovhpd (%%rax), %%xmm8, %%xmm7")
1076
1077GEN_test_Monly(VMOVHPS_128_LoadForm,
1078               "vmovhps (%%rax), %%xmm8, %%xmm7")
1079
1080// The y suffix denotes a 256 -> 128 operation
1081GEN_test_RandM(VCVTPD2PS_256,
1082               "vcvtpd2psy %%ymm8,  %%xmm7",
1083               "vcvtpd2psy (%%rax), %%xmm9")
1084
1085GEN_test_RandM(VPUNPCKHDQ_128,
1086               "vpunpckhdq %%xmm6,  %%xmm8, %%xmm7",
1087               "vpunpckhdq (%%rax), %%xmm8, %%xmm7")
1088
1089GEN_test_Monly(VBROADCASTSS_128,
1090               "vbroadcastss (%%rax), %%xmm8")
1091
1092GEN_test_RandM(VPMOVSXDQ_128,
1093               "vpmovsxdq %%xmm6,  %%xmm8",
1094               "vpmovsxdq (%%rax), %%xmm8")
1095
1096GEN_test_RandM(VPMOVSXWD_128,
1097               "vpmovsxwd %%xmm6,  %%xmm8",
1098               "vpmovsxwd (%%rax), %%xmm8")
1099
1100GEN_test_RandM(VDIVPS_128,
1101               "vdivps %%xmm9,  %%xmm8, %%xmm7",
1102               "vdivps (%%rax), %%xmm8, %%xmm7")
1103
1104GEN_test_RandM(VANDPS_256,
1105               "vandps %%ymm6,  %%ymm8, %%ymm7",
1106               "vandps (%%rax), %%ymm8, %%ymm7")
1107
1108GEN_test_RandM(VXORPS_256,
1109               "vxorps %%ymm6,  %%ymm8, %%ymm7",
1110               "vxorps (%%rax), %%ymm8, %%ymm7")
1111
1112GEN_test_RandM(VORPS_256,
1113               "vorps %%ymm6,  %%ymm8, %%ymm7",
1114               "vorps (%%rax), %%ymm8, %%ymm7")
1115
1116GEN_test_RandM(VANDNPD_256,
1117               "vandnpd %%ymm6,  %%ymm8, %%ymm7",
1118               "vandnpd (%%rax), %%ymm8, %%ymm7")
1119
1120GEN_test_RandM(VANDNPS_256,
1121               "vandnps %%ymm6,  %%ymm8, %%ymm7",
1122               "vandnps (%%rax), %%ymm8, %%ymm7")
1123
1124GEN_test_RandM(VORPD_256,
1125               "vorpd %%ymm6,  %%ymm8, %%ymm7",
1126               "vorpd (%%rax), %%ymm8, %%ymm7")
1127
1128GEN_test_RandM(VPERMILPS_256_0x0F,
1129               "vpermilps $0x0F, %%ymm6,  %%ymm8",
1130               "vpermilps $0x1E, (%%rax), %%ymm8")
1131GEN_test_RandM(VPERMILPS_256_0xFA,
1132               "vpermilps $0xFA, %%ymm6,  %%ymm8",
1133               "vpermilps $0xE5, (%%rax), %%ymm8")
1134GEN_test_RandM(VPERMILPS_256_0xA3,
1135               "vpermilps $0xA3, %%ymm6,  %%ymm8",
1136               "vpermilps $0xB4, (%%rax), %%ymm8")
1137GEN_test_RandM(VPERMILPS_256_0x5A,
1138               "vpermilps $0x5A, %%ymm6,  %%ymm8",
1139               "vpermilps $0x45, (%%rax), %%ymm8")
1140
1141GEN_test_RandM(VPMULHW_128,
1142               "vpmulhw %%xmm9,  %%xmm8, %%xmm7",
1143               "vpmulhw (%%rax), %%xmm8, %%xmm7")
1144
1145GEN_test_RandM(VPUNPCKHQDQ_128,
1146               "vpunpckhqdq %%xmm6,  %%xmm8, %%xmm7",
1147               "vpunpckhqdq (%%rax), %%xmm8, %%xmm7")
1148
1149GEN_test_Ronly(VPSRAW_0x05_128,
1150               "vpsraw $0x5, %%xmm9,  %%xmm7")
1151
1152GEN_test_RandM(VPCMPGTB_128,
1153               "vpcmpgtb %%xmm6,  %%xmm8, %%xmm7",
1154               "vpcmpgtb (%%rax), %%xmm8, %%xmm7")
1155
1156GEN_test_RandM(VPCMPGTW_128,
1157               "vpcmpgtw %%xmm6,  %%xmm8, %%xmm7",
1158               "vpcmpgtw (%%rax), %%xmm8, %%xmm7")
1159
1160GEN_test_RandM(VPCMPGTD_128,
1161               "vpcmpgtd %%xmm6,  %%xmm8, %%xmm7",
1162               "vpcmpgtd (%%rax), %%xmm8, %%xmm7")
1163
1164GEN_test_RandM(VPMOVZXBD_128,
1165               "vpmovzxbd %%xmm6,  %%xmm8",
1166               "vpmovzxbd (%%rax), %%xmm8")
1167
1168GEN_test_RandM(VPMOVSXBD_128,
1169               "vpmovsxbd %%xmm6,  %%xmm8",
1170               "vpmovsxbd (%%rax), %%xmm8")
1171
1172GEN_test_RandM(VPINSRB_128_1of3,
1173               "vpinsrb $0, %%r14d,  %%xmm8, %%xmm7",
1174               "vpinsrb $3, (%%rax), %%xmm8, %%xmm7")
1175GEN_test_RandM(VPINSRB_128_2of3,
1176               "vpinsrb $6, %%r14d,  %%xmm8, %%xmm7",
1177               "vpinsrb $9, (%%rax), %%xmm8, %%xmm7")
1178GEN_test_RandM(VPINSRB_128_3of3,
1179               "vpinsrb $12, %%r14d,  %%xmm8, %%xmm7",
1180               "vpinsrb $15, (%%rax), %%xmm8, %%xmm7")
1181
1182GEN_test_RandM(VPINSRW_128_1of4,
1183               "vpinsrw $0, %%r14d,  %%xmm8, %%xmm7",
1184               "vpinsrw $3, (%%rax), %%xmm8, %%xmm7")
1185GEN_test_RandM(VPINSRW_128_2of4,
1186               "vpinsrw $2, %%r14d,  %%xmm8, %%xmm7",
1187               "vpinsrw $3, (%%rax), %%xmm8, %%xmm7")
1188GEN_test_RandM(VPINSRW_128_3of4,
1189               "vpinsrw $4, %%r14d,  %%xmm8, %%xmm7",
1190               "vpinsrw $5, (%%rax), %%xmm8, %%xmm7")
1191GEN_test_RandM(VPINSRW_128_4of4,
1192               "vpinsrw $6, %%r14d,  %%xmm8, %%xmm7",
1193               "vpinsrw $7, (%%rax), %%xmm8, %%xmm7")
1194
1195GEN_test_RandM(VCOMISD_128,
1196   "vcomisd %%xmm6,  %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14",
1197   "vcomisd (%%rax), %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14")
1198
1199GEN_test_RandM(VCOMISS_128,
1200   "vcomiss %%xmm6,  %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14",
1201   "vcomiss (%%rax), %%xmm8; pushfq; popq %%r14; andq $0x8D5, %%r14")
1202
1203GEN_test_RandM(VMOVUPS_YMM_to_YMMorMEM,
1204               "vmovups %%ymm8, %%ymm7",
1205               "vmovups %%ymm9, (%%rax)")
1206
1207GEN_test_RandM(VDPPD_128_1of4,
1208               "vdppd $0x00, %%xmm6,  %%xmm8, %%xmm7",
1209               "vdppd $0xA5, (%%rax), %%xmm9, %%xmm6")
1210GEN_test_RandM(VDPPD_128_2of4,
1211               "vdppd $0x5A, %%xmm6,  %%xmm8, %%xmm7",
1212               "vdppd $0xFF, (%%rax), %%xmm9, %%xmm6")
1213GEN_test_RandM(VDPPD_128_3of4,
1214               "vdppd $0x0F, %%xmm6,  %%xmm8, %%xmm7",
1215               "vdppd $0x37, (%%rax), %%xmm9, %%xmm6")
1216GEN_test_RandM(VDPPD_128_4of4,
1217               "vdppd $0xF0, %%xmm6,  %%xmm8, %%xmm7",
1218               "vdppd $0x73, (%%rax), %%xmm9, %%xmm6")
1219
1220GEN_test_RandM(VDPPS_128_1of4,
1221               "vdpps $0x00, %%xmm6,  %%xmm8, %%xmm7",
1222               "vdpps $0xA5, (%%rax), %%xmm9, %%xmm6")
1223GEN_test_RandM(VDPPS_128_2of4,
1224               "vdpps $0x5A, %%xmm6,  %%xmm8, %%xmm7",
1225               "vdpps $0xFF, (%%rax), %%xmm9, %%xmm6")
1226GEN_test_RandM(VDPPS_128_3of4,
1227               "vdpps $0x0F, %%xmm6,  %%xmm8, %%xmm7",
1228               "vdpps $0x37, (%%rax), %%xmm9, %%xmm6")
1229GEN_test_RandM(VDPPS_128_4of4,
1230               "vdpps $0xF0, %%xmm6,  %%xmm8, %%xmm7",
1231               "vdpps $0x73, (%%rax), %%xmm9, %%xmm6")
1232
1233GEN_test_RandM(VDPPS_256_1of4,
1234               "vdpps $0x00, %%ymm6,  %%ymm8, %%ymm7",
1235               "vdpps $0xA5, (%%rax), %%ymm9, %%ymm6")
1236GEN_test_RandM(VDPPS_256_2of4,
1237               "vdpps $0x5A, %%ymm6,  %%ymm8, %%ymm7",
1238               "vdpps $0xFF, (%%rax), %%ymm9, %%ymm6")
1239GEN_test_RandM(VDPPS_256_3of4,
1240               "vdpps $0x0F, %%ymm6,  %%ymm8, %%ymm7",
1241               "vdpps $0x37, (%%rax), %%ymm9, %%ymm6")
1242GEN_test_RandM(VDPPS_256_4of4,
1243               "vdpps $0xF0, %%ymm6,  %%ymm8, %%ymm7",
1244               "vdpps $0x73, (%%rax), %%ymm9, %%ymm6")
1245
1246GEN_test_Monly(VBROADCASTSS_256,
1247               "vbroadcastss (%%rax), %%ymm8")
1248
1249GEN_test_RandM(VPALIGNR_128_1of3,
1250               "vpalignr $0, %%xmm6,  %%xmm8, %%xmm7",
1251               "vpalignr $3, (%%rax), %%xmm8, %%xmm7")
1252GEN_test_RandM(VPALIGNR_128_2of3,
1253               "vpalignr $6, %%xmm6,  %%xmm8, %%xmm7",
1254               "vpalignr $9, (%%rax), %%xmm8, %%xmm7")
1255GEN_test_RandM(VPALIGNR_128_3of3,
1256               "vpalignr $12, %%xmm6,  %%xmm8, %%xmm7",
1257               "vpalignr $15, (%%rax), %%xmm8, %%xmm7")
1258
1259GEN_test_Ronly(VMOVSD_REG_XMM, "vmovsd %%xmm9, %%xmm7, %%xmm8")
1260
1261GEN_test_Ronly(VMOVSS_REG_XMM, "vmovss %%xmm9, %%xmm7, %%xmm8")
1262
1263GEN_test_Monly(VMOVLPD_128_M64_XMM_XMM, "vmovlpd (%%rax), %%xmm8, %%xmm7")
1264
1265GEN_test_Monly(VMOVLPD_128_XMM_M64, "vmovlpd %%xmm7, (%%rax)")
1266
1267GEN_test_RandM(VSHUFPD_128_1of2,
1268               "vshufpd $0, %%xmm9,  %%xmm8, %%xmm7",
1269               "vshufpd $1, (%%rax), %%xmm8, %%xmm7")
1270GEN_test_RandM(VSHUFPD_128_2of2,
1271               "vshufpd $2, %%xmm9,  %%xmm8, %%xmm7",
1272               "vshufpd $3, (%%rax), %%xmm8, %%xmm7")
1273
1274GEN_test_RandM(VSHUFPD_256_1of2,
1275               "vshufpd $0x00, %%ymm9,  %%ymm8, %%ymm7",
1276               "vshufpd $0xFF, (%%rax), %%ymm8, %%ymm7")
1277GEN_test_RandM(VSHUFPD_256_2of2,
1278               "vshufpd $0x5A, %%ymm9,  %%ymm8, %%ymm7",
1279               "vshufpd $0xA5, (%%rax), %%ymm8, %%ymm7")
1280
1281GEN_test_RandM(VPERMILPS_128_0x00,
1282               "vpermilps $0x00, %%xmm6,  %%xmm8",
1283               "vpermilps $0x01, (%%rax), %%xmm8")
1284GEN_test_RandM(VPERMILPS_128_0xFE,
1285               "vpermilps $0xFE, %%xmm6,  %%xmm8",
1286               "vpermilps $0xFF, (%%rax), %%xmm8")
1287GEN_test_RandM(VPERMILPS_128_0x30,
1288               "vpermilps $0x30, %%xmm6,  %%xmm8",
1289               "vpermilps $0x03, (%%rax), %%xmm8")
1290GEN_test_RandM(VPERMILPS_128_0x21,
1291               "vpermilps $0x21, %%xmm6,  %%xmm8",
1292               "vpermilps $0x12, (%%rax), %%xmm8")
1293GEN_test_RandM(VPERMILPS_128_0xD7,
1294               "vpermilps $0xD7, %%xmm6,  %%xmm8",
1295               "vpermilps $0x6C, (%%rax), %%xmm8")
1296GEN_test_RandM(VPERMILPS_128_0xB5,
1297               "vpermilps $0xB5, %%xmm6,  %%xmm8",
1298               "vpermilps $0x4A, (%%rax), %%xmm8")
1299GEN_test_RandM(VPERMILPS_128_0x85,
1300               "vpermilps $0x85, %%xmm6,  %%xmm8",
1301               "vpermilps $0xDC, (%%rax), %%xmm8")
1302GEN_test_RandM(VPERMILPS_128_0x29,
1303               "vpermilps $0x29, %%xmm6,  %%xmm8",
1304               "vpermilps $0x92, (%%rax), %%xmm8")
1305
1306GEN_test_RandM(VBLENDPS_128_1of3,
1307               "vblendps $0, %%xmm6,  %%xmm8, %%xmm7",
1308               "vblendps $3, (%%rax), %%xmm8, %%xmm7")
1309GEN_test_RandM(VBLENDPS_128_2of3,
1310               "vblendps $6, %%xmm6,  %%xmm8, %%xmm7",
1311               "vblendps $9, (%%rax), %%xmm8, %%xmm7")
1312GEN_test_RandM(VBLENDPS_128_3of3,
1313               "vblendps $12, %%xmm6,  %%xmm8, %%xmm7",
1314               "vblendps $15, (%%rax), %%xmm8, %%xmm7")
1315
1316GEN_test_RandM(VBLENDPD_128_1of2,
1317               "vblendpd $0, %%xmm6,  %%xmm8, %%xmm7",
1318               "vblendpd $1, (%%rax), %%xmm8, %%xmm7")
1319GEN_test_RandM(VBLENDPD_128_2of2,
1320               "vblendpd $2, %%xmm6,  %%xmm8, %%xmm7",
1321               "vblendpd $3, (%%rax), %%xmm8, %%xmm7")
1322
1323GEN_test_RandM(VBLENDPD_256_1of3,
1324               "vblendpd $0, %%ymm6,  %%ymm8, %%ymm7",
1325               "vblendpd $3, (%%rax), %%ymm8, %%ymm7")
1326GEN_test_RandM(VBLENDPD_256_2of3,
1327               "vblendpd $6, %%ymm6,  %%ymm8, %%ymm7",
1328               "vblendpd $9, (%%rax), %%ymm8, %%ymm7")
1329GEN_test_RandM(VBLENDPD_256_3of3,
1330               "vblendpd $12, %%ymm6,  %%ymm8, %%ymm7",
1331               "vblendpd $15, (%%rax), %%ymm8, %%ymm7")
1332
1333GEN_test_RandM(VPBLENDW_128_0x00,
1334               "vpblendw $0x00, %%xmm6,  %%xmm8, %%xmm7",
1335               "vpblendw $0x01, (%%rax), %%xmm8, %%xmm7")
1336GEN_test_RandM(VPBLENDW_128_0xFE,
1337               "vpblendw $0xFE, %%xmm6,  %%xmm8, %%xmm7",
1338               "vpblendw $0xFF, (%%rax), %%xmm8, %%xmm7")
1339GEN_test_RandM(VPBLENDW_128_0x30,
1340               "vpblendw $0x30, %%xmm6,  %%xmm8, %%xmm7",
1341               "vpblendw $0x03, (%%rax), %%xmm8, %%xmm7")
1342GEN_test_RandM(VPBLENDW_128_0x21,
1343               "vpblendw $0x21, %%xmm6,  %%xmm8, %%xmm7",
1344               "vpblendw $0x12, (%%rax), %%xmm8, %%xmm7")
1345GEN_test_RandM(VPBLENDW_128_0xD7,
1346               "vpblendw $0xD7, %%xmm6,  %%xmm8, %%xmm7",
1347               "vpblendw $0x6C, (%%rax), %%xmm8, %%xmm7")
1348GEN_test_RandM(VPBLENDW_128_0xB5,
1349               "vpblendw $0xB5, %%xmm6,  %%xmm8, %%xmm7",
1350               "vpblendw $0x4A, (%%rax), %%xmm8, %%xmm7")
1351GEN_test_RandM(VPBLENDW_128_0x85,
1352               "vpblendw $0x85, %%xmm6,  %%xmm8, %%xmm7",
1353               "vpblendw $0xDC, (%%rax), %%xmm8, %%xmm7")
1354GEN_test_RandM(VPBLENDW_128_0x29,
1355               "vpblendw $0x29, %%xmm6,  %%xmm8, %%xmm7",
1356               "vpblendw $0x92, (%%rax), %%xmm8, %%xmm7")
1357
1358GEN_test_RandM(VMOVUPS_EtoG_256,
1359               "vmovups %%ymm6,  %%ymm9",
1360               "vmovups (%%rax), %%ymm7")
1361
1362GEN_test_RandM(VSQRTSS_128,
1363               "vsqrtss %%xmm6,  %%xmm8, %%xmm7",
1364               "vsqrtss (%%rax), %%xmm8, %%xmm7")
1365
1366GEN_test_RandM(VSQRTPS_128,
1367               "vsqrtps %%xmm6,  %%xmm8",
1368               "vsqrtps (%%rax), %%xmm8")
1369
1370GEN_test_RandM(VSQRTPS_256,
1371               "vsqrtps %%ymm6,  %%ymm8",
1372               "vsqrtps (%%rax), %%ymm8")
1373
1374GEN_test_RandM(VSQRTPD_128,
1375               "vsqrtpd %%xmm6,  %%xmm8",
1376               "vsqrtpd (%%rax), %%xmm8")
1377
1378GEN_test_RandM(VSQRTPD_256,
1379               "vsqrtpd %%ymm6,  %%ymm8",
1380               "vsqrtpd (%%rax), %%ymm8")
1381
1382GEN_test_RandM(VRSQRTSS_128,
1383               "vrsqrtss %%xmm6,  %%xmm8, %%xmm7",
1384               "vrsqrtss (%%rax), %%xmm8, %%xmm7")
1385
1386GEN_test_RandM(VRSQRTPS_128,
1387               "vrsqrtps %%xmm6,  %%xmm8",
1388               "vrsqrtps (%%rax), %%xmm8")
1389
1390GEN_test_RandM(VRSQRTPS_256,
1391               "vrsqrtps %%ymm6,  %%ymm8",
1392               "vrsqrtps (%%rax), %%ymm8")
1393
1394GEN_test_RandM(VMOVDQU_GtoE_256,
1395               "vmovdqu %%ymm9,  %%ymm6",
1396               "vmovdqu %%ymm7, (%%rax)")
1397
1398GEN_test_RandM(VCVTPS2PD_256,
1399               "vcvtps2pd %%xmm9,  %%ymm6",
1400               "vcvtps2pd (%%rax), %%ymm7")
1401
1402GEN_test_RandM(VCVTTPS2DQ_128,
1403               "vcvttps2dq %%xmm9,  %%xmm6",
1404               "vcvttps2dq (%%rax), %%xmm7")
1405
1406GEN_test_RandM(VCVTTPS2DQ_256,
1407               "vcvttps2dq %%ymm9,  %%ymm6",
1408               "vcvttps2dq (%%rax), %%ymm7")
1409
1410GEN_test_RandM(VCVTDQ2PS_128,
1411               "vcvtdq2ps %%xmm9,  %%xmm6",
1412               "vcvtdq2ps (%%rax), %%xmm7")
1413
1414GEN_test_RandM(VCVTDQ2PS_256,
1415               "vcvtdq2ps %%ymm9,  %%ymm6",
1416               "vcvtdq2ps (%%rax), %%ymm7")
1417
1418GEN_test_RandM(VCVTTPD2DQ_128,
1419               "vcvttpd2dqx %%xmm9,  %%xmm6",
1420               "vcvttpd2dqx (%%rax), %%xmm7")
1421
1422GEN_test_RandM(VCVTTPD2DQ_256,
1423               "vcvttpd2dqy %%ymm9,  %%xmm6",
1424               "vcvttpd2dqy (%%rax), %%xmm7")
1425
1426GEN_test_RandM(VCVTPD2DQ_128,
1427               "vcvtpd2dqx %%xmm9,  %%xmm6",
1428               "vcvtpd2dqx (%%rax), %%xmm7")
1429
1430GEN_test_RandM(VCVTPD2DQ_256,
1431               "vcvtpd2dqy %%ymm9,  %%xmm6",
1432               "vcvtpd2dqy (%%rax), %%xmm7")
1433
1434GEN_test_RandM(VMOVSLDUP_128,
1435               "vmovsldup %%xmm9,  %%xmm6",
1436               "vmovsldup (%%rax), %%xmm7")
1437
1438GEN_test_RandM(VMOVSLDUP_256,
1439               "vmovsldup %%ymm9,  %%ymm6",
1440               "vmovsldup (%%rax), %%ymm7")
1441
1442GEN_test_RandM(VMOVSHDUP_128,
1443               "vmovshdup %%xmm9,  %%xmm6",
1444               "vmovshdup (%%rax), %%xmm7")
1445
1446GEN_test_RandM(VMOVSHDUP_256,
1447               "vmovshdup %%ymm9,  %%ymm6",
1448               "vmovshdup (%%rax), %%ymm7")
1449
1450GEN_test_RandM(VPERMILPS_VAR_128,
1451               "vpermilps %%xmm6,  %%xmm8, %%xmm7",
1452               "vpermilps (%%rax), %%xmm8, %%xmm7")
1453
1454GEN_test_RandM(VPERMILPD_VAR_128,
1455               "vpermilpd %%xmm6,  %%xmm8, %%xmm7",
1456               "vpermilpd (%%rax), %%xmm8, %%xmm7")
1457
1458GEN_test_RandM(VPERMILPS_VAR_256,
1459               "vpermilps %%ymm6,  %%ymm8, %%ymm7",
1460               "vpermilps (%%rax), %%ymm8, %%ymm7")
1461
1462GEN_test_RandM(VPERMILPD_VAR_256,
1463               "vpermilpd %%ymm6,  %%ymm8, %%ymm7",
1464               "vpermilpd (%%rax), %%ymm8, %%ymm7")
1465
1466GEN_test_RandM(VPSLLW_128,
1467               "andl $15, %%r14d;"
1468               "vmovd %%r14d, %%xmm6;"
1469               "vpsllw %%xmm6,     %%xmm8, %%xmm9",
1470               "andq $15, 128(%%rax);"
1471               "vpsllw 128(%%rax), %%xmm8, %%xmm9")
1472
1473GEN_test_RandM(VPSRLW_128,
1474               "andl $15, %%r14d;"
1475               "vmovd %%r14d, %%xmm6;"
1476               "vpsrlw %%xmm6,     %%xmm8, %%xmm9",
1477               "andq $15, 128(%%rax);"
1478               "vpsrlw 128(%%rax), %%xmm8, %%xmm9")
1479
1480GEN_test_RandM(VPSRAW_128,
1481               "andl $31, %%r14d;"
1482               "vmovd %%r14d, %%xmm6;"
1483               "vpsraw %%xmm6,     %%xmm8, %%xmm9",
1484               "andq $15, 128(%%rax);"
1485               "vpsraw 128(%%rax), %%xmm8, %%xmm9")
1486
1487GEN_test_RandM(VPSLLD_128,
1488               "andl $31, %%r14d;"
1489               "vmovd %%r14d, %%xmm6;"
1490               "vpslld %%xmm6,     %%xmm8, %%xmm9",
1491               "andq $31, 128(%%rax);"
1492               "vpslld 128(%%rax), %%xmm8, %%xmm9")
1493
1494GEN_test_RandM(VPSRLD_128,
1495               "andl $31, %%r14d;"
1496               "vmovd %%r14d, %%xmm6;"
1497               "vpsrld %%xmm6,     %%xmm8, %%xmm9",
1498               "andq $31, 128(%%rax);"
1499               "vpsrld 128(%%rax), %%xmm8, %%xmm9")
1500
1501GEN_test_RandM(VPSRAD_128,
1502               "andl $31, %%r14d;"
1503               "vmovd %%r14d, %%xmm6;"
1504               "vpsrad %%xmm6,     %%xmm8, %%xmm9",
1505               "andq $31, 128(%%rax);"
1506               "vpsrad 128(%%rax), %%xmm8, %%xmm9")
1507
1508GEN_test_RandM(VPSLLQ_128,
1509               "andl $63, %%r14d;"
1510               "vmovd %%r14d, %%xmm6;"
1511               "vpsllq %%xmm6,     %%xmm8, %%xmm9",
1512               "andq $63, 128(%%rax);"
1513               "vpsllq 128(%%rax), %%xmm8, %%xmm9")
1514
1515GEN_test_RandM(VPSRLQ_128,
1516               "andl $63, %%r14d;"
1517               "vmovd %%r14d, %%xmm6;"
1518               "vpsrlq %%xmm6,     %%xmm8, %%xmm9",
1519               "andq $63, 128(%%rax);"
1520               "vpsrlq 128(%%rax), %%xmm8, %%xmm9")
1521
1522GEN_test_RandM(VROUNDPS_128_0x0,
1523               "vroundps $0x0, %%xmm8,  %%xmm9",
1524               "vroundps $0x0, (%%rax), %%xmm9")
1525GEN_test_RandM(VROUNDPS_128_0x1,
1526               "vroundps $0x1, %%xmm8,  %%xmm9",
1527               "vroundps $0x1, (%%rax), %%xmm9")
1528GEN_test_RandM(VROUNDPS_128_0x2,
1529               "vroundps $0x2, %%xmm8,  %%xmm9",
1530               "vroundps $0x2, (%%rax), %%xmm9")
1531GEN_test_RandM(VROUNDPS_128_0x3,
1532               "vroundps $0x3, %%xmm8,  %%xmm9",
1533               "vroundps $0x3, (%%rax), %%xmm9")
1534GEN_test_RandM(VROUNDPS_128_0x4,
1535               "vroundps $0x4, %%xmm8,  %%xmm9",
1536               "vroundps $0x4, (%%rax), %%xmm9")
1537
1538GEN_test_RandM(VROUNDPS_256_0x0,
1539               "vroundps $0x0, %%ymm8,  %%ymm9",
1540               "vroundps $0x0, (%%rax), %%ymm9")
1541GEN_test_RandM(VROUNDPS_256_0x1,
1542               "vroundps $0x1, %%ymm8,  %%ymm9",
1543               "vroundps $0x1, (%%rax), %%ymm9")
1544GEN_test_RandM(VROUNDPS_256_0x2,
1545               "vroundps $0x2, %%ymm8,  %%ymm9",
1546               "vroundps $0x2, (%%rax), %%ymm9")
1547GEN_test_RandM(VROUNDPS_256_0x3,
1548               "vroundps $0x3, %%ymm8,  %%ymm9",
1549               "vroundps $0x3, (%%rax), %%ymm9")
1550GEN_test_RandM(VROUNDPS_256_0x4,
1551               "vroundps $0x4, %%ymm8,  %%ymm9",
1552               "vroundps $0x4, (%%rax), %%ymm9")
1553
1554GEN_test_RandM(VROUNDPD_128_0x0,
1555               "vroundpd $0x0, %%xmm8,  %%xmm9",
1556               "vroundpd $0x0, (%%rax), %%xmm9")
1557GEN_test_RandM(VROUNDPD_128_0x1,
1558               "vroundpd $0x1, %%xmm8,  %%xmm9",
1559               "vroundpd $0x1, (%%rax), %%xmm9")
1560GEN_test_RandM(VROUNDPD_128_0x2,
1561               "vroundpd $0x2, %%xmm8,  %%xmm9",
1562               "vroundpd $0x2, (%%rax), %%xmm9")
1563GEN_test_RandM(VROUNDPD_128_0x3,
1564               "vroundpd $0x3, %%xmm8,  %%xmm9",
1565               "vroundpd $0x3, (%%rax), %%xmm9")
1566GEN_test_RandM(VROUNDPD_128_0x4,
1567               "vroundpd $0x4, %%xmm8,  %%xmm9",
1568               "vroundpd $0x4, (%%rax), %%xmm9")
1569
1570GEN_test_RandM(VROUNDPD_256_0x0,
1571               "vroundpd $0x0, %%ymm8,  %%ymm9",
1572               "vroundpd $0x0, (%%rax), %%ymm9")
1573GEN_test_RandM(VROUNDPD_256_0x1,
1574               "vroundpd $0x1, %%ymm8,  %%ymm9",
1575               "vroundpd $0x1, (%%rax), %%ymm9")
1576GEN_test_RandM(VROUNDPD_256_0x2,
1577               "vroundpd $0x2, %%ymm8,  %%ymm9",
1578               "vroundpd $0x2, (%%rax), %%ymm9")
1579GEN_test_RandM(VROUNDPD_256_0x3,
1580               "vroundpd $0x3, %%ymm8,  %%ymm9",
1581               "vroundpd $0x3, (%%rax), %%ymm9")
1582GEN_test_RandM(VROUNDPD_256_0x4,
1583               "vroundpd $0x4, %%ymm8,  %%ymm9",
1584               "vroundpd $0x4, (%%rax), %%ymm9")
1585
1586GEN_test_RandM(VPMADDWD_128,
1587               "vpmaddwd %%xmm6,  %%xmm8, %%xmm7",
1588               "vpmaddwd (%%rax), %%xmm8, %%xmm7")
1589
1590GEN_test_RandM(VADDSUBPS_128,
1591               "vaddsubps %%xmm6,  %%xmm8, %%xmm7",
1592               "vaddsubps (%%rax), %%xmm8, %%xmm7")
1593
1594GEN_test_RandM(VADDSUBPS_256,
1595               "vaddsubps %%ymm6,  %%ymm8, %%ymm7",
1596               "vaddsubps (%%rax), %%ymm8, %%ymm7")
1597
1598GEN_test_RandM(VADDSUBPD_128,
1599               "vaddsubpd %%xmm6,  %%xmm8, %%xmm7",
1600               "vaddsubpd (%%rax), %%xmm8, %%xmm7")
1601
1602GEN_test_RandM(VADDSUBPD_256,
1603               "vaddsubpd %%ymm6,  %%ymm8, %%ymm7",
1604               "vaddsubpd (%%rax), %%ymm8, %%ymm7")
1605
1606GEN_test_RandM(VROUNDSS_0x0,
1607               "vroundss $0x0, %%xmm8,  %%xmm6, %%xmm9",
1608               "vroundss $0x0, (%%rax), %%xmm6, %%xmm9")
1609GEN_test_RandM(VROUNDSS_0x1,
1610               "vroundss $0x1, %%xmm8,  %%xmm6, %%xmm9",
1611               "vroundss $0x1, (%%rax), %%xmm6, %%xmm9")
1612GEN_test_RandM(VROUNDSS_0x2,
1613               "vroundss $0x2, %%xmm8,  %%xmm6, %%xmm9",
1614               "vroundss $0x2, (%%rax), %%xmm6, %%xmm9")
1615GEN_test_RandM(VROUNDSS_0x3,
1616               "vroundss $0x3, %%xmm8,  %%xmm6, %%xmm9",
1617               "vroundss $0x3, (%%rax), %%xmm6, %%xmm9")
1618GEN_test_RandM(VROUNDSS_0x4,
1619               "vroundss $0x4, %%xmm8,  %%xmm6, %%xmm9",
1620               "vroundss $0x4, (%%rax), %%xmm6, %%xmm9")
1621GEN_test_RandM(VROUNDSS_0x5,
1622               "vroundss $0x5, %%xmm8,  %%xmm6, %%xmm9",
1623               "vroundss $0x5, (%%rax), %%xmm6, %%xmm9")
1624
1625GEN_test_RandM(VROUNDSD_0x0,
1626               "vroundsd $0x0, %%xmm8,  %%xmm6, %%xmm9",
1627               "vroundsd $0x0, (%%rax), %%xmm6, %%xmm9")
1628GEN_test_RandM(VROUNDSD_0x1,
1629               "vroundsd $0x1, %%xmm8,  %%xmm6, %%xmm9",
1630               "vroundsd $0x1, (%%rax), %%xmm6, %%xmm9")
1631GEN_test_RandM(VROUNDSD_0x2,
1632               "vroundsd $0x2, %%xmm8,  %%xmm6, %%xmm9",
1633               "vroundsd $0x2, (%%rax), %%xmm6, %%xmm9")
1634GEN_test_RandM(VROUNDSD_0x3,
1635               "vroundsd $0x3, %%xmm8,  %%xmm6, %%xmm9",
1636               "vroundsd $0x3, (%%rax), %%xmm6, %%xmm9")
1637GEN_test_RandM(VROUNDSD_0x4,
1638               "vroundsd $0x4, %%xmm8,  %%xmm6, %%xmm9",
1639               "vroundsd $0x4, (%%rax), %%xmm6, %%xmm9")
1640GEN_test_RandM(VROUNDSD_0x5,
1641               "vroundsd $0x5, %%xmm8,  %%xmm6, %%xmm9",
1642               "vroundsd $0x5, (%%rax), %%xmm6, %%xmm9")
1643
1644GEN_test_RandM(VPTEST_128_1,
1645   "vptest %%xmm6,  %%xmm8; "
1646      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1647   "vptest (%%rax), %%xmm8; "
1648      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1649
1650/* Here we ignore the boilerplate-supplied data and try to do
1651   x AND x   and   x AND NOT x.  Not a great test but better
1652   than nothing. */
1653GEN_test_RandM(VPTEST_128_2,
1654   "vmovups %%xmm6, %%xmm8;"
1655   "vptest %%xmm6,  %%xmm8; "
1656      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1657   "vmovups (%%rax), %%xmm8;"
1658   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1659   "vxorpd %%xmm8,%%xmm7,%%xmm8;"
1660   "vptest (%%rax), %%xmm8; "
1661      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1662
1663GEN_test_RandM(VPTEST_256_1,
1664   "vptest %%ymm6,  %%ymm8; "
1665      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1666   "vptest (%%rax), %%ymm8; "
1667      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1668
1669/* Here we ignore the boilerplate-supplied data and try to do
1670   x AND x   and   x AND NOT x.  Not a great test but better
1671   than nothing. */
1672GEN_test_RandM(VPTEST_256_2,
1673   "vmovups %%ymm6, %%ymm8;"
1674   "vptest %%ymm6,  %%ymm8; "
1675      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1676   "vmovups (%%rax), %%ymm8;"
1677   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1678   "subq $1024, %%rsp;"
1679   "vmovups %%xmm7,512(%%rsp);"
1680   "vmovups %%xmm7,528(%%rsp);"
1681   "vmovups 512(%%rsp), %%ymm7;"
1682   "addq $1024, %%rsp;"
1683   "vxorpd %%ymm8,%%ymm7,%%ymm8;"
1684   "vptest (%%rax), %%ymm8; "
1685      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1686
1687
1688/* VTESTPS/VTESTPD: test once with all-0 operands, once with
1689   one all-0s and one all 1s, and once with random data. */
1690
1691GEN_test_RandM(VTESTPS_128_1,
1692   "vtestps %%xmm6,  %%xmm8; "
1693      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1694   "vtestps (%%rax), %%xmm8; "
1695      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1696
1697/* Here we ignore the boilerplate-supplied data and try to do
1698   x AND x   and   x AND NOT x.  Not a great test but better
1699   than nothing. */
1700GEN_test_RandM(VTESTPS_128_2,
1701   "vmovups %%xmm6, %%xmm8;"
1702   "vtestps %%xmm6,  %%xmm8; "
1703      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1704   "vmovups (%%rax), %%xmm8;"
1705   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1706   "vxorpd %%xmm8,%%xmm7,%%xmm8;"
1707   "vtestps (%%rax), %%xmm8; "
1708      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1709
1710GEN_test_RandM(VTESTPS_128_3,
1711               "vtestps %%xmm8,  %%xmm9; "
1712                  "pushfq; popq %%r14; andq $0x8D5, %%r14",
1713               "vtestps (%%rax), %%xmm9; "
1714                  "pushfq; popq %%r14; andq $0x8D5, %%r14")
1715
1716
1717
1718
1719GEN_test_RandM(VTESTPS_256_1,
1720   "vtestps %%ymm6,  %%ymm8; "
1721      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1722   "vtestps (%%rax), %%ymm8; "
1723      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1724
1725/* Here we ignore the boilerplate-supplied data and try to do
1726   x AND x   and   x AND NOT x.  Not a great test but better
1727   than nothing. */
1728GEN_test_RandM(VTESTPS_256_2,
1729   "vmovups %%ymm6, %%ymm8;"
1730   "vtestps %%ymm6,  %%ymm8; "
1731      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1732   "vmovups (%%rax), %%ymm8;"
1733   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1734   "subq $1024, %%rsp;"
1735   "vmovups %%xmm7,512(%%rsp);"
1736   "vmovups %%xmm7,528(%%rsp);"
1737   "vmovups 512(%%rsp), %%ymm7;"
1738   "addq $1024, %%rsp;"
1739   "vxorpd %%ymm8,%%ymm7,%%ymm8;"
1740   "vtestps (%%rax), %%ymm8; "
1741      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1742
1743GEN_test_RandM(VTESTPS_256_3,
1744               "vtestps %%ymm8,  %%ymm9; "
1745                  "pushfq; popq %%r14; andq $0x8D5, %%r14",
1746               "vtestps (%%rax), %%ymm9; "
1747                  "pushfq; popq %%r14; andq $0x8D5, %%r14")
1748
1749
1750
1751GEN_test_RandM(VTESTPD_128_1,
1752   "vtestpd %%xmm6,  %%xmm8; "
1753      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1754   "vtestpd (%%rax), %%xmm8; "
1755      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1756
1757/* Here we ignore the boilerplate-supplied data and try to do
1758   x AND x   and   x AND NOT x.  Not a great test but better
1759   than nothing. */
1760GEN_test_RandM(VTESTPD_128_2,
1761   "vmovups %%xmm6, %%xmm8;"
1762   "vtestpd %%xmm6,  %%xmm8; "
1763      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1764   "vmovups (%%rax), %%xmm8;"
1765   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1766   "vxorpd %%xmm8,%%xmm7,%%xmm8;"
1767   "vtestpd (%%rax), %%xmm8; "
1768      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1769
1770GEN_test_RandM(VTESTPD_128_3,
1771               "vtestpd %%xmm8,  %%xmm9; "
1772                  "pushfq; popq %%r14; andq $0x8D5, %%r14",
1773               "vtestpd (%%rax), %%xmm9; "
1774                  "pushfq; popq %%r14; andq $0x8D5, %%r14")
1775
1776
1777
1778
1779GEN_test_RandM(VTESTPD_256_1,
1780   "vtestpd %%ymm6,  %%ymm8; "
1781      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1782   "vtestpd (%%rax), %%ymm8; "
1783      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1784
1785/* Here we ignore the boilerplate-supplied data and try to do
1786   x AND x   and   x AND NOT x.  Not a great test but better
1787   than nothing. */
1788GEN_test_RandM(VTESTPD_256_2,
1789   "vmovups %%ymm6, %%ymm8;"
1790   "vtestpd %%ymm6,  %%ymm8; "
1791      "pushfq; popq %%r14; andq $0x8D5, %%r14",
1792   "vmovups (%%rax), %%ymm8;"
1793   "vcmpeqpd %%xmm8,%%xmm8,%%xmm7;"
1794   "subq $1024, %%rsp;"
1795   "vmovups %%xmm7,512(%%rsp);"
1796   "vmovups %%xmm7,528(%%rsp);"
1797   "vmovups 512(%%rsp), %%ymm7;"
1798   "addq $1024, %%rsp;"
1799   "vxorpd %%ymm8,%%ymm7,%%ymm8;"
1800   "vtestpd (%%rax), %%ymm8; "
1801      "pushfq; popq %%r14; andq $0x8D5, %%r14")
1802
1803GEN_test_RandM(VTESTPD_256_3,
1804               "vtestpd %%ymm8,  %%ymm9; "
1805                  "pushfq; popq %%r14; andq $0x8D5, %%r14",
1806               "vtestpd (%%rax), %%ymm9; "
1807                  "pushfq; popq %%r14; andq $0x8D5, %%r14")
1808
1809GEN_test_RandM(VBLENDVPS_128,
1810               "vblendvps %%xmm9, %%xmm6,  %%xmm8, %%xmm7",
1811               "vblendvps %%xmm9, (%%rax), %%xmm8, %%xmm7")
1812
1813GEN_test_RandM(VBLENDVPS_256,
1814               "vblendvps %%ymm9, %%ymm6,  %%ymm8, %%ymm7",
1815               "vblendvps %%ymm9, (%%rax), %%ymm8, %%ymm7")
1816
1817GEN_test_RandM(VBLENDVPD_128,
1818               "vblendvpd %%xmm9, %%xmm6,  %%xmm8, %%xmm7",
1819               "vblendvpd %%xmm9, (%%rax), %%xmm8, %%xmm7")
1820
1821GEN_test_RandM(VBLENDVPD_256,
1822               "vblendvpd %%ymm9, %%ymm6,  %%ymm8, %%ymm7",
1823               "vblendvpd %%ymm9, (%%rax), %%ymm8, %%ymm7")
1824
1825
1826GEN_test_RandM(VHADDPS_128,
1827               "vhaddps %%xmm6,  %%xmm8, %%xmm7",
1828               "vhaddps (%%rax), %%xmm8, %%xmm7")
1829
1830GEN_test_RandM(VHADDPS_256,
1831               "vhaddps %%ymm6,  %%ymm8, %%ymm7",
1832               "vhaddps (%%rax), %%ymm8, %%ymm7")
1833
1834GEN_test_RandM(VHADDPD_128,
1835               "vhaddpd %%xmm6,  %%xmm8, %%xmm7",
1836               "vhaddpd (%%rax), %%xmm8, %%xmm7")
1837
1838GEN_test_RandM(VHADDPD_256,
1839               "vhaddpd %%ymm6,  %%ymm8, %%ymm7",
1840               "vhaddpd (%%rax), %%ymm8, %%ymm7")
1841
1842GEN_test_RandM(VHSUBPS_128,
1843               "vhsubps %%xmm6,  %%xmm8, %%xmm7",
1844               "vhsubps (%%rax), %%xmm8, %%xmm7")
1845
1846GEN_test_RandM(VHSUBPS_256,
1847               "vhsubps %%ymm6,  %%ymm8, %%ymm7",
1848               "vhsubps (%%rax), %%ymm8, %%ymm7")
1849
1850GEN_test_RandM(VHSUBPD_128,
1851               "vhsubpd %%xmm6,  %%xmm8, %%xmm7",
1852               "vhsubpd (%%rax), %%xmm8, %%xmm7")
1853
1854GEN_test_RandM(VHSUBPD_256,
1855               "vhsubpd %%ymm6,  %%ymm8, %%ymm7",
1856               "vhsubpd (%%rax), %%ymm8, %%ymm7")
1857
1858GEN_test_RandM(VEXTRACTPS_0x0,
1859               "vextractps $0, %%xmm8, %%r14d",
1860               "vextractps $0, %%xmm8, (%%rax)")
1861
1862GEN_test_RandM(VEXTRACTPS_0x1,
1863               "vextractps $1, %%xmm8, %%r14d",
1864               "vextractps $1, %%xmm8, (%%rax)")
1865
1866GEN_test_RandM(VEXTRACTPS_0x2,
1867               "vextractps $2, %%xmm8, %%r14d",
1868               "vextractps $2, %%xmm8, (%%rax)")
1869
1870GEN_test_RandM(VEXTRACTPS_0x3,
1871               "vextractps $3, %%xmm8, %%r14d",
1872               "vextractps $3, %%xmm8, (%%rax)")
1873
1874GEN_test_Monly(VLDDQU_128,
1875               "vlddqu 1(%%rax), %%xmm8")
1876
1877GEN_test_Monly(VLDDQU_256,
1878               "vlddqu 1(%%rax), %%ymm8")
1879
1880GEN_test_Monly(VMOVNTDQA_128,
1881               "vmovntdqa (%%rax), %%xmm9")
1882
1883GEN_test_Monly(VMASKMOVDQU_128,
1884               "xchgq %%rax, %%rdi;"
1885               "vmaskmovdqu %%xmm8, %%xmm9;"
1886               "xchgq %%rax, %%rdi")
1887
1888GEN_test_Ronly(VMOVMSKPD_128,
1889               "vmovmskpd %%xmm9, %%r14d")
1890
1891GEN_test_Ronly(VMOVMSKPD_256,
1892               "vmovmskpd %%ymm9, %%r14d")
1893
1894GEN_test_Ronly(VMOVMSKPS_128,
1895               "vmovmskps %%xmm9, %%r14d")
1896
1897GEN_test_Ronly(VMOVMSKPS_256,
1898               "vmovmskps %%ymm9, %%r14d")
1899
1900GEN_test_Monly(VMOVNTPD_128,
1901               "vmovntpd %%xmm9, (%%rax)")
1902
1903GEN_test_Monly(VMOVNTPD_256,
1904               "vmovntpd %%ymm9, (%%rax)")
1905
1906GEN_test_Monly(VMOVNTPS_128,
1907               "vmovntps %%xmm9, (%%rax)")
1908
1909GEN_test_Monly(VMOVNTPS_256,
1910               "vmovntps %%ymm9, (%%rax)")
1911
1912GEN_test_RandM(VPACKSSWB_128,
1913               "vpacksswb %%xmm6,  %%xmm8, %%xmm7",
1914               "vpacksswb (%%rax), %%xmm8, %%xmm7")
1915
1916GEN_test_RandM(VPAVGB_128,
1917               "vpavgb %%xmm6,  %%xmm8, %%xmm7",
1918               "vpavgb (%%rax), %%xmm8, %%xmm7")
1919
1920GEN_test_RandM(VPAVGW_128,
1921               "vpavgw %%xmm6,  %%xmm8, %%xmm7",
1922               "vpavgw (%%rax), %%xmm8, %%xmm7")
1923
1924GEN_test_RandM(VPADDSB_128,
1925               "vpaddsb %%xmm6,  %%xmm8, %%xmm7",
1926               "vpaddsb (%%rax), %%xmm8, %%xmm7")
1927
1928GEN_test_RandM(VPADDSW_128,
1929               "vpaddsw %%xmm6,  %%xmm8, %%xmm7",
1930               "vpaddsw (%%rax), %%xmm8, %%xmm7")
1931
1932GEN_test_RandM(VPHADDW_128,
1933               "vphaddw %%xmm6,  %%xmm8, %%xmm7",
1934               "vphaddw (%%rax), %%xmm8, %%xmm7")
1935
1936GEN_test_RandM(VPHADDD_128,
1937               "vphaddd %%xmm6,  %%xmm8, %%xmm7",
1938               "vphaddd (%%rax), %%xmm8, %%xmm7")
1939
1940GEN_test_RandM(VPHADDSW_128,
1941               "vphaddsw %%xmm6,  %%xmm8, %%xmm7",
1942               "vphaddsw (%%rax), %%xmm8, %%xmm7")
1943
1944GEN_test_RandM(VPMADDUBSW_128,
1945               "vpmaddubsw %%xmm6,  %%xmm8, %%xmm7",
1946               "vpmaddubsw (%%rax), %%xmm8, %%xmm7")
1947
1948GEN_test_RandM(VPHSUBW_128,
1949               "vphsubw %%xmm6,  %%xmm8, %%xmm7",
1950               "vphsubw (%%rax), %%xmm8, %%xmm7")
1951
1952GEN_test_RandM(VPHSUBD_128,
1953               "vphsubd %%xmm6,  %%xmm8, %%xmm7",
1954               "vphsubd (%%rax), %%xmm8, %%xmm7")
1955
1956GEN_test_RandM(VPHSUBSW_128,
1957               "vphsubsw %%xmm6,  %%xmm8, %%xmm7",
1958               "vphsubsw (%%rax), %%xmm8, %%xmm7")
1959
1960GEN_test_RandM(VPABSB_128,
1961               "vpabsb %%xmm6,  %%xmm7",
1962               "vpabsb (%%rax), %%xmm7")
1963
1964GEN_test_RandM(VPABSW_128,
1965               "vpabsw %%xmm6,  %%xmm7",
1966               "vpabsw (%%rax), %%xmm7")
1967
1968GEN_test_RandM(VPMOVSXBQ_128,
1969               "vpmovsxbq %%xmm6,  %%xmm8",
1970               "vpmovsxbq (%%rax), %%xmm8")
1971
1972GEN_test_RandM(VPMOVSXWQ_128,
1973               "vpmovsxwq %%xmm6,  %%xmm8",
1974               "vpmovsxwq (%%rax), %%xmm8")
1975
1976GEN_test_RandM(VPACKUSDW_128,
1977               "vpackusdw %%xmm6,  %%xmm8, %%xmm7",
1978               "vpackusdw (%%rax), %%xmm8, %%xmm7")
1979
1980GEN_test_RandM(VPMOVZXBQ_128,
1981               "vpmovzxbq %%xmm6,  %%xmm8",
1982               "vpmovzxbq (%%rax), %%xmm8")
1983
1984GEN_test_RandM(VPMOVZXWQ_128,
1985               "vpmovzxwq %%xmm6,  %%xmm8",
1986               "vpmovzxwq (%%rax), %%xmm8")
1987
1988GEN_test_RandM(VPMOVZXDQ_128,
1989               "vpmovzxdq %%xmm6,  %%xmm8",
1990               "vpmovzxdq (%%rax), %%xmm8")
1991
1992GEN_test_RandM(VMPSADBW_128_0x0,
1993               "vmpsadbw $0, %%xmm6,  %%xmm8, %%xmm7",
1994               "vmpsadbw $0, (%%rax), %%xmm8, %%xmm7")
1995GEN_test_RandM(VMPSADBW_128_0x1,
1996               "vmpsadbw $1, %%xmm6,  %%xmm8, %%xmm7",
1997               "vmpsadbw $1, (%%rax), %%xmm8, %%xmm7")
1998GEN_test_RandM(VMPSADBW_128_0x2,
1999               "vmpsadbw $2, %%xmm6,  %%xmm8, %%xmm7",
2000               "vmpsadbw $2, (%%rax), %%xmm8, %%xmm7")
2001GEN_test_RandM(VMPSADBW_128_0x3,
2002               "vmpsadbw $3, %%xmm6,  %%xmm8, %%xmm7",
2003               "vmpsadbw $3, (%%rax), %%xmm8, %%xmm7")
2004GEN_test_RandM(VMPSADBW_128_0x4,
2005               "vmpsadbw $4, %%xmm6,  %%xmm8, %%xmm7",
2006               "vmpsadbw $4, (%%rax), %%xmm8, %%xmm7")
2007GEN_test_RandM(VMPSADBW_128_0x5,
2008               "vmpsadbw $5, %%xmm6,  %%xmm8, %%xmm7",
2009               "vmpsadbw $5, (%%rax), %%xmm8, %%xmm7")
2010GEN_test_RandM(VMPSADBW_128_0x6,
2011               "vmpsadbw $6, %%xmm6,  %%xmm8, %%xmm7",
2012               "vmpsadbw $6, (%%rax), %%xmm8, %%xmm7")
2013GEN_test_RandM(VMPSADBW_128_0x7,
2014               "vmpsadbw $7, %%xmm6,  %%xmm8, %%xmm7",
2015               "vmpsadbw $7, (%%rax), %%xmm8, %%xmm7")
2016
2017GEN_test_RandM(VMOVDDUP_YMMorMEM256_to_YMM,
2018               "vmovddup %%ymm8,  %%ymm7",
2019               "vmovddup (%%rax), %%ymm9")
2020
2021GEN_test_Monly(VMOVLPS_128_M64_XMM_XMM, "vmovlps (%%rax), %%xmm8, %%xmm7")
2022
2023GEN_test_Monly(VMOVLPS_128_XMM_M64, "vmovlps %%xmm7, (%%rax)")
2024
2025GEN_test_RandM(VRCPSS_128,
2026               "vrcpss %%xmm6,  %%xmm8, %%xmm7",
2027               "vrcpss (%%rax), %%xmm8, %%xmm7")
2028
2029GEN_test_RandM(VRCPPS_128,
2030               "vrcpps %%xmm6,  %%xmm8",
2031               "vrcpps (%%rax), %%xmm8")
2032
2033GEN_test_RandM(VRCPPS_256,
2034               "vrcpps %%ymm6,  %%ymm8",
2035               "vrcpps (%%rax), %%ymm8")
2036
2037GEN_test_RandM(VPSADBW_128,
2038               "vpsadbw %%xmm6,  %%xmm8, %%xmm7",
2039               "vpsadbw (%%rax), %%xmm8, %%xmm7")
2040
2041GEN_test_RandM(VPSIGNB_128,
2042               "vpsignb %%xmm6,  %%xmm8, %%xmm7",
2043               "vpsignb (%%rax), %%xmm8, %%xmm7")
2044
2045GEN_test_RandM(VPSIGNW_128,
2046               "vpsignw %%xmm6,  %%xmm8, %%xmm7",
2047               "vpsignw (%%rax), %%xmm8, %%xmm7")
2048
2049GEN_test_RandM(VPSIGND_128,
2050               "vpsignd %%xmm6,  %%xmm8, %%xmm7",
2051               "vpsignd (%%rax), %%xmm8, %%xmm7")
2052
2053GEN_test_RandM(VPMULHRSW_128,
2054               "vpmulhrsw %%xmm6,  %%xmm8, %%xmm7",
2055               "vpmulhrsw (%%rax), %%xmm8, %%xmm7")
2056
2057GEN_test_Monly(VBROADCASTF128,
2058               "vbroadcastf128 (%%rax), %%ymm9")
2059
2060GEN_test_RandM(VPEXTRW_128_0x0,
2061               "vpextrw $0x0, %%xmm7, %%r14d",
2062               "vpextrw $0x0, %%xmm7, (%%rax)")
2063GEN_test_RandM(VPEXTRW_128_0x1,
2064               "vpextrw $0x1, %%xmm7, %%r14d",
2065               "vpextrw $0x1, %%xmm7, (%%rax)")
2066GEN_test_RandM(VPEXTRW_128_0x2,
2067               "vpextrw $0x2, %%xmm7, %%r14d",
2068               "vpextrw $0x2, %%xmm7, (%%rax)")
2069GEN_test_RandM(VPEXTRW_128_0x3,
2070               "vpextrw $0x3, %%xmm7, %%r14d",
2071               "vpextrw $0x3, %%xmm7, (%%rax)")
2072GEN_test_RandM(VPEXTRW_128_0x4,
2073               "vpextrw $0x4, %%xmm7, %%r14d",
2074               "vpextrw $0x4, %%xmm7, (%%rax)")
2075GEN_test_RandM(VPEXTRW_128_0x5,
2076               "vpextrw $0x5, %%xmm7, %%r14d",
2077               "vpextrw $0x5, %%xmm7, (%%rax)")
2078GEN_test_RandM(VPEXTRW_128_0x6,
2079               "vpextrw $0x6, %%xmm7, %%r14d",
2080               "vpextrw $0x6, %%xmm7, (%%rax)")
2081GEN_test_RandM(VPEXTRW_128_0x7,
2082               "vpextrw $0x7, %%xmm7, %%r14d",
2083               "vpextrw $0x7, %%xmm7, (%%rax)")
2084
2085GEN_test_RandM(VAESENC,
2086               "vaesenc %%xmm6,  %%xmm8, %%xmm7",
2087               "vaesenc (%%rax), %%xmm8, %%xmm7")
2088
2089GEN_test_RandM(VAESENCLAST,
2090               "vaesenclast %%xmm6,  %%xmm8, %%xmm7",
2091               "vaesenclast (%%rax), %%xmm8, %%xmm7")
2092
2093GEN_test_RandM(VAESDEC,
2094               "vaesdec %%xmm6,  %%xmm8, %%xmm7",
2095               "vaesdec (%%rax), %%xmm8, %%xmm7")
2096
2097GEN_test_RandM(VAESDECLAST,
2098               "vaesdeclast %%xmm6,  %%xmm8, %%xmm7",
2099               "vaesdeclast (%%rax), %%xmm8, %%xmm7")
2100
2101GEN_test_RandM(VAESIMC,
2102               "vaesimc %%xmm6,  %%xmm7",
2103               "vaesimc (%%rax), %%xmm7")
2104
2105GEN_test_RandM(VAESKEYGENASSIST_0x00,
2106               "vaeskeygenassist $0x00, %%xmm6,  %%xmm7",
2107               "vaeskeygenassist $0x00, (%%rax), %%xmm7")
2108GEN_test_RandM(VAESKEYGENASSIST_0x31,
2109               "vaeskeygenassist $0x31, %%xmm6,  %%xmm7",
2110               "vaeskeygenassist $0x31, (%%rax), %%xmm7")
2111GEN_test_RandM(VAESKEYGENASSIST_0xB2,
2112               "vaeskeygenassist $0xb2, %%xmm6,  %%xmm7",
2113               "vaeskeygenassist $0xb2, (%%rax), %%xmm7")
2114GEN_test_RandM(VAESKEYGENASSIST_0xFF,
2115               "vaeskeygenassist $0xFF, %%xmm6,  %%xmm7",
2116               "vaeskeygenassist $0xFF, (%%rax), %%xmm7")
2117
2118GEN_test_RandM(VPCLMULQDQ_0x00,
2119               "vpclmulqdq $0x00, %%xmm6,  %%xmm8, %%xmm7",
2120               "vpclmulqdq $0x00, (%%rax), %%xmm8, %%xmm7")
2121GEN_test_RandM(VPCLMULQDQ_0x01,
2122               "vpclmulqdq $0x01, %%xmm6,  %%xmm8, %%xmm7",
2123               "vpclmulqdq $0x01, (%%rax), %%xmm8, %%xmm7")
2124GEN_test_RandM(VPCLMULQDQ_0x10,
2125               "vpclmulqdq $0x10, %%xmm6,  %%xmm8, %%xmm7",
2126               "vpclmulqdq $0x10, (%%rax), %%xmm8, %%xmm7")
2127GEN_test_RandM(VPCLMULQDQ_0x11,
2128               "vpclmulqdq $0x11, %%xmm6,  %%xmm8, %%xmm7",
2129               "vpclmulqdq $0x11, (%%rax), %%xmm8, %%xmm7")
2130GEN_test_RandM(VPCLMULQDQ_0xFF,
2131               "vpclmulqdq $0xFF, %%xmm6,  %%xmm8, %%xmm7",
2132               "vpclmulqdq $0xFF, (%%rax), %%xmm8, %%xmm7")
2133
2134GEN_test_RandM(VCMPSS_128_0x9,
2135               "vcmpss $0x9, %%xmm6,  %%xmm8, %%xmm7",
2136               "vcmpss $0x9, (%%rax), %%xmm8, %%xmm7")
2137
2138GEN_test_Monly(VMASKMOVPS_128_LoadForm,
2139               "vmaskmovps (%%rax), %%xmm8, %%xmm7;"
2140               "vxorps %%xmm6, %%xmm6, %%xmm6;"
2141               "vmaskmovps (%%rax,%%rax,4), %%xmm6, %%xmm9")
2142
2143GEN_test_Monly(VMASKMOVPS_256_LoadForm,
2144               "vmaskmovps (%%rax), %%ymm8, %%ymm7;"
2145               "vxorps %%ymm6, %%ymm6, %%ymm6;"
2146               "vmaskmovps (%%rax,%%rax,4), %%ymm6, %%ymm9")
2147
2148GEN_test_Monly(VMASKMOVPD_128_LoadForm,
2149               "vmaskmovpd (%%rax), %%xmm8, %%xmm7;"
2150               "vxorpd %%xmm6, %%xmm6, %%xmm6;"
2151               "vmaskmovpd (%%rax,%%rax,4), %%xmm6, %%xmm9")
2152
2153GEN_test_Monly(VMASKMOVPD_256_LoadForm,
2154               "vmaskmovpd (%%rax), %%ymm8, %%ymm7;"
2155               "vxorpd %%ymm6, %%ymm6, %%ymm6;"
2156               "vmaskmovpd (%%rax,%%rax,4), %%ymm6, %%ymm9")
2157
2158/* Comment duplicated above, for convenient reference:
2159   Allowed operands in test insns:
2160     Reg form:  %ymm6,  %ymm7, %ymm8, %ymm9 and %r14.
2161     Mem form:  (%rax), %ymm7, %ymm8, %ymm9 and %r14.
2162   Imm8 etc fields are also allowed, where they make sense.
2163*/
2164
2165#define N_DEFAULT_ITERS 3
2166
2167// Do the specified test some number of times
2168#define DO_N(_iters, _testfn) \
2169   do { int i; for (i = 0; i < (_iters); i++) { test_##_testfn(); } } while (0)
2170
2171// Do the specified test the default number of times
2172#define DO_D(_testfn) DO_N(N_DEFAULT_ITERS, _testfn)
2173
2174
2175int main ( void )
2176{
2177   DO_D( VMOVUPD_EtoG_256 );
2178   DO_D( VMOVUPD_GtoE_256 );
2179   DO_D( VPSUBW_128 );
2180   DO_D( VPSUBQ_128 );
2181   DO_D( VPADDQ_128 );
2182   DO_D( VPINSRQ_128 );
2183   DO_D( VUCOMISS_128 );
2184   DO_D( VUCOMISD_128 );
2185   DO_D( VCVTPS2PD_128 );
2186   DO_D( VANDNPD_128 );
2187   DO_D( VORPD_128 );
2188   DO_D( VXORPD_128 );
2189   DO_D( VXORPS_128 );
2190   DO_D( VMULSD_128 );
2191   DO_D( VADDSD_128 );
2192   DO_D( VMINSD_128 );
2193   DO_D( VSUBSD_128 );
2194   DO_D( VDIVSD_128 );
2195   DO_D( VMAXSD_128 );
2196   DO_D( VPSHUFD_0x39_128 );
2197   DO_D( VPCMPEQD_128 );
2198   DO_D( VPEXTRD_128_0x3 );
2199   DO_D( VPEXTRD_128_0x0 );
2200   DO_D( VINSERTF128_0x0 );
2201   DO_D( VINSERTF128_0x1 );
2202   DO_D( VEXTRACTF128_0x0 );
2203   DO_D( VEXTRACTF128_0x1 );
2204   DO_D( VCVTPD2PS_128 );
2205   /* Test all CMPSS variants; this code is tricky. */
2206   DO_D( VCMPSS_128_0x0 );
2207   DO_D( VCMPSS_128_0x1 );
2208   DO_D( VCMPSS_128_0x2 );
2209   DO_D( VCMPSS_128_0x3 );
2210   DO_D( VCMPSS_128_0x4 );
2211   DO_D( VCMPSS_128_0x5 );
2212   DO_D( VCMPSS_128_0x6 );
2213   DO_D( VCMPSS_128_0x7 );
2214   DO_D( VCMPSS_128_0x8 );
2215   DO_D( VCMPSS_128_0xA );
2216   DO_D( VCMPSS_128_0xC );
2217   DO_D( VCMPSS_128_0xC );
2218   DO_D( VCMPSS_128_0xD );
2219   DO_D( VCMPSS_128_0xE );
2220   DO_D( VCMPSS_128_0x11 );
2221   DO_D( VCMPSS_128_0x12);
2222   DO_D( VCMPSS_128_0x16 );
2223   DO_D( VCMPSS_128_0x1E );
2224   DO_D( VMOVDDUP_XMMorMEM64_to_XMM );
2225   DO_D( VMOVD_IREGorMEM32_to_XMM );
2226   DO_D( VMOVQ_XMM_MEM64 );
2227   DO_D( VMOVDQA_GtoE_256 );
2228   DO_D( VMOVDQA_GtoE_128 );
2229   DO_D( VMOVDQU_GtoE_128 );
2230   DO_D( VMOVDQA_EtoG_256 );
2231   DO_D( VMOVDQA_EtoG_128 );
2232   DO_D( VMOVDQU_EtoG_128 );
2233   DO_D( VMOVAPD_GtoE_128 );
2234   DO_D( VMOVAPD_GtoE_256 );
2235   DO_D( VMOVAPS_GtoE_128 );
2236   DO_D( VMOVAPS_GtoE_256 );
2237   DO_D( VMOVAPS_EtoG_128 );
2238   DO_D( VMOVAPD_EtoG_256 );
2239   DO_D( VMOVAPD_EtoG_128 );
2240   DO_D( VMOVUPD_GtoE_128 );
2241   DO_D( VMOVSS_XMM_M32 );
2242   DO_D( VMOVSD_XMM_M64 );
2243   DO_D( VMOVSS_M64_XMM );
2244   DO_D( VMOVSD_M64_XMM );
2245   DO_D( VINSERTPS_0x39_128 );
2246   DO_D( VPUNPCKLDQ_128 );
2247   DO_D( VPACKSSDW_128 );
2248   DO_D( VPADDW_128 );
2249   DO_D( VPSRLW_0x05_128 );
2250   DO_D( VPSLLW_0x05_128 );
2251   DO_D( VPUNPCKLQDQ_128 );
2252   DO_D( VPINSRD_128 );
2253   DO_D( VMOVD_XMM_to_MEM32 );
2254   DO_D( VPANDN_128 );
2255   DO_D( VPSLLDQ_0x05_128 );
2256   DO_D( VPSRLDQ_0x05_128 );
2257   DO_D( VPSUBUSB_128 );
2258   DO_D( VPSUBSB_128 );
2259   DO_D( VPSLLD_0x05_128 );
2260   DO_D( VPSRLD_0x05_128 );
2261   DO_D( VPSRAD_0x05_128 );
2262   DO_D( VPUNPCKLWD_128 );
2263   DO_D( VPUNPCKHWD_128 );
2264   DO_D( VPADDUSB_128 );
2265   DO_D( VPMULHUW_128 );
2266   DO_D( VPADDUSW_128 );
2267   DO_D( VPMULLW_128 );
2268   DO_D( VPSHUFHW_0x39_128 );
2269   DO_D( VPSHUFLW_0x39_128 );
2270   DO_D( VCVTPS2DQ_128 );
2271   DO_D( VSUBPS_128 );
2272   DO_D( VADDPS_128 );
2273   DO_D( VMULPS_128 );
2274   DO_D( VMAXPS_128 );
2275   DO_D( VMINPS_128 );
2276   DO_D( VSHUFPS_0x39_128 );
2277   DO_D( VPCMPEQB_128 );
2278   DO_D( VMOVHPD_128_StoreForm );
2279   DO_D( VPAND_128 );
2280   DO_D( VPMOVMSKB_128 );
2281   DO_D( VCVTTSS2SI_64 );
2282   DO_D( VPACKUSWB_128 );
2283   DO_D( VCVTSS2SD_128 );
2284   DO_D( VCVTSD2SS_128 );
2285   DO_D( VMOVD_XMM_to_IREG32 );
2286   DO_D( VPCMPESTRM_0x45_128 );
2287   DO_D( VMOVQ_IREGorMEM64_to_XMM );
2288   DO_D( VMOVUPS_XMM_to_XMMorMEM );
2289   DO_D( VMOVNTDQ_128 );
2290   DO_D( VMOVLHPS_128 );
2291   DO_D( VPABSD_128 );
2292   DO_D( VMOVHLPS_128 );
2293   DO_D( VMOVQ_XMM_to_IREG64 );
2294   DO_D( VMOVQ_XMMorMEM64_to_XMM );
2295   DO_D( VCVTTSS2SI_32 );
2296   DO_D( VPUNPCKLBW_128 );
2297   DO_D( VPUNPCKHBW_128 );
2298   DO_D( VMULSS_128 );
2299   DO_D( VSUBSS_128 );
2300   DO_D( VADDSS_128 );
2301   DO_D( VDIVSS_128 );
2302   DO_D( VUNPCKLPS_128 );
2303   DO_D( VCVTSI2SS_128 );
2304   DO_D( VANDPS_128 );
2305   DO_D( VMINSS_128 );
2306   DO_D( VMAXSS_128 );
2307   DO_D( VANDNPS_128 );
2308   DO_D( VORPS_128 );
2309   DO_D( VSQRTSD_128 );
2310   /* Test all CMPSS variants; this code is tricky. */
2311   DO_D( VCMPSD_128_0x0 );
2312   DO_D( VCMPSD_128_0x1 );
2313   DO_D( VCMPSD_128_0x2 );
2314   DO_D( VCMPSD_128_0x3 );
2315   DO_D( VCMPSD_128_0x4 );
2316   DO_D( VCMPSD_128_0x5 );
2317   DO_D( VCMPSD_128_0x6 );
2318   DO_D( VCMPSD_128_0x7 );
2319   DO_D( VCMPSD_128_0x8 );
2320   DO_D( VCMPSD_128_0xA );
2321   DO_D( VCMPSD_128_0xC );
2322   DO_D( VCMPSD_128_0xD );
2323   DO_D( VCMPSD_128_0xE );
2324   DO_D( VCMPSD_128_0x11 );
2325   DO_D( VCMPSD_128_0x12 );
2326   DO_D( VCMPSD_128_0x16 );
2327   DO_D( VCMPSD_128_0x1E );
2328   DO_D( VPSHUFB_128 );
2329   DO_D( VCVTTSD2SI_32 );
2330   DO_D( VCVTTSD2SI_64 );
2331   DO_D( VCVTSI2SS_64 );
2332   DO_D( VCVTSI2SD_64 );
2333   DO_D( VCVTSI2SD_32 );
2334   DO_D( VPOR_128 );
2335   DO_D( VPXOR_128 );
2336   DO_D( VPSUBB_128 );
2337   DO_D( VPSUBD_128 );
2338   DO_D( VPADDD_128 );
2339   DO_D( VPMOVZXBW_128 );
2340   DO_D( VPMOVZXWD_128 );
2341   DO_D( VPBLENDVB_128 );
2342   DO_D( VPMINSD_128 );
2343   DO_D( VPMAXSD_128 );
2344   DO_D( VANDPD_128 );
2345   DO_D( VMULPD_256 );
2346   DO_D( VMOVUPD_EtoG_128 );
2347   DO_D( VADDPD_256 );
2348   DO_D( VSUBPD_256 );
2349   DO_D( VDIVPD_256 );
2350   DO_D( VPCMPEQQ_128 );
2351   DO_D( VSUBPD_128 );
2352   DO_D( VADDPD_128 );
2353   DO_D( VUNPCKLPD_128 );
2354   DO_D( VUNPCKHPD_128 );
2355   DO_D( VUNPCKHPS_128 );
2356   DO_D( VMOVUPS_EtoG_128 );
2357   DO_D( VADDPS_256 );
2358   DO_D( VSUBPS_256 );
2359   DO_D( VMULPS_256 );
2360   DO_D( VDIVPS_256 );
2361   DO_D( VPCMPGTQ_128 );
2362   DO_D( VPEXTRQ_128_0x0 );
2363   DO_D( VPEXTRQ_128_0x1 );
2364   DO_D( VPSRLQ_0x05_128 );
2365   DO_D( VPMULUDQ_128 );
2366   DO_D( VPSLLQ_0x05_128 );
2367   DO_D( VPMAXUD_128 );
2368   DO_D( VPMINUD_128 );
2369   DO_D( VPMULLD_128 );
2370   DO_D( VPMAXUW_128 );
2371   DO_D( VPEXTRW_128_EregOnly_toG_0x0 );
2372   DO_D( VPEXTRW_128_EregOnly_toG_0x7 );
2373   DO_D( VPMINUW_128 );
2374   DO_D( VPHMINPOSUW_128 );
2375   DO_D( VPMAXSW_128 );
2376   DO_D( VPMINSW_128 );
2377   DO_D( VPMAXUB_128 );
2378   DO_D( VPEXTRB_GtoE_128_0x0 );
2379   DO_D( VPEXTRB_GtoE_128_0x1 );
2380   DO_D( VPEXTRB_GtoE_128_0x2 );
2381   DO_D( VPEXTRB_GtoE_128_0x3 );
2382   DO_D( VPEXTRB_GtoE_128_0x4 );
2383   DO_D( VPEXTRB_GtoE_128_0x9 );
2384   DO_D( VPEXTRB_GtoE_128_0xE );
2385   DO_D( VPEXTRB_GtoE_128_0xF );
2386   DO_D( VPMINUB_128 );
2387   DO_D( VPMAXSB_128 );
2388   DO_D( VPMINSB_128 );
2389   DO_D( VPERM2F128_0x00 );
2390   DO_D( VPERM2F128_0xFF );
2391   DO_D( VPERM2F128_0x30 );
2392   DO_D( VPERM2F128_0x21 );
2393   DO_D( VPERM2F128_0x12 );
2394   DO_D( VPERM2F128_0x03 );
2395   DO_D( VPERM2F128_0x85 );
2396   DO_D( VPERM2F128_0x5A );
2397   DO_D( VPERMILPD_256_0x0 );
2398   DO_D( VPERMILPD_256_0xF );
2399   DO_D( VPERMILPD_256_0xA );
2400   DO_D( VPERMILPD_256_0x5 );
2401   DO_D( VPERMILPD_128_0x0 );
2402   DO_D( VPERMILPD_128_0x3 );
2403   DO_D( VUNPCKLPD_256 );
2404   DO_D( VUNPCKHPD_256 );
2405   DO_D( VSHUFPS_0x39_256 );
2406   DO_D( VUNPCKLPS_256 );
2407   DO_D( VUNPCKHPS_256 );
2408   DO_D( VXORPD_256 );
2409   DO_D( VBROADCASTSD_256 );
2410   DO_D( VCMPPD_128_0x4 );
2411   DO_D( VCVTDQ2PD_128 );
2412   DO_D( VDIVPD_128 );
2413   DO_D( VANDPD_256 );
2414   DO_D( VPMOVSXBW_128 );
2415   DO_D( VPSUBUSW_128 );
2416   DO_D( VPSUBSW_128 );
2417   DO_D( VPCMPEQW_128 );
2418   DO_D( VPADDB_128 );
2419   DO_D( VMOVAPS_EtoG_256 );
2420   DO_D( VCVTDQ2PD_256 );
2421   DO_D( VMOVHPD_128_LoadForm );
2422   DO_D( VCVTPD2PS_256 );
2423   DO_D( VPUNPCKHDQ_128 );
2424   DO_D( VBROADCASTSS_128 );
2425   DO_D( VPMOVSXDQ_128 );
2426   DO_D( VPMOVSXWD_128 );
2427   DO_D( VDIVPS_128 );
2428   DO_D( VANDPS_256 );
2429   DO_D( VXORPS_256 );
2430   DO_D( VORPS_256 );
2431   DO_D( VANDNPD_256 );
2432   DO_D( VANDNPS_256 );
2433   DO_D( VORPD_256 );
2434   DO_D( VPERMILPS_256_0x0F );
2435   DO_D( VPERMILPS_256_0xFA );
2436   DO_D( VPERMILPS_256_0xA3 );
2437   DO_D( VPERMILPS_256_0x5A );
2438   DO_D( VPMULHW_128 );
2439   DO_D( VPUNPCKHQDQ_128 );
2440   DO_D( VPSRAW_0x05_128 );
2441   DO_D( VPCMPGTD_128 );
2442   DO_D( VPMOVZXBD_128 );
2443   DO_D( VPMOVSXBD_128 );
2444   DO_D( VPINSRB_128_1of3 );
2445   DO_D( VPINSRB_128_2of3 );
2446   DO_D( VPINSRB_128_3of3 );
2447   DO_D( VCOMISD_128 );
2448   DO_D( VCOMISS_128 );
2449   DO_D( VMOVUPS_YMM_to_YMMorMEM );
2450   DO_D( VDPPD_128_1of4 );
2451   DO_D( VDPPD_128_2of4 );
2452   DO_D( VDPPD_128_3of4 );
2453   DO_D( VDPPD_128_4of4 );
2454   DO_D( VPINSRW_128_1of4 );
2455   DO_D( VPINSRW_128_2of4 );
2456   DO_D( VPINSRW_128_3of4 );
2457   DO_D( VPINSRW_128_4of4 );
2458   DO_D( VBROADCASTSS_256 );
2459   DO_D( VPALIGNR_128_1of3 );
2460   DO_D( VPALIGNR_128_2of3 );
2461   DO_D( VPALIGNR_128_3of3 );
2462   DO_D( VMOVSD_REG_XMM );
2463   DO_D( VMOVSS_REG_XMM );
2464   DO_D( VMOVLPD_128_M64_XMM_XMM );
2465   DO_D( VMOVLPD_128_XMM_M64 );
2466   DO_D( VSHUFPD_128_1of2 );
2467   DO_D( VSHUFPD_128_2of2 );
2468   DO_D( VSHUFPD_256_1of2 );
2469   DO_D( VSHUFPD_256_2of2 );
2470   DO_D( VPERMILPS_128_0x00 );
2471   DO_D( VPERMILPS_128_0xFE );
2472   DO_D( VPERMILPS_128_0x30 );
2473   DO_D( VPERMILPS_128_0x21 );
2474   DO_D( VPERMILPS_128_0xD7 );
2475   DO_D( VPERMILPS_128_0xB5 );
2476   DO_D( VPERMILPS_128_0x85 );
2477   DO_D( VPERMILPS_128_0x29 );
2478   DO_D( VBLENDPS_128_1of3 );
2479   DO_D( VBLENDPS_128_2of3 );
2480   DO_D( VBLENDPS_128_3of3 );
2481   DO_D( VBLENDPD_128_1of2 );
2482   DO_D( VBLENDPD_128_2of2 );
2483   DO_D( VBLENDPD_256_1of3 );
2484   DO_D( VBLENDPD_256_2of3 );
2485   DO_D( VBLENDPD_256_3of3 );
2486   DO_D( VPBLENDW_128_0x00 );
2487   DO_D( VPBLENDW_128_0xFE );
2488   DO_D( VPBLENDW_128_0x30 );
2489   DO_D( VPBLENDW_128_0x21 );
2490   DO_D( VPBLENDW_128_0xD7 );
2491   DO_D( VPBLENDW_128_0xB5 );
2492   DO_D( VPBLENDW_128_0x85 );
2493   DO_D( VPBLENDW_128_0x29 );
2494   DO_D( VMOVUPS_EtoG_256 );
2495   DO_D( VSQRTSS_128 );
2496   DO_D( VSQRTPS_128 );
2497   DO_D( VSQRTPS_256 );
2498   DO_D( VSQRTPD_128 );
2499   DO_D( VSQRTPD_256 );
2500   DO_D( VRSQRTSS_128 );
2501   DO_D( VRSQRTPS_128 );
2502   DO_D( VRSQRTPS_256 );
2503   DO_D( VMOVDQU_GtoE_256 );
2504   DO_D( VCVTPS2PD_256 );
2505   DO_D( VCVTTPS2DQ_128 );
2506   DO_D( VCVTTPS2DQ_256 );
2507   DO_D( VCVTDQ2PS_128 );
2508   DO_D( VCVTDQ2PS_256 );
2509   DO_D( VCVTTPD2DQ_128 );
2510   DO_D( VCVTTPD2DQ_256 );
2511   DO_D( VCVTPD2DQ_128 );
2512   DO_D( VCVTPD2DQ_256 );
2513   DO_D( VMOVSLDUP_128 );
2514   DO_D( VMOVSLDUP_256 );
2515   DO_D( VMOVSHDUP_128 );
2516   DO_D( VMOVSHDUP_256 );
2517   DO_D( VPERMILPS_VAR_128 );
2518   DO_D( VPERMILPD_VAR_128 );
2519   DO_D( VPERMILPS_VAR_256 );
2520   DO_D( VPERMILPD_VAR_256 );
2521   DO_D( VPSLLW_128 );
2522   DO_D( VPSRLW_128 );
2523   DO_D( VPSRAW_128 );
2524   DO_D( VPSLLD_128 );
2525   DO_D( VPSRLD_128 );
2526   DO_D( VPSRAD_128 );
2527   DO_D( VPSLLQ_128 );
2528   DO_D( VPSRLQ_128 );
2529   DO_D( VROUNDPS_128_0x0 );
2530   DO_D( VROUNDPS_128_0x1 );
2531   DO_D( VROUNDPS_128_0x2 );
2532   DO_D( VROUNDPS_128_0x3 );
2533   DO_D( VROUNDPS_128_0x4 );
2534   DO_D( VROUNDPS_256_0x0 );
2535   DO_D( VROUNDPS_256_0x1 );
2536   DO_D( VROUNDPS_256_0x2 );
2537   DO_D( VROUNDPS_256_0x3 );
2538   DO_D( VROUNDPS_256_0x4 );
2539   DO_D( VROUNDPD_128_0x0 );
2540   DO_D( VROUNDPD_128_0x1 );
2541   DO_D( VROUNDPD_128_0x2 );
2542   DO_D( VROUNDPD_128_0x3 );
2543   DO_D( VROUNDPD_128_0x4 );
2544   DO_D( VROUNDPD_256_0x0 );
2545   DO_D( VROUNDPD_256_0x1 );
2546   DO_D( VROUNDPD_256_0x2 );
2547   DO_D( VROUNDPD_256_0x3 );
2548   DO_D( VROUNDPD_256_0x4 );
2549   DO_D( VROUNDSS_0x0 );
2550   DO_D( VROUNDSS_0x1 );
2551   DO_D( VROUNDSS_0x2 );
2552   DO_D( VROUNDSS_0x3 );
2553   DO_D( VROUNDSS_0x4 );
2554   DO_D( VROUNDSS_0x5 );
2555   DO_D( VROUNDSD_0x0 );
2556   DO_D( VROUNDSD_0x1 );
2557   DO_D( VROUNDSD_0x2 );
2558   DO_D( VROUNDSD_0x3 );
2559   DO_D( VROUNDSD_0x4 );
2560   DO_D( VROUNDSD_0x5 );
2561   DO_D( VPTEST_128_1 );
2562   DO_D( VPTEST_128_2 );
2563   DO_D( VPTEST_256_1 );
2564   DO_D( VPTEST_256_2 );
2565   DO_D( VTESTPS_128_1 );
2566   DO_D( VTESTPS_128_2 );
2567   DO_N( 10, VTESTPS_128_3 );
2568   DO_D( VTESTPS_256_1 );
2569   DO_D( VTESTPS_256_2 );
2570   DO_N( 10, VTESTPS_256_3 );
2571   DO_D( VTESTPD_128_1 );
2572   DO_D( VTESTPD_128_2 );
2573   DO_N( 10, VTESTPD_128_3 );
2574   DO_D( VTESTPD_256_1 );
2575   DO_D( VTESTPD_256_2 );
2576   DO_N( 10, VTESTPD_256_3 );
2577   DO_D( VBLENDVPS_128 );
2578   DO_D( VBLENDVPS_256 );
2579   DO_D( VBLENDVPD_128 );
2580   DO_D( VBLENDVPD_256 );
2581   DO_D( VPMULDQ_128 );
2582   DO_D( VCMPPD_256_0x4 );
2583   DO_D( VCMPPS_128_0x4 );
2584   DO_D( VCMPPS_256_0x4 );
2585   DO_D( VPCMPGTB_128 );
2586   DO_D( VPCMPGTW_128 );
2587   DO_D( VPMADDWD_128 );
2588   DO_D( VADDSUBPS_128 );
2589   DO_D( VADDSUBPS_256 );
2590   DO_D( VADDSUBPD_128 );
2591   DO_D( VADDSUBPD_256 );
2592   DO_D( VCVTSS2SI_64 );
2593   DO_D( VCVTSS2SI_32 );
2594   DO_D( VCVTSD2SI_32 );
2595   DO_D( VCVTSD2SI_64 );
2596   DO_D( VDPPS_128_1of4 );
2597   DO_D( VDPPS_128_2of4 );
2598   DO_D( VDPPS_128_3of4 );
2599   DO_D( VDPPS_128_4of4 );
2600   DO_D( VDPPS_256_1of4 );
2601   DO_D( VDPPS_256_2of4 );
2602   DO_D( VDPPS_256_3of4 );
2603   DO_D( VDPPS_256_4of4 );
2604   DO_D( VHADDPS_128 );
2605   DO_D( VHADDPS_256 );
2606   DO_D( VHADDPD_128 );
2607   DO_D( VHADDPD_256 );
2608   DO_D( VHSUBPS_128 );
2609   DO_D( VHSUBPS_256 );
2610   DO_D( VHSUBPD_128 );
2611   DO_D( VHSUBPD_256 );
2612   DO_D( VEXTRACTPS_0x0 );
2613   DO_D( VEXTRACTPS_0x1 );
2614   DO_D( VEXTRACTPS_0x2 );
2615   DO_D( VEXTRACTPS_0x3 );
2616   DO_D( VLDDQU_128 );
2617   DO_D( VLDDQU_256 );
2618   DO_D( VMAXPS_256 );
2619   DO_D( VMAXPD_128 );
2620   DO_D( VMAXPD_256 );
2621   DO_D( VMINPS_256 );
2622   DO_D( VMINPD_128 );
2623   DO_D( VMINPD_256 );
2624   DO_D( VMOVHPS_128_StoreForm );
2625   DO_D( VMOVNTDQ_256 );
2626   DO_D( VMOVHPS_128_LoadForm );
2627   DO_D( VMOVNTDQA_128 );
2628   DO_D( VMASKMOVDQU_128 );
2629   DO_D( VMOVMSKPD_128 );
2630   DO_D( VMOVMSKPD_256 );
2631   DO_D( VMOVMSKPS_128 );
2632   DO_D( VMOVMSKPS_256 );
2633   DO_D( VMOVNTPD_128 );
2634   DO_D( VMOVNTPD_256 );
2635   DO_D( VMOVNTPS_128 );
2636   DO_D( VMOVNTPS_256 );
2637   DO_D( VPACKSSWB_128 );
2638   DO_D( VPAVGB_128 );
2639   DO_D( VPAVGW_128 );
2640   DO_D( VPADDSB_128 );
2641   DO_D( VPADDSW_128 );
2642   DO_D( VPHADDW_128 );
2643   DO_D( VPHADDD_128 );
2644   DO_D( VPHADDSW_128 );
2645   DO_D( VPMADDUBSW_128 );
2646   DO_D( VPHSUBW_128 );
2647   DO_D( VPHSUBD_128 );
2648   DO_D( VPHSUBSW_128 );
2649   DO_D( VPABSB_128 );
2650   DO_D( VPABSW_128 );
2651   DO_D( VPMOVSXBQ_128 );
2652   DO_D( VPMOVSXWQ_128 );
2653   DO_D( VPACKUSDW_128 );
2654   DO_D( VPMOVZXBQ_128 );
2655   DO_D( VPMOVZXWQ_128 );
2656   DO_D( VPMOVZXDQ_128 );
2657   DO_D( VMPSADBW_128_0x0 );
2658   DO_D( VMPSADBW_128_0x1 );
2659   DO_D( VMPSADBW_128_0x2 );
2660   DO_D( VMPSADBW_128_0x3 );
2661   DO_D( VMPSADBW_128_0x4 );
2662   DO_D( VMPSADBW_128_0x5 );
2663   DO_D( VMPSADBW_128_0x6 );
2664   DO_D( VMPSADBW_128_0x7 );
2665   DO_D( VMOVDDUP_YMMorMEM256_to_YMM );
2666   DO_D( VMOVLPS_128_M64_XMM_XMM );
2667   DO_D( VMOVLPS_128_XMM_M64 );
2668   DO_D( VRCPSS_128 );
2669   DO_D( VRCPPS_128 );
2670   DO_D( VRCPPS_256 );
2671   DO_D( VPSADBW_128 );
2672   DO_D( VPSIGNB_128 );
2673   DO_D( VPSIGNW_128 );
2674   DO_D( VPSIGND_128 );
2675   DO_D( VPMULHRSW_128 );
2676   DO_D( VBROADCASTF128 );
2677   DO_D( VPEXTRW_128_0x0 );
2678   DO_D( VPEXTRW_128_0x1 );
2679   DO_D( VPEXTRW_128_0x2 );
2680   DO_D( VPEXTRW_128_0x3 );
2681   DO_D( VPEXTRW_128_0x4 );
2682   DO_D( VPEXTRW_128_0x5 );
2683   DO_D( VPEXTRW_128_0x6 );
2684   DO_D( VPEXTRW_128_0x7 );
2685   DO_D( VAESENC );
2686   DO_D( VAESENCLAST );
2687   DO_D( VAESDEC );
2688   DO_D( VAESDECLAST );
2689   DO_D( VAESIMC );
2690   DO_D( VAESKEYGENASSIST_0x00 );
2691   DO_D( VAESKEYGENASSIST_0x31 );
2692   DO_D( VAESKEYGENASSIST_0xB2 );
2693   DO_D( VAESKEYGENASSIST_0xFF );
2694   DO_D( VPCLMULQDQ_0x00 );
2695   DO_D( VPCLMULQDQ_0x01 );
2696   DO_D( VPCLMULQDQ_0x10 );
2697   DO_D( VPCLMULQDQ_0x11 );
2698   DO_D( VPCLMULQDQ_0xFF );
2699   DO_D( VCMPSS_128_0x9 );
2700   DO_D( VMASKMOVPS_128_LoadForm );
2701   DO_D( VMASKMOVPS_256_LoadForm );
2702   DO_D( VMASKMOVPD_128_LoadForm );
2703   DO_D( VMASKMOVPD_256_LoadForm );
2704   return 0;
2705}
2706
2707