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