summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-24 22:22:12 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-24 22:22:12 +0000
commit602d09d0aa87e7a26e2b14c0468e64f3a410da6f (patch)
tree21d251a3af23a3889acacab2da19781e00b8bdcd
parent5dcb4664f27630f88bdd12ca5dd6b7264998d749 (diff)
downloadbcm5719-llvm-602d09d0aa87e7a26e2b14c0468e64f3a410da6f.tar.gz
bcm5719-llvm-602d09d0aa87e7a26e2b14c0468e64f3a410da6f.zip
[ms-inline asm] Test case for r166632.
llvm-svn: 166633
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 3c2025c07f7..e875698684f 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -163,3 +163,19 @@ void t17() {
// CHECK: call void asm sideeffect inteldialect ".byte 0x43", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0x4B", "~{dirflag},~{fpsr},~{flags}"() nounwind
}
+
+struct t18_type { int a, b; };
+
+int t18() {
+ struct t18_type foo;
+ foo.a = 1;
+ foo.b = 2;
+ __asm {
+ lea ebx, foo
+ mov eax, [ebx].0
+ mov [ebx].4, ecx
+ }
+ return foo.b;
+// CHECK: t18
+// CHECK: call void asm sideeffect inteldialect "lea ebx, foo\0A\09mov eax, [ebx].0\0A\09mov [ebx].4, ecx", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+}
OpenPOWER on IntegriCloud