]> granicus.if.org Git - clang/commitdiff
[ms-inline asm] Test case for r166526.
authorChad Rosier <mcrosier@apple.com>
Tue, 23 Oct 2012 23:42:25 +0000 (23:42 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 23 Oct 2012 23:42:25 +0000 (23:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166527 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/ms-inline-asm-64.c [new file with mode: 0644]

diff --git a/test/CodeGen/ms-inline-asm-64.c b/test/CodeGen/ms-inline-asm-64.c
new file mode 100644 (file)
index 0000000..6bf3e20
--- /dev/null
@@ -0,0 +1,9 @@
+// REQUIRES: x86-64-registered-target
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O0 -fms-extensions -fenable-experimental-ms-inline-asm -w -emit-llvm -o - | FileCheck %s
+
+void t1() {
+  int var = 10;
+  __asm mov rax, offset var ; rax = address of myvar
+// CHECK: t1
+// CHECK: call void asm sideeffect inteldialect "mov rax, $0", "r,~{rax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
+}