1// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s 2 3 pause 4// CHECK: pause 5// CHECK: encoding: [0xf3,0x90] 6 sfence 7// CHECK: sfence 8// CHECK: encoding: [0x0f,0xae,0xf8] 9 lfence 10// CHECK: lfence 11// CHECK: encoding: [0x0f,0xae,0xe8] 12 mfence 13// CHECK: mfence 14// CHECK: encoding: [0x0f,0xae,0xf0] 15 monitor 16// CHECK: monitor 17// CHECK: encoding: [0x0f,0x01,0xc8] 18 monitor %eax, %ecx, %edx 19// CHECK: monitor 20// CHECK: encoding: [0x0f,0x01,0xc8] 21 mwait 22// CHECK: mwait 23// CHECK: encoding: [0x0f,0x01,0xc9] 24 mwait %eax, %ecx 25// CHECK: mwait 26// CHECK: encoding: [0x0f,0x01,0xc9] 27 28 vmcall 29// CHECK: vmcall 30// CHECK: encoding: [0x0f,0x01,0xc1] 31 vmfunc 32// CHECK: vmfunc 33// CHECK: encoding: [0x0f,0x01,0xd4] 34 vmlaunch 35// CHECK: vmlaunch 36// CHECK: encoding: [0x0f,0x01,0xc2] 37 vmresume 38// CHECK: vmresume 39// CHECK: encoding: [0x0f,0x01,0xc3] 40 vmxoff 41// CHECK: vmxoff 42// CHECK: encoding: [0x0f,0x01,0xc4] 43 swapgs 44// CHECK: swapgs 45// CHECK: encoding: [0x0f,0x01,0xf8] 46 47 vmrun %eax 48// CHECK: vmrun %eax 49// CHECK: encoding: [0x0f,0x01,0xd8] 50 vmmcall 51// CHECK: vmmcall 52// CHECK: encoding: [0x0f,0x01,0xd9] 53 vmload %eax 54// CHECK: vmload %eax 55// CHECK: encoding: [0x0f,0x01,0xda] 56 vmsave %eax 57// CHECK: vmsave %eax 58// CHECK: encoding: [0x0f,0x01,0xdb] 59 stgi 60// CHECK: stgi 61// CHECK: encoding: [0x0f,0x01,0xdc] 62 clgi 63// CHECK: clgi 64// CHECK: encoding: [0x0f,0x01,0xdd] 65 skinit %eax 66// CHECK: skinit %eax 67// CHECK: encoding: [0x0f,0x01,0xde] 68 invlpga %ecx, %eax 69// CHECK: invlpga %ecx, %eax 70// CHECK: encoding: [0x0f,0x01,0xdf] 71 72 rdtscp 73// CHECK: rdtscp 74// CHECK: encoding: [0x0f,0x01,0xf9] 75 76 77// CHECK: movl %eax, 16(%ebp) # encoding: [0x89,0x45,0x10] 78 movl %eax, 16(%ebp) 79// CHECK: movl %eax, -16(%ebp) # encoding: [0x89,0x45,0xf0] 80 movl %eax, -16(%ebp) 81 82// CHECK: testb %bl, %cl # encoding: [0x84,0xd9] 83 testb %bl, %cl 84 85// CHECK: cmpl %eax, %ebx # encoding: [0x39,0xc3] 86 cmpl %eax, %ebx 87 88// CHECK: addw %ax, %ax # encoding: [0x66,0x01,0xc0] 89 addw %ax, %ax 90 91// CHECK: shrl %eax # encoding: [0xd1,0xe8] 92 shrl $1, %eax 93 94// CHECK: shll %eax # encoding: [0xd1,0xe0] 95 sall $1, %eax 96// CHECK: shll %eax # encoding: [0xd1,0xe0] 97 sal $1, %eax 98 99// moffset forms of moves, rdar://7947184 100movb 0, %al // CHECK: movb 0, %al # encoding: [0xa0,0x00,0x00,0x00,0x00] 101movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0xa1,0x00,0x00,0x00,0x00] 102movl 0, %eax // CHECK: movl 0, %eax # encoding: [0xa1,0x00,0x00,0x00,0x00] 103 104// rdar://7973775 105into 106// CHECK: into 107// CHECK: encoding: [0xce] 108int3 109// CHECK: int3 110// CHECK: encoding: [0xcc] 111int $4 112// CHECK: int $4 113// CHECK: encoding: [0xcd,0x04] 114int $255 115// CHECK: int $255 116// CHECK: encoding: [0xcd,0xff] 117 118// CHECK: pushfl # encoding: [0x9c] 119 pushf 120// CHECK: pushfl # encoding: [0x9c] 121 pushfl 122// CHECK: popfl # encoding: [0x9d] 123 popf 124// CHECK: popfl # encoding: [0x9d] 125 popfl 126 127// rdar://8014869 128retl 129// CHECK: ret 130// CHECK: encoding: [0xc3] 131 132// rdar://7973854 133// CHECK: cmoval %eax, %edx 134// CHECK: encoding: [0x0f,0x47,0xd0] 135 cmoval %eax,%edx 136 137// CHECK: cmovael %eax, %edx 138// CHECK: encoding: [0x0f,0x43,0xd0] 139 cmovael %eax,%edx 140 141// CHECK: cmovbel %eax, %edx 142// CHECK: encoding: [0x0f,0x46,0xd0] 143 cmovbel %eax,%edx 144 145// CHECK: cmovbl %eax, %edx 146// CHECK: encoding: [0x0f,0x42,0xd0] 147 cmovbl %eax,%edx 148 149// CHECK: cmovbw %bx, %bx 150cmovnae %bx,%bx 151 152 153// CHECK: cmovbel %eax, %edx 154// CHECK: encoding: [0x0f,0x46,0xd0] 155 cmovbel %eax,%edx 156 157// CHECK: cmovbl %eax, %edx 158// CHECK: encoding: [0x0f,0x42,0xd0] 159 cmovcl %eax,%edx 160 161// CHECK: cmovel %eax, %edx 162// CHECK: encoding: [0x0f,0x44,0xd0] 163 cmovel %eax,%edx 164 165// CHECK: cmovgl %eax, %edx 166// CHECK: encoding: [0x0f,0x4f,0xd0] 167 cmovgl %eax,%edx 168 169// CHECK: cmovgel %eax, %edx 170// CHECK: encoding: [0x0f,0x4d,0xd0] 171 cmovgel %eax,%edx 172 173// CHECK: cmovll %eax, %edx 174// CHECK: encoding: [0x0f,0x4c,0xd0] 175 cmovll %eax,%edx 176 177// CHECK: cmovlel %eax, %edx 178// CHECK: encoding: [0x0f,0x4e,0xd0] 179 cmovlel %eax,%edx 180 181// CHECK: cmovbel %eax, %edx 182// CHECK: encoding: [0x0f,0x46,0xd0] 183 cmovnal %eax,%edx 184 185// CHECK: cmovnel %eax, %edx 186// CHECK: encoding: [0x0f,0x45,0xd0] 187 cmovnel %eax,%edx 188 189// CHECK: cmovael %eax, %edx 190// CHECK: encoding: [0x0f,0x43,0xd0] 191 cmovnbl %eax,%edx 192 193// CHECK: cmoval %eax, %edx 194// CHECK: encoding: [0x0f,0x47,0xd0] 195 cmovnbel %eax,%edx 196 197// CHECK: cmovael %eax, %edx 198// CHECK: encoding: [0x0f,0x43,0xd0] 199 cmovncl %eax,%edx 200 201// CHECK: cmovnel %eax, %edx 202// CHECK: encoding: [0x0f,0x45,0xd0] 203 cmovnel %eax,%edx 204 205// CHECK: cmovlel %eax, %edx 206// CHECK: encoding: [0x0f,0x4e,0xd0] 207 cmovngl %eax,%edx 208 209// CHECK: cmovgel %eax, %edx 210// CHECK: encoding: [0x0f,0x4d,0xd0] 211 cmovnl %eax,%edx 212 213// CHECK: cmovnel %eax, %edx 214// CHECK: encoding: [0x0f,0x45,0xd0] 215 cmovnel %eax,%edx 216 217// CHECK: cmovlel %eax, %edx 218// CHECK: encoding: [0x0f,0x4e,0xd0] 219 cmovngl %eax,%edx 220 221// CHECK: cmovll %eax, %edx 222// CHECK: encoding: [0x0f,0x4c,0xd0] 223 cmovngel %eax,%edx 224 225// CHECK: cmovgel %eax, %edx 226// CHECK: encoding: [0x0f,0x4d,0xd0] 227 cmovnll %eax,%edx 228 229// CHECK: cmovgl %eax, %edx 230// CHECK: encoding: [0x0f,0x4f,0xd0] 231 cmovnlel %eax,%edx 232 233// CHECK: cmovnol %eax, %edx 234// CHECK: encoding: [0x0f,0x41,0xd0] 235 cmovnol %eax,%edx 236 237// CHECK: cmovnpl %eax, %edx 238// CHECK: encoding: [0x0f,0x4b,0xd0] 239 cmovnpl %eax,%edx 240 241// CHECK: cmovnsl %eax, %edx 242// CHECK: encoding: [0x0f,0x49,0xd0] 243 cmovnsl %eax,%edx 244 245// CHECK: cmovnel %eax, %edx 246// CHECK: encoding: [0x0f,0x45,0xd0] 247 cmovnzl %eax,%edx 248 249// CHECK: cmovol %eax, %edx 250// CHECK: encoding: [0x0f,0x40,0xd0] 251 cmovol %eax,%edx 252 253// CHECK: cmovpl %eax, %edx 254// CHECK: encoding: [0x0f,0x4a,0xd0] 255 cmovpl %eax,%edx 256 257// CHECK: cmovsl %eax, %edx 258// CHECK: encoding: [0x0f,0x48,0xd0] 259 cmovsl %eax,%edx 260 261// CHECK: cmovel %eax, %edx 262// CHECK: encoding: [0x0f,0x44,0xd0] 263 cmovzl %eax,%edx 264 265// CHECK: cmpps $0, %xmm0, %xmm1 266// CHECK: encoding: [0x0f,0xc2,0xc8,0x00] 267 cmpps $0, %xmm0, %xmm1 268// CHECK: cmpps $0, (%eax), %xmm1 269// CHECK: encoding: [0x0f,0xc2,0x08,0x00] 270 cmpps $0, 0(%eax), %xmm1 271// CHECK: cmppd $0, %xmm0, %xmm1 272// CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x00] 273 cmppd $0, %xmm0, %xmm1 274// CHECK: cmppd $0, (%eax), %xmm1 275// CHECK: encoding: [0x66,0x0f,0xc2,0x08,0x00] 276 cmppd $0, 0(%eax), %xmm1 277// CHECK: cmpss $0, %xmm0, %xmm1 278// CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x00] 279 cmpss $0, %xmm0, %xmm1 280// CHECK: cmpss $0, (%eax), %xmm1 281// CHECK: encoding: [0xf3,0x0f,0xc2,0x08,0x00] 282 cmpss $0, 0(%eax), %xmm1 283// CHECK: cmpsd $0, %xmm0, %xmm1 284// CHECK: encoding: [0xf2,0x0f,0xc2,0xc8,0x00] 285 cmpsd $0, %xmm0, %xmm1 286// CHECK: cmpsd $0, (%eax), %xmm1 287// CHECK: encoding: [0xf2,0x0f,0xc2,0x08,0x00] 288 cmpsd $0, 0(%eax), %xmm1 289 290// Check matching of instructions which embed the SSE comparison code. 291 292// CHECK: cmpeqps %xmm0, %xmm1 293// CHECK: encoding: [0x0f,0xc2,0xc8,0x00] 294 cmpeqps %xmm0, %xmm1 295 296// CHECK: cmpltpd %xmm0, %xmm1 297// CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x01] 298 cmpltpd %xmm0, %xmm1 299 300// CHECK: cmpless %xmm0, %xmm1 301// CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x02] 302 cmpless %xmm0, %xmm1 303 304// CHECK: cmpunordpd %xmm0, %xmm1 305// CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x03] 306 cmpunordpd %xmm0, %xmm1 307 308// CHECK: cmpneqps %xmm0, %xmm1 309// CHECK: encoding: [0x0f,0xc2,0xc8,0x04] 310 cmpneqps %xmm0, %xmm1 311 312// CHECK: cmpnltpd %xmm0, %xmm1 313// CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x05] 314 cmpnltpd %xmm0, %xmm1 315 316// CHECK: cmpnless %xmm0, %xmm1 317// CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x06] 318 cmpnless %xmm0, %xmm1 319 320// CHECK: cmpordsd %xmm0, %xmm1 321// CHECK: encoding: [0xf2,0x0f,0xc2,0xc8,0x07] 322 cmpordsd %xmm0, %xmm1 323 324// rdar://7995856 325// CHECK: fmul %st(0) 326// CHECK: encoding: [0xd8,0xc8] 327 fmul %st(0), %st 328 329// CHECK: fadd %st(0) 330// CHECK: encoding: [0xd8,0xc0] 331 fadd %st(0), %st 332 333// CHECK: fsub %st(0) 334// CHECK: encoding: [0xd8,0xe0] 335 fsub %st(0), %st 336 337// CHECK: fsubr %st(0) 338// CHECK: encoding: [0xd8,0xe8] 339 fsubr %st(0), %st 340 341// CHECK: fdivr %st(0) 342// CHECK: encoding: [0xd8,0xf8] 343 fdivr %st(0), %st 344 345// CHECK: fdiv %st(0) 346// CHECK: encoding: [0xd8,0xf0] 347 fdiv %st(0), %st 348 349// radr://8017519 350// CHECK: movl %cs, %eax 351// CHECK: encoding: [0x8c,0xc8] 352 movl %cs, %eax 353 354// CHECK: movw %cs, %ax 355// CHECK: encoding: [0x66,0x8c,0xc8] 356 movw %cs, %ax 357 358// CHECK: movl %cs, (%eax) 359// CHECK: encoding: [0x8c,0x08] 360 movl %cs, (%eax) 361 362// CHECK: movw %cs, (%eax) 363// CHECK: encoding: [0x66,0x8c,0x08] 364 movw %cs, (%eax) 365 366// CHECK: movl %eax, %cs 367// CHECK: encoding: [0x8e,0xc8] 368 movl %eax, %cs 369 370// CHECK: movl (%eax), %cs 371// CHECK: encoding: [0x8e,0x08] 372 movl (%eax), %cs 373 374// CHECK: movw (%eax), %cs 375// CHECK: encoding: [0x66,0x8e,0x08] 376 movw (%eax), %cs 377 378// radr://8033374 379// CHECK: movl %cr0, %eax 380// CHECK: encoding: [0x0f,0x20,0xc0] 381 movl %cr0,%eax 382 383// CHECK: movl %cr1, %eax 384// CHECK: encoding: [0x0f,0x20,0xc8] 385 movl %cr1,%eax 386 387// CHECK: movl %cr2, %eax 388// CHECK: encoding: [0x0f,0x20,0xd0] 389 movl %cr2,%eax 390 391// CHECK: movl %cr3, %eax 392// CHECK: encoding: [0x0f,0x20,0xd8] 393 movl %cr3,%eax 394 395// CHECK: movl %cr4, %eax 396// CHECK: encoding: [0x0f,0x20,0xe0] 397 movl %cr4,%eax 398 399// CHECK: movl %dr0, %eax 400// CHECK: encoding: [0x0f,0x21,0xc0] 401 movl %dr0,%eax 402 403// CHECK: movl %dr1, %eax 404// CHECK: encoding: [0x0f,0x21,0xc8] 405 movl %dr1,%eax 406 407// CHECK: movl %dr1, %eax 408// CHECK: encoding: [0x0f,0x21,0xc8] 409 movl %dr1,%eax 410 411// CHECK: movl %dr2, %eax 412// CHECK: encoding: [0x0f,0x21,0xd0] 413 movl %dr2,%eax 414 415// CHECK: movl %dr3, %eax 416// CHECK: encoding: [0x0f,0x21,0xd8] 417 movl %dr3,%eax 418 419// CHECK: movl %dr4, %eax 420// CHECK: encoding: [0x0f,0x21,0xe0] 421 movl %dr4,%eax 422 423// CHECK: movl %dr5, %eax 424// CHECK: encoding: [0x0f,0x21,0xe8] 425 movl %dr5,%eax 426 427// CHECK: movl %dr6, %eax 428// CHECK: encoding: [0x0f,0x21,0xf0] 429 movl %dr6,%eax 430 431// CHECK: movl %dr7, %eax 432// CHECK: encoding: [0x0f,0x21,0xf8] 433 movl %dr7,%eax 434 435// radr://8017522 436// CHECK: wait 437// CHECK: encoding: [0x9b] 438 fwait 439 440// rdar://7873482 441// CHECK: [0x65,0xa1,0x7c,0x00,0x00,0x00] 442 movl %gs:124, %eax 443 444// CHECK: [0x65,0xa3,0x7c,0x00,0x00,0x00] 445 movl %eax, %gs:124 446 447// CHECK: pushal 448// CHECK: encoding: [0x60] 449 pusha 450 451// CHECK: popal 452// CHECK: encoding: [0x61] 453 popa 454 455// CHECK: pushaw 456// CHECK: encoding: [0x66,0x60] 457 pushaw 458 459// CHECK: popaw 460// CHECK: encoding: [0x66,0x61] 461 popaw 462 463// CHECK: pushal 464// CHECK: encoding: [0x60] 465 pushal 466 467// CHECK: popal 468// CHECK: encoding: [0x61] 469 popal 470 471// CHECK: jmpl *8(%eax) 472// CHECK: encoding: [0xff,0x60,0x08] 473 jmp *8(%eax) 474 475// PR7465 476// CHECK: lcalll $2, $4660 477// CHECK: encoding: [0x9a,0x34,0x12,0x00,0x00,0x02,0x00] 478lcalll $0x2, $0x1234 479 480 481// rdar://8061602 482L1: 483 jcxz L1 484// CHECK: jcxz L1 485// CHECK: encoding: [0x67,0xe3,A] 486 jecxz L1 487// CHECK: jecxz L1 488// CHECK: encoding: [0xe3,A] 489 490// rdar://8403974 491iret 492// CHECK: iretl 493// CHECK: encoding: [0xcf] 494iretw 495// CHECK: iretw 496// CHECK: encoding: [0x66,0xcf] 497iretl 498// CHECK: iretl 499// CHECK: encoding: [0xcf] 500 501// rdar://8403907 502sysret 503// CHECK: sysretl 504// CHECK: encoding: [0x0f,0x07] 505sysretl 506// CHECK: sysretl 507// CHECK: encoding: [0x0f,0x07] 508 509// rdar://8018260 510testl %ecx, -24(%ebp) 511// CHECK: testl -24(%ebp), %ecx 512testl -24(%ebp), %ecx 513// CHECK: testl -24(%ebp), %ecx 514 515 516// rdar://8407242 517push %cs 518// CHECK: pushl %cs 519// CHECK: encoding: [0x0e] 520push %ds 521// CHECK: pushl %ds 522// CHECK: encoding: [0x1e] 523push %ss 524// CHECK: pushl %ss 525// CHECK: encoding: [0x16] 526push %es 527// CHECK: pushl %es 528// CHECK: encoding: [0x06] 529push %fs 530// CHECK: pushl %fs 531// CHECK: encoding: [0x0f,0xa0] 532push %gs 533// CHECK: pushl %gs 534// CHECK: encoding: [0x0f,0xa8] 535 536pushw %cs 537// CHECK: pushw %cs 538// CHECK: encoding: [0x66,0x0e] 539pushw %ds 540// CHECK: pushw %ds 541// CHECK: encoding: [0x66,0x1e] 542pushw %ss 543// CHECK: pushw %ss 544// CHECK: encoding: [0x66,0x16] 545pushw %es 546// CHECK: pushw %es 547// CHECK: encoding: [0x66,0x06] 548pushw %fs 549// CHECK: pushw %fs 550// CHECK: encoding: [0x66,0x0f,0xa0] 551pushw %gs 552// CHECK: pushw %gs 553// CHECK: encoding: [0x66,0x0f,0xa8] 554 555pop %ss 556// CHECK: popl %ss 557// CHECK: encoding: [0x17] 558pop %ds 559// CHECK: popl %ds 560// CHECK: encoding: [0x1f] 561pop %es 562// CHECK: popl %es 563// CHECK: encoding: [0x07] 564 565// rdar://8408129 566pushfd 567// CHECK: pushfl 568popfd 569// CHECK: popfl 570pushfl 571// CHECK: pushfl 572popfl 573// CHECK: popfl 574 575 576// rdar://8416805 577 setc %bl 578 setnae %bl 579 setnb %bl 580 setnc %bl 581 setna %bl 582 setnbe %bl 583 setpe %bl 584 setpo %bl 585 setnge %bl 586 setnl %bl 587 setng %bl 588 setnle %bl 589 590// PR8686 591 setneb %cl // CHECK: setne %cl 592 setcb %bl // CHECK: setb %bl 593 setnaeb %bl // CHECK: setb %bl 594 595 596// PR8114 597 598out %al, (%dx) 599// CHECK: outb %al, %dx 600outb %al, (%dx) 601// CHECK: outb %al, %dx 602out %ax, (%dx) 603// CHECK: outw %ax, %dx 604outw %ax, (%dx) 605// CHECK: outw %ax, %dx 606out %eax, (%dx) 607// CHECK: outl %eax, %dx 608outl %eax, (%dx) 609// CHECK: outl %eax, %dx 610 611 612in (%dx), %al 613// CHECK: inb %dx, %al 614inb (%dx), %al 615// CHECK: inb %dx, %al 616in (%dx), %ax 617// CHECK: inw %dx, %ax 618inw (%dx), %ax 619// CHECK: inw %dx, %ax 620in (%dx), %eax 621// CHECK: inl %dx, %eax 622inl (%dx), %eax 623// CHECK: inl %dx, %eax 624 625//PR15455 626 627outs (%esi), (%dx) 628// CHECK: outsw (%esi), %dx 629outsb (%esi), (%dx) 630// CHECK: outsb (%esi), %dx 631outsw (%esi), (%dx) 632// CHECK: outsw (%esi), %dx 633outsl (%esi), (%dx) 634// CHECK: outsl (%esi), %dx 635 636ins (%dx), %es:(%edi) 637// CHECK: insw %dx, %es:(%edi) 638insb (%dx), %es:(%edi) 639// CHECK: insb %dx, %es:(%edi) 640insw (%dx), %es:(%edi) 641// CHECK: insw %dx, %es:(%edi) 642insl (%dx), %es:(%edi) 643// CHECK: insl %dx, %es:(%edi) 644 645// CHECK: lcalll $31438, $31438 646// CHECK: lcalll $31438, $31438 647// CHECK: ljmpl $31438, $31438 648// CHECK: ljmpl $31438, $31438 649 650calll $0x7ace,$0x7ace 651lcalll $0x7ace,$0x7ace 652jmpl $0x7ace,$0x7ace 653ljmpl $0x7ace,$0x7ace 654 655// CHECK: lcallw $31438, $31438 656// CHECK: lcallw $31438, $31438 657// CHECK: ljmpw $31438, $31438 658// CHECK: ljmpw $31438, $31438 659 660callw $0x7ace,$0x7ace 661lcallw $0x7ace,$0x7ace 662jmpw $0x7ace,$0x7ace 663ljmpw $0x7ace,$0x7ace 664 665// CHECK: lcalll $31438, $31438 666// CHECK: lcalll $31438, $31438 667// CHECK: ljmpl $31438, $31438 668// CHECK: ljmpl $31438, $31438 669 670call $0x7ace,$0x7ace 671lcall $0x7ace,$0x7ace 672jmp $0x7ace,$0x7ace 673ljmp $0x7ace,$0x7ace 674 675// rdar://8456370 676// CHECK: calll a 677 calll a 678 679// CHECK: incb %al # encoding: [0xfe,0xc0] 680 incb %al 681 682// CHECK: incw %ax # encoding: [0x66,0x40] 683 incw %ax 684 685// CHECK: incl %eax # encoding: [0x40] 686 incl %eax 687 688// CHECK: decb %al # encoding: [0xfe,0xc8] 689 decb %al 690 691// CHECK: decw %ax # encoding: [0x66,0x48] 692 decw %ax 693 694// CHECK: decl %eax # encoding: [0x48] 695 decl %eax 696 697// CHECK: pshufw $14, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x0e] 698pshufw $14, %mm4, %mm0 699 700// CHECK: pshufw $90, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x5a] 701// PR8288 702pshufw $90, %mm4, %mm0 703 704// rdar://8416805 705// CHECK: aaa 706// CHECK: encoding: [0x37] 707 aaa 708 709// CHECK: aad $1 710// CHECK: encoding: [0xd5,0x01] 711 aad $1 712 713// CHECK: aad 714// CHECK: encoding: [0xd5,0x0a] 715 aad $0xA 716 717// CHECK: aad 718// CHECK: encoding: [0xd5,0x0a] 719 aad 720 721// CHECK: aam $2 722// CHECK: encoding: [0xd4,0x02] 723 aam $2 724 725// CHECK: aam 726// CHECK: encoding: [0xd4,0x0a] 727 aam $0xA 728 729// CHECK: aam 730// CHECK: encoding: [0xd4,0x0a] 731 aam 732 733// CHECK: aas 734// CHECK: encoding: [0x3f] 735 aas 736 737// CHECK: daa 738// CHECK: encoding: [0x27] 739 daa 740 741// CHECK: das 742// CHECK: encoding: [0x2f] 743 das 744 745// CHECK: retw $31438 746// CHECK: encoding: [0x66,0xc2,0xce,0x7a] 747 retw $0x7ace 748 749// CHECK: lretw $31438 750// CHECK: encoding: [0x66,0xca,0xce,0x7a] 751 lretw $0x7ace 752 753// CHECK: bound 2(%eax), %bx 754// CHECK: encoding: [0x66,0x62,0x58,0x02] 755 bound 2(%eax),%bx 756 757// CHECK: bound 4(%ebx), %ecx 758// CHECK: encoding: [0x62,0x4b,0x04] 759 bound 4(%ebx),%ecx 760 761// CHECK: arpl %bx, %bx 762// CHECK: encoding: [0x63,0xdb] 763 arpl %bx,%bx 764 765// CHECK: arpl %bx, 6(%ecx) 766// CHECK: encoding: [0x63,0x59,0x06] 767 arpl %bx,6(%ecx) 768 769// CHECK: lgdtw 4(%eax) 770// CHECK: encoding: [0x66,0x0f,0x01,0x50,0x04] 771 lgdtw 4(%eax) 772 773// CHECK: lgdtl 4(%eax) 774// CHECK: encoding: [0x0f,0x01,0x50,0x04] 775 lgdt 4(%eax) 776 777// CHECK: lgdtl 4(%eax) 778// CHECK: encoding: [0x0f,0x01,0x50,0x04] 779 lgdtl 4(%eax) 780 781// CHECK: lidtw 4(%eax) 782// CHECK: encoding: [0x66,0x0f,0x01,0x58,0x04] 783 lidtw 4(%eax) 784 785// CHECK: lidtl 4(%eax) 786// CHECK: encoding: [0x0f,0x01,0x58,0x04] 787 lidt 4(%eax) 788 789// CHECK: lidtl 4(%eax) 790// CHECK: encoding: [0x0f,0x01,0x58,0x04] 791 lidtl 4(%eax) 792 793// CHECK: sgdtw 4(%eax) 794// CHECK: encoding: [0x66,0x0f,0x01,0x40,0x04] 795 sgdtw 4(%eax) 796 797// CHECK: sgdtl 4(%eax) 798// CHECK: encoding: [0x0f,0x01,0x40,0x04] 799 sgdt 4(%eax) 800 801// CHECK: sgdtl 4(%eax) 802// CHECK: encoding: [0x0f,0x01,0x40,0x04] 803 sgdtl 4(%eax) 804 805// CHECK: sidtw 4(%eax) 806// CHECK: encoding: [0x66,0x0f,0x01,0x48,0x04] 807 sidtw 4(%eax) 808 809// CHECK: sidtl 4(%eax) 810// CHECK: encoding: [0x0f,0x01,0x48,0x04] 811 sidt 4(%eax) 812 813// CHECK: sidtl 4(%eax) 814// CHECK: encoding: [0x0f,0x01,0x48,0x04] 815 sidtl 4(%eax) 816 817// CHECK: fcompi %st(2) 818// CHECK: encoding: [0xdf,0xf2] 819 fcompi %st(2), %st 820 821// CHECK: fcompi %st(2) 822// CHECK: encoding: [0xdf,0xf2] 823 fcompi %st(2) 824 825// CHECK: fcompi 826// CHECK: encoding: [0xdf,0xf1] 827 fcompi 828 829// CHECK: fucompi %st(2) 830// CHECK: encoding: [0xdf,0xea] 831 fucompi %st(2),%st 832 833// CHECK: fucompi %st(2) 834// CHECK: encoding: [0xdf,0xea] 835 fucompi %st(2) 836 837// CHECK: fucompi 838// CHECK: encoding: [0xdf,0xe9] 839 fucompi 840 841// CHECK: fldcw 32493 842// CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00] 843 fldcww 0x7eed 844 845// CHECK: fldcw 32493 846// CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00] 847 fldcw 0x7eed 848 849// CHECK: fnstcw 32493 850// CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00] 851 fnstcww 0x7eed 852 853// CHECK: fnstcw 32493 854// CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00] 855 fnstcw 0x7eed 856 857// CHECK: wait 858// CHECK: encoding: [0x9b] 859 fstcww 0x7eed 860 861// CHECK: wait 862// CHECK: encoding: [0x9b] 863 fstcw 0x7eed 864 865// CHECK: fnstsw 32493 866// CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00] 867 fnstsww 0x7eed 868 869// CHECK: fnstsw 32493 870// CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00] 871 fnstsw 0x7eed 872 873// CHECK: wait 874// CHECK: encoding: [0x9b] 875 fstsww 0x7eed 876 877// CHECK: wait 878// CHECK: encoding: [0x9b] 879 fstsw 0x7eed 880 881// CHECK: verr 32493 882// CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00] 883 verrw 0x7eed 884 885// CHECK: verr 32493 886// CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00] 887 verr 0x7eed 888 889// CHECK: wait 890// CHECK: encoding: [0x9b] 891 fclex 892 893// CHECK: fnclex 894// CHECK: encoding: [0xdb,0xe2] 895 fnclex 896 897// CHECK: ud2 898// CHECK: encoding: [0x0f,0x0b] 899 ud2 900 901// CHECK: ud2 902// CHECK: encoding: [0x0f,0x0b] 903 ud2a 904 905// CHECK: ud2b 906// CHECK: encoding: [0x0f,0xb9] 907 ud2b 908 909// CHECK: loope 0 910// CHECK: encoding: [0xe1,A] 911 loopz 0 912 913// CHECK: loopne 0 914// CHECK: encoding: [0xe0,A] 915 loopnz 0 916 917// CHECK: outsb (%esi), %dx # encoding: [0x6e] 918// CHECK: outsb 919// CHECK: outsb 920 outsb 921 outsb %ds:(%esi), %dx 922 outsb (%esi), %dx 923 924// CHECK: outsw (%esi), %dx # encoding: [0x66,0x6f] 925// CHECK: outsw 926// CHECK: outsw 927 outsw 928 outsw %ds:(%esi), %dx 929 outsw (%esi), %dx 930 931// CHECK: outsl (%esi), %dx # encoding: [0x6f] 932// CHECK: outsl 933 outsl 934 outsl %ds:(%esi), %dx 935 outsl (%esi), %dx 936 937// CHECK: insb %dx, %es:(%edi) # encoding: [0x6c] 938// CHECK: insb 939 insb 940 insb %dx, %es:(%edi) 941 942// CHECK: insw %dx, %es:(%edi) # encoding: [0x66,0x6d] 943// CHECK: insw 944 insw 945 insw %dx, %es:(%edi) 946 947// CHECK: insl %dx, %es:(%edi) # encoding: [0x6d] 948// CHECK: insl 949 insl 950 insl %dx, %es:(%edi) 951 952// CHECK: movsb (%esi), %es:(%edi) # encoding: [0xa4] 953// CHECK: movsb 954// CHECK: movsb 955 movsb 956 movsb %ds:(%esi), %es:(%edi) 957 movsb (%esi), %es:(%edi) 958 959// CHECK: movsw (%esi), %es:(%edi) # encoding: [0x66,0xa5] 960// CHECK: movsw 961// CHECK: movsw 962 movsw 963 movsw %ds:(%esi), %es:(%edi) 964 movsw (%esi), %es:(%edi) 965 966// CHECK: movsl (%esi), %es:(%edi) # encoding: [0xa5] 967// CHECK: movsl 968// CHECK: movsl 969 movsl 970 movsl %ds:(%esi), %es:(%edi) 971 movsl (%esi), %es:(%edi) 972 973// CHECK: lodsb (%esi), %al # encoding: [0xac] 974// CHECK: lodsb 975// CHECK: lodsb 976// CHECK: lodsb 977// CHECK: lodsb 978 lodsb 979 lodsb %ds:(%esi), %al 980 lodsb (%esi), %al 981 lods %ds:(%esi), %al 982 lods (%esi), %al 983 984// CHECK: lodsw (%esi), %ax # encoding: [0x66,0xad] 985// CHECK: lodsw 986// CHECK: lodsw 987// CHECK: lodsw 988// CHECK: lodsw 989 lodsw 990 lodsw %ds:(%esi), %ax 991 lodsw (%esi), %ax 992 lods %ds:(%esi), %ax 993 lods (%esi), %ax 994 995// CHECK: lodsl (%esi), %eax # encoding: [0xad] 996// CHECK: lodsl 997// CHECK: lodsl 998// CHECK: lodsl 999// CHECK: lodsl 1000 lodsl 1001 lodsl %ds:(%esi), %eax 1002 lodsl (%esi), %eax 1003 lods %ds:(%esi), %eax 1004 lods (%esi), %eax 1005 1006// CHECK: stosb %al, %es:(%edi) # encoding: [0xaa] 1007// CHECK: stosb 1008// CHECK: stosb 1009 stosb 1010 stosb %al, %es:(%edi) 1011 stos %al, %es:(%edi) 1012 1013// CHECK: stosw %ax, %es:(%edi) # encoding: [0x66,0xab] 1014// CHECK: stosw 1015// CHECK: stosw 1016 stosw 1017 stosw %ax, %es:(%edi) 1018 stos %ax, %es:(%edi) 1019 1020// CHECK: stosl %eax, %es:(%edi) # encoding: [0xab] 1021// CHECK: stosl 1022// CHECK: stosl 1023 stosl 1024 stosl %eax, %es:(%edi) 1025 stos %eax, %es:(%edi) 1026 1027// CHECK: strw 1028// CHECK: encoding: [0x66,0x0f,0x00,0xc8] 1029 str %ax 1030 1031// CHECK: strl 1032// CHECK: encoding: [0x0f,0x00,0xc8] 1033 str %eax 1034 1035 1036// PR9378 1037// CHECK: fsubp 1038// CHECK: encoding: [0xde,0xe1] 1039fsubp %st,%st(1) 1040 1041// PR9164 1042// CHECK: fsubp %st(2) 1043// CHECK: encoding: [0xde,0xe2] 1044fsubp %st, %st(2) 1045 1046// PR10345 1047// CHECK: xchgl %eax, %eax 1048// CHECK: encoding: [0x90] 1049xchgl %eax, %eax 1050 1051// CHECK: xchgw %ax, %ax 1052// CHECK: encoding: [0x66,0x90] 1053xchgw %ax, %ax 1054 1055// CHECK: xchgl %ecx, %eax 1056// CHECK: encoding: [0x91] 1057xchgl %ecx, %eax 1058 1059// CHECK: xchgl %ecx, %eax 1060// CHECK: encoding: [0x91] 1061xchgl %eax, %ecx 1062 1063// CHECK: retw 1064// CHECK: encoding: [0x66,0xc3] 1065retw 1066 1067// CHECK: lretw 1068// CHECK: encoding: [0x66,0xcb] 1069lretw 1070