[cfe-commits] r166633 - /cfe/trunk/test/CodeGen/ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Wed Oct 24 15:22:12 PDT 2012


Author: mcrosier
Date: Wed Oct 24 17:22:12 2012
New Revision: 166633

URL: http://llvm.org/viewvc/llvm-project?rev=166633&view=rev
Log:
[ms-inline asm] Test case for r166632.

Modified:
    cfe/trunk/test/CodeGen/ms-inline-asm.c

Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=166633&r1=166632&r2=166633&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Wed Oct 24 17:22:12 2012
@@ -163,3 +163,19 @@
 // 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
+}





More information about the cfe-commits mailing list