Index: darwin_stop_world.c =================================================================== --- darwin_stop_world.c (.../svn+ssh://bryce@gcc.gnu.org/svn/gcc/tags/GC_6_6/boehm-gc) (revision 110202) +++ darwin_stop_world.c (working copy) @@ -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 Index: include/private/gc_priv.h =================================================================== --- include/private/gc_priv.h (.../svn+ssh://bryce@gcc.gnu.org/svn/gcc/tags/GC_6_6/boehm-gc) (revision 110202) +++ include/private/gc_priv.h (working copy) @@ -755,17 +759,9 @@ # ifdef LARGE_CONFIG # define MAX_ROOT_SETS 4096 # else -# ifdef PCR -# define MAX_ROOT_SETS 1024 -# else -# if defined(MSWIN32) || defined(MSWINCE) -# define MAX_ROOT_SETS 1024 - /* Under NT, we add only written pages, which can result */ - /* in many small root sets. */ -# else -# define MAX_ROOT_SETS 256 -# endif -# endif + /* GCJ LOCAL: MAX_ROOT_SETS increased to permit more shared */ + /* libraries to be loaded. */ +# define MAX_ROOT_SETS 1024 # endif # define MAX_EXCLUSIONS (MAX_ROOT_SETS/4) Index: include/private/gcconfig.h =================================================================== --- include/private/gcconfig.h (.../svn+ssh://bryce@gcc.gnu.org/svn/gcc/tags/GC_6_6/boehm-gc) (revision 110202) +++ include/private/gcconfig.h (working copy) @@ -1406,8 +1406,8 @@ # define DATAEND /* not needed */ # endif # if defined(NETBSD) +# define OS_TYPE "NETBSD" # define ALIGNMENT 4 -# define OS_TYPE "NETBSD" # define HEURISTIC2 # define USE_GENERIC_PUSH_REGS # ifdef __ELF__ Index: powerpc_darwin_mach_dep.s =================================================================== --- powerpc_darwin_mach_dep.s (.../svn+ssh://bryce@gcc.gnu.org/svn/gcc/tags/GC_6_6/boehm-gc) (revision 110202) +++ powerpc_darwin_mach_dep.s (working copy) @@ -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 cannot be inline asm. .text - .align 2 + .align LOG2_GPR_BYTES .globl _GC_push_regs _GC_push_regs: @@ -65,7 +76,7 @@ .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,12 +85,11 @@ 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 Index: misc.c =================================================================== --- misc.c (.../svn+ssh://bryce@gcc.gnu.org/svn/gcc/tags/GC_6_6/boehm-gc) (revision 110202) +++ misc.c (working copy) @@ -479,8 +479,9 @@ BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL; HMODULE hK32 = GetModuleHandle("kernel32.dll"); if (hK32) - (FARPROC) pfn = GetProcAddress(hK32, - "InitializeCriticalSectionAndSpinCount"); + pfn = (BOOL (WINAPI *) (LPCRITICAL_SECTION, DWORD)) + GetProcAddress (hK32, + "InitializeCriticalSectionAndSpinCount"); if (pfn) pfn(&GC_allocate_ml, 4000); else