aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ms-inline-asm.c
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
commitf7427273d0aeed94d025629f98e3099112107628 (patch)
treed8ffcbaec511181830df72450a5ce10fdf6ef2b6 /test/CodeGen/ms-inline-asm.c
parent39e177692ea2096af2ad0dcead79250b50958fa3 (diff)
[ms-inline asm] Test case for r166632.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ms-inline-asm.c')
-rw-r--r--test/CodeGen/ms-inline-asm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c
index 3c2025c07f..e875698684 100644
--- a/test/CodeGen/ms-inline-asm.c
+++ b/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
+}