Commits

Iain Buclaw  committed 0414cec Merge
  • Participants
  • Parent commits 3f532d7, 65cafac

Comments (0)

Files changed (5)

File d/druntime/core/sys/posix/setjmp.d

     {
         alias int[64] __jmp_buf;
     }
+    else version (PPC)
+    {
+        alias int[64 + (12*4)] __jmp_buf;
+    }
+    else version (PPC64)
+    {
+        alias long[64] __jmp_buf;   
+    }
     else
         static assert(0);
     struct __jmp_buf_tag

File d/druntime/core/threadasm.S

  ************************************************************************************/
 #if defined( __ppc__ ) || defined( __PPC__ ) || defined( __powerpc__ )
 
-
 /**
  * Performs a context switch.
  *
 _fiber_switchContext:
 
     /* Save linkage area */
-    mflr        r0
-    mfcr        r5
-    stw     r0, 8(r1)
-    stw     r5, 4(r1)
+    mflr        0
+    mfcr        5
+    stw     0, 8(1)
+    stw     5, 4(1)
 
     /* Save GPRs */
-    stw     r11, (-1 * 4)(r1)
-    stw     r13, (-2 * 4)(r1)
-    stw     r14, (-3 * 4)(r1)
-    stw     r15, (-4 * 4)(r1)
-    stw     r16, (-5 * 4)(r1)
-    stw     r17, (-6 * 4)(r1)
-    stw     r18, (-7 * 4)(r1)
-    stw     r19, (-8 * 4)(r1)
-    stw     r20, (-9 * 4)(r1)
-    stw     r21, (-10 * 4)(r1)
-    stw     r22, (-11 * 4)(r1)
-    stw     r23, (-12 * 4)(r1)
-    stw     r24, (-13 * 4)(r1)
-    stw     r25, (-14 * 4)(r1)
-    stw     r26, (-15 * 4)(r1)
-    stw     r27, (-16 * 4)(r1)
-    stw     r28, (-17 * 4)(r1)
-    stw     r29, (-18 * 4)(r1)
-    stw     r30, (-19 * 4)(r1)
-    stwu    r31, (-20 * 4)(r1)
+    stw     11, (-1 * 4)(1)
+    stw     13, (-2 * 4)(1)
+    stw     14, (-3 * 4)(1)
+    stw     15, (-4 * 4)(1)
+    stw     16, (-5 * 4)(1)
+    stw     17, (-6 * 4)(1)
+    stw     18, (-7 * 4)(1)
+    stw     19, (-8 * 4)(1)
+    stw     20, (-9 * 4)(1)
+    stw     21, (-10 * 4)(1)
+    stw     22, (-11 * 4)(1)
+    stw     23, (-12 * 4)(1)
+    stw     24, (-13 * 4)(1)
+    stw     25, (-14 * 4)(1)
+    stw     26, (-15 * 4)(1)
+    stw     27, (-16 * 4)(1)
+    stw     28, (-17 * 4)(1)
+    stw     29, (-18 * 4)(1)
+    stw     30, (-19 * 4)(1)
+    stwu    31, (-20 * 4)(1)
 
     /* We update the stack pointer here, since we do not want the GC to
        scan the floating point registers. */
 
     /* Save FPRs */
-    stfd    f14, (-1 * 8)(r1)
-    stfd    f15, (-2 * 8)(r1)
-    stfd    f16, (-3 * 8)(r1)
-    stfd    f17, (-4 * 8)(r1)
-    stfd    f18, (-5 * 8)(r1)
-    stfd    f19, (-6 * 8)(r1)
-    stfd    f20, (-7 * 8)(r1)
-    stfd    f21, (-8 * 8)(r1)
-    stfd    f22, (-9 * 8)(r1)
-    stfd    f23, (-10 * 8)(r1)
-    stfd    f24, (-11 * 8)(r1)
-    stfd    f25, (-12 * 8)(r1)
-    stfd    f26, (-13 * 8)(r1)
-    stfd    f27, (-14 * 8)(r1)
-    stfd    f28, (-15 * 8)(r1)
-    stfd    f29, (-16 * 8)(r1)
-    stfd    f30, (-17 * 8)(r1)
-    stfd    f31, (-18 * 8)(r1)
+    stfd    14, (-1 * 8)(1)
+    stfd    15, (-2 * 8)(1)
+    stfd    16, (-3 * 8)(1)
+    stfd    17, (-4 * 8)(1)
+    stfd    18, (-5 * 8)(1)
+    stfd    19, (-6 * 8)(1)
+    stfd    20, (-7 * 8)(1)
+    stfd    21, (-8 * 8)(1)
+    stfd    22, (-9 * 8)(1)
+    stfd    23, (-10 * 8)(1)
+    stfd    24, (-11 * 8)(1)
+    stfd    25, (-12 * 8)(1)
+    stfd    26, (-13 * 8)(1)
+    stfd    27, (-14 * 8)(1)
+    stfd    28, (-15 * 8)(1)
+    stfd    29, (-16 * 8)(1)
+    stfd    30, (-17 * 8)(1)
+    stfd    31, (-18 * 8)(1)
 
     /* Update the old stack pointer */
