1# RUN: llvm-mc --disassemble %s -triple=i686-linux-gnu-code16 | FileCheck %s 2 3# CHECK: movl $305419896, %ebx 40x66 0xbb 0x78 0x56 0x34 0x12 5 6# CHECK: pause 70xf3 0x90 8 9# CHECK: sfence 100x0f 0xae 0xf8 11 12# CHECK: lfence 130x0f 0xae 0xe8 14 15# CHECK: mfence 160x0f 0xae 0xf0 17 18# CHECK: stgi 190x0f 0x01 0xdc 20 21# CHECK: clgi 220x0f 0x01 0xdd 23 24# CHECK: rdtscp 250x0f 0x01 0xf9 26 27# CHECK: movl %eax, 16(%ebp) 280x67 0x66 0x89 0x45 0x10 29 30# CHECK: movl %eax, -16(%ebp) 310x67 0x66 0x89 0x45 0xf0 32 33# CHECK: testb %cl, %bl 340x84 0xcb 35 36# CHECK: cmpl %eax, %ebx 370x66 0x39 0xc3 38 39# CHECK: addw %ax, %ax 400x01 0xc0 41 42# CHECK: shrl %eax 430x66 0xd1 0xe8 44 45# CHECK: shll %eax 460x66 0xd1 0xe0 47 48# CHECK: shll %eax 490x66 0xd1 0xe0 50 51# CHECK: movb 0, %al 520xa0 0x00 0x00 53 54# CHECK: movw 0, %ax 550xa1 0x00 0x00 56 57# CHECK: movl 0, %eax 580x66 0xa1 0x00 0x00 59 60# CHECK: into 610xce 62 63# CHECK: int3 640xcc 65 66# CHECK: int $4 670xcd 0x04 68 69# CHECK: int $127 700xcd 0x7f 71 72# CHECK: pushfw 730x9c 74 75# CHECK: pushfl 760x66 0x9c 77 78# CHECK: popfw 790x9d 80 81# CHECK: popfl 820x66 0x9d 83 84# CHECK: retl 850x66 0xc3 86 87# CHECK: cmoval %eax, %edx 880x66 0x0f 0x47 0xd0 89 90# CHECK: cmovael %eax, %edx 910x66 0x0f 0x43 0xd0 92 93# CHECK: cmovbel %eax, %edx 940x66 0x0f 0x46 0xd0 95 96# CHECK: cmovbl %eax, %edx 970x66 0x0f 0x42 0xd0 98 99# CHECK: cmovbw %bx, %bx 1000x0f 0x42 0xdb 101 102# CHECK: cmovbel %eax, %edx 1030x66 0x0f 0x46 0xd0 104 105# CHECK: cmovbl %eax, %edx 1060x66 0x0f 0x42 0xd0 107 108# CHECK: cmovel %eax, %edx 1090x66 0x0f 0x44 0xd0 110 111# CHECK: cmovgl %eax, %edx 1120x66 0x0f 0x4f 0xd0 113 114# CHECK: cmovgel %eax, %edx 1150x66 0x0f 0x4d 0xd0 116 117# CHECK: cmovll %eax, %edx 1180x66 0x0f 0x4c 0xd0 119 120# CHECK: cmovlel %eax, %edx 1210x66 0x0f 0x4e 0xd0 122 123# CHECK: cmovbel %eax, %edx 1240x66 0x0f 0x46 0xd0 125 126# CHECK: cmovnel %eax, %edx 1270x66 0x0f 0x45 0xd0 128 129# CHECK: cmovael %eax, %edx 1300x66 0x0f 0x43 0xd0 131 132# CHECK: cmoval %eax, %edx 1330x66 0x0f 0x47 0xd0 134 135# CHECK: cmovael %eax, %edx 1360x66 0x0f 0x43 0xd0 137 138# CHECK: cmovnel %eax, %edx 1390x66 0x0f 0x45 0xd0 140 141# CHECK: cmovlel %eax, %edx 1420x66 0x0f 0x4e 0xd0 143 144# CHECK: cmovgel %eax, %edx 1450x66 0x0f 0x4d 0xd0 146 147# CHECK: cmovnel %eax, %edx 1480x66 0x0f 0x45 0xd0 149 150# CHECK: cmovlel %eax, %edx 1510x66 0x0f 0x4e 0xd0 152 153# CHECK: cmovll %eax, %edx 1540x66 0x0f 0x4c 0xd0 155 156# CHECK: cmovgel %eax, %edx 1570x66 0x0f 0x4d 0xd0 158 159# CHECK: cmovgl %eax, %edx 1600x66 0x0f 0x4f 0xd0 161 162# CHECK: cmovnol %eax, %edx 1630x66 0x0f 0x41 0xd0 164 165# CHECK: cmovnpl %eax, %edx 1660x66 0x0f 0x4b 0xd0 167 168# CHECK: cmovnsl %eax, %edx 1690x66 0x0f 0x49 0xd0 170 171# CHECK: cmovnel %eax, %edx 1720x66 0x0f 0x45 0xd0 173 174# CHECK: cmovol %eax, %edx 1750x66 0x0f 0x40 0xd0 176 177# CHECK: cmovpl %eax, %edx 1780x66 0x0f 0x4a 0xd0 179 180# CHECK: cmovsl %eax, %edx 1810x66 0x0f 0x48 0xd0 182 183# CHECK: cmovel %eax, %edx 1840x66 0x0f 0x44 0xd0 185 186# CHECK: fmul %st(0) 1870xd8 0xc8 188 189# CHECK: fadd %st(0) 1900xd8 0xc0 191 192# CHECK: fsub %st(0) 1930xd8 0xe0 194 195# CHECK: fsubr %st(0) 1960xd8 0xe8 197 198# CHECK: fdivr %st(0) 1990xd8 0xf8 200 201# CHECK: fdiv %st(0) 2020xd8 0xf0 203 204# CHECK: movl %cs, %eax 2050x66 0x8c 0xc8 206 207# CHECK: movw %cs, %ax 2080x8c 0xc8 209 210# CHECK: movw %cs, (%eax) 2110x67 0x66 0x8c 0x08 212 213# CHECK: movw %cs, (%eax) 2140x67 0x8c 0x08 215 216# CHECK: movl %eax, %cs 2170x66 0x8e 0xc8 218 219# CHECK: movw (%eax), %cs 2200x67 0x66 0x8e 0x08 221 222# CHECK: movw (%eax), %cs 2230x67 0x8e 0x08 224 225# CHECKX: movl %cr0, %eax 2260x0f 0x20 0xc0 227 228# CHECKX: movl %cr1, %eax 2290x0f 0x20 0xc8 230 231# CHECKX: movl %cr2, %eax 2320x0f 0x20 0xd0 233 234# CHECKX: movl %cr3, %eax 2350x0f 0x20 0xd8 236 237# CHECKX: movl %cr4, %eax 2380x0f 0x20 0xe0 239 240# CHECKX: movl %dr0, %eax 2410x0f 0x21 0xc0 242 243# CHECKX: movl %dr1, %eax 2440x0f 0x21 0xc8 245 246# CHECKX: movl %dr1, %eax 2470x0f 0x21 0xc8 248 249# CHECKX: movl %dr2, %eax 2500x0f 0x21 0xd0 251 252# CHECKX: movl %dr3, %eax 2530x0f 0x21 0xd8 254 255# CHECKX: movl %dr4, %eax 2560x0f 0x21 0xe0 257 258# CHECKX: movl %dr5, %eax 2590x0f 0x21 0xe8 260 261# CHECKX: movl %dr6, %eax 2620x0f 0x21 0xf0 263 264# CHECKX: movl %dr7, %eax 2650x0f 0x21 0xf8 266 267# CHECK: wait 2680x9b 269 270# CHECK: movl %gs:124, %eax 2710x65 0x66 0x8b 0x06 0x7c 0x00 272 273# CHECK: pushaw 2740x60 275 276# CHECK: popaw 2770x61 278 279# CHECK: pushaw 2800x60 281 282# CHECK: popaw 2830x61 284 285# CHECK: pushal 2860x66 0x60 287 288# CHECK: popal 2890x66 0x61 290 291# CHECK: jmpw *8(%eax) 2920x67 0xff 0x60 0x08 293 294# CHECK: jmpl *8(%eax) 2950x67 0x66 0xff 0x60 0x08 296 297# CHECK: lcalll $2, $4660 2980x66 0x9a 0x34 0x12 0x00 0x00 0x02 0x00 299 300# CHECK: jcxz 3010xe3 0x00 302 303# CHECK: jecxz 3040x67 0xe3 0x00 305 306# CHECK: iretw 3070xcf 308 309# CHECK: iretw 3100xcf 311 312# CHECK: iretl 3130x66 0xcf 314 315# CHECK: sysretl 3160x0f 0x07 317 318# CHECK: sysretl 3190x0f 0x07 320 321# CHECK: testl %ecx, -24(%ebp) 3220x67 0x66 0x85 0x4d 0xe8 323 324# CHECK: testl %ecx, -24(%ebp) 3250x67 0x66 0x85 0x4d 0xe8 326 327# CHECK: pushw %cs 3280x0e 329 330# CHECK: pushw %ds 3310x1e 332 333# CHECK: pushw %ss 3340x16 335 336# CHECK: pushw %es 3370x06 338 339# CHECK: pushw %fs 3400x0f 0xa0 341 342# CHECK: pushw %gs 3430x0f 0xa8 344 345# CHECK: pushw %cs 3460x0e 347 348# CHECK: pushw %ds 3490x1e 350 351# CHECK: pushw %ss 3520x16 353 354# CHECK: pushw %es 3550x06 356 357# CHECK: pushw %fs 3580x0f 0xa0 359 360# CHECK: pushw %gs 3610x0f 0xa8 362 363# CHECK: pushl %cs 3640x66 0x0e 365 366# CHECK: pushl %ds 3670x66 0x1e 368 369# CHECK: pushl %ss 3700x66 0x16 371 372# CHECK: pushl %es 3730x66 0x06 374 375# CHECK: pushl %fs 3760x66 0x0f 0xa0 377 378# CHECK: pushl %gs 3790x66 0x0f 0xa8 380 381# CHECK: popw %ss 3820x17 383 384# CHECK: popw %ds 3850x1f 386 387# CHECK: popw %es 3880x07 389 390# CHECK: popl %ss 3910x66 0x17 392 393# CHECK: popl %ds 3940x66 0x1f 395 396# CHECK: popl %es 3970x66 0x07 398 399# CHECK: pushfl 4000x66 0x9c 401 402# CHECK: popfl 4030x66 0x9d 404 405# CHECK: pushfl 4060x66 0x9c 407 408# CHECK: popfl 4090x66 0x9d 410 411# CHECK: salc 4120xd6 413 414# CHECK: setb %bl 4150x0f 0x92 0xc3 416 417# CHECK: setb %bl 4180x0f 0x92 0xc3 419 420# CHECK: setae %bl 4210x0f 0x93 0xc3 422 423# CHECK: setae %bl 4240x0f 0x93 0xc3 425 426# CHECK: setbe %bl 4270x0f 0x96 0xc3 428 429# CHECK: seta %bl 4300x0f 0x97 0xc3 431 432# CHECK: setp %bl 4330x0f 0x9a 0xc3 434 435# CHECK: setnp %bl 4360x0f 0x9b 0xc3 437 438# CHECK: setl %bl 4390x0f 0x9c 0xc3 440 441# CHECK: setge %bl 4420x0f 0x9d 0xc3 443 444# CHECK: setle %bl 4450x0f 0x9e 0xc3 446 447# CHECK: setg %bl 4480x0f 0x9f 0xc3 449 450# CHECK: setne %cl 4510x0f 0x95 0xc1 452 453# CHECK: setb %bl 4540x0f 0x92 0xc3 455 456# CHECK: setb %bl 4570x0f 0x92 0xc3 458 459# CHECK: lcalll $31438, $31438 4600x66 0x9a 0xce 0x7a 0x00 0x00 0xce 0x7a 461 462# CHECK: lcalll $31438, $31438 4630x66 0x9a 0xce 0x7a 0x00 0x00 0xce 0x7a 464 465# CHECK: ljmpl $31438, $31438 4660x66 0xea 0xce 0x7a 0x00 0x00 0xce 0x7a 467 468# CHECK: ljmpl $31438, $31438 4690x66 0xea 0xce 0x7a 0x00 0x00 0xce 0x7a 470 471# CHECK: lcallw $31438, $31438 4720x9a 0xce 0x7a 0xce 0x7a 473 474# CHECK: lcallw $31438, $31438 4750x9a 0xce 0x7a 0xce 0x7a 476 477# CHECK: ljmpw $31438, $31438 4780xea 0xce 0x7a 0xce 0x7a 479 480# CHECK: ljmpw $31438, $31438 4810xea 0xce 0x7a 0xce 0x7a 482 483# CHECK: lcallw $31438, $31438 4840x9a 0xce 0x7a 0xce 0x7a 485 486# CHECK: lcallw $31438, $31438 4870x9a 0xce 0x7a 0xce 0x7a 488 489# CHECK: ljmpw $31438, $31438 4900xea 0xce 0x7a 0xce 0x7a 491 492# CHECK: ljmpw $31438, $31438 4930xea 0xce 0x7a 0xce 0x7a 494 495# CHECK: calll 4960x66 0xe8 0x00 0x00 0x00 0x00 497 498# CHECK: callw 4990xe8 0x00 0x00 500 501# CHECK: incb %al 5020xfe 0xc0 503 504# CHECK: incw %ax 5050x40 506 507# CHECK: incl %eax 5080x66 0x40 509 510# CHECK: decb %al 5110xfe 0xc8 512 513# CHECK: decw %ax 5140x48 515 516# CHECK: decl %eax 5170x66 0x48 518 519# CHECK: pshufw $14, %mm4, %mm0 5200x0f 0x70 0xc4 0x0e 521 522# CHECK: pshufw $90, %mm4, %mm0 5230x0f 0x70 0xc4 0x5a 524 525# CHECK: aaa 5260x37 527 528# CHECK: aad $1 5290xd5 0x01 530 531# CHECK: aad 5320xd5 0x0a 533 534# CHECK: aad 5350xd5 0x0a 536 537# CHECK: aam $2 5380xd4 0x02 539 540# CHECK: aam 5410xd4 0x0a 542 543# CHECK: aam 5440xd4 0x0a 545 546# CHECK: aas 5470x3f 548 549# CHECK: daa 5500x27 551 552# CHECK: das 5530x2f 554 555# CHECK: retw $31438 5560xc2 0xce 0x7a 557 558# CHECK: lretw $31438 5590xca 0xce 0x7a 560 561# CHECK: retw $31438 5620xc2 0xce 0x7a 563 564# CHECK: lretw $31438 5650xca 0xce 0x7a 566 567# CHECK: retl $31438 5680x66 0xc2 0xce 0x7a 569 570# CHECK: lretl $31438 5710x66 0xca 0xce 0x7a 572 573# CHECK: bound %bx, 2(%eax) 5740x67 0x62 0x58 0x02 575 576# CHECK: bound %ecx, 4(%ebx) 5770x67 0x66 0x62 0x4b 0x04 578 579# CHECK: arpl %bx, %bx 5800x63 0xdb 581 582# CHECK: arpl %bx, 6(%ecx) 5830x67 0x63 0x59 0x06 584 585# CHECK: lgdtw 4(%eax) 5860x67 0x0f 0x01 0x50 0x04 587 588# CHECK: lgdtw 4(%eax) 5890x67 0x0f 0x01 0x50 0x04 590 591# CHECK: lgdtl 4(%eax) 5920x67 0x66 0x0f 0x01 0x50 0x04 593 594# CHECK: lidtw 4(%eax) 5950x67 0x0f 0x01 0x58 0x04 596 597# CHECK: lidtw 4(%eax) 5980x67 0x0f 0x01 0x58 0x04 599 600# CHECK: lidtl 4(%eax) 6010x67 0x66 0x0f 0x01 0x58 0x04 602 603# CHECK: sgdtw 4(%eax) 6040x67 0x0f 0x01 0x40 0x04 605 606# CHECK: sgdtw 4(%eax) 6070x67 0x0f 0x01 0x40 0x04 608 609# CHECK: sgdtl 4(%eax) 6100x67 0x66 0x0f 0x01 0x40 0x04 611 612# CHECK: sidtw 4(%eax) 6130x67 0x0f 0x01 0x48 0x04 614 615# CHECK: sidtw 4(%eax) 6160x67 0x0f 0x01 0x48 0x04 617 618# CHECK: sidtl 4(%eax) 6190x67 0x66 0x0f 0x01 0x48 0x04 620 621# CHECK: fcompi %st(2) 6220xdf 0xf2 623 624# CHECK: fcompi %st(2) 6250xdf 0xf2 626 627# CHECK: fcompi %st(1) 6280xdf 0xf1 629 630# CHECK: fucompi %st(2) 6310xdf 0xea 632 633# CHECK: fucompi %st(2) 6340xdf 0xea 635 636# CHECK: fucompi %st(1) 6370xdf 0xe9 638 639# CHECK: fldcw 32493 6400xd9 0x2e 0xed 0x7e 641 642# CHECK: fldcw 32493 6430xd9 0x2e 0xed 0x7e 644 645# CHECK: fnstcw 32493 6460xd9 0x3e 0xed 0x7e 647 648# CHECK: fnstcw 32493 6490xd9 0x3e 0xed 0x7e 650 651# CHECK: wait 6520x9b 653 654# CHECK: fnstcw 32493 6550xd9 0x3e 0xed 0x7e 656 657# CHECK: wait 6580x9b 659 660# CHECK: fnstcw 32493 6610xd9 0x3e 0xed 0x7e 662 663# CHECK: fnstsw 32493 6640xdd 0x3e 0xed 0x7e 665 666# CHECK: fnstsw 32493 6670xdd 0x3e 0xed 0x7e 668 669# CHECK: wait 6700x9b 671 672# CHECK: fnstsw 32493 6730xdd 0x3e 0xed 0x7e 674 675# CHECK: wait 6760x9b 677 678# CHECK: fnstsw 32493 6790xdd 0x3e 0xed 0x7e 680 681# CHECK: verr 32493 6820x0f 0x00 0x26 0xed 0x7e 683 684# CHECK: verr 32493 6850x0f 0x00 0x26 0xed 0x7e 686 687# CHECK: wait 6880x9b 689 690# CHECK: fnclex 6910xdb 0xe2 692 693# CHECK: fnclex 6940xdb 0xe2 695 696# CHECK: ud2 6970x0f 0x0b 698 699# CHECK: ud2 7000x0f 0x0b 701 702# CHECK: ud2b 7030x0f 0xb9 704 705# CHECK: loope 7060xe1 0x00 707 708# CHECK: loopne 7090xe0 0x00 710 711# CHECK: outsb 7120x6e 713 714# CHECK: outsw 7150x6f 716 717# CHECK: outsl 7180x66 0x6f 719 720# CHECK: insb 7210x6c 722 723# CHECK: insw 7240x6d 725 726# CHECK: insl 7270x66 0x6d 728 729# CHECK: movsb 7300xa4 731 732# CHECK: movsw 7330xa5 734 735# CHECK: movsl 7360x66 0xa5 737 738# CHECK: lodsb 7390xac 740 741# CHECK: lodsw 7420xad 743 744# CHECK: lodsl 7450x66 0xad 746 747# CHECK: stosb 7480xaa 749 750# CHECK: stosw 7510xab 752 753# CHECK: stosl 7540x66 0xab 755 756# CHECK: strw %ax 7570x0f 0x00 0xc8 758 759# CHECK: strl %eax 7600x66 0x0f 0x00 0xc8 761 762# CHECK: fsubp %st(1) 7630xde 0xe1 764 765# CHECK: fsubp %st(2) 7660xde 0xe2 767 768# CHECKX: nop 7690x66 0x90 770 771# CHECKX: nop 7720x90 773 774# CHECK: xchgl %ecx, %eax 7750x66 0x91 776 777# CHECK: xchgl %ecx, %eax 7780x66 0x91 779 780# CHECK: retw 7810xc3 782 783# CHECK: retl 7840x66 0xc3 785 786# CHECK: lretw 7870xcb 788 789# CHECK: lretl 7900x66 0xcb 791 792# CHECK: callw -1 7930xe8 0xff 0xff 794 795# CHECK: wbnoinvd 7960xf3 0x0f 0x09 797 798# CHECK: umonitor %ax 7990xf3 0x0f 0xae 0xf0 800 801# CHECK: umonitor %eax 8020x67 0xf3 0x0f 0xae 0xf0 803 804#CHECK: movdir64b (%esi), %eax 8050x67 0x66 0x0f 0x38 0xf8 0x06 806 807#CHECK: movdir64b (%si), %ax 8080x66 0x0f 0x38 0xf8 0x04 809