summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-24 17:23:06 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-24 17:23:06 +0000
commit42146d9a0602ae4331d3f6324fb57788e2f240df (patch)
tree2253a4cab8bd50aed113c915298027b4223d63ac /clang/test/CodeGen/ms-inline-asm.c
parent2289f2c932542a0e193ef562d1517602c3c94faf (diff)
downloadbcm5719-llvm-42146d9a0602ae4331d3f6324fb57788e2f240df.tar.gz
bcm5719-llvm-42146d9a0602ae4331d3f6324fb57788e2f240df.zip
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register. llvm-svn: 166594
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.c')
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 3997c53ee26..597d58148ea 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -146,3 +146,10 @@ void t15() {
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
// CHECK: call void asm sideeffect inteldialect "mov eax, $0", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
}
+
+void t16() {
+ int var = 10;
+ __asm mov [eax], offset var
+// CHECK: t16
+// CHECK: call void asm sideeffect inteldialect "mov [eax], $0", "r,~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
+}
OpenPOWER on IntegriCloud