summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-12 01:00:01 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-12 01:00:01 +0000
commit8bc655605b34df95fca46d1dda778b67016bf127 (patch)
tree5a82ec98ad854f64519bd829ea32c2e97ff48a5e /llvm/test/MC
parent697b0042191d0f8a947b4ad443855fc8b47366fd (diff)
downloadbcm5719-llvm-8bc655605b34df95fca46d1dda778b67016bf127.tar.gz
bcm5719-llvm-8bc655605b34df95fca46d1dda778b67016bf127.zip
[ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Part of rdar://12470373 llvm-svn: 174926
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/X86/intel-syntax-hex.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/intel-syntax-hex.s b/llvm/test/MC/X86/intel-syntax-hex.s
new file mode 100644
index 00000000000..35376c611bf
--- /dev/null
+++ b/llvm/test/MC/X86/intel-syntax-hex.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s
+// rdar://12470373
+
+// Checks to make sure we parse the hexidecimal suffix properly.
+// CHECK: movl $10, %eax
+ mov eax, 10
+// CHECK: movl $16, %eax
+ mov eax, 10h
+// CHECK: movl $16, %eax
+ mov eax, 10H
+// CHECK: movl $4294967295, %eax
+ mov eax, 0ffffffffh
+// CHECK: movl $4294967295, %eax
+ mov eax, 0xffffffff
+// CHECK: movl $4294967295, %eax
+ mov eax, 0xffffffffh
+// CHECK: movl $15, %eax
+ mov eax, 0fh
+// CHECK: movl $162, %eax
+ mov eax, 0a2h
+// CHECK: movl $162, %eax
+ mov eax, 0xa2
+// CHECK: movl $162, %eax
+ mov eax, 0xa2h
+// CHECK: movl $674, %eax
+ mov eax, 2a2h
OpenPOWER on IntegriCloud