llvm-6502/test/MC/X86/intel-syntax-binary.s
Chad Rosier 8915e27704 [ms-inline asm] Add support for lexing binary integers with a [bB] suffix.
This is complicated by backward labels (e.g., 0b can be both a backward label
and a binary zero).  The current implementation assumes [0-9]b is always a
label and thus it's possible for 0b and 1b to not be interpreted correctly for
ms-style inline assembly.  However, this is relatively simple to fix in the
inline assembly (i.e., drop the [bB]).

This patch also limits backward labels to [0-9]b, so that only 0b and 1b are
ambiguous.
Part of rdar://12470373


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174983 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 18:29:02 +00:00

15 lines
375 B
ArmAsm

// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s
// rdar://12470373
// Checks to make sure we parse the binary suffix properly.
// CHECK: movl $1, %eax
mov eax, 01b
// CHECK: movl $2, %eax
mov eax, 10b
// CHECK: movl $3, %eax
mov eax, 11b
// CHECK: movl $3, %eax
mov eax, 11B
// CHECK: movl $2711, %eax
mov eax, 101010010111B