[cfe-commits] r172744 - in /cfe/trunk/test: CodeGen/ms-inline-asm.c Sema/ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Thu Jan 17 11:22:48 PST 2013


Author: mcrosier
Date: Thu Jan 17 13:22:48 2013
New Revision: 172744

URL: http://llvm.org/viewvc/llvm-project?rev=172744&view=rev
Log:
[ms-inline asm] Updates and test case for r172743.
Part of rdar://12576868

Modified:
    cfe/trunk/test/CodeGen/ms-inline-asm.c
    cfe/trunk/test/Sema/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=172744&r1=172743&r2=172744&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Thu Jan 17 13:22:48 2013
@@ -198,10 +198,38 @@
 }
 
 void t20() {
+  char bar;
   int foo;
-  __asm mov eax, TYPE foo
+  char _bar[2];
+  int _foo[4];
+
+  __asm mov eax, LENGTH foo
+  __asm mov eax, LENGTH bar
+  __asm mov eax, LENGTH _foo
+  __asm mov eax, LENGTH _bar
 // CHECK: t20
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$4", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$2", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+
+  __asm mov eax, TYPE foo
+  __asm mov eax, TYPE bar
+  __asm mov eax, TYPE _foo
+  __asm mov eax, TYPE _bar
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$4", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$4", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+
+  __asm mov eax, SIZE foo
+  __asm mov eax, SIZE bar
+  __asm mov eax, SIZE _foo
+  __asm mov eax, SIZE _bar
 // CHECK: call void asm sideeffect inteldialect "mov eax, $$4", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$16", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$2", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
 }
 
 void t21() {

Modified: cfe/trunk/test/Sema/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms-inline-asm.c?rev=172744&r1=172743&r2=172744&view=diff
==============================================================================
--- cfe/trunk/test/Sema/ms-inline-asm.c (original)
+++ cfe/trunk/test/Sema/ms-inline-asm.c Thu Jan 17 13:22:48 2013
@@ -19,20 +19,4 @@
   __asm {
     mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
   }
-  f();
-  __asm {
-    mov eax, TYPE cat // expected-error {{Unable to lookup TYPE of expr!}}
-  }
-  f();
-  __asm {
-    mov eax, SIZE foo // expected-error {{Unsupported directive!}}
-  }
-  f();
-  __asm {
-    mov eax, LENGTH foo // expected-error {{Unsupported directive!}}
-  }
-  f();
-  __asm {
-    mov eax, TYPE bar // expected-error {{Unable to lookup TYPE of expr!}}
-  }
 }





More information about the cfe-commits mailing list