| 1 |
# RUN: llvm-mc -triple x86_64 -show-encoding -x86-asm-syntax=intel -output-asm-variant=1 %s | FileCheck %s |
| 2 |
|
| 3 |
## MRMDestMem |
| 4 |
|
| 5 |
# CHECK: vextractf32x4 xmmword ptr [r16 + r17], zmm0, 1 |
| 6 |
# CHECK: encoding: [0x62,0xfb,0x79,0x48,0x19,0x04,0x08,0x01] |
| 7 |
vextractf32x4 xmmword ptr [r16 + r17], zmm0, 1 |
| 8 |
|
| 9 |
# CHECK: add r18, qword ptr [r17 + 123], r16 |
| 10 |
# CHECK: encoding: [0x62,0xec,0xec,0x10,0x01,0x41,0x7b] |
| 11 |
add r18, qword ptr [r17 + 123], r16 |
| 12 |
|
| 13 |
## MRMDestMemCC |
| 14 |
|
| 15 |
# CHECK: cfcmovb qword ptr [r17 + 4*r18 + 123], r16 |
| 16 |
# CHECK: encoding: [0x62,0xec,0xf8,0x0c,0x42,0x44,0x91,0x7b] |
| 17 |
cfcmovb qword ptr [r17 + 4*r18 + 123], r16 |
| 18 |
|
| 19 |
## MRMSrcMem |
| 20 |
|
| 21 |
# CHECK: vbroadcasti32x4 zmm0, xmmword ptr [r16 + r17] |
| 22 |
# CHECK: encoding: [0x62,0xfa,0x79,0x48,0x5a,0x04,0x08] |
| 23 |
vbroadcasti32x4 zmm0, xmmword ptr [r16 + r17] |
| 24 |
|
| 25 |
# CHECK: sub r18, r17, qword ptr [r16 + 123] |
| 26 |
# CHECK: encoding: [0x62,0xec,0xec,0x10,0x2b,0x48,0x7b] |
| 27 |
sub r18, r17, qword ptr [r16 + 123] |
| 28 |
|
| 29 |
## MRMSrcMemCC |
| 30 |
|
| 31 |
# CHECK: cfcmovb r18, qword ptr [r16 + 4*r17 + 123] |
| 32 |
# CHECK: encoding: [0x62,0xec,0xf8,0x08,0x42,0x54,0x88,0x7b] |
| 33 |
cfcmovb r18, qword ptr [r16 + 4*r17 + 123] |
| 34 |
|
| 35 |
# CHECK: cfcmovb r19, r18, qword ptr [r16 + 4*r17 + 123] |
| 36 |
# CHECK: encoding: [0x62,0xec,0xe0,0x14,0x42,0x54,0x88,0x7b] |
| 37 |
cfcmovb r19, r18, qword ptr [r16 + 4*r17 + 123] |
| 38 |
|
| 39 |
## MRM0m |
| 40 |
|
| 41 |
# CHECK: vprorq zmm0, zmmword ptr [r16 + r17], 0 |
| 42 |
# CHECK: encoding: [0x62,0xf9,0xf9,0x48,0x72,0x04,0x08,0x00] |
| 43 |
vprorq zmm0, zmmword ptr [r16 + r17], 0 |
| 44 |
|
| 45 |
# CHECK: add r17, qword ptr [r16 + 123], 127 |
| 46 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x40,0x7b,0x7f] |
| 47 |
add r17, qword ptr [r16 + 123], 127 |
| 48 |
|
| 49 |
## MRM1m |
| 50 |
|
| 51 |
# CHECK: vprolq zmm0, zmmword ptr [r16 + r17], 0 |
| 52 |
# CHECK: encoding: [0x62,0xf9,0xf9,0x48,0x72,0x0c,0x08,0x00] |
| 53 |
vprolq zmm0, zmmword ptr [r16 + r17], 0 |
| 54 |
|
| 55 |
# CHECK: or r17, qword ptr [r16 + 123], 127 |
| 56 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x48,0x7b,0x7f] |
| 57 |
or r17, qword ptr [r16 + 123], 127 |
| 58 |
|
| 59 |
## MRM2m |
| 60 |
|
| 61 |
# CHECK: vpsrlq zmm0, zmmword ptr [r16 + r17], 0 |
| 62 |
# CHECK: encoding: [0x62,0xf9,0xf9,0x48,0x73,0x14,0x08,0x00] |
| 63 |
vpsrlq zmm0, zmmword ptr [r16 + r17], 0 |
| 64 |
|
| 65 |
# CHECK: adc r17, qword ptr [r16 + 123], 127 |
| 66 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x50,0x7b,0x7f] |
| 67 |
adc r17, qword ptr [r16 + 123], 127 |
| 68 |
|
| 69 |
## MRM3m |
| 70 |
|
| 71 |
# CHECK: vpsrldq zmm0, zmmword ptr [r16 + r17], 0 |
| 72 |
# CHECK: encoding: [0x62,0xf9,0x79,0x48,0x73,0x1c,0x08,0x00] |
| 73 |
vpsrldq zmm0, zmmword ptr [r16 + r17], 0 |
| 74 |
|
| 75 |
# CHECK: sbb r17, qword ptr [r16 + 123], 127 |
| 76 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x58,0x7b,0x7f] |
| 77 |
sbb r17, qword ptr [r16 + 123], 127 |
| 78 |
|
| 79 |
## MRM4m |
| 80 |
|
| 81 |
# CHECK: vpsraq zmm0, zmmword ptr [r16 + r17], 0 |
| 82 |
# CHECK: encoding: [0x62,0xf9,0xf9,0x48,0x72,0x24,0x08,0x00] |
| 83 |
vpsraq zmm0, zmmword ptr [r16 + r17], 0 |
| 84 |
|
| 85 |
# CHECK: and r17, qword ptr [r16 + 123], 127 |
| 86 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x60,0x7b,0x7f] |
| 87 |
and r17, qword ptr [r16 + 123], 127 |
| 88 |
|
| 89 |
## MRM5m |
| 90 |
## AsmParser is buggy for this KNC instruction |
| 91 |
# C;HECK: vscatterpf0dps {k1}, zmmword ptr [r16 + zmm0] |
| 92 |
# C;HECK: encoding: [0x62,0xfa,0x7d,0x49,0xc6,0x2c,0x00] |
| 93 |
# vscatterpf0dps {k1}, zmmword ptr [r16 + zmm0] |
| 94 |
|
| 95 |
# CHECK: sub r17, qword ptr [r16 + 123], 127 |
| 96 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x68,0x7b,0x7f] |
| 97 |
sub r17, qword ptr [r16 + 123], 127 |
| 98 |
|
| 99 |
## MRM6m |
| 100 |
|
| 101 |
# CHECK: vpsllq zmm0, zmmword ptr [r16 + r17], 0 |
| 102 |
# CHECK: encoding: [0x62,0xf9,0xf9,0x48,0x73,0x34,0x08,0x00] |
| 103 |
vpsllq zmm0, zmmword ptr [r16 + r17], 0 |
| 104 |
|
| 105 |
# CHECK: xor r17, qword ptr [r16 + 123], 127 |
| 106 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0x70,0x7b,0x7f] |
| 107 |
xor r17, qword ptr [r16 + 123], 127 |
| 108 |
|
| 109 |
## MRM7m |
| 110 |
|
| 111 |
# CHECK: vpslldq zmm0, zmmword ptr [r16 + r17], 0 |
| 112 |
# CHECK: encoding: [0x62,0xf9,0x79,0x48,0x73,0x3c,0x08,0x00] |
| 113 |
vpslldq zmm0, zmmword ptr [r16 + r17], 0 |
| 114 |
|
| 115 |
# CHECK: sar r18, qword ptr [r16 + r17 + 291], 123 |
| 116 |
# CHECK: encoding: [0x62,0xfc,0xe8,0x10,0xc1,0xbc,0x08,0x23,0x01,0x00,0x00,0x7b] |
| 117 |
sar r18, qword ptr [r16 + r17 + 291], 123 |
| 118 |
|
| 119 |
## MRMDestMem4VOp3CC |
| 120 |
|
| 121 |
# CHECK: cmpbexadd dword ptr [r28 + 4*r29 + 291], r22d, r18d |
| 122 |
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe6,0xb4,0xac,0x23,0x01,0x00,0x00] |
| 123 |
cmpbexadd dword ptr [r28 + 4*r29 + 291], r22d, r18d |
| 124 |
|
| 125 |
## MRMSrcMem4VOp3 |
| 126 |
|
| 127 |
# CHECK: bzhi r23, qword ptr [r28 + 4*r29 + 291], r19 |
| 128 |
# CHECK: encoding: [0x62,0x8a,0xe0,0x00,0xf5,0xbc,0xac,0x23,0x01,0x00,0x00] |
| 129 |
bzhi r23, qword ptr [r28 + 4*r29 + 291], r19 |
| 130 |
|
| 131 |
## MRMDestReg |
| 132 |
|
| 133 |
# CHECK: vextractps r16d, xmm16, 1 |
| 134 |
# CHECK: encoding: [0x62,0xeb,0x7d,0x08,0x17,0xc0,0x01] |
| 135 |
vextractps r16d, xmm16, 1 |
| 136 |
|
| 137 |
# CHECK: {nf} add r17, r16 |
| 138 |
# CHECK: encoding: [0x62,0xec,0xfc,0x0c,0x01,0xc1] |
| 139 |
{nf} add r17, r16 |
| 140 |
|
| 141 |
## MRMDestRegCC |
| 142 |
|
| 143 |
# CHECK: cfcmovb r17, r16 |
| 144 |
# CHECK: encoding: [0x62,0xec,0xfc,0x0c,0x42,0xc1] |
| 145 |
cfcmovb r17, r16 |
| 146 |
|
| 147 |
## MRMSrcReg |
| 148 |
|
| 149 |
# CHECK: mulx r18, r17, r16 |
| 150 |
# CHECK: encoding: [0x62,0xea,0xf7,0x00,0xf6,0xd0] |
| 151 |
mulx r18, r17, r16 |
| 152 |
|
| 153 |
## MRMSrcRegCC |
| 154 |
|
| 155 |
# CHECK: cfcmovb r18, r17, r16 |
| 156 |
# CHECK: encoding: [0x62,0xec,0xec,0x14,0x42,0xc8] |
| 157 |
cfcmovb r18, r17, r16 |
| 158 |
|
| 159 |
## MRMSrcReg4VOp3 |
| 160 |
|
| 161 |
# CHECK: bzhi r27, r23, r19 |
| 162 |
# CHECK: encoding: [0x62,0x6a,0xe4,0x00,0xf5,0xdf] |
| 163 |
bzhi r27, r23, r19 |
| 164 |
|
| 165 |
## MRM0r |
| 166 |
|
| 167 |
# CHECK: add r17, r16, 127 |
| 168 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xc0,0x7f] |
| 169 |
add r17, r16, 127 |
| 170 |
|
| 171 |
## MRM1r |
| 172 |
|
| 173 |
# CHECK: or r17, r16, 127 |
| 174 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xc8,0x7f] |
| 175 |
or r17, r16, 127 |
| 176 |
|
| 177 |
## MRM2r |
| 178 |
|
| 179 |
# CHECK: adc r17, r16, 127 |
| 180 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xd0,0x7f] |
| 181 |
adc r17, r16, 127 |
| 182 |
|
| 183 |
## MRM3r |
| 184 |
|
| 185 |
# CHECK: sbb r17, r16, 127 |
| 186 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xd8,0x7f] |
| 187 |
sbb r17, r16, 127 |
| 188 |
|
| 189 |
## MRM4r |
| 190 |
|
| 191 |
# CHECK: and r17, r16, 127 |
| 192 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xe0,0x7f] |
| 193 |
and r17, r16, 127 |
| 194 |
|
| 195 |
## MRM5r |
| 196 |
|
| 197 |
# CHECK: sub r17, r16, 127 |
| 198 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xe8,0x7f] |
| 199 |
sub r17, r16, 127 |
| 200 |
|
| 201 |
## MRM6r |
| 202 |
|
| 203 |
# CHECK: xor r17, r16, 127 |
| 204 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0x83,0xf0,0x7f] |
| 205 |
xor r17, r16, 127 |
| 206 |
|
| 207 |
## MRM7r |
| 208 |
|
| 209 |
# CHECK: sar r17, r16, 123 |
| 210 |
# CHECK: encoding: [0x62,0xfc,0xf4,0x10,0xc1,0xf8,0x7b] |
| 211 |
sar r17, r16, 123 |
| 212 |
|
| 213 |
## MRMXrCC |
| 214 |
# CHECK: setzuo r16b |
| 215 |
# CHECK: encoding: [0x62,0xfc,0x7f,0x18,0x40,0xc0] |
| 216 |
setzuo r16b |
| 217 |
|
| 218 |
## MRMXmCC |
| 219 |
# CHECK: setzuo byte ptr [r16 + r17] |
| 220 |
# CHECK: encoding: [0x62,0xfc,0x7b,0x18,0x40,0x04,0x08] |
| 221 |
setzuo byte ptr [r16 + r17] |
| 222 |
|
| 223 |
## NoCD8 |
| 224 |
|
| 225 |
# CHECK: {nf} neg qword ptr [r16 + 123] |
| 226 |
# CHECK: encoding: [0x62,0xfc,0xfc,0x0c,0xf7,0x58,0x7b] |
| 227 |
{nf} neg qword ptr [r16 + 123] |
| 228 |
|
| 229 |
# CHECK: {evex} not qword ptr [r16 + 123] |
| 230 |
# CHECK: encoding: [0x62,0xfc,0xfc,0x08,0xf7,0x50,0x7b] |
| 231 |
{evex} not qword ptr [r16 + 123] |