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
This commit is contained in:
Mike Stump 2005-03-24 00:48:39 +00:00 committed by Mike Stump
parent 1488177afe
commit 97e095fdc7
4 changed files with 37 additions and 13 deletions

View File

@ -1,3 +1,9 @@
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>
* Makefile.in, include/Makefile.in: Regenerate.

View File

@ -1,5 +1,7 @@
#include "private/pthread_support.h"
/* This probably needs more porting work to ppc64. */
# if defined(GC_DARWIN_THREADS)
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
@ -14,13 +16,12 @@
*/
#define PPC_RED_ZONE_SIZE 224
/* Not 64-bit clean. Wait until Apple defines their 64-bit ABI */
typedef struct StackFrame {
unsigned int savedSP;
unsigned int savedCR;
unsigned int savedLR;
unsigned int reserved[2];
unsigned int savedRTOC;
unsigned long savedSP;
unsigned long savedCR;
unsigned long savedLR;
unsigned long reserved[2];
unsigned long savedRTOC;
} StackFrame;

View File

@ -277,8 +277,9 @@
# define MACOS
# define mach_type_known
# endif
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# if defined(macosx) \
|| defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) \
|| defined(__APPLE__) && defined(__MACH__) && defined(__ppc64__)
# define DARWIN
# define POWERPC
# define mach_type_known
@ -756,7 +757,12 @@
# define DATAEND (_end)
# endif
# ifdef DARWIN
# define ALIGNMENT 4
# if (defined (__ppc64__))
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4
# endif
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.

View File

@ -1,10 +1,21 @@
#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
; some of the non-volatile registers before we get a chance to save them
; therefore, this can't be inline asm.
.text
.align 2
.align LOG2_GPR_BYTES
.globl _GC_push_regs
_GC_push_regs:
@ -65,7 +76,7 @@ _GC_push_regs:
.data
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.align 2
.align LOG2_GPR_BYTES
L_GC_push_one$stub:
.indirect_symbol _GC_push_one
mflr r0
@ -74,11 +85,11 @@ L0$_GC_push_one:
mflr r11
addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
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
bctr
.data
.lazy_symbol_pointer
L_GC_push_one$lazy_ptr:
.indirect_symbol _GC_push_one
.long dyld_stub_binding_helper
.g_long dyld_stub_binding_helper