aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ms-inline-asm.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-22 19:43:17 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-22 19:43:17 +0000
commit5a12aca46db5477f7e35a70dbec8d3afe5549ac0 (patch)
tree7d22e6ff0bcf5a73a00977f156c19d57b56ed526 /test/CodeGen/ms-inline-asm.c
parent4d3ee9bc48dc1e6aea0b0d451a4b98e20b04ce00 (diff)
[ms-inline asm] Test case for r166433.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ms-inline-asm.c')
-rw-r--r--test/CodeGen/ms-inline-asm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c
index 87f2334170..98a384c70e 100644
--- a/test/CodeGen/ms-inline-asm.c
+++ b/test/CodeGen/ms-inline-asm.c
@@ -137,3 +137,11 @@ void t14() {
// CHECK: t14
// CHECK: call void asm sideeffect inteldialect ".if 1\0A\09mov eax, dword ptr $0\0A\09.else\0A\09.endif", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
}
+
+void t15() {
+ int var = 10;
+ __asm mov eax, var ; eax = 10
+ __asm mov eax, offset var ; eax = address of myvar
+// CHECK: t15
+// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
+}