Author: mcrosier
Date: Wed Dec 5 13:52:05 2012
New Revision: 169411
URL: http://llvm.org/viewvc/llvm-project?rev=169411&view=rev
Log:
[ms-inline asm] Add more tests.
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=169411&r1=169410&r2=169411&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Wed Dec 5 13:52:05 2012
@@ -200,3 +200,32 @@
// CHECK: t20
// CHECK: call void asm sideeffect inteldialect "mov eax, $$4",
"~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
}
+
+
+void t21() {
+ __asm {
+ __asm push ebx
+ __asm mov ebx, 0x07
+ __asm pop ebx
+ }
+// CHECK: t21
+// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx,
$$0x07\0A\09pop ebx", "~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind
+}
+
+extern void t22_helper(int x);
+void t22() {
+ int x = 0;
+ __asm {
+ __asm push ebx
+ __asm mov ebx, esp
+ }
+ t22_helper(x);
+ __asm {
+ __asm mov esp, ebx
+ __asm pop ebx
+ }
+// CHECK: t22
+// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, esp",
"~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void @t22_helper
+// CHECK: call void asm sideeffect inteldialect "mov esp, ebx\0A\09pop ebx",
"~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() nounwind
+}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits