diff test/asm1.d @ 276:21f85bac0b1a trunk

[svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
author lindquist
date Fri, 20 Jun 2008 17:45:13 +0200
parents 5825d48b27d1
children
line wrap: on
line diff
--- a/test/asm1.d	Thu Jun 19 17:30:32 2008 +0200
+++ b/test/asm1.d	Fri Jun 20 17:45:13 2008 +0200
@@ -1,8 +1,20 @@
 module asm1;
 
+extern(C) int printf(char*, ...);
+
 void main()
 {
-    version(LLVM_InlineAsm_X86_64)
+    version(D_InlineAsm_X86)
+    {
+	int x;
+	asm
+	{
+	    mov EAX, 42;
+	    mov x, EAX;
+	}
+	printf("x = %d\n", x);
+    }
+    else version(D_InlineAsm_X86_64)
     {
         long x;
         asm
@@ -14,6 +26,6 @@
     }
     else
     {
-        static assert(0, "no llvm inline asm for this platform yet");
+        static assert(0, "no inline asm for this platform yet");
     }
 }