# RUN: llvm-mc -triple x86_64 -disassemble %s | FileCheck %s --check-prefix=ATT
# RUN: llvm-mc -triple x86_64 -disassemble -output-asm-variant=1 %s | FileCheck %s --check-prefix=INTEL
## R bit
# ATT: leal (%rax), %r16d
# INTEL: lea r16d, [rax]
0xd5,0x40,0x8d,0x00
# ATT: leal (%rax), %r17d
# INTEL: lea r17d, [rax]
0xd5,0x40,0x8d,0x08
# ATT: leal (%rax), %r18d
# INTEL: lea r18d, [rax]
0xd5,0x40,0x8d,0x10
# ATT: leal (%rax), %r19d
# INTEL: lea r19d, [rax]
0xd5,0x40,0x8d,0x18
# ATT: leal (%rax), %r20d
# INTEL: lea r20d, [rax]
0xd5,0x40,0x8d,0x20
# ATT: leal (%rax), %r21d
# INTEL: lea r21d, [rax]
0xd5,0x40,0x8d,0x28
# ATT: leal (%rax), %r22d
# INTEL: lea r22d, [rax]
0xd5,0x40,0x8d,0x30
# ATT: leal (%rax), %r23d
# INTEL: lea r23d, [rax]
0xd5,0x40,0x8d,0x38
# ATT: leal (%rax), %r24d
# INTEL: lea r24d, [rax]
0xd5,0x44,0x8d,0x00
# ATT: leal (%rax), %r25d
# INTEL: lea r25d, [rax]
0xd5,0x44,0x8d,0x08
# ATT: leal (%rax), %r26d
# INTEL: lea r26d, [rax]
0xd5,0x44,0x8d,0x10
# ATT: leal (%rax), %r27d
# INTEL: lea r27d, [rax]
0xd5,0x44,0x8d,0x18
# ATT: leal (%rax), %r28d
# INTEL: lea r28d, [rax]
0xd5,0x44,0x8d,0x20
# ATT: leal (%rax), %r29d
# INTEL: lea r29d, [rax]
0xd5,0x44,0x8d,0x28
# ATT: leal (%rax), %r30d
# INTEL: lea r30d, [rax]
0xd5,0x44,0x8d,0x30
# ATT: leal (%rax), %r31d
# INTEL: lea r31d, [rax]
0xd5,0x44,0x8d,0x38
## X bit
# ATT: leal (,%r16), %eax
# INTEL: lea eax, [1*r16]
0xd5,0x20,0x8d,0x04,0x05,0x00,0x00,0x00,0x00
# ATT: leal (,%r17), %eax
# INTEL: lea eax, [1*r17]
0xd5,0x20,0x8d,0x04,0x0d,0x00,0x00,0x00,0x00
# ATT: leal (,%r18), %eax
# INTEL: lea eax, [1*r18]
0xd5,0x20,0x8d,0x04,0x15,0x00,0x00,0x00,0x00
# ATT: leal (,%r19), %eax
# INTEL: lea eax, [1*r19]
0xd5,0x20,0x8d,0x04,0x1d,0x00,0x00,0x00,0x00
# ATT: leal (,%r20), %eax
# INTEL: lea eax, [1*r20]
0xd5,0x20,0x8d,0x04,0x25,0x00,0x00,0x00,0x00
# ATT: leal (,%r21), %eax
# INTEL: lea eax, [1*r21]
0xd5,0x20,0x8d,0x04,0x2d,0x00,0x00,0x00,0x00
# ATT: leal (,%r22), %eax
# INTEL: lea eax, [1*r22]
0xd5,0x20,0x8d,0x04,0x35,0x00,0x00,0x00,0x00
# ATT: leal (,%r23), %eax
# INTEL: lea eax, [1*r23]
0xd5,0x20,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00
# ATT: leal (,%r24), %eax
# INTEL: lea eax, [1*r24]
0xd5,0x22,0x8d,0x04,0x05,0x00,0x00,0x00,0x00
# ATT: leal (,%r25), %eax
# INTEL: lea eax, [1*r25]
0xd5,0x22,0x8d,0x04,0x0d,0x00,0x00,0x00,0x00
# ATT: leal (,%r26), %eax
# INTEL: lea eax, [1*r26]
0xd5,0x22,0x8d,0x04,0x15,0x00,0x00,0x00,0x00
# ATT: leal (,%r27), %eax
# INTEL: lea eax, [1*r27]
0xd5,0x22,0x8d,0x04,0x1d,0x00,0x00,0x00,0x00
# ATT: leal (,%r28), %eax
# INTEL: lea eax, [1*r28]
0xd5,0x22,0x8d,0x04,0x25,0x00,0x00,0x00,0x00
# ATT: leal (,%r29), %eax
# INTEL: lea eax, [1*r29]
0xd5,0x22,0x8d,0x04,0x2d,0x00,0x00,0x00,0x00
# ATT: leal (,%r30), %eax
# INTEL: lea eax, [1*r30]
0xd5,0x22,0x8d,0x04,0x35,0x00,0x00,0x00,0x00
# ATT: leal (,%r31), %eax
# INTEL: lea eax, [1*r31]
0xd5,0x22,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00
## B bit
# ATT: leal (%r16), %eax
# INTEL: lea eax, [r16]
0xd5,0x10,0x8d,0x00
# ATT: leal (%r17), %eax
# INTEL: lea eax, [r17]
0xd5,0x10,0x8d,0x01
# ATT: leal (%r18), %eax
# INTEL: lea eax, [r18]
0xd5,0x10,0x8d,0x02
# ATT: leal (%r19), %eax
# INTEL: lea eax, [r19]
0xd5,0x10,0x8d,0x03
# ATT: leal (%r20,%riz), %eax
# INTEL: lea eax, [r20 + riz]
0xd5,0x10,0x8d,0x04,0x24
# ATT: leal (%r21), %eax
# INTEL: lea eax, [r21]
0xd5,0x10,0x8d,0x45,0x00
# ATT: leal (%r22), %eax
# INTEL: lea eax, [r22]
0xd5,0x10,0x8d,0x06
# ATT: leal (%r23), %eax
# INTEL: lea eax, [r23]
0xd5,0x10,0x8d,0x07
# ATT: leal (%r24), %eax
# INTEL: lea eax, [r24]
0xd5,0x11,0x8d,0x00
# ATT: leal (%r25), %eax
# INTEL: lea eax, [r25]
0xd5,0x11,0x8d,0x01
# ATT: leal (%r26), %eax
# INTEL: lea eax, [r26]
0xd5,0x11,0x8d,0x02
# ATT: leal (%r27), %eax
# INTEL: lea eax, [r27]
0xd5,0x11,0x8d,0x03
# ATT: leal (%r28,%riz), %eax
# INTEL: lea eax, [r28 + riz]
0xd5,0x11,0x8d,0x04,0x24
# ATT: leal (%r29), %eax
# INTEL: lea eax, [r29]
0xd5,0x11,0x8d,0x45,0x00
# ATT: leal (%r30), %eax
# INTEL: lea eax, [r30]
0xd5,0x11,0x8d,0x06
# ATT: leal (%r31), %eax
# INTEL: lea eax, [r31]
0xd5,0x11,0x8d,0x07
## SIB
# ATT: leal 1(%r20,%riz), %eax
# INTEL: lea eax, [r20 + riz + 1]
0xd5,0x10,0x8d,0x44,0x24,0x01
# ATT: leal 1(%r28,%riz), %eax
# INTEL: lea eax, [r28 + riz + 1]
0xd5,0x11,0x8d,0x44,0x24,0x01
# ATT: leal 129(%r20,%riz), %eax
# INTEL: lea eax, [r20 + riz + 129]
0xd5,0x10,0x8d,0x84,0x24,0x81,0x00,0x00,0x00
# ATT: leal 129(%r28,%riz), %eax
# INTEL: lea eax, [r28 + riz + 129]
0xd5,0x11,0x8d,0x84,0x24,0x81,0x00,0x00,0x00
## W bit
# ATT: leaq (%rax), %r16
# INTEL: lea r16, [rax]
0xd5,0x48,0x8d,0x00
# ATT: leaq (%r16), %rax
# INTEL: lea rax, [r16]
0xd5,0x18,0x8d,0x00
# ATT: leaq (,%r16), %rax
# INTEL: lea rax, [1*r16]
0xd5,0x28,0x8d,0x04,0x05,0x00,0x00,0x00,0x00
## M bit
# ATT: imull %eax, %r16d
# INTEL: imul r16d, eax
0xd5,0xc0,0xaf,0xc0