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

// CHECK: lkgs ax
// CHECK: encoding: [0xf2,0x0f,0x00,0xf0]
          lkgs ax

// CHECK: lkgs r12w
// CHECK: encoding: [0xf2,0x41,0x0f,0x00,0xf4]
          lkgs r12w

// CHECK: lkgs word ptr [rbp + 8*r14 + 268435456]
// CHECK: encoding: [0xf2,0x42,0x0f,0x00,0xb4,0xf5,0x00,0x00,0x00,0x10]
          lkgs word ptr [rbp + 8*r14 + 268435456]

// CHECK: lkgs word ptr [r8 + 4*rax + 291]
// CHECK: encoding: [0xf2,0x41,0x0f,0x00,0xb4,0x80,0x23,0x01,0x00,0x00]
          lkgs word ptr [r8 + 4*rax + 291]

// CHECK: lkgs word ptr [rip]
// CHECK: encoding: [0xf2,0x0f,0x00,0x35,0x00,0x00,0x00,0x00]
          lkgs word ptr [rip]

// CHECK: lkgs word ptr [2*rbp - 64]
// CHECK: encoding: [0xf2,0x0f,0x00,0x34,0x6d,0xc0,0xff,0xff,0xff]
          lkgs word ptr [2*rbp - 64]

// CHECK: lkgs word ptr [rcx + 254]
// CHECK: encoding: [0xf2,0x0f,0x00,0xb1,0xfe,0x00,0x00,0x00]
          lkgs word ptr [rcx + 254]

// CHECK: lkgs word ptr [rdx - 256]
// CHECK: encoding: [0xf2,0x0f,0x00,0xb2,0x00,0xff,0xff,0xff]
          lkgs word ptr [rdx - 256]

