1// RUN: llvm-mc -triple x86_64-unknown-unknown -show-encoding %s > %t 2> %t.err 2// RUN: FileCheck < %t %s 3// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s 4 5 monitor 6// CHECK: monitor 7// CHECK: encoding: [0x0f,0x01,0xc8] 8 monitor %rax, %rcx, %rdx 9// CHECK: monitor 10// CHECK: encoding: [0x0f,0x01,0xc8] 11 mwait 12// CHECK: mwait 13// CHECK: encoding: [0x0f,0x01,0xc9] 14 mwait %rax, %rcx 15// CHECK: mwait 16// CHECK: encoding: [0x0f,0x01,0xc9] 17 18// Suffix inference: 19 20// CHECK: addl $0, %eax 21 add $0, %eax 22// CHECK: addb $255, %al 23 add $0xFF, %al 24// CHECK: orq %rax, %rdx 25 or %rax, %rdx 26// CHECK: shlq $3, %rax 27 shl $3, %rax 28 29 30// CHECK: subb %al, %al 31 subb %al, %al 32 33// CHECK: addl $24, %eax 34 addl $24, %eax 35 36// CHECK: movl %eax, 10(%ebp) 37 movl %eax, 10(%ebp) 38// CHECK: movl %eax, 10(%ebp,%ebx) 39 movl %eax, 10(%ebp, %ebx) 40// CHECK: movl %eax, 10(%ebp,%ebx,4) 41 movl %eax, 10(%ebp, %ebx, 4) 42// CHECK: movl %eax, 10(,%ebx,4) 43 movl %eax, 10(, %ebx, 4) 44 45// CHECK: movl 0, %eax 46 movl 0, %eax 47// CHECK: movl $0, %eax 48 movl $0, %eax 49 50// CHECK: ret 51 ret 52 53// CHECK: retw 54 retw 55 56// FIXME: Check that this matches SUB32ri8 57// CHECK: subl $1, %eax 58 subl $1, %eax 59 60// FIXME: Check that this matches SUB32ri8 61// CHECK: subl $-1, %eax 62 subl $-1, %eax 63 64// FIXME: Check that this matches SUB32ri 65// CHECK: subl $256, %eax 66 subl $256, %eax 67 68// FIXME: Check that this matches XOR64ri8 69// CHECK: xorq $1, %rax 70 xorq $1, %rax 71 72// FIXME: Check that this matches XOR64ri32 73// CHECK: xorq $256, %rax 74 xorq $256, %rax 75 76// FIXME: Check that this matches SUB8rr 77// CHECK: subb %al, %bl 78 subb %al, %bl 79 80// FIXME: Check that this matches SUB16rr 81// CHECK: subw %ax, %bx 82 subw %ax, %bx 83 84// FIXME: Check that this matches SUB32rr 85// CHECK: subl %eax, %ebx 86 subl %eax, %ebx 87 88// FIXME: Check that this matches the correct instruction. 89// CHECK: callq *%rax 90 call *%rax 91 92// FIXME: Check that this matches the correct instruction. 93// CHECK: shldl %cl, %eax, %ebx 94 shldl %cl, %eax, %ebx 95 96// CHECK: shll $2, %eax 97 shll $2, %eax 98 99// CHECK: shll $2, %eax 100 sall $2, %eax 101 102// CHECK: rep 103// CHECK-NEXT: movsb 104rep # comment 105movsb 106 107// CHECK: rep 108// CHECK: insb 109 rep;insb 110 111// CHECK: rep 112// CHECK: outsb 113 rep;outsb 114 115// CHECK: rep 116// CHECK: movsb 117 rep;movsb 118 119 120// rdar://8470918 121smovb // CHECK: movsb 122smovw // CHECK: movsw 123smovl // CHECK: movsl 124smovq // CHECK: movsq 125 126// rdar://8456361 127// CHECK: rep 128// CHECK: movsl 129 rep movsd 130 131// CHECK: rep 132// CHECK: lodsb 133 rep;lodsb 134 135// CHECK: rep 136// CHECK: stosb 137 rep;stosb 138 139// NOTE: repz and repe have the same opcode as rep 140// CHECK: rep 141// CHECK: cmpsb 142 repz;cmpsb 143 144// NOTE: repnz has the same opcode as repne 145// CHECK: repne 146// CHECK: cmpsb 147 repnz;cmpsb 148 149// NOTE: repe and repz have the same opcode as rep 150// CHECK: rep 151// CHECK: scasb 152 repe;scasb 153 154// CHECK: repne 155// CHECK: scasb 156 repne;scasb 157 158// CHECK: lock 159// CHECK: cmpxchgb %al, (%ebx) 160 lock;cmpxchgb %al, 0(%ebx) 161 162// CHECK: cs 163// CHECK: movb (%eax), %al 164 cs;movb 0(%eax), %al 165 166// CHECK: ss 167// CHECK: movb (%eax), %al 168 ss;movb 0(%eax), %al 169 170// CHECK: ds 171// CHECK: movb (%eax), %al 172 ds;movb 0(%eax), %al 173 174// CHECK: es 175// CHECK: movb (%eax), %al 176 es;movb 0(%eax), %al 177 178// CHECK: fs 179// CHECK: movb (%eax), %al 180 fs;movb 0(%eax), %al 181 182// CHECK: gs 183// CHECK: movb (%eax), %al 184 gs;movb 0(%eax), %al 185 186// CHECK: fadd %st(0) 187// CHECK: fadd %st(1) 188// CHECK: fadd %st(7) 189 190fadd %st(0) 191fadd %st(1) 192fadd %st(7) 193 194// CHECK: leal 0, %eax 195 leal 0, %eax 196 197// rdar://7986634 - Insensitivity on opcodes. 198// CHECK: int3 199INT3 200 201// rdar://8735979 - int $3 -> int3 202// CHECK: int3 203int $3 204 205 206// Allow scale factor without index register. 207// CHECK: movaps %xmm3, (%esi) 208// CHECK-STDERR: warning: scale factor without index register is ignored 209movaps %xmm3, (%esi, 2) 210 211// CHECK: imull $12, %eax 212imul $12, %eax 213 214// CHECK: imull %ecx, %eax 215imull %ecx, %eax 216 217 218// rdar://8208481 219// CHECK: outb %al, $161 220outb %al, $161 221// CHECK: outw %ax, $128 222outw %ax, $128 223// CHECK: inb $161, %al 224inb $161, %al 225 226// rdar://8017621 227// CHECK: pushq $1 228push $1 229 230// rdar://9716860 231pushq $1 232// CHECK: encoding: [0x6a,0x01] 233pushq $1111111 234// CHECK: encoding: [0x68,0x47,0xf4,0x10,0x00] 235 236// rdar://8017530 237// CHECK: sldtw 4 238sldt 4 239 240// rdar://8208499 241// CHECK: cmovnew %bx, %ax 242cmovnz %bx, %ax 243// CHECK: cmovneq %rbx, %rax 244cmovnzq %rbx, %rax 245 246 247// rdar://8407928 248// CHECK: inb $127, %al 249// CHECK: inw %dx, %ax 250// CHECK: outb %al, $127 251// CHECK: outw %ax, %dx 252// CHECK: inl %dx, %eax 253inb $0x7f 254inw %dx 255outb $0x7f 256outw %dx 257inl %dx 258 259 260// PR8114 261// CHECK: outb %al, %dx 262// CHECK: outb %al, %dx 263// CHECK: outw %ax, %dx 264// CHECK: outw %ax, %dx 265// CHECK: outl %eax, %dx 266// CHECK: outl %eax, %dx 267 268out %al, (%dx) 269outb %al, (%dx) 270out %ax, (%dx) 271outw %ax, (%dx) 272out %eax, (%dx) 273outl %eax, (%dx) 274 275// CHECK: inb %dx, %al 276// CHECK: inb %dx, %al 277// CHECK: inw %dx, %ax 278// CHECK: inw %dx, %ax 279// CHECK: inl %dx, %eax 280// CHECK: inl %dx, %eax 281 282in (%dx), %al 283inb (%dx), %al 284in (%dx), %ax 285inw (%dx), %ax 286in (%dx), %eax 287inl (%dx), %eax 288 289//PR15455 290 291outsb (%rsi), (%dx) 292// CHECK: outsb (%rsi), %dx 293outsw (%rsi), (%dx) 294// CHECK: outsw (%rsi), %dx 295outsl (%rsi), (%dx) 296// CHECK: outsl (%rsi), %dx 297 298insb (%dx), %es:(%rdi) 299// CHECK: insb %dx, %es:(%rdi) 300insw (%dx), %es:(%rdi) 301// CHECK: insw %dx, %es:(%rdi) 302insl (%dx), %es:(%rdi) 303// CHECK: insl %dx, %es:(%rdi) 304 305// rdar://8431422 306 307// CHECK: fxch %st(1) 308// CHECK: fucom %st(1) 309// CHECK: fucomp %st(1) 310// CHECK: faddp %st, %st(1) 311// CHECK: faddp %st, %st(0) 312// CHECK: fsubp %st, %st(1) 313// CHECK: fsubrp %st, %st(1) 314// CHECK: fmulp %st, %st(1) 315// CHECK: fdivp %st, %st(1) 316// CHECK: fdivrp %st, %st(1) 317 318fxch 319fucom 320fucomp 321faddp 322faddp %st 323fsubp 324fsubrp 325fmulp 326fdivp 327fdivrp 328 329// CHECK: fcomi %st(1) 330// CHECK: fcomi %st(2) 331// CHECK: fucomi %st(1) 332// CHECK: fucomi %st(2) 333// CHECK: fucomi %st(2) 334 335fcomi 336fcomi %st(2) 337fucomi 338fucomi %st(2) 339fucomi %st(2), %st 340 341// CHECK: fnstsw %ax 342// CHECK: fnstsw %ax 343 344fnstsw 345fnstsw %ax 346 347// rdar://8431880 348// CHECK: rclb %bl 349// CHECK: rcll 3735928559(%ebx,%ecx,8) 350// CHECK: rcrl %ecx 351// CHECK: rcrl 305419896 352rcl %bl 353rcll 0xdeadbeef(%ebx,%ecx,8) 354rcr %ecx 355rcrl 0x12345678 356 357rclb %bl // CHECK: rclb %bl # encoding: [0xd0,0xd3] 358rclb $1, %bl // CHECK: rclb %bl # encoding: [0xd0,0xd3] 359rclb $2, %bl // CHECK: rclb $2, %bl # encoding: [0xc0,0xd3,0x02] 360 361// rdar://8418316 362// PR12173 363// CHECK: shldw %cl, %bx, %dx 364// CHECK: shldw %cl, %bx, %dx 365// CHECK: shldw $1, %bx, %dx 366// CHECK: shldw %cl, %bx, (%rax) 367// CHECK: shldw %cl, %bx, (%rax) 368// CHECK: shrdw %cl, %bx, %dx 369// CHECK: shrdw %cl, %bx, %dx 370// CHECK: shrdw $1, %bx, %dx 371// CHECK: shrdw %cl, %bx, (%rax) 372// CHECK: shrdw %cl, %bx, (%rax) 373 374shld %bx, %dx 375shld %cl, %bx, %dx 376shld $1, %bx, %dx 377shld %bx, (%rax) 378shld %cl, %bx, (%rax) 379shrd %bx, %dx 380shrd %cl, %bx, %dx 381shrd $1, %bx, %dx 382shrd %bx, (%rax) 383shrd %cl, %bx, (%rax) 384 385// CHECK: sldtl %ecx 386// CHECK: encoding: [0x0f,0x00,0xc1] 387// CHECK: sldtw %cx 388// CHECK: encoding: [0x66,0x0f,0x00,0xc1] 389 390sldt %ecx 391sldt %cx 392 393// CHECK: lcalll *3135175374 394// CHECK: ljmpl *3135175374 395// CHECK: lcalll *(%rax) 396// CHECK: ljmpl *(%rax) 397lcall *0xbadeface 398ljmp *0xbadeface 399lcall *(%rax) 400ljmpl *(%rax) 401 402// CHECK: ljmpl *%cs:305419896 403// CHECK: encoding: [0x2e,0xff,0x2c,0x25,0x78,0x56,0x34,0x12] 404ljmp %cs:*0x12345678 405 406// rdar://8444631 407// CHECK: enter $31438, $0 408// CHECK: encoding: [0xc8,0xce,0x7a,0x00] 409// CHECK: enter $31438, $1 410// CHECK: encoding: [0xc8,0xce,0x7a,0x01] 411// CHECK: enter $31438, $127 412// CHECK: encoding: [0xc8,0xce,0x7a,0x7f] 413enter $0x7ace,$0 414enter $0x7ace,$1 415enter $0x7ace,$0x7f 416 417 418// rdar://8456364 419// CHECK: movw %cs, %ax 420mov %cs, %ax 421 422// rdar://8456391 423fcmovb %st(1), %st // CHECK: fcmovb %st(1), %st 424fcmove %st(1), %st // CHECK: fcmove %st(1), %st 425fcmovbe %st(1), %st // CHECK: fcmovbe %st(1), %st 426fcmovu %st(1), %st // CHECK: fcmovu %st(1), %st 427 428fcmovnb %st(1), %st // CHECK: fcmovnb %st(1), %st 429fcmovne %st(1), %st // CHECK: fcmovne %st(1), %st 430fcmovnbe %st(1), %st // CHECK: fcmovnbe %st(1), %st 431fcmovnu %st(1), %st // CHECK: fcmovnu %st(1), %st 432 433fcmovnae %st(1), %st // CHECK: fcmovb %st(1), %st 434fcmovna %st(1), %st // CHECK: fcmovbe %st(1), %st 435 436fcmovae %st(1), %st // CHECK: fcmovnb %st(1), %st 437fcmova %st(1), %st // CHECK: fcmovnbe %st(1), %st 438 439// rdar://8456417 440.byte (88 + 1) & 15 // CHECK: .byte 9 441 442// rdar://8456412 443mov %rdx, %cr0 444// CHECK: movq %rdx, %cr0 445// CHECK: encoding: [0x0f,0x22,0xc2] 446mov %rdx, %cr4 447// CHECK: movq %rdx, %cr4 448// CHECK: encoding: [0x0f,0x22,0xe2] 449mov %rdx, %cr8 450// CHECK: movq %rdx, %cr8 451// CHECK: encoding: [0x44,0x0f,0x22,0xc2] 452mov %rdx, %cr15 453// CHECK: movq %rdx, %cr15 454// CHECK: encoding: [0x44,0x0f,0x22,0xfa] 455mov %rdx, %dr15 456// CHECK: movq %rdx, %dr15 457// CHECK: encoding: [0x44,0x0f,0x23,0xfa] 458mov %rdx, %db15 459// CHECK: movq %rdx, %dr15 460// CHECK: encoding: [0x44,0x0f,0x23,0xfa] 461 462// rdar://8456371 - Handle commutable instructions written backward. 463// CHECK: faddp %st, %st(1) 464// CHECK: fmulp %st, %st(2) 465faddp %st, %st(1) 466fmulp %st, %st(2) 467 468// rdar://8468087 - Encode these accurately, they are not synonyms. 469// CHECK: fmul %st, %st(1) 470// CHECK: encoding: [0xdc,0xc9] 471// CHECK: fmul %st(1) 472// CHECK: encoding: [0xd8,0xc9] 473fmul %st, %st(1) 474fmul %st(1), %st 475 476// CHECK: fadd %st, %st(1) 477// CHECK: encoding: [0xdc,0xc1] 478// CHECK: fadd %st(1) 479// CHECK: encoding: [0xd8,0xc1] 480fadd %st, %st(1) 481fadd %st(1), %st 482 483 484// rdar://8416805 485// CHECK: xorb %al, %al 486// CHECK: encoding: [0x30,0xc0] 487// CHECK: xorw %di, %di 488// CHECK: encoding: [0x66,0x31,0xff] 489// CHECK: xorl %esi, %esi 490// CHECK: encoding: [0x31,0xf6] 491// CHECK: xorq %rsi, %rsi 492// CHECK: encoding: [0x48,0x31,0xf6] 493clrb %al 494clr %di 495clr %esi 496clr %rsi 497 498// rdar://8456378 499cltq // CHECK: cltq 500cdqe // CHECK: cltq 501cwde // CHECK: cwtl 502cwtl // CHECK: cwtl 503 504// rdar://8416805 505cbw // CHECK: cbtw 506cwd // CHECK: cwtd 507cdq // CHECK: cltd 508cqo // CHECK: cqto 509 510// rdar://8456378 and PR7557 - fstsw 511fstsw %ax 512// CHECK: wait 513// CHECK: fnstsw 514fstsw (%rax) 515// CHECK: wait 516// CHECK: fnstsw (%rax) 517 518// PR8259 519fstcw (%rsp) 520// CHECK: wait 521// CHECK: fnstcw (%rsp) 522 523// PR8259 524fstcw (%rsp) 525// CHECK: wait 526// CHECK: fnstcw (%rsp) 527 528// PR8258 529finit 530// CHECK: wait 531// CHECK: fninit 532 533fsave 32493 534// CHECK: wait 535// CHECK: fnsave 32493 536 537 538// rdar://8456382 - cvtsd2si support. 539cvtsd2si %xmm1, %rax 540// CHECK: cvtsd2si %xmm1, %rax 541// CHECK: encoding: [0xf2,0x48,0x0f,0x2d,0xc1] 542cvtsd2si %xmm1, %eax 543// CHECK: cvtsd2si %xmm1, %eax 544// CHECK: encoding: [0xf2,0x0f,0x2d,0xc1] 545 546cvtsd2siq %xmm0, %rax // CHECK: cvtsd2si %xmm0, %rax 547cvtsd2sil %xmm0, %eax // CHECK: cvtsd2si %xmm0, %eax 548cvtsd2si %xmm0, %rax // CHECK: cvtsd2si %xmm0, %rax 549 550 551cvttpd2dq %xmm1, %xmm0 // CHECK: cvttpd2dq %xmm1, %xmm0 552cvttpd2dq (%rax), %xmm0 // CHECK: cvttpd2dq (%rax), %xmm0 553 554cvttps2dq %xmm1, %xmm0 // CHECK: cvttps2dq %xmm1, %xmm0 555cvttps2dq (%rax), %xmm0 // CHECK: cvttps2dq (%rax), %xmm0 556 557// rdar://8456376 - llvm-mc rejects 'roundss' 558roundss $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0a,0xc0,0x0e] 559roundps $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x08,0xc0,0x0e] 560roundsd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0b,0xc0,0x0e] 561roundpd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x09,0xc0,0x0e] 562 563 564// rdar://8482675 - 32-bit mem operand support in 64-bit mode (0x67 prefix) 565leal 8(%eax), %esi 566// CHECK: leal 8(%eax), %esi 567// CHECK: encoding: [0x67,0x8d,0x70,0x08] 568leaq 8(%eax), %rsi 569// CHECK: leaq 8(%eax), %rsi 570// CHECK: encoding: [0x67,0x48,0x8d,0x70,0x08] 571leaq 8(%rax), %rsi 572// CHECK: leaq 8(%rax), %rsi 573// CHECK: encoding: [0x48,0x8d,0x70,0x08] 574 575 576cvttpd2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 577// CHECK: cvttpd2dq 3735928559(%ebx,%ecx,8), %xmm5 578// CHECK: encoding: [0x67,0x66,0x0f,0xe6,0xac,0xcb,0xef,0xbe,0xad,0xde] 579 580// rdar://8490728 - llvm-mc rejects 'movmskpd' 581movmskpd %xmm6, %rax 582// CHECK: movmskpd %xmm6, %eax 583// CHECK: encoding: [0x66,0x0f,0x50,0xc6] 584movmskpd %xmm6, %eax 585// CHECK: movmskpd %xmm6, %eax 586// CHECK: encoding: [0x66,0x0f,0x50,0xc6] 587 588// rdar://8491845 - Gas supports commuted forms of non-commutable instructions. 589fdivrp %st, %st(1) // CHECK: encoding: [0xde,0xf9] 590fdivrp %st(1), %st // CHECK: encoding: [0xde,0xf9] 591 592fsubrp %st, %st(1) // CHECK: encoding: [0xde,0xe9] 593fsubrp %st(1), %st // CHECK: encoding: [0xde,0xe9] 594 595// also PR8861 596fdivp %st, %st(1) // CHECK: encoding: [0xde,0xf1] 597fdivp %st(1), %st // CHECK: encoding: [0xde,0xf1] 598 599 600movl foo(%rip), %eax 601// CHECK: movl foo(%rip), %eax 602// CHECK: encoding: [0x8b,0x05,A,A,A,A] 603// CHECK: fixup A - offset: 2, value: foo-4, kind: reloc_riprel_4byte 604 605movb $12, foo(%rip) 606// CHECK: movb $12, foo(%rip) 607// CHECK: encoding: [0xc6,0x05,A,A,A,A,0x0c] 608// CHECK: fixup A - offset: 2, value: foo-5, kind: reloc_riprel_4byte 609 610movw $12, foo(%rip) 611// CHECK: movw $12, foo(%rip) 612// CHECK: encoding: [0x66,0xc7,0x05,A,A,A,A,0x0c,0x00] 613// CHECK: fixup A - offset: 3, value: foo-6, kind: reloc_riprel_4byte 614 615movl $12, foo(%rip) 616// CHECK: movl $12, foo(%rip) 617// CHECK: encoding: [0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00] 618// CHECK: fixup A - offset: 2, value: foo-8, kind: reloc_riprel_4byte 619 620// rdar://37247000 621movl $12, 1024(%rip) 622// CHECK: movl $12, 1024(%rip) 623// CHECK: encoding: [0xc7,0x05,0x00,0x04,0x00,0x00,0x0c,0x00,0x00,0x00] 624 625movq $12, foo(%rip) 626// CHECK: movq $12, foo(%rip) 627// CHECK: encoding: [0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00] 628// CHECK: fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte 629 630movl foo(%eip), %eax 631// CHECK: movl foo(%eip), %eax 632// CHECK: encoding: [0x67,0x8b,0x05,A,A,A,A] 633// CHECK: fixup A - offset: 3, value: foo-4, kind: reloc_riprel_4byte 634 635movb $12, foo(%eip) 636// CHECK: movb $12, foo(%eip) 637// CHECK: encoding: [0x67,0xc6,0x05,A,A,A,A,0x0c] 638// CHECK: fixup A - offset: 3, value: foo-5, kind: reloc_riprel_4byte 639 640movw $12, foo(%eip) 641// CHECK: movw $12, foo(%eip) 642// CHECK: encoding: [0x67,0x66,0xc7,0x05,A,A,A,A,0x0c,0x00] 643// CHECK: fixup A - offset: 4, value: foo-6, kind: reloc_riprel_4byte 644 645movl $12, foo(%eip) 646// CHECK: movl $12, foo(%eip) 647// CHECK: encoding: [0x67,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00] 648// CHECK: fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte 649 650movq $12, foo(%eip) 651// CHECK: movq $12, foo(%eip) 652// CHECK: encoding: [0x67,0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00] 653// CHECK: fixup A - offset: 4, value: foo-8, kind: reloc_riprel_4byte 654 655// CHECK: addq $-424, %rax 656// CHECK: encoding: [0x48,0x05,0x58,0xfe,0xff,0xff] 657addq $-424, %rax 658 659 660// CHECK: movq _foo@GOTPCREL(%rip), %rax 661// CHECK: encoding: [0x48,0x8b,0x05,A,A,A,A] 662// CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load 663movq _foo@GOTPCREL(%rip), %rax 664 665// CHECK: movq _foo@GOTPCREL(%rip), %r14 666// CHECK: encoding: [0x4c,0x8b,0x35,A,A,A,A] 667// CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load 668movq _foo@GOTPCREL(%rip), %r14 669 670// CHECK: movq _foo@GOTPCREL(%eip), %rax 671// CHECK: encoding: [0x67,0x48,0x8b,0x05,A,A,A,A] 672// CHECK: fixup A - offset: 4, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load 673movq _foo@GOTPCREL(%eip), %rax 674 675// CHECK: movq _foo@GOTPCREL(%eip), %r14 676// CHECK: encoding: [0x67,0x4c,0x8b,0x35,A,A,A,A] 677// CHECK: fixup A - offset: 4, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load 678movq _foo@GOTPCREL(%eip), %r14 679 680// CHECK: movq (%r13,%rax,8), %r13 681// CHECK: encoding: [0x4d,0x8b,0x6c,0xc5,0x00] 682movq 0x00(%r13,%rax,8),%r13 683 684// CHECK: testq %rax, %rbx 685// CHECK: encoding: [0x48,0x85,0xc3] 686testq %rax, %rbx 687 688// CHECK: cmpq %rbx, %r14 689// CHECK: encoding: [0x49,0x39,0xde] 690 cmpq %rbx, %r14 691 692// rdar://7947167 693 694movsq 695// CHECK: movsq 696// CHECK: encoding: [0x48,0xa5] 697 698movsl 699// CHECK: movsl 700// CHECK: encoding: [0xa5] 701 702stosq 703// CHECK: stosq 704// CHECK: encoding: [0x48,0xab] 705stosl 706// CHECK: stosl 707// CHECK: encoding: [0xab] 708 709 710// Not moffset forms of moves, they are x86-32 only! rdar://7947184 711movb 0, %al // CHECK: movb 0, %al # encoding: [0x8a,0x04,0x25,0x00,0x00,0x00,0x00] 712movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0x8b,0x04,0x25,0x00,0x00,0x00,0x00] 713movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00,0x00] 714 715// CHECK: pushfq # encoding: [0x9c] 716 pushf 717// CHECK: pushfq # encoding: [0x9c] 718 pushfq 719// CHECK: popfq # encoding: [0x9d] 720 popf 721// CHECK: popfq # encoding: [0x9d] 722 popfq 723 724// CHECK: movabsq $-281474976710654, %rax 725// CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff] 726 movabsq $0xFFFF000000000002, %rax 727 728// CHECK: movabsq $-281474976710654, %rax 729// CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff] 730 movq $0xFFFF000000000002, %rax 731 732// CHECK: movabsq 81985529216486895, %rax 733// CHECK: encoding: [0x48,0xa1,0xef,0xcd,0xab,0x89,0x67,0x45,0x23,0x01] 734 movabsq 0x123456789abcdef, %rax 735 736// CHECK: movq $-65536, %rax 737// CHECK: encoding: [0x48,0xc7,0xc0,0x00,0x00,0xff,0xff] 738 movq $0xFFFFFFFFFFFF0000, %rax 739 740// CHECK: movq $-256, %rax 741// CHECK: encoding: [0x48,0xc7,0xc0,0x00,0xff,0xff,0xff] 742 movq $0xFFFFFFFFFFFFFF00, %rax 743 744// CHECK: movq $10, %rax 745// CHECK: encoding: [0x48,0xc7,0xc0,0x0a,0x00,0x00,0x00] 746 movq $10, %rax 747 748// CHECK: movq 81985529216486895, %rax 749// CHECK: encoding: [0x48,0x8b,0x04,0x25,0xef,0xcd,0xab,0x89] 750 movq 0x123456789abcdef, %rax 751 752// CHECK: movabsb -6066930261531658096, %al 753// CHECK: encoding: [0xa0,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 754 movabsb 0xabcdef1234567890,%al 755 756// CHECK: movabsw -6066930261531658096, %ax 757// CHECK: encoding: [0x66,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 758 movabsw 0xabcdef1234567890,%ax 759 760// CHECK: movabsl -6066930261531658096, %eax 761// CHECK: encoding: [0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 762 movabsl 0xabcdef1234567890,%eax 763 764// CHECK: movabsq -6066930261531658096, %rax 765// CHECK: encoding: [0x48,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 766 movabsq 0xabcdef1234567890, %rax 767 768// CHECK: movabsb %al, -6066930261531658096 769// CHECK: encoding: [0xa2,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 770 movabsb %al,0xabcdef1234567890 771 772// CHECK: movabsw %ax, -6066930261531658096 773// CHECK: encoding: [0x66,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 774 movabsw %ax,0xabcdef1234567890 775 776// CHECK: movabsl %eax, -6066930261531658096 777// CHECK: encoding: [0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 778 movabsl %eax,0xabcdef1234567890 779 780// CHECK: movabsq %rax, -6066930261531658096 781// CHECK: encoding: [0x48,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab] 782 movabsq %rax,0xabcdef1234567890 783 784// rdar://8014869 785// 786// CHECK: ret 787// CHECK: encoding: [0xc3] 788 retq 789 790// CHECK: sete %al 791// CHECK: encoding: [0x0f,0x94,0xc0] 792 setz %al 793 794// CHECK: setne %al 795// CHECK: encoding: [0x0f,0x95,0xc0] 796 setnz %al 797 798// CHECK: je 0 799// CHECK: encoding: [0x74,A] 800 jz 0 801 802// CHECK: jne 803// CHECK: encoding: [0x75,A] 804 jnz 0 805 806// PR9264 807btl $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01] 808bt $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01] 809 810// rdar://8017515 811btq $0x01,%rdx 812// CHECK: btq $1, %rdx 813// CHECK: encoding: [0x48,0x0f,0xba,0xe2,0x01] 814 815//rdar://8017633 816// CHECK: movzbl %al, %esi 817// CHECK: encoding: [0x0f,0xb6,0xf0] 818 movzx %al, %esi 819 820// CHECK: movzbq %al, %rsi 821// CHECK: encoding: [0x48,0x0f,0xb6,0xf0] 822 movzx %al, %rsi 823 824// CHECK: movsbw %al, %ax 825// CHECK: encoding: [0x66,0x0f,0xbe,0xc0] 826movsx %al, %ax 827 828// CHECK: movsbl %al, %eax 829// CHECK: encoding: [0x0f,0xbe,0xc0] 830movsx %al, %eax 831 832// CHECK: movswl %ax, %eax 833// CHECK: encoding: [0x0f,0xbf,0xc0] 834movsx %ax, %eax 835 836// CHECK: movsbq %bl, %rax 837// CHECK: encoding: [0x48,0x0f,0xbe,0xc3] 838movsx %bl, %rax 839 840// CHECK: movswq %cx, %rax 841// CHECK: encoding: [0x48,0x0f,0xbf,0xc1] 842movsx %cx, %rax 843 844// CHECK: movslq %edi, %rax 845// CHECK: encoding: [0x48,0x63,0xc7] 846movsx %edi, %rax 847 848// CHECK: movzbw %al, %ax 849// CHECK: encoding: [0x66,0x0f,0xb6,0xc0] 850movzx %al, %ax 851 852// CHECK: movzbl %al, %eax 853// CHECK: encoding: [0x0f,0xb6,0xc0] 854movzx %al, %eax 855 856// CHECK: movzwl %ax, %eax 857// CHECK: encoding: [0x0f,0xb7,0xc0] 858movzx %ax, %eax 859 860// CHECK: movzbq %bl, %rax 861// CHECK: encoding: [0x48,0x0f,0xb6,0xc3] 862movzx %bl, %rax 863 864// CHECK: movzwq %cx, %rax 865// CHECK: encoding: [0x48,0x0f,0xb7,0xc1] 866movzx %cx, %rax 867 868// CHECK: movsbw (%rax), %ax 869// CHECK: encoding: [0x66,0x0f,0xbe,0x00] 870movsx (%rax), %ax 871 872// CHECK: movzbw (%rax), %ax 873// CHECK: encoding: [0x66,0x0f,0xb6,0x00] 874movzx (%rax), %ax 875 876// CHECK: movzbq 1280(%rbx,%r11), %r12 877// CHECK: encoding: [0x4e,0x0f,0xb6,0xa4,0x1b,0x00,0x05,0x00,0x00] 878movzb 1280(%rbx, %r11), %r12 879 880// rdar://7873482 881// CHECK: [0x65,0x8b,0x04,0x25,0x7c,0x00,0x00,0x00] 882 movl %gs:124, %eax 883 884// CHECK: jmpq *8(%rax) 885// CHECK: encoding: [0xff,0x60,0x08] 886 jmp *8(%rax) 887 888// CHECK: btq $61, -216(%rbp) 889// CHECK: encoding: [0x48,0x0f,0xba,0xa5,0x28,0xff,0xff,0xff,0x3d] 890 btq $61, -216(%rbp) 891 892 893// rdar://8061602 894L1: 895 jecxz L1 896// CHECK: jecxz L1 897// CHECK: encoding: [0x67,0xe3,A] 898 jrcxz L1 899// CHECK: jrcxz L1 900// CHECK: encoding: [0xe3,A] 901 902// PR8061 903xchgl 368(%rax),%ecx 904// CHECK: xchgl %ecx, 368(%rax) 905xchgl %ecx, 368(%rax) 906// CHECK: xchgl %ecx, 368(%rax) 907 908// rdar://8407548 909xchg 0xdeadbeef(%rbx,%rcx,8),%bl 910// CHECK: xchgb %bl, 3735928559(%rbx,%rcx,8) 911 912 913 914// PR7254 915lock incl 1(%rsp) 916// CHECK: lock 917// CHECK: incl 1(%rsp) 918 919// rdar://8741045 920lock/incl 1(%rsp) 921// CHECK: lock 922// CHECK: incl 1(%rsp) 923 924 925lock addq %rsi, (%rdi) 926// CHECK: lock 927// CHECK: addq %rsi, (%rdi) 928// CHECK: encoding: [0xf0,0x48,0x01,0x37] 929 930lock subq %rsi, (%rdi) 931// CHECK: lock 932// CHECK: subq %rsi, (%rdi) 933// CHECK: encoding: [0xf0,0x48,0x29,0x37] 934 935lock andq %rsi, (%rdi) 936// CHECK: lock 937// CHECK: andq %rsi, (%rdi) 938// CHECK: encoding: [0xf0,0x48,0x21,0x37] 939 940lock orq %rsi, (%rdi) 941// CHECK: lock 942// CHECK: orq %rsi, (%rdi) 943// CHECK: encoding: [0xf0,0x48,0x09,0x37] 944 945lock xorq %rsi, (%rdi) 946// CHECK: lock 947// CHECK: xorq %rsi, (%rdi) 948// CHECK: encoding: [0xf0,0x48,0x31,0x37] 949 950xacquire lock addq %rax, (%rax) 951// CHECK: xacquire 952// CHECK: encoding: [0xf2] 953// CHECK: lock 954// CHECK: addq %rax, (%rax) 955// CHECK: encoding: [0xf0,0x48,0x01,0x00] 956 957xrelease lock addq %rax, (%rax) 958// CHECK: xrelease 959// CHECK: encoding: [0xf3] 960// CHECK: lock 961// CHECK: addq %rax, (%rax) 962// CHECK: encoding: [0xf0,0x48,0x01,0x00] 963 964// rdar://8033482 965rep movsl 966// CHECK: rep 967// CHECK: movsl 968// CHECK: encoding: [0xf3,0xa5] 969 970 971// rdar://8403974 972iret 973// CHECK: iretl 974// CHECK: encoding: [0xcf] 975iretw 976// CHECK: iretw 977// CHECK: encoding: [0x66,0xcf] 978iretl 979// CHECK: iretl 980// CHECK: encoding: [0xcf] 981iretq 982// CHECK: iretq 983// CHECK: encoding: [0x48,0xcf] 984 985// rdar://8416805 986// CHECK: retw $31438 987// CHECK: encoding: [0x66,0xc2,0xce,0x7a] 988 retw $0x7ace 989 990// CHECK: lretw $31438 991// CHECK: encoding: [0x66,0xca,0xce,0x7a] 992 lretw $0x7ace 993 994// PR8592 995lretq // CHECK: lretq # encoding: [0x48,0xcb] 996lretl // CHECK: lretl # encoding: [0xcb] 997lret // CHECK: lretl # encoding: [0xcb] 998lretw // CHECK: lretw # encoding: [0x66,0xcb] 999 1000// rdar://8403907 1001sysret 1002// CHECK: sysretl 1003// CHECK: encoding: [0x0f,0x07] 1004sysretl 1005// CHECK: sysretl 1006// CHECK: encoding: [0x0f,0x07] 1007sysretq 1008// CHECK: sysretq 1009// CHECK: encoding: [0x48,0x0f,0x07] 1010 1011// rdar://8407242 1012push %fs 1013// CHECK: pushq %fs 1014// CHECK: encoding: [0x0f,0xa0] 1015push %gs 1016// CHECK: pushq %gs 1017// CHECK: encoding: [0x0f,0xa8] 1018 1019pushw %fs 1020// CHECK: pushw %fs 1021// CHECK: encoding: [0x66,0x0f,0xa0] 1022pushw %gs 1023// CHECK: pushw %gs 1024// CHECK: encoding: [0x66,0x0f,0xa8] 1025 1026 1027pop %fs 1028// CHECK: popq %fs 1029// CHECK: encoding: [0x0f,0xa1] 1030pop %gs 1031// CHECK: popq %gs 1032// CHECK: encoding: [0x0f,0xa9] 1033 1034popw %fs 1035// CHECK: popw %fs 1036// CHECK: encoding: [0x66,0x0f,0xa1] 1037popw %gs 1038// CHECK: popw %gs 1039// CHECK: encoding: [0x66,0x0f,0xa9] 1040 1041// rdar://8438816 1042fildq -8(%rsp) 1043fildll -8(%rsp) 1044// CHECK: fildll -8(%rsp) 1045// CHECK: encoding: [0xdf,0x6c,0x24,0xf8] 1046// CHECK: fildll -8(%rsp) 1047// CHECK: encoding: [0xdf,0x6c,0x24,0xf8] 1048 1049// CHECK: callq a 1050 callq a 1051 1052// CHECK: leaq -40(%rbp), %r15 1053 leaq -40(%rbp), %r15 1054 1055 1056 1057// rdar://8013734 - Alias dr6=db6 1058mov %dr6, %rax 1059mov %db6, %rax 1060// CHECK: movq %dr6, %rax 1061// CHECK: movq %dr6, %rax 1062 1063 1064// INC/DEC encodings. 1065incb %al // CHECK: incb %al # encoding: [0xfe,0xc0] 1066incw %ax // CHECK: incw %ax # encoding: [0x66,0xff,0xc0] 1067incl %eax // CHECK: incl %eax # encoding: [0xff,0xc0] 1068decb %al // CHECK: decb %al # encoding: [0xfe,0xc8] 1069decw %ax // CHECK: decw %ax # encoding: [0x66,0xff,0xc8] 1070decl %eax // CHECK: decl %eax # encoding: [0xff,0xc8] 1071 1072// rdar://8416805 1073// CHECK: lgdtq 4(%rax) 1074// CHECK: encoding: [0x0f,0x01,0x50,0x04] 1075 lgdt 4(%rax) 1076 1077// CHECK: lgdtq 4(%rax) 1078// CHECK: encoding: [0x0f,0x01,0x50,0x04] 1079 lgdtq 4(%rax) 1080 1081// CHECK: lidtq 4(%rax) 1082// CHECK: encoding: [0x0f,0x01,0x58,0x04] 1083 lidt 4(%rax) 1084 1085// CHECK: lidtq 4(%rax) 1086// CHECK: encoding: [0x0f,0x01,0x58,0x04] 1087 lidtq 4(%rax) 1088 1089// CHECK: sgdtq 4(%rax) 1090// CHECK: encoding: [0x0f,0x01,0x40,0x04] 1091 sgdt 4(%rax) 1092 1093// CHECK: sgdtq 4(%rax) 1094// CHECK: encoding: [0x0f,0x01,0x40,0x04] 1095 sgdtq 4(%rax) 1096 1097// CHECK: sidtq 4(%rax) 1098// CHECK: encoding: [0x0f,0x01,0x48,0x04] 1099 sidt 4(%rax) 1100 1101// CHECK: sidtq 4(%rax) 1102// CHECK: encoding: [0x0f,0x01,0x48,0x04] 1103 sidtq 4(%rax) 1104 1105 1106// rdar://8208615 1107mov (%rsi), %gs // CHECK: movw (%rsi), %gs # encoding: [0x8e,0x2e] 1108mov %gs, (%rsi) // CHECK: movw %gs, (%rsi) # encoding: [0x8c,0x2e] 1109 1110 1111// rdar://8431864 1112//CHECK: divb %bl 1113//CHECK: divw %bx 1114//CHECK: divl %ecx 1115//CHECK: divl 3735928559(%ebx,%ecx,8) 1116//CHECK: divl 69 1117//CHECK: divl 32493 1118//CHECK: divl 3133065982 1119//CHECK: divl 305419896 1120//CHECK: idivb %bl 1121//CHECK: idivw %bx 1122//CHECK: idivl %ecx 1123//CHECK: idivl 3735928559(%ebx,%ecx,8) 1124//CHECK: idivl 69 1125//CHECK: idivl 32493 1126//CHECK: idivl 3133065982 1127//CHECK: idivl 305419896 1128 div %bl,%al 1129 div %bx,%ax 1130 div %ecx,%eax 1131 div 0xdeadbeef(%ebx,%ecx,8),%eax 1132 div 0x45,%eax 1133 div 0x7eed,%eax 1134 div 0xbabecafe,%eax 1135 div 0x12345678,%eax 1136 idiv %bl,%al 1137 idiv %bx,%ax 1138 idiv %ecx,%eax 1139 idiv 0xdeadbeef(%ebx,%ecx,8),%eax 1140 idiv 0x45,%eax 1141 idiv 0x7eed,%eax 1142 idiv 0xbabecafe,%eax 1143 idiv 0x12345678,%eax 1144 1145// PR8524 1146movd %rax, %mm5 // CHECK: movq %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8] 1147movd %mm5, %rbx // CHECK: movq %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb] 1148movq %rax, %mm5 // CHECK: movq %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8] 1149movq %mm5, %rbx // CHECK: movq %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb] 1150 1151rex64 // CHECK: rex64 # encoding: [0x48] 1152data16 // CHECK: data16 # encoding: [0x66] 1153 1154// CHECK: data16 1155// CHECK: encoding: [0x66] 1156// CHECK: lgdtq 4(%rax) 1157// CHECK: encoding: [0x0f,0x01,0x50,0x04] 1158data16 lgdt 4(%rax) 1159 1160// PR8855 1161movq 18446744073709551615,%rbx // CHECK: movq -1, %rbx 1162 1163// PR8946 1164movdqu %xmm0, %xmm1 // CHECK: movdqu %xmm0, %xmm1 # encoding: [0xf3,0x0f,0x6f,0xc8] 1165 1166// PR8935 1167xgetbv // CHECK: xgetbv # encoding: [0x0f,0x01,0xd0] 1168xsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1] 1169 1170// CHECK: loope 0 1171// CHECK: encoding: [0xe1,A] 1172 loopz 0 1173 1174// CHECK: loopne 0 1175// CHECK: encoding: [0xe0,A] 1176 loopnz 0 1177 1178// CHECK: outsb (%rsi), %dx # encoding: [0x6e] 1179// CHECK: outsb 1180// CHECK: outsb 1181 outsb 1182 outsb %ds:(%rsi), %dx 1183 outsb (%rsi), %dx 1184 1185// CHECK: outsw (%rsi), %dx # encoding: [0x66,0x6f] 1186// CHECK: outsw 1187// CHECK: outsw 1188 outsw 1189 outsw %ds:(%rsi), %dx 1190 outsw (%rsi), %dx 1191 1192// CHECK: outsl (%rsi), %dx # encoding: [0x6f] 1193// CHECK: outsl 1194 outsl 1195 outsl %ds:(%rsi), %dx 1196 outsl (%rsi), %dx 1197 1198// CHECK: insb %dx, %es:(%rdi) # encoding: [0x6c] 1199// CHECK: insb 1200 insb 1201 insb %dx, %es:(%rdi) 1202 1203// CHECK: insw %dx, %es:(%rdi) # encoding: [0x66,0x6d] 1204// CHECK: insw 1205 insw 1206 insw %dx, %es:(%rdi) 1207 1208// CHECK: insl %dx, %es:(%rdi) # encoding: [0x6d] 1209// CHECK: insl 1210 insl 1211 insl %dx, %es:(%rdi) 1212 1213// CHECK: movsb (%rsi), %es:(%rdi) # encoding: [0xa4] 1214// CHECK: movsb 1215// CHECK: movsb 1216 movsb 1217 movsb %ds:(%rsi), %es:(%rdi) 1218 movsb (%rsi), %es:(%rdi) 1219 1220// CHECK: movsw (%rsi), %es:(%rdi) # encoding: [0x66,0xa5] 1221// CHECK: movsw 1222// CHECK: movsw 1223 movsw 1224 movsw %ds:(%rsi), %es:(%rdi) 1225 movsw (%rsi), %es:(%rdi) 1226 1227// CHECK: movsl (%rsi), %es:(%rdi) # encoding: [0xa5] 1228// CHECK: movsl 1229// CHECK: movsl 1230 movsl 1231 movsl %ds:(%rsi), %es:(%rdi) 1232 movsl (%rsi), %es:(%rdi) 1233// rdar://10883092 1234// CHECK: movsl 1235 movsl (%rsi), (%rdi) 1236 1237// CHECK: movsq (%rsi), %es:(%rdi) # encoding: [0x48,0xa5] 1238// CHECK: movsq 1239// CHECK: movsq 1240 movsq 1241 movsq %ds:(%rsi), %es:(%rdi) 1242 movsq (%rsi), %es:(%rdi) 1243 1244// CHECK: lodsb (%rsi), %al # encoding: [0xac] 1245// CHECK: lodsb 1246// CHECK: lodsb 1247// CHECK: lodsb 1248// CHECK: lodsb 1249 lodsb 1250 lodsb %ds:(%rsi), %al 1251 lodsb (%rsi), %al 1252 lods %ds:(%rsi), %al 1253 lods (%rsi), %al 1254 1255// CHECK: lodsw (%rsi), %ax # encoding: [0x66,0xad] 1256// CHECK: lodsw 1257// CHECK: lodsw 1258// CHECK: lodsw 1259// CHECK: lodsw 1260 lodsw 1261 lodsw %ds:(%rsi), %ax 1262 lodsw (%rsi), %ax 1263 lods %ds:(%rsi), %ax 1264 lods (%rsi), %ax 1265 1266// CHECK: lodsl (%rsi), %eax # encoding: [0xad] 1267// CHECK: lodsl 1268// CHECK: lodsl 1269// CHECK: lodsl 1270// CHECK: lodsl 1271 lodsl 1272 lodsl %ds:(%rsi), %eax 1273 lodsl (%rsi), %eax 1274 lods %ds:(%rsi), %eax 1275 lods (%rsi), %eax 1276 1277// CHECK: lodsq (%rsi), %rax # encoding: [0x48,0xad] 1278// CHECK: lodsq 1279// CHECK: lodsq 1280// CHECK: lodsq 1281// CHECK: lodsq 1282 lodsq 1283 lodsq %ds:(%rsi), %rax 1284 lodsq (%rsi), %rax 1285 lods %ds:(%rsi), %rax 1286 lods (%rsi), %rax 1287 1288// CHECK: stosb %al, %es:(%rdi) # encoding: [0xaa] 1289// CHECK: stosb 1290// CHECK: stosb 1291 stosb 1292 stosb %al, %es:(%rdi) 1293 stos %al, %es:(%rdi) 1294 1295// CHECK: stosw %ax, %es:(%rdi) # encoding: [0x66,0xab] 1296// CHECK: stosw 1297// CHECK: stosw 1298 stosw 1299 stosw %ax, %es:(%rdi) 1300 stos %ax, %es:(%rdi) 1301 1302// CHECK: stosl %eax, %es:(%rdi) # encoding: [0xab] 1303// CHECK: stosl 1304// CHECK: stosl 1305 stosl 1306 stosl %eax, %es:(%rdi) 1307 stos %eax, %es:(%rdi) 1308 1309// CHECK: stosq %rax, %es:(%rdi) # encoding: [0x48,0xab] 1310// CHECK: stosq 1311// CHECK: stosq 1312 stosq 1313 stosq %rax, %es:(%rdi) 1314 stos %rax, %es:(%rdi) 1315 1316// CHECK: strw 1317// CHECK: encoding: [0x66,0x0f,0x00,0xc8] 1318 str %ax 1319 1320// CHECK: strl 1321// CHECK: encoding: [0x0f,0x00,0xc8] 1322 str %eax 1323 1324// CHECK: strw 1325// CHECK: encoding: [0x66,0x0f,0x00,0xc8] 1326 str %ax 1327 1328// CHECK: strq 1329// CHECK: encoding: [0x48,0x0f,0x00,0xc8] 1330 str %rax 1331 1332// CHECK: movq %rdi, %xmm0 1333// CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7] 1334 movq %rdi,%xmm0 1335 1336// CHECK: movq %xmm0, %rax 1337// CHECK: encoding: [0x66,0x48,0x0f,0x7e,0xc0] 1338 movq %xmm0, %rax 1339 1340// CHECK: movntil %eax, (%rdi) 1341// CHECK: encoding: [0x0f,0xc3,0x07] 1342// CHECK: movntil 1343movntil %eax, (%rdi) 1344movnti %eax, (%rdi) 1345 1346// CHECK: movntiq %rax, (%rdi) 1347// CHECK: encoding: [0x48,0x0f,0xc3,0x07] 1348// CHECK: movntiq 1349movntiq %rax, (%rdi) 1350movnti %rax, (%rdi) 1351 1352// CHECK: pclmulqdq $17, %xmm0, %xmm1 1353// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x11] 1354pclmulhqhqdq %xmm0, %xmm1 1355 1356// CHECK: pclmulqdq $1, %xmm0, %xmm1 1357// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x01] 1358pclmulqdq $1, %xmm0, %xmm1 1359 1360// CHECK: pclmulqdq $16, (%rdi), %xmm1 1361// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x10] 1362pclmullqhqdq (%rdi), %xmm1 1363 1364// CHECK: pclmulqdq $0, (%rdi), %xmm1 1365// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x00] 1366pclmulqdq $0, (%rdi), %xmm1 1367 1368// PR10345 1369// CHECK: nop 1370// CHECK: encoding: [0x90] 1371xchgq %rax, %rax 1372 1373// CHECK: xchgl %eax, %eax 1374// CHECK: encoding: [0x87,0xc0] 1375xchgl %eax, %eax 1376 1377// CHECK: xchgw %ax, %ax 1378// CHECK: encoding: [0x66,0x90] 1379xchgw %ax, %ax 1380 1381// CHECK: xchgl %ecx, %eax 1382// CHECK: encoding: [0x91] 1383xchgl %ecx, %eax 1384 1385// CHECK: xchgl %ecx, %eax 1386// CHECK: encoding: [0x91] 1387xchgl %eax, %ecx 1388 1389// CHECK: sysexit 1390// CHECK: encoding: [0x0f,0x35] 1391sysexit 1392 1393// CHECK: sysexitl 1394// CHECK: encoding: [0x0f,0x35] 1395sysexitl 1396 1397// CHECK: sysexitq 1398// CHECK: encoding: [0x48,0x0f,0x35] 1399sysexitq 1400 1401// CHECK: clac 1402// CHECK: encoding: [0x0f,0x01,0xca] 1403clac 1404 1405// CHECK: stac 1406// CHECK: encoding: [0x0f,0x01,0xcb] 1407stac 1408 1409// CHECK: faddp %st, %st(1) 1410// CHECK: fmulp %st, %st(1) 1411// CHECK: fsubp %st, %st(1) 1412// CHECK: fsubrp %st, %st(1) 1413// CHECK: fdivp %st, %st(1) 1414// CHECK: fdivrp %st, %st(1) 1415faddp %st, %st(1) 1416fmulp %st, %st(1) 1417fsubp %st, %st(1) 1418fsubrp %st, %st(1) 1419fdivp %st, %st(1) 1420fdivrp %st, %st(1) 1421 1422// CHECK: faddp %st, %st(1) 1423// CHECK: fmulp %st, %st(1) 1424// CHECK: fsubp %st, %st(1) 1425// CHECK: fsubrp %st, %st(1) 1426// CHECK: fdivp %st, %st(1) 1427// CHECK: fdivrp %st, %st(1) 1428faddp %st(1), %st 1429fmulp %st(1), %st 1430fsubp %st(1), %st 1431fsubrp %st(1), %st 1432fdivp %st(1), %st 1433fdivrp %st(1), %st 1434 1435// CHECK: faddp %st, %st(1) 1436// CHECK: fmulp %st, %st(1) 1437// CHECK: fsubp %st, %st(1) 1438// CHECK: fsubrp %st, %st(1) 1439// CHECK: fdivp %st, %st(1) 1440// CHECK: fdivrp %st, %st(1) 1441faddp %st(1) 1442fmulp %st(1) 1443fsubp %st(1) 1444fsubrp %st(1) 1445fdivp %st(1) 1446fdivrp %st(1) 1447 1448// CHECK: faddp %st, %st(1) 1449// CHECK: fmulp %st, %st(1) 1450// CHECK: fsubp %st, %st(1) 1451// CHECK: fsubrp %st, %st(1) 1452// CHECK: fdivp %st, %st(1) 1453// CHECK: fdivrp %st, %st(1) 1454faddp 1455fmulp 1456fsubp 1457fsubrp 1458fdivp 1459fdivrp 1460 1461// CHECK: fadd %st(1) 1462// CHECK: fmul %st(1) 1463// CHECK: fsub %st(1) 1464// CHECK: fsubr %st(1) 1465// CHECK: fdiv %st(1) 1466// CHECK: fdivr %st(1) 1467fadd %st(1), %st 1468fmul %st(1), %st 1469fsub %st(1), %st 1470fsubr %st(1), %st 1471fdiv %st(1), %st 1472fdivr %st(1), %st 1473 1474// CHECK: fadd %st, %st(1) 1475// CHECK: fmul %st, %st(1) 1476// CHECK: fsub %st, %st(1) 1477// CHECK: fsubr %st, %st(1) 1478// CHECK: fdiv %st, %st(1) 1479// CHECK: fdivr %st, %st(1) 1480fadd %st, %st(1) 1481fmul %st, %st(1) 1482fsub %st, %st(1) 1483fsubr %st, %st(1) 1484fdiv %st, %st(1) 1485fdivr %st, %st(1) 1486 1487// CHECK: fadd %st(1) 1488// CHECK: fmul %st(1) 1489// CHECK: fsub %st(1) 1490// CHECK: fsubr %st(1) 1491// CHECK: fdiv %st(1) 1492// CHECK: fdivr %st(1) 1493fadd %st(1) 1494fmul %st(1) 1495fsub %st(1) 1496fsubr %st(1) 1497fdiv %st(1) 1498fdivr %st(1) 1499 1500// CHECK: movd %xmm0, %eax 1501// CHECK: movq %xmm0, %rax 1502// CHECK: movq %xmm0, %rax 1503// CHECK: vmovd %xmm0, %eax 1504// CHECK: vmovq %xmm0, %rax 1505// CHECK: vmovq %xmm0, %rax 1506movd %xmm0, %eax 1507movq %xmm0, %rax 1508movq %xmm0, %rax 1509vmovd %xmm0, %eax 1510vmovd %xmm0, %rax 1511vmovq %xmm0, %rax 1512 1513// CHECK: seto 3735928559(%r10,%r9,8) 1514// CHECK: encoding: [0x43,0x0f,0x90,0x84,0xca,0xef,0xbe,0xad,0xde] 1515 seto 0xdeadbeef(%r10,%r9,8) 1516 1517// CHECK: monitorx 1518// CHECK: encoding: [0x0f,0x01,0xfa] 1519 monitorx 1520 1521// CHECK: monitorx 1522// CHECK: encoding: [0x0f,0x01,0xfa] 1523 monitorx %rax, %rcx, %rdx 1524 1525// CHECK: mwaitx 1526// CHECK: encoding: [0x0f,0x01,0xfb] 1527 mwaitx 1528 1529// CHECK: mwaitx 1530// CHECK: encoding: [0x0f,0x01,0xfb] 1531 mwaitx %rax, %rcx, %rbx 1532 1533// CHECK: clzero 1534// CHECK: encoding: [0x0f,0x01,0xfc] 1535 clzero 1536 1537// CHECK: clzero 1538// CHECK: encoding: [0x0f,0x01,0xfc] 1539 clzero %rax 1540 1541// CHECK: movl %r15d, (%r15,%r15) 1542// CHECK: encoding: [0x47,0x89,0x3c,0x3f] 1543movl %r15d, (%r15,%r15) 1544 1545// CHECK: nopq 3735928559(%rbx,%rcx,8) 1546// CHECK: encoding: [0x48,0x0f,0x1f,0x84,0xcb,0xef,0xbe,0xad,0xde] 1547nopq 0xdeadbeef(%rbx,%rcx,8) 1548 1549// CHECK: nopq %rax 1550// CHECK: encoding: [0x48,0x0f,0x1f,0xc0] 1551nopq %rax 1552 1553// CHECK: rdpid %rax 1554// CHECK: encoding: [0xf3,0x0f,0xc7,0xf8] 1555rdpid %rax 1556 1557// CHECK: ptwritel 3735928559(%rbx,%rcx,8) 1558// CHECK: encoding: [0xf3,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde] 1559ptwritel 0xdeadbeef(%rbx,%rcx,8) 1560 1561// CHECK: ptwritel %eax 1562// CHECK: encoding: [0xf3,0x0f,0xae,0xe0] 1563ptwritel %eax 1564 1565// CHECK: ptwriteq 3735928559(%rbx,%rcx,8) 1566// CHECK: encoding: [0xf3,0x48,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde] 1567ptwriteq 0xdeadbeef(%rbx,%rcx,8) 1568 1569// CHECK: ptwriteq %rax 1570// CHECK: encoding: [0xf3,0x48,0x0f,0xae,0xe0] 1571ptwriteq %rax 1572 1573// CHECK: wbnoinvd 1574// CHECK: encoding: [0xf3,0x0f,0x09] 1575wbnoinvd 1576 1577// CHECK: cldemote 4(%rax) 1578// CHECK: encoding: [0x0f,0x1c,0x40,0x04] 1579cldemote 4(%rax) 1580 1581// CHECK: cldemote 3735928559(%rbx,%rcx,8) 1582// CHECK: encoding: [0x0f,0x1c,0x84,0xcb,0xef,0xbe,0xad,0xde] 1583cldemote 0xdeadbeef(%rbx,%rcx,8) 1584 1585// CHECK: umonitor %r13 1586// CHECK: encoding: [0xf3,0x41,0x0f,0xae,0xf5] 1587umonitor %r13 1588 1589// CHECK: umonitor %rax 1590// CHECK: encoding: [0xf3,0x0f,0xae,0xf0] 1591umonitor %rax 1592 1593// CHECK: umonitor %eax 1594// CHECK: encoding: [0x67,0xf3,0x0f,0xae,0xf0] 1595umonitor %eax 1596 1597// CHECK: umwait %r15 1598// CHECK: encoding: [0xf2,0x41,0x0f,0xae,0xf7] 1599umwait %r15 1600 1601// CHECK: umwait %ebx 1602// CHECK: encoding: [0xf2,0x0f,0xae,0xf3] 1603umwait %ebx 1604 1605// CHECK: tpause %r15 1606// CHECK: encoding: [0x66,0x41,0x0f,0xae,0xf7] 1607tpause %r15 1608 1609// CHECK: tpause %ebx 1610// CHECK: encoding: [0x66,0x0f,0xae,0xf3] 1611tpause %ebx 1612 1613// CHECK: movdiri %r15, 485498096 1614// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x3c,0x25,0xf0,0x1c,0xf0,0x1c] 1615movdiri %r15, 485498096 1616 1617// CHECK: movdiri %r15, (%rdx) 1618// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x3a] 1619movdiri %r15, (%rdx) 1620 1621// CHECK: movdiri %r15, 64(%rdx) 1622// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x7a,0x40] 1623movdiri %r15, 64(%rdx) 1624 1625// CHECK: movdir64b 485498096, %rax 1626// CHECK: # encoding: [0x66,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1627movdir64b 485498096, %rax 1628 1629// CHECK: movdir64b 485498096, %eax 1630// CHECK: # encoding: [0x67,0x66,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1631movdir64b 485498096, %eax 1632 1633// CHECK: movdir64b (%rdx), %r15 1634// CHECK: # encoding: [0x66,0x44,0x0f,0x38,0xf8,0x3a] 1635movdir64b (%rdx), %r15 1636 1637// CHECK: pconfig 1638// CHECK: # encoding: [0x0f,0x01,0xc5] 1639pconfig 1640 1641// CHECK: encls 1642// CHECK: encoding: [0x0f,0x01,0xcf] 1643encls 1644 1645// CHECK: enclu 1646// CHECK: encoding: [0x0f,0x01,0xd7] 1647enclu 1648 1649// CHECK: enclv 1650// CHECK: encoding: [0x0f,0x01,0xc0] 1651enclv 1652 1653// CHECK: movq %rax, %rbx 1654// CHECK: encoding: [0x48,0x8b,0xd8] 1655movq.s %rax, %rbx 1656 1657// CHECK: movq %rax, %rbx 1658// CHECK: encoding: [0x48,0x8b,0xd8] 1659mov.s %rax, %rbx 1660 1661// CHECK: movl %eax, %ebx 1662// CHECK: encoding: [0x8b,0xd8] 1663movl.s %eax, %ebx 1664 1665// CHECK: movl %eax, %ebx 1666// CHECK: encoding: [0x8b,0xd8] 1667mov.s %eax, %ebx 1668 1669// CHECK: movw %ax, %bx 1670// CHECK: encoding: [0x66,0x8b,0xd8] 1671movw.s %ax, %bx 1672 1673// CHECK: movw %ax, %bx 1674// CHECK: encoding: [0x66,0x8b,0xd8] 1675mov.s %ax, %bx 1676 1677// CHECK: movb %al, %bl 1678// CHECK: encoding: [0x8a,0xd8] 1679movb.s %al, %bl 1680 1681// CHECK: movb %al, %bl 1682// CHECK: encoding: [0x8a,0xd8] 1683mov.s %al, %bl 1684 1685// CHECK: movq %mm0, %mm1 1686// CHECK: encoding: [0x0f,0x7f,0xc1] 1687movq.s %mm0, %mm1 1688 1689// CHECK: movq %xmm0, %xmm1 1690// CHECK: encoding: [0x66,0x0f,0xd6,0xc1] 1691movq.s %xmm0, %xmm1 1692 1693// CHECK: movdqa %xmm0, %xmm1 1694// CHECK: encoding: [0x66,0x0f,0x7f,0xc1] 1695movdqa.s %xmm0, %xmm1 1696 1697// CHECK: movdqu %xmm0, %xmm1 1698// CHECK: encoding: [0xf3,0x0f,0x7f,0xc1] 1699movdqu.s %xmm0, %xmm1 1700 1701// CHECK: movaps %xmm0, %xmm1 1702// CHECK: encoding: [0x0f,0x29,0xc1] 1703movaps.s %xmm0, %xmm1 1704 1705// CHECK: movups %xmm0, %xmm1 1706// CHECK: encoding: [0x0f,0x11,0xc1] 1707movups.s %xmm0, %xmm1 1708 1709// CHECK: movapd %xmm0, %xmm1 1710// CHECK: encoding: [0x66,0x0f,0x29,0xc1] 1711movapd.s %xmm0, %xmm1 1712 1713// CHECK: movupd %xmm0, %xmm1 1714// CHECK: encoding: [0x66,0x0f,0x11,0xc1] 1715movupd.s %xmm0, %xmm1 1716 1717// CHECK: vmovq %xmm0, %xmm8 1718// CHECK: encoding: [0xc4,0xc1,0x79,0xd6,0xc0] 1719vmovq.s %xmm0, %xmm8 1720 1721// CHECK: vmovq %xmm8, %xmm0 1722// CHECK: encoding: [0xc5,0x79,0xd6,0xc0] 1723vmovq.s %xmm8, %xmm0 1724 1725// CHECK: vmovdqa %xmm0, %xmm8 1726// CHECK: encoding: [0xc4,0xc1,0x79,0x7f,0xc0] 1727vmovdqa.s %xmm0, %xmm8 1728 1729// CHECK: vmovdqa %xmm8, %xmm0 1730// CHECK: encoding: [0xc5,0x79,0x7f,0xc0] 1731vmovdqa.s %xmm8, %xmm0 1732 1733// CHECK: vmovdqu %xmm0, %xmm8 1734// CHECK: encoding: [0xc4,0xc1,0x7a,0x7f,0xc0] 1735vmovdqu.s %xmm0, %xmm8 1736 1737// CHECK: vmovdqu %xmm8, %xmm0 1738// CHECK: encoding: [0xc5,0x7a,0x7f,0xc0] 1739vmovdqu.s %xmm8, %xmm0 1740 1741// CHECK: vmovaps %xmm0, %xmm8 1742// CHECK: encoding: [0xc4,0xc1,0x78,0x29,0xc0] 1743vmovaps.s %xmm0, %xmm8 1744 1745// CHECK: vmovaps %xmm8, %xmm0 1746// CHECK: encoding: [0xc5,0x78,0x29,0xc0] 1747vmovaps.s %xmm8, %xmm0 1748 1749// CHECK: vmovups %xmm0, %xmm8 1750// CHECK: encoding: [0xc4,0xc1,0x78,0x11,0xc0] 1751vmovups.s %xmm0, %xmm8 1752 1753// CHECK: vmovups %xmm8, %xmm0 1754// CHECK: encoding: [0xc5,0x78,0x11,0xc0] 1755vmovups.s %xmm8, %xmm0 1756 1757// CHECK: vmovapd %xmm0, %xmm8 1758// CHECK: encoding: [0xc4,0xc1,0x79,0x29,0xc0] 1759vmovapd.s %xmm0, %xmm8 1760 1761// CHECK: vmovapd %xmm8, %xmm0 1762// CHECK: encoding: [0xc5,0x79,0x29,0xc0] 1763vmovapd.s %xmm8, %xmm0 1764 1765// CHECK: vmovupd %xmm0, %xmm8 1766// CHECK: encoding: [0xc4,0xc1,0x79,0x11,0xc0] 1767vmovupd.s %xmm0, %xmm8 1768 1769// CHECK: vmovupd %xmm8, %xmm0 1770// CHECK: encoding: [0xc5,0x79,0x11,0xc0] 1771vmovupd.s %xmm8, %xmm0 1772 1773// __asm __volatile( 1774// "pushf \n\t" 1775// "popf \n\t" 1776// "rep \n\t" 1777// ".byte 0x0f, 0xa7, 0xd0" 1778// ); 1779// CHECK: pushfq 1780// CHECK-NEXT: popfq 1781// CHECK-NEXT: rep 1782// CHECK-NEXT: .byte 15 1783// CHECK-NEXT: .byte 167 1784// CHECK-NEXT: .byte 208 1785pushfq 1786popfq 1787rep 1788.byte 15 1789.byte 167 1790.byte 208 1791 1792// CHECK: lock 1793// CHECK: cmpxchgl 1794 cmp $0, %edx 1795 je 1f 1796 lock 17971: cmpxchgl %ecx,(%rdi) 1798 1799// CHECK: rep 1800// CHECK-NEXT: byte 1801rep 1802.byte 0xa4 # movsb 1803 1804// CHECK: lock 1805// This line has to be the last one in the file 1806lock 1807 1808// CHECK: enqcmd 268435456(%ebp,%r14d,8), %esi 1809// CHECK: encoding: [0x67,0xf2,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10] 1810enqcmd 0x10000000(%ebp, %r14d, 8), %esi 1811 1812// CHECK: enqcmd (%r9d), %edi 1813// CHECK: encoding: [0x67,0xf2,0x41,0x0f,0x38,0xf8,0x39] 1814enqcmd (%r9d), %edi 1815 1816// CHECK: enqcmd 8128(%ecx), %eax 1817// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00] 1818enqcmd 8128(%ecx), %eax 1819 1820// CHECK: enqcmd -8192(%edx), %ebx 1821// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff] 1822enqcmd -8192(%edx), %ebx 1823 1824// CHECK: enqcmd 485498096, %eax 1825// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1826enqcmd 485498096, %eax 1827 1828// CHECK: enqcmds 268435456(%ebp,%r14d,8), %esi 1829// CHECK: encoding: [0x67,0xf3,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10] 1830enqcmds 0x10000000(%ebp, %r14d, 8), %esi 1831 1832// CHECK: enqcmds (%r9d), %edi 1833// CHECK: encoding: [0x67,0xf3,0x41,0x0f,0x38,0xf8,0x39] 1834enqcmds (%r9d), %edi 1835 1836// CHECK: enqcmds 8128(%ecx), %eax 1837// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00] 1838enqcmds 8128(%ecx), %eax 1839 1840// CHECK: enqcmds -8192(%edx), %ebx 1841// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff] 1842enqcmds -8192(%edx), %ebx 1843 1844// CHECK: enqcmds 485498096, %eax 1845// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1846enqcmds 485498096, %eax 1847 1848// CHECK: enqcmd 268435456(%rbp,%r14,8), %rsi 1849// CHECK: encoding: [0xf2,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10] 1850enqcmd 0x10000000(%rbp, %r14, 8), %rsi 1851 1852// CHECK: enqcmd (%r9), %rdi 1853// CHECK: encoding: [0xf2,0x41,0x0f,0x38,0xf8,0x39] 1854enqcmd (%r9), %rdi 1855 1856// CHECK: enqcmd 8128(%rcx), %rax 1857// CHECK: encoding: [0xf2,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00] 1858enqcmd 8128(%rcx), %rax 1859 1860// CHECK: enqcmd -8192(%rdx), %rbx 1861// CHECK: encoding: [0xf2,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff] 1862enqcmd -8192(%rdx), %rbx 1863 1864// CHECK: enqcmd 485498096, %rax 1865// CHECK: encoding: [0xf2,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1866enqcmd 485498096, %rax 1867 1868// CHECK: enqcmds 268435456(%rbp,%r14,8), %rsi 1869// CHECK: encoding: [0xf3,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10] 1870enqcmds 0x10000000(%rbp, %r14, 8), %rsi 1871 1872// CHECK: enqcmds (%r9), %rdi 1873// CHECK: encoding: [0xf3,0x41,0x0f,0x38,0xf8,0x39] 1874enqcmds (%r9), %rdi 1875 1876// CHECK: enqcmds 8128(%rcx), %rax 1877// CHECK: encoding: [0xf3,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00] 1878enqcmds 8128(%rcx), %rax 1879 1880// CHECK: enqcmds -8192(%rdx), %rbx 1881// CHECK: encoding: [0xf3,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff] 1882enqcmds -8192(%rdx), %rbx 1883 1884// CHECK: enqcmds 485498096, %rax 1885// CHECK: encoding: [0xf3,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] 1886enqcmds 485498096, %rax 1887 1888// CHECK: serialize 1889// CHECK: encoding: [0x0f,0x01,0xe8] 1890serialize 1891 1892// CHECK: xsusldtrk 1893// CHECK: encoding: [0xf2,0x0f,0x01,0xe8] 1894xsusldtrk 1895 1896// CHECK: xresldtrk 1897// CHECK: encoding: [0xf2,0x0f,0x01,0xe9] 1898xresldtrk 1899 1900// CHECK: ud1q %rdx, %rdi 1901// CHECK: encoding: [0x48,0x0f,0xb9,0xfa] 1902ud1 %rdx, %rdi 1903 1904// CHECK: ud1q (%rbx), %rcx 1905// CHECK: encoding: [0x48,0x0f,0xb9,0x0b] 1906ud2b (%rbx), %rcx 1907 1908// Requires no displacement by default 1909// CHECK: movl $1, (%rax) 1910// CHECK: encoding: [0xc7,0x00,0x01,0x00,0x00,0x00] 1911// CHECK: movl $1, (%rax) 1912// CHECK: encoding: [0xc7,0x40,0x00,0x01,0x00,0x00,0x00] 1913// CHECK: movl $1, (%rax) 1914// CHECK: encoding: [0xc7,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1915// CHECK: movl $1, (%rax) 1916// CHECK: encoding: [0xc7,0x40,0x00,0x01,0x00,0x00,0x00] 1917// CHECK: movl $1, (%rax) 1918// CHECK: encoding: [0xc7,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1919movl $1, (%rax) 1920{disp8} movl $1, (%rax) 1921{disp32} movl $1, (%rax) 1922movl.d8 $1, (%rax) 1923movl.d32 $1, (%rax) 1924 1925// Requires disp8 by default 1926// CHECK: movl $1, (%rbp) 1927// CHECK: encoding: [0xc7,0x45,0x00,0x01,0x00,0x00,0x00] 1928// CHECK: movl $1, (%rbp) 1929// CHECK: encoding: [0xc7,0x45,0x00,0x01,0x00,0x00,0x00] 1930// CHECK: movl $1, (%rbp) 1931// CHECK: encoding: [0xc7,0x85,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1932movl $1, (%rbp) 1933{disp8} movl $1, (%rbp) 1934{disp32} movl $1, (%rbp) 1935 1936// Requires disp8 by default 1937// CHECK: movl $1, (%r13) 1938// CHECK: encoding: [0x41,0xc7,0x45,0x00,0x01,0x00,0x00,0x00] 1939// CHECK: movl $1, (%r13) 1940// CHECK: encoding: [0x41,0xc7,0x45,0x00,0x01,0x00,0x00,0x00] 1941// CHECK: movl $1, (%r13) 1942// CHECK: encoding: [0x41,0xc7,0x85,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1943movl $1, (%r13) 1944{disp8} movl $1, (%r13) 1945{disp32} movl $1, (%r13) 1946 1947// Requires disp8 by default 1948// CHECK: movl $1, 8(%rax) 1949// CHECK: encoding: [0xc7,0x40,0x08,0x01,0x00,0x00,0x00] 1950// CHECK: movl $1, 8(%rax) 1951// CHECK: encoding: [0xc7,0x40,0x08,0x01,0x00,0x00,0x00] 1952// CHECK: movl $1, 8(%rax) 1953// CHECK: encoding: [0xc7,0x80,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1954movl $1, 8(%rax) 1955{disp8} movl $1, 8(%rax) 1956{disp32} movl $1, 8(%rax) 1957 1958// Requires no displacement by default 1959// CHECK: movl $1, (%rax,%rbx,4) 1960// CHECK: encoding: [0xc7,0x04,0x98,0x01,0x00,0x00,0x00] 1961// CHECK: movl $1, (%rax,%rbx,4) 1962// CHECK: encoding: [0xc7,0x44,0x98,0x00,0x01,0x00,0x00,0x00] 1963// CHECK: movl $1, (%rax,%rbx,4) 1964// CHECK: encoding: [0xc7,0x84,0x98,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1965movl $1, (%rax,%rbx,4) 1966{disp8} movl $1, (%rax,%rbx,4) 1967{disp32} movl $1, (%rax,%rbx,4) 1968 1969// Requires disp8 by default. 1970// CHECK: movl $1, 8(%rax,%rbx,4) 1971// CHECK: encoding: [0xc7,0x44,0x98,0x08,0x01,0x00,0x00,0x00] 1972// CHECK: movl $1, 8(%rax,%rbx,4) 1973// CHECK: encoding: [0xc7,0x44,0x98,0x08,0x01,0x00,0x00,0x00] 1974// CHECK: movl $1, 8(%rax,%rbx,4) 1975// CHECK: encoding: [0xc7,0x84,0x98,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1976movl $1, 8(%rax,%rbx,4) 1977{disp8} movl $1, 8(%rax,%rbx,4) 1978{disp32} movl $1, 8(%rax,%rbx,4) 1979 1980// Requires disp8 by default. 1981// CHECK: movl $1, (%rbp,%rbx,4) 1982// CHECK: encoding: [0xc7,0x44,0x9d,0x00,0x01,0x00,0x00,0x00] 1983// CHECK: movl $1, (%rbp,%rbx,4) 1984// CHECK: encoding: [0xc7,0x44,0x9d,0x00,0x01,0x00,0x00,0x00] 1985// CHECK: movl $1, (%rbp,%rbx,4) 1986// CHECK: encoding: [0xc7,0x84,0x9d,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1987movl $1, (%rbp,%rbx,4) 1988{disp8} movl $1, (%rbp,%rbx,4) 1989{disp32} movl $1, (%rbp,%rbx,4) 1990 1991// Requires disp8 by default. 1992// CHECK: movl $1, (%r13,%rbx,4) 1993// CHECK: encoding: [0x41,0xc7,0x44,0x9d,0x00,0x01,0x00,0x00,0x00] 1994// CHECK: movl $1, (%r13,%rbx,4) 1995// CHECK: encoding: [0x41,0xc7,0x44,0x9d,0x00,0x01,0x00,0x00,0x00] 1996// CHECK: movl $1, (%r13,%rbx,4) 1997// CHECK: encoding: [0x41,0xc7,0x84,0x9d,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1998movl $1, (%r13,%rbx,4) 1999{disp8} movl $1, (%r13,%rbx,4) 2000{disp32} movl $1, (%r13,%rbx,4) 2001 2002// CHECK: seamcall 2003// CHECK: encoding: [0x66,0x0f,0x01,0xcf] 2004seamcall 2005 2006// CHECK: seamret 2007// CHECK: encoding: [0x66,0x0f,0x01,0xcd] 2008seamret 2009 2010// CHECK: seamops 2011// CHECK: encoding: [0x66,0x0f,0x01,0xce] 2012seamops 2013 2014// CHECK: tdcall 2015// CHECK: encoding: [0x66,0x0f,0x01,0xcc] 2016tdcall 2017 2018// CHECK: hreset 2019// CHECK: encoding: [0xf3,0x0f,0x3a,0xf0,0xc0,0x01] 2020hreset $1 2021 2022// CHECK: uiret 2023// CHECK: encoding: [0xf3,0x0f,0x01,0xec] 2024uiret 2025 2026// CHECK: clui 2027// CHECK: encoding: [0xf3,0x0f,0x01,0xee] 2028clui 2029 2030// CHECK: stui 2031// CHECK: encoding: [0xf3,0x0f,0x01,0xef] 2032stui 2033 2034// CHECK: testui 2035// CHECK: encoding: [0xf3,0x0f,0x01,0xed] 2036testui 2037 2038// CHECK: senduipi %rax 2039// CHECK: encoding: [0xf3,0x0f,0xc7,0xf0] 2040senduipi %rax 2041 2042// CHECK: senduipi %rdx 2043// CHECK: encoding: [0xf3,0x0f,0xc7,0xf2] 2044senduipi %rdx 2045 2046// CHECK: senduipi %r8 2047// CHECK: encoding: [0xf3,0x41,0x0f,0xc7,0xf0] 2048senduipi %r8 2049 2050// CHECK: senduipi %r13 2051// CHECK: encoding: [0xf3,0x41,0x0f,0xc7,0xf5] 2052senduipi %r13 2053