-    stw     r1, 0(r3)
+    stw     1, 0(3)
 
     /* Set new stack pointer */
-    addi        r1, r4, 20 * 4
+    addi        1, 4, 20 * 4
 
     /* Restore linkage area */
-    lwz     r0, 8(r1)
-    lwz     r5, 4(r1)
+    lwz     0, 8(1)
+    lwz     5, 4(1)
 
     /* Restore GPRs */
-    lwz     r11, (-1 * 4)(r1)
-    lwz     r13, (-2 * 4)(r1)
-    lwz     r14, (-3 * 4)(r1)
-    lwz     r15, (-4 * 4)(r1)
-    lwz     r16, (-5 * 4)(r1)
-    lwz     r17, (-6 * 4)(r1)
-    lwz     r18, (-7 * 4)(r1)
-    lwz     r19, (-8 * 4)(r1)
-    lwz     r20, (-9 * 4)(r1)
-    lwz     r21, (-10 * 4)(r1)
-    lwz     r22, (-11 * 4)(r1)
-    lwz     r23, (-12 * 4)(r1)
-    lwz     r24, (-13 * 4)(r1)
-    lwz     r25, (-14 * 4)(r1)
-    lwz     r26, (-15 * 4)(r1)
-    lwz     r27, (-16 * 4)(r1)
-    lwz     r28, (-17 * 4)(r1)
-    lwz     r29, (-18 * 4)(r1)
-    lwz     r30, (-19 * 4)(r1)
-    lwz     r31, (-20 * 4)(r1)
+    lwz     11, (-1 * 4)(1)
+    lwz     13, (-2 * 4)(1)
+    lwz     14, (-3 * 4)(1)
+    lwz     15, (-4 * 4)(1)
+    lwz     16, (-5 * 4)(1)
+    lwz     17, (-6 * 4)(1)
+    lwz     18, (-7 * 4)(1)
+    lwz     19, (-8 * 4)(1)
+    lwz     20, (-9 * 4)(1)
+    lwz     21, (-10 * 4)(1)
+    lwz     22, (-11 * 4)(1)
+    lwz     23, (-12 * 4)(1)
+    lwz     24, (-13 * 4)(1)
+    lwz     25, (-14 * 4)(1)
+    lwz     26, (-15 * 4)(1)
+    lwz     27, (-16 * 4)(1)
+    lwz     28, (-17 * 4)(1)
+    lwz     29, (-18 * 4)(1)
+    lwz     30, (-19 * 4)(1)
+    lwz     31, (-20 * 4)(1)
 
 
     /* Restore FPRs */
