1# Check 64bit BMI2 instructions 2 3 .allow_index_reg 4 .text 5_start: 6 7# Test for op r32, r/m32, imm8 8 rorx $7,%eax,%ebx 9 rorx $7,(%rcx),%ebx 10 rorx $7,%r9d,%r15d 11 rorx $7,(%rcx),%r15d 12 13# Test for op r32, r32, r/m32 14 mulx %eax,%ebx,%esi 15 mulx (%rcx),%ebx,%esi 16 mulx %r9d,%r15d,%r10d 17 mulx (%rcx),%r15d,%r10d 18 pdep %eax,%ebx,%esi 19 pdep (%rcx),%ebx,%esi 20 pdep %r9d,%r15d,%r10d 21 pdep (%rcx),%r15d,%r10d 22 pext %eax,%ebx,%esi 23 pext (%rcx),%ebx,%esi 24 pext %r9d,%r15d,%r10d 25 pext (%rcx),%r15d,%r10d 26 27# Test for op r32, r/m32, r32 28 bzhi %eax,%ebx,%esi 29 bzhi %ebx,(%rcx),%esi 30 bzhi %r9d,%r15d,%r10d 31 bzhi %r9d,(%rcx),%r10d 32 sarx %eax,%ebx,%esi 33 sarx %ebx,(%rcx),%esi 34 sarx %r9d,%r15d,%r10d 35 sarx %r9d,(%rcx),%r10d 36 shlx %eax,%ebx,%esi 37 shlx %ebx,(%rcx),%esi 38 shlx %r9d,%r15d,%r10d 39 shlx %r9d,(%rcx),%r10d 40 shrx %eax,%ebx,%esi 41 shrx %ebx,(%rcx),%esi 42 shrx %r9d,%r15d,%r10d 43 shrx %r9d,(%rcx),%r10d 44 45# Test for op r64, r/m64, imm8 46 rorx $7,%rax,%rbx 47 rorx $7,(%rcx),%rbx 48 rorx $7,%r9,%r15 49 rorx $7,(%rcx),%r15 50 51# Test for op r64, r64, r/m64 52 mulx %rax,%rbx,%rsi 53 mulx (%rcx),%rbx,%rsi 54 mulx %r9,%r15,%r10 55 mulx (%rcx),%r15,%r10 56 pdep %rax,%rbx,%rsi 57 pdep (%rcx),%rbx,%rsi 58 pdep %r9,%r15,%r10 59 pdep (%rcx),%r15,%r10 60 pext %rax,%rbx,%rsi 61 pext (%rcx),%rbx,%rsi 62 pext %r9,%r15,%r10 63 pext (%rcx),%r15,%r10 64 65# Test for op r64, r/m64, r64 66 bzhi %rax,%rbx,%rsi 67 bzhi %rax,(%rcx),%rsi 68 bzhi %r9,%r15,%r10 69 bzhi %r9,(%rcx),%r10 70 sarx %rax,%rbx,%rsi 71 sarx %rax,(%rcx),%rsi 72 sarx %r9,%r15,%r10 73 sarx %r9,(%rcx),%r10 74 shlx %rax,%rbx,%rsi 75 shlx %rax,(%rcx),%rsi 76 shlx %r9,%r15,%r10 77 shlx %r9,(%rcx),%r10 78 shrx %rax,%rbx,%rsi 79 shrx %rax,(%rcx),%rsi 80 shrx %r9,%r15,%r10 81 shrx %r9,(%rcx),%r10 82 83 .intel_syntax noprefix 84 85# Test for op r32, r/m32, imm8 86 rorx ebx,eax,7 87 rorx ebx,DWORD PTR [rcx],7 88 rorx r10d,r9d,7 89 rorx r10d,DWORD PTR [rcx],7 90 rorx ebx,[rcx],7 91 92# Test for op r32, r32, r/m32 93 mulx esi,ebx,eax 94 mulx esi,ebx,DWORD PTR [rcx] 95 mulx r15d,r10d,r9d 96 mulx r15d,r10d,DWORD PTR [rcx] 97 mulx esi,ebx,[rcx] 98 pdep esi,ebx,eax 99 pdep esi,ebx,DWORD PTR [rcx] 100 pdep r15d,r10d,r9d 101 pdep r15d,r10d,DWORD PTR [rcx] 102 pdep esi,ebx,[rcx] 103 pext esi,ebx,eax 104 pext esi,ebx,DWORD PTR [rcx] 105 pext r15d,r10d,r9d 106 pext r15d,r10d,DWORD PTR [rcx] 107 pext esi,ebx,[rcx] 108 109# Test for op r32, r/m32, r32 110 bzhi esi,ebx,eax 111 bzhi esi,DWORD PTR [rcx],ebx 112 bzhi r15d,r10d,r9d 113 bzhi r15d,DWORD PTR [rcx],r9d 114 bzhi esi,[rcx],ebx 115 sarx esi,ebx,eax 116 sarx esi,DWORD PTR [rcx],ebx 117 sarx r15d,r10d,r9d 118 sarx r15d,DWORD PTR [rcx],r9d 119 sarx esi,[rcx],ebx 120 shlx esi,ebx,eax 121 shlx esi,DWORD PTR [rcx],ebx 122 shlx r15d,r10d,r9d 123 shlx r15d,DWORD PTR [rcx],r9d 124 shlx esi,[rcx],ebx 125 shrx esi,ebx,eax 126 shrx esi,DWORD PTR [rcx],ebx 127 shrx r15d,r10d,r9d 128 shrx r15d,DWORD PTR [rcx],r9d 129 shrx esi,[rcx],ebx 130 131# Test for op r64, r/m64, imm8 132 rorx rbx,rax,7 133 rorx rbx,QWORD PTR [rcx],7 134 rorx r15,r9,7 135 rorx r15,QWORD PTR [rcx],7 136 rorx rbx,[rcx],7 137 138# Test for op r64, r64, r/m64 139 mulx rsi,rbx,rax 140 mulx rsi,rbx,QWORD PTR [rcx] 141 mulx r10,r15,r9 142 mulx r10,r15,QWORD PTR [rcx] 143 mulx rsi,rbx,[rcx] 144 pdep rsi,rbx,rax 145 pdep rsi,rbx,QWORD PTR [rcx] 146 pdep r10,r15,r9 147 pdep r10,r15,QWORD PTR [rcx] 148 pdep rsi,rbx,[rcx] 149 pext rsi,rbx,rax 150 pext rsi,rbx,QWORD PTR [rcx] 151 pext r10,r15,r9 152 pext r10,r15,QWORD PTR [rcx] 153 pext rsi,rbx,[rcx] 154 155# Test for op r64, r/m64, r64 156 bzhi rsi,rbx,rax 157 bzhi rsi,QWORD PTR [rcx],rax 158 bzhi r10,r15,r9 159 bzhi r10,QWORD PTR [rcx],r9 160 bzhi rsi,[rcx],rax 161 sarx rsi,rbx,rax 162 sarx rsi,QWORD PTR [rcx],rax 163 sarx r10,r15,r9 164 sarx r10,QWORD PTR [rcx],r9 165 sarx rsi,[rcx],rax 166 shlx rsi,rbx,rax 167 shlx rsi,QWORD PTR [rcx],rax 168 shlx r10,r15,r9 169 shlx r10,QWORD PTR [rcx],r9 170 shlx rsi,[rcx],rax 171 shrx rsi,rbx,rax 172 shrx rsi,QWORD PTR [rcx],rax 173 shrx r10,r15,r9 174 shrx r10,QWORD PTR [rcx],r9 175 shrx rsi,[rcx],rax 176