1 # RUN: llvm-mc --disassemble %s -triple=i686-apple-darwin9 | FileCheck %s 2 3 # Coverage 4 5 # CHECK: pushl 6 0xff 0x34 0x24 7 8 # CHECK: popl 9 0x58 10 11 # CHECK: calll 12 0xff 0xd0 13 14 # CHECK: incl 15 0x40 16 17 # CHECK: leave 18 0xc9 19 20 # PR8873: some instructions not recognized in 32-bit mode 21 22 # CHECK: fld 23 0xdd 0x04 0x24 24 25 # CHECK: pshufb 26 0x0f 0x38 0x00 0xc0 27 28 # CHECK: crc32b %al, %eax 29 0xf2 0x0f 0x38 0xf0 0xc0 30 31 # CHECK: crc32w %ax, %eax 32 0x66 0xf2 0x0f 0x38 0xf1 0xc0 33 34 # CHECK: crc32l %eax, %eax 35 0xf2 0x0f 0x38 0xf1 0xc0 36 37 38 # CHECK: int $33 39 0xCD 0x21 40 41 # CHECK: int $33 42 0xCD 0x21 43 44 45 # CHECK: addb %al, (%eax) 46 0 0 47 48 # CHECK: calll -1234 49 0xe8 0x2e 0xfb 0xff 0xff 50 51 # CHECK: lfence 52 0x0f 0xae 0xe8 53 54 # CHECK: mfence 55 0x0f 0xae 0xf0 56 57 # CHECK: monitor 58 0x0f 0x01 0xc8 59 60 # CHECK: mwait 61 0x0f 0x01 0xc9 62 63 # CHECK: vmcall 64 0x0f 0x01 0xc1 65 66 # CHECK: vmlaunch 67 0x0f 0x01 0xc2 68 69 # CHECK: vmresume 70 0x0f 0x01 0xc3 71 72 # CHECK: vmxoff 73 0x0f 0x01 0xc4 74 75 # CHECK: swapgs 76 0x0f 0x01 0xf8 77 78 # CHECK: rdtscp 79 0x0f 0x01 0xf9 80 81 # CHECK: vmxon 82 0xf3 0x0f 0xc7 0x30 83 84 # CHECK: vmptrld 85 0x0f 0xc7 0x30 86 87 # CHECK: vmptrst 88 0x0f 0xc7 0x38 89 90 # CHECK: movl $0, -4(%ebp) 91 0xc7 0x45 0xfc 0x00 0x00 0x00 0x00 92 93 # CHECK: movl %cr0, %ecx 94 0x0f 0x20 0xc1 95 96 # CHECK: leal 4(%esp), %ecx 97 0x8d 0x4c 0x24 0x04 98 99 # CHECK: enter $1, $2 100 0xc8 0x01 0x00 0x02 101 102 # CHECK: movw $47416, -66(%ebp) 103 0x66 0xc7 0x45 0xbe 0x38 0xb9 104 105 # CHECK: vaddpd %ymm5, %ymm1, %ymm0 106 0xc4 0xc1 0x75 0x58 0xc5 107 108 # CHECK: vaddps %ymm3, %ymm1, %ymm0 109 0xc5 0xf4 0x58 0xc3 110 111 # CHECK: vandpd %ymm5, %ymm1, %ymm0 112 0xc4 0xc1 0x75 0x54 0xc5 113 114 # CHECK: vandps %ymm3, %ymm1, %ymm0 115 0xc5 0xf4 0x54 0xc3 116 117 # CHECK: vzeroall 118 0xc5 0xfc 0x77 119 120 # CHECK: vcvtps2pd %xmm0, %ymm0 121 0xc5 0xfc 0x5a 0xc0 122 123 # CHECK: vandps (%edx), %xmm1, %xmm7 124 0xc5 0xf0 0x54 0x3a 125 126 # CHECK: vcvtss2sil %xmm0, %eax 127 0xc5 0xfa 0x2d 0xc0 128 129 # CHECK: vcvtsd2si %xmm0, %eax 130 0xc5 0xfb 0x2d 0xc0 131 132 # CHECK: vcvtsd2si %xmm0, %eax 133 0xc4 0xe1 0x7b 0x2d 0xc0 134 135 # CHECK: vmaskmovpd %xmm0, %xmm1, (%eax) 136 0xc4 0xe2 0x71 0x2f 0x00 137 138 # CHECK: vmovapd %xmm0, %xmm2 139 0xc5 0xf9 0x28 0xd0 140 141 # Check these special case instructions that the immediate is not sign-extend. 142 # CHECK: blendps $129, %xmm2, %xmm1 143 0x66 0x0f 0x3a 0x0c 0xca 0x81 144 145 # CHECK: blendpd $129, %xmm2, %xmm1 146 0x66 0x0f 0x3a 0x0d 0xca 0x81 147 148 # CHECK: pblendw $129, %xmm2, %xmm1 149 0x66 0x0f 0x3a 0x0e 0xca 0x81 150 151 # CHECK: mpsadbw $129, %xmm2, %xmm1 152 0x66 0x0f 0x3a 0x42 0xca 0x81 153 154 # CHECK: dpps $129, %xmm2, %xmm1 155 0x66 0x0f 0x3a 0x40 0xca 0x81 156 157 # CHECK: dppd $129, %xmm2, %xmm1 158 0x66 0x0f 0x3a 0x41 0xca 0x81 159 160 # CHECK: insertps $129, %xmm2, %xmm1 161 0x66 0x0f 0x3a 0x21 0xca 0x81 162 163 # CHECK: vblendps $129, %ymm2, %ymm5, %ymm1 164 0xc4 0xe3 0x55 0x0c 0xca 0x81 165 166 # CHECK: vblendps $129, (%eax), %ymm5, %ymm1 167 0xc4 0xe3 0x55 0x0c 0x08 0x81 168 169 # CHECK: vblendpd $129, %ymm2, %ymm5, %ymm1 170 0xc4 0xe3 0x55 0x0d 0xca 0x81 171 172 # CHECK: vblendpd $129, (%eax), %ymm5, %ymm1 173 0xc4 0xe3 0x55 0x0d 0x08 0x81 174 175 # CHECK: vpblendw $129, %xmm2, %xmm5, %xmm1 176 0xc4 0xe3 0x51 0x0e 0xca 0x81 177 178 # CHECK: vmpsadbw $129, %xmm2, %xmm5, %xmm1 179 0xc4 0xe3 0x51 0x42 0xca 0x81 180 181 # CHECK: vdpps $129, %ymm2, %ymm5, %ymm1 182 0xc4 0xe3 0x55 0x40 0xca 0x81 183 184 # CHECK: vdpps $129, (%eax), %ymm5, %ymm1 185 0xc4 0xe3 0x55 0x40 0x08 0x81 186 187 # CHECK: vdppd $129, %xmm2, %xmm5, %xmm1 188 0xc4 0xe3 0x51 0x41 0xca 0x81 189 190 # CHECK: vinsertps $129, %xmm3, %xmm2, %xmm1 191 0xc4 0xe3 0x69 0x21 0xcb 0x81 192 193 # CHECK: pause 194 0xf3 0x90 195 196 # CHECK: addl %eax, %edi 197 0x01 0xc7 198 199 # CHECK: addl %edi, %eax 200 0x03 0xc7 201 202 # CHECK: movl %eax, %edi 203 0x89 0xc7 204 205 # CHECK: movl %edi, %eax 206 0x8b 0xc7 207 208 # CHECK: movups %xmm1, %xmm0 209 0x0f 0x10 0xc1 210 211 # CHECK: movups %xmm0, %xmm1 212 0x0f 0x11 0xc1 213 214 # CHECK: movaps %xmm1, %xmm0 215 0x0f 0x28 0xc1 216 217 # CHECK: movaps %xmm0, %xmm1 218 0x0f 0x29 0xc1 219 220 # CHECK: movupd %xmm1, %xmm0 221 0x66 0x0f 0x10 0xc1 222 223 # CHECK: movupd %xmm0, %xmm1 224 0x66 0x0f 0x11 0xc1 225 226 # CHECK: movapd %xmm1, %xmm0 227 0x66 0x0f 0x28 0xc1 228 229 # CHECK: movapd %xmm0, %xmm1 230 0x66 0x0f 0x29 0xc1 231 232 # CHECK: vmovups %xmm1, %xmm0 233 0xc5 0xf8 0x10 0xc1 234 235 # CHECK: vmovups %xmm0, %xmm1 236 0xc5 0xf8 0x11 0xc1 237 238 # CHECK: vmovaps %xmm1, %xmm0 239 0xc5 0xf8 0x28 0xc1 240 241 # CHECK: vmovaps %xmm0, %xmm1 242 0xc5 0xf8 0x29 0xc1 243 244 # CHECK: vmovupd %xmm1, %xmm0 245 0xc5 0xf9 0x10 0xc1 246 247 # CHECK: vmovupd %xmm0, %xmm1 248 0xc5 0xf9 0x11 0xc1 249 250 # CHECK: vmovapd %xmm1, %xmm0 251 0xc5 0xf9 0x28 0xc1 252 253 # CHECK: vmovapd %xmm0, %xmm1 254 0xc5 0xf9 0x29 0xc1 255 256 # CHECK: vmovups %ymm1, %ymm0 257 0xc5 0xfc 0x10 0xc1 258 259 # CHECK: vmovups %ymm0, %ymm1 260 0xc5 0xfc 0x11 0xc1 261 262 # CHECK: vmovaps %ymm1, %ymm0 263 0xc5 0xfc 0x28 0xc1 264 265 # CHECK: vmovaps %ymm0, %ymm1 266 0xc5 0xfc 0x29 0xc1 267 268 # CHECK: movdqa %xmm1, %xmm0 269 0x66 0x0f 0x6f 0xc1 270 271 # CHECK: movdqa %xmm0, %xmm1 272 0x66 0x0f 0x7f 0xc1 273 274 # CHECK: movdqu %xmm1, %xmm0 275 0xf3 0x0f 0x6f 0xc1 276 277 # CHECK: movdqu %xmm0, %xmm1 278 0xf3 0x0f 0x7f 0xc1 279 280 # CHECK: vmovdqa %xmm1, %xmm0 281 0xc5 0xf9 0x6f 0xc1 282 283 # CHECK: vmovdqa %xmm0, %xmm1 284 0xc5 0xf9 0x7f 0xc1 285 286 # CHECK: vmovdqa %ymm1, %ymm0 287 0xc5 0xfd 0x6f 0xc1 288 289 # CHECK: vmovdqa %ymm0, %ymm1 290 0xc5 0xfd 0x7f 0xc1 291 292 # CHECK: vmovdqu %xmm1, %xmm0 293 0xc5 0xfa 0x6f 0xc1 294 295 # CHECK: vmovdqu %xmm0, %xmm1 296 0xc5 0xfa 0x7f 0xc1 297 298 # CHECK: vmovdqu %ymm1, %ymm0 299 0xc5 0xfe 0x6f 0xc1 300 301 # CHECK: vmovdqu %ymm0, %ymm1 302 0xc5 0xfe 0x7f 0xc1 303 304 # CHECK: vblendvps %xmm4, %xmm1, %xmm2, %xmm3 305 0xc4 0xe3 0x69 0x4a 0xd9 0x41 306 307 # CHECK: vroundpd $0, %xmm0, %xmm0 308 0xc4 0xe3 0x79 0x09 0xc0 0x00 309 310 # CHECK: vroundps $0, %xmm0, %xmm0 311 0xc4 0xe3 0x79 0x08 0xc0 0x00 312 313 # CHECK: vroundpd $0, %ymm0, %ymm0 314 0xc4 0xe3 0x7d 0x09 0xc0 0x00 315 316 # CHECK: vroundps $0, %ymm0, %ymm0 317 0xc4 0xe3 0x7d 0x08 0xc0 0x00 318 319 # CHECK: vroundss $0, %xmm0, %xmm0, %xmm0 320 0xc4 0xe3 0x79 0x0a 0xc0 0x00 321 322 # CHECK: vroundsd $0, %xmm0, %xmm0, %xmm0 323 0xc4 0xe3 0x79 0x0b 0xc0 0x00 324 325 # CHECK: invept (%eax), %eax 326 0x66 0x0f 0x38 0x80 0x00 327 328 # CHECK: invvpid (%eax), %eax 329 0x66 0x0f 0x38 0x81 0x00 330 331 # CHECK: invpcid (%eax), %eax 332 0x66 0x0f 0x38 0x82 0x00 333 334 # CHECK: nop 335 0x90 336 337 # CHECK: addb $0, %al 338 0x04 0x00 339 340 # CHECK: addw $0, %ax 341 0x66 0x05 0x00 0x00 342 343 # CHECK: addl $0, %eax 344 0x05 0x00 0x00 0x00 0x00 345 346 # CHECK: adcb $0, %al 347 0x14 0x00 348 349 # CHECK: adcw $0, %ax 350 0x66 0x15 0x00 0x00 351 352 # CHECK: adcl $0, %eax 353 0x15 0x00 0x00 0x00 0x00 354 355 # CHECK: cmpb $0, %al 356 0x3c 0x00 357 358 # CHECK: cmpw $0, %ax 359 0x66 0x3d 0x00 0x00 360 361 # CHECK: cmpl $0, %eax 362 0x3d 0x00 0x00 0x00 0x00 363 364 # CHECK: testb $0, %al 365 0xa8 0x00 366 367 # CHECK: testw $0, %ax 368 0x66 0xa9 0x00 0x00 369 370 # CHECK: testl $0, %eax 371 0xa9 0x00 0x00 0x00 0x00 372 373 # CHECK: movb 0, %al 374 0xa0 0x00 0x00 0x00 0x00 375 376 # CHECK: movw 0, %ax 377 0x66 0xa1 0x00 0x00 0x00 0x00 378 379 # CHECK: movl 0, %eax 380 0xa1 0x00 0x00 0x00 0x00 381 382 # CHECK: movb %al, 0 383 0xa2 0x00 0x00 0x00 0x00 384 385 # CHECK: movw %ax, 0 386 0x66 0xa3 0x00 0x00 0x00 0x00 387 388 # CHECK: movl %eax, 0 389 0xa3 0x00 0x00 0x00 0x00 390 391 # CHECK: vaddps %xmm3, %xmm7, %xmm0 392 0xc4 0xe1 0x00 0x58 0xc3 393 394 # CHECK: movbel (%eax), %eax 395 0x0f 0x38 0xf0 0x00 396 397 # CHECK: movbel %eax, (%eax) 398 0x0f 0x38 0xf1 0x00 399 400 # CHECK: movbew (%eax), %ax 401 0x66 0x0f 0x38 0xf0 0x00 402 403 # CHECK: movbew %ax, (%eax) 404 0x66 0x0f 0x38 0xf1 0x00 405 406 # CHECK: rdrandw %ax 407 0x66 0x0f 0xc7 0xf0 408 409 # CHECK: rdrandl %eax 410 0x0f 0xc7 0xf0 411 412 # CHECK: vroundss $0, %xmm0, %xmm0, %xmm0 413 0xc4 0xe3 0x7d 0x0a 0xc0 0x00 414 415 # CHECK: vroundsd $0, %xmm0, %xmm0, %xmm0 416 0xc4 0xe3 0x7d 0x0b 0xc0 0x00 417 418 # CHECK: vcvtsd2si %xmm0, %eax 419 0xc4 0xe1 0x7f 0x2d 0xc0 420 421 # CHECK: vcvtsd2si %xmm0, %eax 422 0xc4 0xe1 0xff 0x2d 0xc0 423 424 # CHECK: vucomisd %xmm1, %xmm0 425 0xc5 0xfd 0x2e 0xc1 426 427 # CHECK: vucomiss %xmm1, %xmm0 428 0xc5 0xfc 0x2e 0xc1 429 430 # CHECK: vcomisd %xmm1, %xmm0 431 0xc5 0xfd 0x2f 0xc1 432 433 # CHECK: vcomiss %xmm1, %xmm0 434 0xc5 0xfc 0x2f 0xc1 435 436 # CHECK: vaddss %xmm1, %xmm0, %xmm0 437 0xc5 0xfe 0x58 0xc1 438 439 # CHECK: xsave (%eax) 440 0x0f 0xae 0x20 441 442 # CHECK: xrstor (%eax) 443 0x0f 0xae 0x28 444 445 # CHECK: xsaveopt (%eax) 446 0x0f 0xae 0x30 447 448 # CHECK: vcvtph2ps %xmm0, %xmm0 449 0xc4 0xe2 0x79 0x13 0xc0 450 451 # CHECK: vcvtph2ps (%eax), %xmm0 452 0xc4 0xe2 0x79 0x13 0x00 453 454 # CHECK: vcvtph2ps %xmm0, %ymm0 455 0xc4 0xe2 0x7d 0x13 0xc0 456 457 # CHECK: vcvtph2ps (%eax), %ymm0 458 0xc4 0xe2 0x7d 0x13 0x00 459 460 # CHECK: vcvtps2ph $0, %xmm0, %xmm0 461 0xc4 0xe3 0x79 0x1d 0xc0 0x00 462 463 # CHECK: vcvtps2ph $0, %xmm0, (%eax) 464 0xc4 0xe3 0x79 0x1d 0x00 0x00 465 466 # CHECK: vcvtps2ph $0, %ymm0, %xmm0 467 0xc4 0xe3 0x7d 0x1d 0xc0 0x00 468 469 # CHECK: vcvtps2ph $0, %ymm0, (%eax) 470 0xc4 0xe3 0x7d 0x1d 0x00 0x00 471 472 # CHECK: popcntl %eax, %eax 473 0xf3 0x0f 0xb8 0xc0 474 475 # CHECK: popcntw %ax, %ax 476 0x66 0xf3 0x0f 0xb8 0xc0 477 478 # CHECK: lzcntl %eax, %eax 479 0xf3 0x0f 0xbd 0xc0 480 481 # CHECK: lzcntw %ax, %ax 482 0x66 0xf3 0x0f 0xbd 0xc0 483 484 # CHECK: tzcntl %eax, %eax 485 0xf3 0x0f 0xbc 0xc0 486 487 # CHECK: tzcntw %ax, %ax 488 0x66 0xf3 0x0f 0xbc 0xc0 489 490 # CHECK: andnl %ecx, %edi, %eax 491 0xc4 0xe2 0x00 0xf2 0xc1 492 493 # CHECK: andnl (%eax), %edi, %eax 494 0xc4 0xe2 0x00 0xf2 0x00 495 496 # CHECK: andnl %ecx, %edi, %eax 497 0xc4 0xe2 0x80 0xf2 0xc1 498 499 # CHECK: andnl (%eax), %edi, %eax 500 0xc4 0xe2 0x80 0xf2 0x00 501 502 # CHECK: blsrl (%eax), %edi 503 0xc4 0xe2 0x40 0xf3 0x08 504 505 # CHECK: blsmskl (%eax), %edi 506 0xc4 0xe2 0x40 0xf3 0x10 507 508 # CHECK: blsil (%eax), %edi 509 0xc4 0xe2 0x40 0xf3 0x18 510 511 # CHECK: bextrl %esi, (%eax), %edx 512 0xc4 0xe2 0x08 0xf7 0x10 513 514 # CHECK: bextrl %esi, %ebx, %edx 515 0xc4 0xe2 0x08 0xf7 0xd3 516 517 # CHECK: bzhil %esi, (%eax), %edx 518 0xc4 0xe2 0x08 0xf5 0x10 519 520 # CHECK: bzhil %esi, %ebx, %edx 521 0xc4 0xe2 0x08 0xf5 0xd3 522 523 # CHECK: pextl %esp, %ecx, %edx 524 0xc4 0xe2 0x72 0xf5 0xd4 525 526 # CHECK: pextl (%eax), %ecx, %edx 527 0xc4 0xe2 0x72 0xf5 0x10 528 529 # CHECK: pdepl %esp, %ecx, %edx 530 0xc4 0xe2 0x73 0xf5 0xd4 531 532 # CHECK: pdepl (%eax), %ecx, %edx 533 0xc4 0xe2 0x73 0xf5 0x10 534