# HG changeset patch # User Christian Kamm # Date 1219595145 -7200 # Node ID a426104603081d5ac09588525a4e151a47490514 # Parent f478666f5b969c98e7f86b53feef52b350020f6a# Parent 1c7220171d41b3edf746cdc797653aef5797100a Automated merge with http://hg.dsource.org/projects/llvmdc diff -r 1c7220171d41 -r a42610460308 dmd/mars.c --- 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"); diff -r 1c7220171d41 -r a42610460308 runtime/internal/monitor.c --- 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 #if _WIN32 -#elif linux +#elif linux || __APPLE__ #define USE_PTHREADS 1 #else #endif diff -r 1c7220171d41 -r a42610460308 runtime/llvmdc.diff --- 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 }