Commit 97e095fd by Mike Stump Committed by Mike Stump

darwin_stop_world.c: Update for -m64 multilib.

        * darwin_stop_world.c: Update for -m64 multilib.
        * include/private/gcconfig.h: Likewise.
        * powerpc_darwin_mach_dep.s: Likewise.

From-SVN: r96968
parent 1488177a
2005-03-23 Mike Stump <mrs@apple.com>
* darwin_stop_world.c: Update for -m64 multilib.
* include/private/gcconfig.h: Likewise.
* powerpc_darwin_mach_dep.s: Likewise.
2005-03-01 Kelley Cook <kcook@gcc.gnu.org> 2005-03-01 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in, include/Makefile.in: Regenerate. * Makefile.in, include/Makefile.in: Regenerate.
......
#include "private/pthread_support.h" #include "private/pthread_support.h"
/* This probably needs more porting work to ppc64. */
# if defined(GC_DARWIN_THREADS) # if defined(GC_DARWIN_THREADS)
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple /* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
...@@ -14,13 +16,12 @@ ...@@ -14,13 +16,12 @@
*/ */
#define PPC_RED_ZONE_SIZE 224 #define PPC_RED_ZONE_SIZE 224
/* Not 64-bit clean. Wait until Apple defines their 64-bit ABI */
typedef struct StackFrame { typedef struct StackFrame {
unsigned int savedSP; unsigned long savedSP;
unsigned int savedCR; unsigned long savedCR;
unsigned int savedLR; unsigned long savedLR;
unsigned int reserved[2]; unsigned long reserved[2];
unsigned int savedRTOC; unsigned long savedRTOC;
} StackFrame; } StackFrame;
......
...@@ -277,8 +277,9 @@ ...@@ -277,8 +277,9 @@
# define MACOS # define MACOS
# define mach_type_known # define mach_type_known
# endif # endif
# if defined(macosx) || \ # if defined(macosx) \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) || defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) \
|| defined(__APPLE__) && defined(__MACH__) && defined(__ppc64__)
# define DARWIN # define DARWIN
# define POWERPC # define POWERPC
# define mach_type_known # define mach_type_known
...@@ -756,7 +757,12 @@ ...@@ -756,7 +757,12 @@
# define DATAEND (_end) # define DATAEND (_end)
# endif # endif
# ifdef DARWIN # ifdef DARWIN
# if (defined (__ppc64__))
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4 # define ALIGNMENT 4
# endif
# define OS_TYPE "DARWIN" # define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING # define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used. /* XXX: see get_end(3), get_etext() and get_end() should not be used.
......
#if defined(__ppc64__)
#define MODE_CHOICE(x, y) y
#else
#define MODE_CHOICE(x, y) x
#endif
#define lgu MODE_CHOICE(lwzu, ldu)
#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
; GC_push_regs function. Under some optimization levels GCC will clobber ; GC_push_regs function. Under some optimization levels GCC will clobber
; some of the non-volatile registers before we get a chance to save them ; some of the non-volatile registers before we get a chance to save them
; therefore, this can't be inline asm. ; therefore, this can't be inline asm.
.text .text
.align 2 .align LOG2_GPR_BYTES
.globl _GC_push_regs .globl _GC_push_regs
_GC_push_regs: _GC_push_regs:
...@@ -65,7 +76,7 @@ _GC_push_regs: ...@@ -65,7 +76,7 @@ _GC_push_regs:
.data .data
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.align 2 .align LOG2_GPR_BYTES
L_GC_push_one$stub: L_GC_push_one$stub:
.indirect_symbol _GC_push_one .indirect_symbol _GC_push_one
mflr r0 mflr r0
...@@ -74,11 +85,11 @@ L0$_GC_push_one: ...@@ -74,11 +85,11 @@ L0$_GC_push_one:
mflr r11 mflr r11
addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one) addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
mtlr r0 mtlr r0
lwzu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11) lgu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
mtctr r12 mtctr r12
bctr bctr
.data .data
.lazy_symbol_pointer .lazy_symbol_pointer
L_GC_push_one$lazy_ptr: L_GC_push_one$lazy_ptr:
.indirect_symbol _GC_push_one .indirect_symbol _GC_push_one
.long dyld_stub_binding_helper .g_long dyld_stub_binding_helper
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment