// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s

// CHECK:      aadd qword ptr [rbp + 8*r14 + 268435456], r9
// CHECK: encoding: [0x4e,0x0f,0x38,0xfc,0x8c,0xf5,0x00,0x00,0x00,0x10]
               aadd qword ptr [rbp + 8*r14 + 268435456], r9

// CHECK:      aadd qword ptr [r8 + 4*rax + 291], r9
// CHECK: encoding: [0x4d,0x0f,0x38,0xfc,0x8c,0x80,0x23,0x01,0x00,0x00]
               aadd qword ptr [r8 + 4*rax + 291], r9

// CHECK:      aadd qword ptr [rip], r9
// CHECK: encoding: [0x4c,0x0f,0x38,0xfc,0x0d,0x00,0x00,0x00,0x00]
               aadd qword ptr [rip], r9

// CHECK:      aadd qword ptr [2*rbp - 512], r9
// CHECK: encoding: [0x4c,0x0f,0x38,0xfc,0x0c,0x6d,0x00,0xfe,0xff,0xff]
               aadd qword ptr [2*rbp - 512], r9

// CHECK:      aadd qword ptr [rcx + 2032], r9
// CHECK: encoding: [0x4c,0x0f,0x38,0xfc,0x89,0xf0,0x07,0x00,0x00]
               aadd qword ptr [rcx + 2032], r9

// CHECK:      aadd qword ptr [rdx - 2048], r9
// CHECK: encoding: [0x4c,0x0f,0x38,0xfc,0x8a,0x00,0xf8,0xff,0xff]
               aadd qword ptr [rdx - 2048], r9

// CHECK:      aadd dword ptr [esp + 8*esi + 268435456], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x9c,0xf4,0x00,0x00,0x00,0x10]
               aadd dword ptr [esp + 8*esi + 268435456], ebx

// CHECK:      aadd dword ptr [edi + 4*eax + 291], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x9c,0x87,0x23,0x01,0x00,0x00]
               aadd dword ptr [edi + 4*eax + 291], ebx

// CHECK:      aadd dword ptr [eax], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x18]
               aadd dword ptr [eax], ebx

// CHECK:      aadd dword ptr [2*ebp - 512], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x1c,0x6d,0x00,0xfe,0xff,0xff]
               aadd dword ptr [2*ebp - 512], ebx

// CHECK:      aadd dword ptr [ecx + 2032], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x99,0xf0,0x07,0x00,0x00]
               aadd dword ptr [ecx + 2032], ebx

// CHECK:      aadd dword ptr [edx - 2048], ebx
// CHECK: encoding: [0x67,0x0f,0x38,0xfc,0x9a,0x00,0xf8,0xff,0xff]
               aadd dword ptr [edx - 2048], ebx

// CHECK:      aand qword ptr [rbp + 8*r14 + 268435456], r9
// CHECK: encoding: [0x66,0x4e,0x0f,0x38,0xfc,0x8c,0xf5,0x00,0x00,0x00,0x10]
               aand qword ptr [rbp + 8*r14 + 268435456], r9

// CHECK:      aand qword ptr [r8 + 4*rax + 291], r9
// CHECK: encoding: [0x66,0x4d,0x0f,0x38,0xfc,0x8c,0x80,0x23,0x01,0x00,0x00]
               aand qword ptr [r8 + 4*rax + 291], r9

// CHECK:      aand qword ptr [rip], r9
// CHECK: encoding: [0x66,0x4c,0x0f,0x38,0xfc,0x0d,0x00,0x00,0x00,0x00]
               aand qword ptr [rip], r9

// CHECK:      aand qword ptr [2*rbp - 512], r9
// CHECK: encoding: [0x66,0x4c,0x0f,0x38,0xfc,0x0c,0x6d,0x00,0xfe,0xff,0xff]
               aand qword ptr [2*rbp - 512], r9

// CHECK:      aand qword ptr [rcx + 2032], r9
// CHECK: encoding: [0x66,0x4c,0x0f,0x38,0xfc,0x89,0xf0,0x07,0x00,0x00]
               aand qword ptr [rcx + 2032], r9

// CHECK:      aand qword ptr [rdx - 2048], r9
// CHECK: encoding: [0x66,0x4c,0x0f,0x38,0xfc,0x8a,0x00,0xf8,0xff,0xff]
               aand qword ptr [rdx - 2048], r9

// CHECK:      aand dword ptr [esp + 8*esi + 268435456], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x9c,0xf4,0x00,0x00,0x00,0x10]
               aand dword ptr [esp + 8*esi + 268435456], ebx

// CHECK:      aand dword ptr [edi + 4*eax + 291], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x9c,0x87,0x23,0x01,0x00,0x00]
               aand dword ptr [edi + 4*eax + 291], ebx

// CHECK:      aand dword ptr [eax], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x18]
               aand dword ptr [eax], ebx

// CHECK:      aand dword ptr [2*ebp - 512], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x1c,0x6d,0x00,0xfe,0xff,0xff]
               aand dword ptr [2*ebp - 512], ebx

// CHECK:      aand dword ptr [ecx + 2032], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x99,0xf0,0x07,0x00,0x00]
               aand dword ptr [ecx + 2032], ebx

// CHECK:      aand dword ptr [edx - 2048], ebx
// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xfc,0x9a,0x00,0xf8,0xff,0xff]
               aand dword ptr [edx - 2048], ebx

