1 # RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s 2 3 # Coverage 4 5 # CHECK: vcmptrue_usps 6 0xc5 0x04 0xc2 0xc7 0x1f 7 8 # CHECK: vcmptrue_uspd 9 0xc5 0x05 0xc2 0xc7 0x1f 10 11 # CHECK: vcmptrue_usss 12 0xc5 0x06 0xc2 0xc7 0x1f 13 14 # CHECK: vcmptrue_ussd 15 0xc5 0x07 0xc2 0xc7 0x1f 16 17 # CHECK: vcmpeq_uqps 18 0xc5 0x04 0xc2 0xc7 0x08 19 20 # CHECK: vcmpeq_uqpd 21 0xc5 0x05 0xc2 0xc7 0x08 22 23 # CHECK: vcmpeq_uqss 24 0xc5 0x06 0xc2 0xc7 0x08 25 26 # CHECK: vcmpeq_uqsd 27 0xc5 0x07 0xc2 0xc7 0x08 28 29 # CHECK: vcmpeqps 30 0xc5 0x04 0xc2 0xc7 0x00 31 32 # CHECK: vcmpeqpd 33 0xc5 0x05 0xc2 0xc7 0x00 34 35 # CHECK: vcmpeqss 36 0xc5 0x06 0xc2 0xc7 0x00 37 38 # CHECK: vcmpeqsd 39 0xc5 0x07 0xc2 0xc7 0x00 40 41 # CHECK: cmpeqps 42 0x0f 0xc2 0xc7 0x00 43 44 # CHECK: cmpeqpd 45 0x66 0x0f 0xc2 0xc7 0x00 46 47 # CHECK: cmpeqss 48 0xf3 0x0f 0xc2 0xc7 0x00 49 50 # CHECK: cmpeqsd 51 0xf2 0x0f 0xc2 0xc7 0x00 52 53 # CHECK: cmpordps 54 0x0f 0xc2 0xc7 0x07 55 56 # CHECK: cmpordpd 57 0x66 0x0f 0xc2 0xc7 0x07 58 59 # CHECK: cmpordss 60 0xf3 0x0f 0xc2 0xc7 0x07 61 62 # CHECK: cmpordsd 63 0xf2 0x0f 0xc2 0xc7 0x07 64 65 # CHECK: extrq $2, $3, %xmm0 66 0x66 0x0f 0x78 0xc0 0x03 0x02 67 68 # CHECK: extrq %xmm1, %xmm0 69 0x66 0x0f 0x79 0xc1 70 71 # CHECK: insertq $6, $5, %xmm1, %xmm0 72 0xf2 0x0f 0x78 0xc1 0x05 0x06 73 74 # CHECK: insertq %xmm1, %xmm0 75 0xf2 0x0f 0x79 0xc1 76 77 # CHECK: movntsd %xmm0, (%rdi) 78 0xf2 0x0f 0x2b 0x07 79 80 # CHECK: movntss %xmm0, (%rdi) 81 0xf3 0x0f 0x2b 0x07 82 83 # CHECK: adcxl %eax, %eax 84 0x66 0x0f 0x38 0xf6 0xc0 85 86 # CHECK: adcxl (%rax), %eax 87 0x66 0x0f 0x38 0xf6 0x00 88 89 # CHECK: adcxq %rax, %rax 90 0x66 0x48 0x0f 0x38 0xf6 0xc0 91 92 # CHECK: adcxq (%rax), %rax 93 0x66 0x48 0x0f 0x38 0xf6 0x00 94 95 # CHECK: adoxl %eax, %eax 96 0xf3 0x0f 0x38 0xf6 0xc0 97 98 # CHECK: adoxl (%rax), %eax 99 0xf3 0x0f 0x38 0xf6 0x00 100 101 # CHECK: adoxq %rax, %rax 102 0xf3 0x48 0x0f 0x38 0xf6 0xc0 103 104 # CHECK: adoxq (%rax), %rax 105 0xf3 0x48 0x0f 0x38 0xf6 0x00 106 107 # CHECK: xbegin 53 108 0xc7 0xf8 0x35 0x00 0x00 0x00 109 110 # CHECK: xbegin 53 111 0x66 0xc7 0xf8 0x35 0x00 112 113 # CHECK: xend 114 0x0f 0x01 0xd5 115 116 # CHECK: xabort $13 117 0xc6 0xf8 0x0d 118 119 # CHECK: xsave64 (%rax) 120 0x48 0x0f 0xae 0x20 121 122 # CHECK: xrstor64 (%rax) 123 0x48 0x0f 0xae 0x28 124 125 # CHECK: xsaveopt64 (%rax) 126 0x48 0x0f 0xae 0x30 127 128 # CHECK: clac 129 0x0f 0x01 0xca 130 131 # CHECK: stac 132 0x0f 0x01 0xcb 133 134 # CHECK: movabsb -6066930261531658096, %al 135 0xa0 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 136 137 # CHECK: movabsb -6066930261531658096, %al 138 0x48 0xa0 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 139 140 # CHECK: movabsw -6066930261531658096, %ax 141 0x66 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 142 143 # CHECK: movabsl -6066930261531658096, %eax 144 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 145 146 # CHECK: movabsq -6066930261531658096, %rax 147 0x48 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 148 149 # CHECK: movabsb %al, -6066930261531658096 150 0xa2 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 151 152 # CHECK: movabsb %al, -6066930261531658096 153 0x48 0xa2 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 154 155 # CHECK: movabsw %ax, -6066930261531658096 156 0x66 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 157 158 # CHECK: movabsl %eax, -6066930261531658096 159 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 160 161 # CHECK: movabsq %rax, -6066930261531658096 162 0x48 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab 163 164 # CHECK: sha1rnds4 $1, %xmm1, %xmm2 165 0x0f 0x3a 0xcc 0xd1 0x01 166 167 # CHECK: sha1rnds4 $1, (%rax), %xmm2 168 0x0f 0x3a 0xcc 0x10 0x01 169 170 # CHECK: sha1nexte %xmm1, %xmm2 171 0x0f 0x38 0xc8 0xd1 172 173 # CHECK: sha1nexte (%rax), %xmm2 174 0x0f 0x38 0xc8 0x10 175 176 # CHECK: sha1msg1 %xmm1, %xmm2 177 0x0f 0x38 0xc9 0xd1 178 179 # CHECK: sha1msg1 (%rax), %xmm2 180 0x0f 0x38 0xc9 0x10 181 182 # CHECK: sha1msg2 %xmm1, %xmm2 183 0x0f 0x38 0xca 0xd1 184 185 # CHECK: sha1msg2 (%rax), %xmm2 186 0x0f 0x38 0xca 0x10 187 188 # CHECK: sha256rnds2 (%rax), %xmm2 189 0x0f 0x38 0xcb 0x10 190 191 # CHECK: sha256rnds2 %xmm1, %xmm2 192 0x0f 0x38 0xcb 0xd1 193 194 # CHECK: sha256msg1 %xmm1, %xmm2 195 0x0f 0x38 0xcc 0xd1 196 197 # CHECK: sha256msg1 (%rax), %xmm2 198 0x0f 0x38 0xcc 0x10 199 200 # CHECK: sha256msg2 %xmm1, %xmm2 201 0x0f 0x38 0xcd 0xd1 202 203 # CHECK: sha256msg2 (%rax), %xmm2 204 0x0f 0x38 0xcd 0x10 205 206 # CHECK: incl %ecx 207 0xff 0xc1 208 209 # CHECK: decl %ecx 210 0xff 0xc9 211 212 # CHECK: incw %cx 213 0x66 0xff 0xc1 214 215 # CHECK: decw %cx 216 0x66 0xff 0xc9 217 218 # CHECK: incb %cl 219 0xfe 0xc1 220 221 # CHECK: decb %cl 222 0xfe 0xc9 223 224 # CHECK: incq %rcx 225 0x48 0xff 0xc1 226 227 # CHECK: decq %rcx 228 0x48 0xff 0xc9 229 230 # CHECK: movq %xmm0, %xmm0 231 0xf3 0x0f 0x7e 0xc0 232 233 # CHECK: vmovq %xmm0, %xmm0 234 0xc5 0xfa 0x7e 0xc0 235 236 # CHECK: vmovq %xmm0, %rax 237 0xc4 0xe1 0xf9 0x7e 0xc0 238 239 # CHECK: movd (%rax), %mm0 240 0x48 0x0f 0x6e 0x00 241 242 # CHECK: movd %rax, %mm0 243 0x48 0x0f 0x6e 0xc0 244 245 # CHECK: movd %mm0, (%rax) 246 0x48 0x0f 0x7e 0x00 247 248 # CHECK: movd %mm0, %rax 249 0x48 0x0f 0x7e 0xc0 250 251 # CHECK: movd (%rax), %xmm0 252 0x66 0x48 0x0f 0x6e 0x00 253 254 # CHECK: movd %rax, %xmm0 255 0x66 0x48 0x0f 0x6e 0xc0 256 257 # CHECK: movd %xmm0, (%rax) 258 0x66 0x48 0x0f 0x7e 0x00 259 260 # CHECK: movd %xmm0, %rax 261 0x66 0x48 0x0f 0x7e 0xc0 262 263 # CHECK: pextrw $3, %xmm3, %ecx 264 0x66 0x0f 0x3a 0x15 0xd9 0x03 265 266 # CHECK: pextrw $3, %xmm3, (%rax) 267 0x66 0x0f 0x3a 0x15 0x18 0x03 268 269 # CHECK: $0, 305419896(,%r8) 270 0x43 0x80 0x04 0x05 0x78 0x56 0x34 0x12 0x00 271 272 # CHECK: $0, 305419896(%r13,%r8) 273 0x43 0x80 0x84 0x05 0x78 0x56 0x34 0x12 0x00 274 275 # CHECK: $0, 305419896(,%r8) 276 0x42 0x80 0x04 0x05 0x78 0x56 0x34 0x12 0x00 277 278 # CHECK: $0, 305419896(%rbp,%r8) 279 0x42 0x80 0x84 0x05 0x78 0x56 0x34 0x12 0x00 280 281 # CHECK: $0, 305419896(,%r12) 282 0x42 0x80 0x04 0x25 0x78 0x56 0x34 0x12 0x00 283 284 # CHECK: $0, 305419896(%rbp,%r12) 285 0x42 0x80 0x84 0x25 0x78 0x56 0x34 0x12 0x00 286 287 # CHECK: $0, 305419896 288 0x80 0x04 0x25 0x78 0x56 0x34 0x12 0x00 289 290 # CHECK: $0, 305419896(%rbp) 291 0x80 0x84 0x25 0x78 0x56 0x34 0x12 0x00 292 293 # CHECK: movabsq 6510615555426900570, %rax 294 0x48 0xa1 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 295 296 # CHECK: movq 1515870810, %rax 297 0x67, 0x48 0xa1 0x5a 0x5a 0x5a 0x5a 298 299 # CHECK: movabsq %rax, 6510615555426900570 300 0x48 0xa3 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 301 302 # CHECK: movq %rax, 1515870810 303 0x67, 0x48 0xa3 0x5a 0x5a 0x5a 0x5a 304 305 # CHECK: callq -32769 306 0x66 0xe8 0xff 0x7f 0xff 0xff 307 308 # CHECK: callq -32769 309 0x66 0x66 0x48 0xe8 0xff 0x7f 0xff 0xff 310 311 # CHECK: jmp -32769 312 0xe9 0xff 0x7f 0xff 0xff 313 314 # CHECK: jmp -32769 315 0x66 0xe9 0xff 0x7f 0xff 0xff 316 317 # CHECK: jmp -32769 318 0x66 0x66 0x48 0xe9 0xff 0x7f 0xff 0xff 319 320 # CHECK: jb -32769 321 0x0f 0x82 0xff 0x7f 0xff 0xff 322 323 # CHECK: jb -32769 324 0x66 0x0f 0x82 0xff 0x7f 0xff 0xff 325 326 # CHECK: jae -32769 327 0x0f 0x83 0xff 0x7f 0xff 0xff 328 329 # CHECK: jae -32769 330 0x66 0x0f 0x83 0xff 0x7f 0xff 0xff 331 332 # CHECK: je -32769 333 0x0f 0x84 0xff 0x7f 0xff 0xff 334 335 # CHECK: je -32769 336 0x66 0x0f 0x84 0xff 0x7f 0xff 0xff 337 338 # CHECK: jne -32769 339 0x0f 0x85 0xff 0x7f 0xff 0xff 340 341 # CHECK: jne -32769 342 0x66 0x0f 0x85 0xff 0x7f 0xff 0xff 343 344 # CHECK: jbe -32769 345 0x0f 0x86 0xff 0x7f 0xff 0xff 346 347 # CHECK: jbe -32769 348 0x66 0x0f 0x86 0xff 0x7f 0xff 0xff 349 350 # CHECK: ja -32769 351 0x0f 0x87 0xff 0x7f 0xff 0xff 352 353 # CHECK: ja -32769 354 0x66 0x0f 0x87 0xff 0x7f 0xff 0xff 355 356 # CHECK: js -32769 357 0x0f 0x88 0xff 0x7f 0xff 0xff 358 359 # CHECK: js -32769 360 0x66 0x0f 0x88 0xff 0x7f 0xff 0xff 361 362 # CHECK: jns -32769 363 0x0f 0x89 0xff 0x7f 0xff 0xff 364 365 # CHECK: jns -32769 366 0x66 0x0f 0x89 0xff 0x7f 0xff 0xff 367 368 # CHECK: jp -32769 369 0x0f 0x8a 0xff 0x7f 0xff 0xff 370 371 # CHECK: jp -32769 372 0x66 0x0f 0x8a 0xff 0x7f 0xff 0xff 373 374 # CHECK: jnp -32769 375 0x0f 0x8b 0xff 0x7f 0xff 0xff 376 377 # CHECK: jnp -32769 378 0x66 0x0f 0x8b 0xff 0x7f 0xff 0xff 379 380 # CHECK: jl -32769 381 0x0f 0x8c 0xff 0x7f 0xff 0xff 382 383 # CHECK: jl -32769 384 0x66 0x0f 0x8c 0xff 0x7f 0xff 0xff 385 386 # CHECK: jge -32769 387 0x0f 0x8d 0xff 0x7f 0xff 0xff 388 389 # CHECK: jge -32769 390 0x66 0x0f 0x8d 0xff 0x7f 0xff 0xff 391 392 # CHECK: jle -32769 393 0x0f 0x8e 0xff 0x7f 0xff 0xff 394 395 # CHECK: jle -32769 396 0x66 0x0f 0x8e 0xff 0x7f 0xff 0xff 397 398 # CHECK: jg -32769 399 0x0f 0x8f 0xff 0x7f 0xff 0xff 400 401 # CHECK: jg -32769 402 0x66 0x0f 0x8f 0xff 0x7f 0xff 0xff 403 404 # CHECK: lcallw *-32769(%rip) 405 0x66 0xff 0x1d 0xff 0x7f 0xff 0xff 406 407 # CHECK: ljmpw *-32769(%rip) 408 0x66 0xff 0x2d 0xff 0x7f 0xff 0xff 409 410 # CHECK: psubsb (%rdx), %mm3 411 0x0f 0xe8 0x1a 412 413 # CHECK: psubsb (%rdx), %xmm3 414 0x66 0x0f 0xe8 0x1a 415 416 # CHECK: addq 255(%rip), %rbx 417 0x49, 0x03, 0x1d, 0xff, 0x00, 0x00, 0x00 418 419 # The following 4 encodings are equivalent, as confirmed by the 'xed64' 420 # decoder tool provided by Intel, which we assume to be canonical even 421 # if the real silicon does something different. If that should happen, 422 # then we'll all have disassembler bugs to repair. 423 424 # Try all combinations of EVEX.x and REX.b: 425 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15 426 0x62 0x11 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11 427 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15 428 0x62 0x31 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11 429 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15 430 0x62 0x51 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11 431 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15 432 0x62 0x71 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11 433 434 # Known bugs: these use a SIB byte. The index register is incorrectly 435 # printed as an xmm register. Indeed there are "gather" load instructions 436 # taking a vector of indices, but ONLY those instructions can do that. 437 # The CHECK lines test the current incorrect output; FIXME is desired. 438 # CHECK: vaddps (%r10,%xmm9), %zmm20, %zmm15 439 # FIXME: vaddps (%r10,%r9), %zmm20, %zmm15 440 0x62 0x11 0x5c 0x40 0x58 0x3c 0x0a 441 442 # CHECK: vaddps (%rdx,%xmm9), %zmm20, %zmm15 443 # FIXME: vaddps (%rdx,%r9), %zmm20, %zmm15 444 0x62 0x31 0x5c 0x40 0x58 0x3c 0x0a 445 446 # CHECK: vaddps (%r10,%xmm1), %zmm20, %zmm15 447 # FIXME: vaddps (%r10,%rcx), %zmm20, %zmm15 448 0x62 0x51 0x5c 0x40 0x58 0x3c 0x0a 449 450 # CHECK: vaddps (%rdx,%xmm1), %zmm20, %zmm15 451 # FIXME: vaddps (%rdx,%rcx), %zmm20, %zmm15 452 0x62 0x71 0x5c 0x40 0x58 0x3c 0x0a 453 454 # CHECK: callq 32767 455 0xe8 0xff 0x7f 0x00 0x00 456 457 # CHECK: callq -32769 458 0xe8 0xff 0x7f 0xff 0xff 459