aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-12 18:45:21 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-12 18:45:21 +0000
commit8e70b00253f7c00814795ae287030efc2053ce8c (patch)
tree2fadff9edf24630686087d280adc648369059895
parentbe9f4208632ca301384a6f484bc88ef8c3331523 (diff)
[ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174989 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/ms-inline-asm.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c
index 532292f795..e6869b2230 100644
--- a/test/CodeGen/ms-inline-asm.c
+++ b/test/CodeGen/ms-inline-asm.c
@@ -274,3 +274,37 @@ void t24() {
// CHECK: t24
// CHECK: call void asm sideeffect inteldialect "call $0", "r,~{dirflag},~{fpsr},~{flags}"(void ()* @t24_helper) nounwind
}
+
+void t25() {
+ __asm mov eax, 0ffffffffh
+ __asm mov eax, 0fh
+ __asm mov eax, 0a2h
+ __asm mov eax, 0xa2h
+ __asm mov eax, 0xa2
+// CHECK: t25
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0ffffffffh", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0fh", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0a2h", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0xa2h", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0xa2", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+}
+
+void t26() {
+ __asm pushad
+ __asm mov eax, 0
+ __asm __emit 0fh
+ __asm __emit 0a2h
+ __asm popad
+// CHECK: t26
+// CHECK: call void asm sideeffect inteldialect "pushad", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$0", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "__emit 0fh", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "__emit 0a2h", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "popad", "~{dirflag},~{fpsr},~{flags}"() nounwind
+}
+
+void t27() {
+ __asm mov eax, fs:[0h]
+// CHECK: t27
+// CHECL: call void asm sideeffect inteldialect "mov eax, fs:[0h]", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+}