* powerpc_darwin_mach_dep.s: Add ppc64 support (imported from gcc).
* darwin_stop_world.c, misc.c, doc/README.changes,
include/private/gc_priv.h, include/private/gcconfig.h:
minor updates from gcc.
#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
(Thanks to Andreas Tobler.)
- Add support for Darwin/X86. (Thanks to Geoff Norton and the Mono
developers.)
+ - Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to Bryce
+ McKinley and other gcj developers.)
Since gc6.7:
- Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler
# 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)
# define DATAEND /* not needed */
# endif
# if defined(NETBSD)
-# define ALIGNMENT 4
# define OS_TYPE "NETBSD"
+# define ALIGNMENT 4
# define HEURISTIC2
# ifdef __ELF__
extern int etext[];
BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
HMODULE hK32 = GetModuleHandleA("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
+#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:
.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
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