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