-    lfd     f14, (-1 * 8)(r4)
-    lfd     f15, (-2 * 8)(r4)
-    lfd     f16, (-3 * 8)(r4)
-    lfd     f17, (-4 * 8)(r4)
-    lfd     f18, (-5 * 8)(r4)
-    lfd     f19, (-6 * 8)(r4)
-    lfd     f20, (-7 * 8)(r4)
-    lfd     f21, (-8 * 8)(r4)
-    lfd     f22, (-9 * 8)(r4)
-    lfd     f23, (-10 * 8)(r4)
-    lfd     f24, (-11 * 8)(r4)
-    lfd     f25, (-12 * 8)(r4)
-    lfd     f26, (-13 * 8)(r4)
-    lfd     f27, (-14 * 8)(r4)
-    lfd     f28, (-15 * 8)(r4)
-    lfd     f29, (-16 * 8)(r4)
-    lfd     f30, (-17 * 8)(r4)
-    lfd     f31, (-18 * 8)(r4)
+    lfd     14, (-1 * 8)(4)
+    lfd     15, (-2 * 8)(4)
+    lfd     16, (-3 * 8)(4)
+    lfd     17, (-4 * 8)(4)
+    lfd     18, (-5 * 8)(4)
+    lfd     19, (-6 * 8)(4)
+    lfd     20, (-7 * 8)(4)
+    lfd     21, (-8 * 8)(4)
+    lfd     22, (-9 * 8)(4)
+    lfd     23, (-10 * 8)(4)
+    lfd     24, (-11 * 8)(4)
+    lfd     25, (-12 * 8)(4)
+    lfd     26, (-13 * 8)(4)
+    lfd     27, (-14 * 8)(4)
+    lfd     28, (-15 * 8)(4)
+    lfd     29, (-16 * 8)(4)
+    lfd     30, (-17 * 8)(4)
+    lfd     31, (-18 * 8)(4)
 
     /* Set condition and link register */
-    mtcr        r5
-    mtlr        r0
+    mtcr        5
+    mtlr        0
 
     /* Return and switch context */
     blr

File d/phobos2/Makefile.am

 
 CORE_OBJS=core/atomic.o core/cpuid.o core/demangle.o core/exception.o \
 	  core/math.o core/memory.o core/runtime.o core/simd.o \
-	  core/thread.o core/time.o core/vararg.o core/sync/barrier.o \
+	  core/thread.o core/threadasm.o core/time.o core/vararg.o core/sync/barrier.o \
 	  core/sync/condition.o core/sync/config.o core/sync/exception.o \
 	  core/sync/mutex.o core/sync/rwmutex.o core/sync/semaphore.o
 

File d/phobos2/Makefile.in

 
 CORE_OBJS = core/atomic.o core/cpuid.o core/demangle.o core/exception.o \
 	  core/math.o core/memory.o core/runtime.o core/simd.o \
-	  core/thread.o core/time.o core/vararg.o core/sync/barrier.o \
+	  core/thread.o core/threadasm.o core/time.o core/vararg.o core/sync/barrier.o \
 	  core/sync/condition.o core/sync/config.o core/sync/exception.o \
 	  core/sync/mutex.o core/sync/rwmutex.o core/sync/semaphore.o
 

File d/phobos2/config/ldfuncs-ppclinux

 real frexp( double, int * ); alias frexp frexpl;
 int ilogb( double ); alias ilogb ilogbl;
 real scalbn( double, int ); alias scalbn scalbnl;
-real scalbln( double, Clong_t ); alias scalbln scalblnl;
+real scalbln( double, __builtin_Clong ); alias scalbln scalblnl;
 real fabs( double ); alias fabs fabsl;
 real cbrt( double ); alias cbrt cbrtl;
 real hypot( double, double ); alias hypot hypotl;
 real floor( double ); alias floor floorl;
 real nearbyint( double ); alias nearbyint nearbyintl;
 real rint( double ); alias rint rintl;
-Clong_t lrint( double ); alias lrint lrintl;
+__builtin_Clong lrint( double ); alias lrint lrintl;
 long llrint( double ); alias llrint llrintl;
 real round( double ); alias round roundl;
-Clong_t lround( double ); alias lround lroundl;
+__builtin_Clong lround( double ); alias lround lroundl;
 long llround( double ); alias llround llroundl;
 real trunc( double ); alias trunc truncl;
 real fmod( double, real); alias fmod fmodl;
 real frexpl( real, int * );
 int ilogbl( real );
 real scalbnl( real, int );
-real scalblnl( real, Clong_t );
+real scalblnl( real, __builtin_Clong );
 real fabsl( real );
 real cbrtl( real );
 real hypotl( real, real );
 real floorl( real );
 real nearbyintl( real );
 real rintl( real );
-Clong_t lrintl( real );
+__builtin_Clong lrintl( real );
 long llrintl( real );
 real roundl( real );
-Clong_t lroundl( real );
+__builtin_Clong lroundl( real );
 long llroundl( real );
 real truncl( real );
 real fmodl( real, real);