changeset 545:a42610460308

Automated merge with http://hg.dsource.org/projects/llvmdc
author Christian Kamm <kamm incasoftware de>
date Sun, 24 Aug 2008 18:25:45 +0200
parents f478666f5b96 (diff) 1c7220171d41 (current diff)
children 406aee3416bb
files
diffstat 3 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/mars.c	Sun Aug 24 18:25:34 2008 +0200
+++ b/dmd/mars.c	Sun Aug 24 18:25:45 2008 +0200
@@ -314,7 +314,7 @@
     global.params.os = OSWindows;
 #elif linux
     global.params.os = OSLinux;
-#elif __APPLY__
+#elif __APPLE__
     global.params.os = OSMacOSX;
 #else
 #error
@@ -759,7 +759,9 @@
 
     case OSMacOSX:
 	VersionCondition::addPredefinedGlobalIdent("darwin");
+    VersionCondition::addPredefinedGlobalIdent("Posix");
 	global.params.tt_os = "-pc-darwin-gnu";
+    break;
 
     default:
 	assert(false && "Target OS not supported");
--- a/runtime/internal/monitor.c	Sun Aug 24 18:25:34 2008 +0200
+++ b/runtime/internal/monitor.c	Sun Aug 24 18:25:45 2008 +0200
@@ -12,7 +12,7 @@
 #include <assert.h>
 
 #if _WIN32
-#elif linux
+#elif linux || __APPLE__
 #define USE_PTHREADS	1
 #else
 #endif
--- a/runtime/llvmdc.diff	Sun Aug 24 18:25:34 2008 +0200
+++ b/runtime/llvmdc.diff	Sun Aug 24 18:25:45 2008 +0200
@@ -88,7 +88,7 @@
 ===================================================================
 --- lib/common/tango/core/Thread.d	(revision 3899)
 +++ lib/common/tango/core/Thread.d	(working copy)
-@@ -244,8 +244,30 @@
+@@ -244,8 +244,29 @@
          }
          body
          {
@@ -100,7 +100,6 @@
 +                    uint eax,ecx,edx,ebx,ebp,esi,edi;
 +                    asm
 +                    {
-+                        //pushad              ;
 +                        mov eax[EBP], EAX      ;
 +                        mov ecx[EBP], ECX      ;
 +                        mov edx[EBP], EDX      ;
@@ -120,22 +119,25 @@
                  asm
                  {
                      pushad;
-@@ -297,6 +319,10 @@
+@@ -297,8 +318,12 @@
                  }
              }
  
+-            version( D_InlineAsm_X86 )
 +            version( LLVMDC)
-+            {
+             {
 +                // nothing to pop
 +            }
-             version( D_InlineAsm_X86 )
-             {
++            else version( D_InlineAsm_X86 )
++            {
                  asm
+                 {
+                     popad;
 Index: lib/gc/basic/gcx.d
 ===================================================================
 --- lib/gc/basic/gcx.d	(revision 3899)
 +++ lib/gc/basic/gcx.d	(working copy)
-@@ -2178,6 +2178,29 @@
+@@ -2178,6 +2178,28 @@
              __builtin_unwind_init();
              sp = & sp;
          }
@@ -146,7 +148,6 @@
 +                uint eax,ecx,edx,ebx,ebp,esi,edi;
 +                asm
 +                {
-+                    pushad                 ;
 +                    mov eax[EBP], EAX      ;
 +                    mov ecx[EBP], ECX      ;
 +                    mov edx[EBP], EDX      ;
@@ -165,7 +166,7 @@
          else
          {
          asm
-@@ -2191,6 +2214,10 @@
+@@ -2191,6 +2213,10 @@
          {
              // nothing to do
          }