166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s 266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// PR7195 466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: callw 42 566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x66,0xe8,A,A] 666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman callw 42 766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// rdar://8127102 966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq %gs:(%rdi), %rax 1066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x65,0x48,0x8b,0x07] 1166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovq %gs:(%rdi), %rax 1266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 1366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b %bl, %eax 1466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0xc3] 1566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b %bl, %eax 1666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 1766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b 4(%rbx), %eax 1866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04] 1966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b 4(%rbx), %eax 2066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 2166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32w %bx, %eax 2266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x66,0xf2,0x0f,0x38,0xf1,0xc3] 2366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32w %bx, %eax 2466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 2566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32w 4(%rbx), %eax 2666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x66,0xf2,0x0f,0x38,0xf1,0x43,0x04] 2766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32w 4(%rbx), %eax 2866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 2966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l %ebx, %eax 3066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0xc3] 3166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l %ebx, %eax 3266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 3366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l 4(%rbx), %eax 3466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x43,0x04] 3566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l 4(%rbx), %eax 3666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 3766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l 3735928559(%rbx,%rcx,8), %ecx 3866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x8c,0xcb,0xef,0xbe,0xad,0xde] 3966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l 0xdeadbeef(%rbx,%rcx,8),%ecx 4066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 4166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l 69, %ecx 4266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0x45,0x00,0x00,0x00] 4366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l 0x45,%ecx 4466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 4566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l 32493, %ecx 4666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xed,0x7e,0x00,0x00] 4766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l 0x7eed,%ecx 4866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 4966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l 3133065982, %ecx 5066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xfe,0xca,0xbe,0xba] 5166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l 0xbabecafe,%ecx 5266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 5366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32l %ecx, %ecx 5466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0xc9] 5566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32l %ecx,%ecx 5666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 5766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b %r11b, %eax 5866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x41,0x0f,0x38,0xf0,0xc3] 5966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b %r11b, %eax 6066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 6166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b 4(%rbx), %eax 6266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04] 6366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b 4(%rbx), %eax 6466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 6566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b %dil, %rax 6666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf0,0xc7] 6766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b %dil,%rax 6866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 6966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b %r11b, %rax 7066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x49,0x0f,0x38,0xf0,0xc3] 7166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b %r11b,%rax 7266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 7366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32b 4(%rbx), %rax 7466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf0,0x43,0x04] 7566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32b 4(%rbx), %rax 7666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 7766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32q %rbx, %rax 7866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf1,0xc3] 7966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32q %rbx, %rax 8066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 8166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: crc32q 4(%rbx), %rax 8266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf1,0x43,0x04] 8366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman crc32q 4(%rbx), %rax 8466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 8566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %r8, %mm1 8666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x49,0x0f,0x6e,0xc8] 8766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %r8, %mm1 8866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 8966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %r8d, %mm1 9066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x41,0x0f,0x6e,0xc8] 9166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %r8d, %mm1 9266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 9366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %rdx, %mm1 9466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x0f,0x6e,0xca] 9566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %rdx, %mm1 9666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 9766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %edx, %mm1 9866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x0f,0x6e,0xca] 9966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %edx, %mm1 10066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 10166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %mm1, %r8 10266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x49,0x0f,0x7e,0xc8] 10366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %mm1, %r8 10466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 10566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %mm1, %r8d 10666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x41,0x0f,0x7e,0xc8] 10766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %mm1, %r8d 10866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 10966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %mm1, %rdx 11066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x0f,0x7e,0xca] 11166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %mm1, %rdx 11266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 11366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movd %mm1, %edx 11466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x0f,0x7e,0xca] 11566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanmovd %mm1, %edx 11666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 11766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// rdar://7840289 11866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: pshufb CPI1_0(%rip), %xmm1 11966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x66,0x0f,0x38,0x00,0x0d,A,A,A,A] 12066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: fixup A - offset: 5, value: CPI1_0-4 12166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanpshufb CPI1_0(%rip), %xmm1 12266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 12366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq 57005(,%riz), %rbx 12466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x8b,0x1c,0x25,0xad,0xde,0x00,0x00] 12566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman movq 57005(,%riz), %rbx 12666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 12766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq 48879(,%riz), %rax 12866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x8b,0x04,0x25,0xef,0xbe,0x00,0x00] 12966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman movq 48879(,%riz), %rax 13066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 13166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq -4(,%riz,8), %rax 13266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x8b,0x04,0xe5,0xfc,0xff,0xff,0xff] 13366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman movq -4(,%riz,8), %rax 13466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 13566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq (%rcx,%riz), %rax 13666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x8b,0x04,0x21] 13766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman movq (%rcx,%riz), %rax 13866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 13966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: movq (%rcx,%riz,8), %rax 14066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x8b,0x04,0xe1] 14166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman movq (%rcx,%riz,8), %rax 14266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 14366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: fxsaveq (%rax) 14466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x0f,0xae,0x00] 14566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman fxsaveq (%rax) 14666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 14766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: fxrstorq (%rax) 14866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x48,0x0f,0xae,0x08] 14966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman fxrstorq (%rax) 15066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 15166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: leave 15266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xc9] 15366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman leave 15466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 15566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: leave 15666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xc9] 15766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman leaveq 15866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 15966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: flds (%edi) 16066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x67,0xd9,0x07] 16166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman flds (%edi) 16266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 16366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: filds (%edi) 16466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0x67,0xdf,0x07] 16566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman filds (%edi) 16666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 16766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: flds (%rdi) 16866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xd9,0x07] 16966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman flds (%rdi) 17066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman 17166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: filds (%rdi) 17266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman// CHECK: encoding: [0xdf,0x07] 17366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman filds (%rdi) 174