From b54833a27ef6e0bfc5356141eae2b589107a401d Mon Sep 17 00:00:00 2001 From: hboehm Date: Sat, 6 Jan 2007 00:25:28 +0000 Subject: [PATCH] 2007-01-05 Hans Boehm (Really Andreas Tobler, others) * os_dep.c, include/private/gcconfig.h: Partial (?) FREEBSD/X86_64 support. * include/private/gc_priv.h (i386_THREAD_STATE_COUNT): Fix spelling. --- doc/README.changes | 1 + include/private/gc_priv.h | 2 +- include/private/gcconfig.h | 6 +++++- os_dep.c | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/README.changes b/doc/README.changes index 500ef2c9..c4a066c3 100644 --- a/doc/README.changes +++ b/doc/README.changes @@ -2292,6 +2292,7 @@ Since gc6.8: - Fix M68K LINUX port. (Thanks to Debian packagers.) - __GNUC__ was misspelled as __GNUC in new_gc_alloc.h. (Thanks to Peter Wang.) - Integrated Allan Hsu's patch for OS X VM deallocation problems. + - Applied FreeBSD/X86_64 patch. Since gc6.9: - Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index c0955afc..64104fe1 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -376,7 +376,7 @@ extern GC_warn_proc GC_current_warn_proc; /* FIXME: This looks dubious for X86_64 */ # define GC_THREAD_STATE_T i386_thread_state_t # define GC_MACH_THREAD_STATE i386_THREAD_STATE -# define GC_MACH_THREAD_STATE_COUNT I386_THREAD_STATE_COUNT +# define GC_MACH_THREAD_STATE_COUNT i386_THREAD_STATE_COUNT # else # error define GC_THREAD_STATE_T # define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 61d349d5..55d62991 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -323,6 +323,10 @@ # define I386 # define mach_type_known # endif +# if defined(FREEBSD) && defined(__x86_64__) +# define X86_64 +# define mach_type_known +# endif # if defined(__NetBSD__) && (defined(i386) || defined(__i386__)) # define I386 # define mach_type_known @@ -334,7 +338,7 @@ # if defined(FREEBSD) && defined(__sparc__) # define SPARC # define mach_type_known -#endif +# endif # if defined(bsdi) && (defined(i386) || defined(__i386__)) # define I386 # define BSDI diff --git a/os_dep.c b/os_dep.c index fe995e87..0c332c77 100644 --- a/os_dep.c +++ b/os_dep.c @@ -1620,7 +1620,7 @@ ptr_t GC_SysVGetDataStart(size_t max_page_size, ptr_t etext_addr) } # endif -# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR) +# if defined(FREEBSD) && (defined(I386) || defined(X86_64) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR) /* Its unclear whether this should be identical to the above, or */ /* whether it should apply to non-X86 architectures. */ /* For now we don't assume that there is always an empty page after */ -- 2.40.0