// CHECK:      aor qword ptr [rbp + 8*r14 + 268435456], r9
// CHECK: encoding: [0xf2,0x4e,0x0f,0x38,0xfc,0x8c,0xf5,0x00,0x00,0x00,0x10]
               aor qword ptr [rbp + 8*r14 + 268435456], r9

// CHECK:      aor qword ptr [r8 + 4*rax + 291], r9
// CHECK: encoding: [0xf2,0x4d,0x0f,0x38,0xfc,0x8c,0x80,0x23,0x01,0x00,0x00]
               aor qword ptr [r8 + 4*rax + 291], r9

// CHECK:      aor qword ptr [rip], r9
// CHECK: encoding: [0xf2,0x4c,0x0f,0x38,0xfc,0x0d,0x00,0x00,0x00,0x00]
               aor qword ptr [rip], r9

// CHECK:      aor qword ptr [2*rbp - 512], r9
// CHECK: encoding: [0xf2,0x4c,0x0f,0x38,0xfc,0x0c,0x6d,0x00,0xfe,0xff,0xff]
               aor qword ptr [2*rbp - 512], r9

// CHECK:      aor qword ptr [rcx + 2032], r9
// CHECK: encoding: [0xf2,0x4c,0x0f,0x38,0xfc,0x89,0xf0,0x07,0x00,0x00]
               aor qword ptr [rcx + 2032], r9

// CHECK:      aor qword ptr [rdx - 2048], r9
// CHECK: encoding: [0xf2,0x4c,0x0f,0x38,0xfc,0x8a,0x00,0xf8,0xff,0xff]
               aor qword ptr [rdx - 2048], r9

// CHECK:      aor dword ptr [esp + 8*esi + 268435456], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x9c,0xf4,0x00,0x00,0x00,0x10]
               aor dword ptr [esp + 8*esi + 268435456], ebx

// CHECK:      aor dword ptr [edi + 4*eax + 291], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x9c,0x87,0x23,0x01,0x00,0x00]
               aor dword ptr [edi + 4*eax + 291], ebx

// CHECK:      aor dword ptr [eax], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x18]
               aor dword ptr [eax], ebx

// CHECK:      aor dword ptr [2*ebp - 512], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x1c,0x6d,0x00,0xfe,0xff,0xff]
               aor dword ptr [2*ebp - 512], ebx

// CHECK:      aor dword ptr [ecx + 2032], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x99,0xf0,0x07,0x00,0x00]
               aor dword ptr [ecx + 2032], ebx

// CHECK:      aor dword ptr [edx - 2048], ebx
// CHECK: encoding: [0x67,0xf2,0x0f,0x38,0xfc,0x9a,0x00,0xf8,0xff,0xff]
               aor dword ptr [edx - 2048], ebx

// CHECK:      axor qword ptr [rbp + 8*r14 + 268435456], r9
// CHECK: encoding: [0xf3,0x4e,0x0f,0x38,0xfc,0x8c,0xf5,0x00,0x00,0x00,0x10]
               axor qword ptr [rbp + 8*r14 + 268435456], r9

// CHECK:      axor qword ptr [r8 + 4*rax + 291], r9
// CHECK: encoding: [0xf3,0x4d,0x0f,0x38,0xfc,0x8c,0x80,0x23,0x01,0x00,0x00]
               axor qword ptr [r8 + 4*rax + 291], r9

// CHECK:      axor qword ptr [rip], r9
// CHECK: encoding: [0xf3,0x4c,0x0f,0x38,0xfc,0x0d,0x00,0x00,0x00,0x00]
               axor qword ptr [rip], r9

// CHECK:      axor qword ptr [2*rbp - 512], r9
// CHECK: encoding: [0xf3,0x4c,0x0f,0x38,0xfc,0x0c,0x6d,0x00,0xfe,0xff,0xff]
               axor qword ptr [2*rbp - 512], r9

// CHECK:      axor qword ptr [rcx + 2032], r9
// CHECK: encoding: [0xf3,0x4c,0x0f,0x38,0xfc,0x89,0xf0,0x07,0x00,0x00]
               axor qword ptr [rcx + 2032], r9

// CHECK:      axor qword ptr [rdx - 2048], r9
// CHECK: encoding: [0xf3,0x4c,0x0f,0x38,0xfc,0x8a,0x00,0xf8,0xff,0xff]
               axor qword ptr [rdx - 2048], r9

// CHECK:      axor dword ptr [esp + 8*esi + 268435456], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x9c,0xf4,0x00,0x00,0x00,0x10]
               axor dword ptr [esp + 8*esi + 268435456], ebx

// CHECK:      axor dword ptr [edi + 4*eax + 291], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x9c,0x87,0x23,0x01,0x00,0x00]
               axor dword ptr [edi + 4*eax + 291], ebx

// CHECK:      axor dword ptr [eax], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x18]
               axor dword ptr [eax], ebx

// CHECK:      axor dword ptr [2*ebp - 512], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x1c,0x6d,0x00,0xfe,0xff,0xff]
               axor dword ptr [2*ebp - 512], ebx

// CHECK:      axor dword ptr [ecx + 2032], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x99,0xf0,0x07,0x00,0x00]
               axor dword ptr [ecx + 2032], ebx

// CHECK:      axor dword ptr [edx - 2048], ebx
// CHECK: encoding: [0x67,0xf3,0x0f,0x38,0xfc,0x9a,0x00,0xf8,0xff,0xff]
               axor dword ptr [edx - 2048], ebx
