From 63ee57ccb66bb0d0c3d0dee2702b791d5651cdef Mon Sep 17 00:00:00 2001 From: Robert Jordan Date: Fri, 22 Dec 2006 00:30:04 +0000 Subject: [PATCH] 2006-12-22 Robert Jordan * include/private/gcconfig.h, os_dep.c: Add FreeBSD/amd64 support. Based on a FreeBSD Port Collection patch. r=Paolo. svn path=/trunk/mono/; revision=69915 --- ChangeLog | 6 ++++++ include/private/gcconfig.h | 20 ++++++++++++++++++++ os_dep.c | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d9a9a5d9..0b800d82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-22 Robert Jordan + + * include/private/gcconfig.h, os_dep.c: + Add FreeBSD/amd64 support. Based on a FreeBSD Port Collection patch. + r=Paolo. + 2006-11-19 Allan Hsu * libgc/darwin_stop_world.c, libgc/include/private/gc_priv.h, diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index d278603a..cf2a825c 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -347,6 +347,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 @@ -1989,6 +1993,22 @@ # define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1) # endif # endif +# ifdef FREEBSD +# define OS_TYPE "FREEBSD" +# ifndef GC_FREEBSD_THREADS +# define MPROTECT_VDB +# endif +# define SIG_SUSPEND SIGTSTP +# define SIG_THR_RESTART SIGCONT +# define NEED_FIND_LIMIT +# define FREEBSD_STACKBOTTOM +# ifdef __ELF__ +# define DYNAMIC_LOADING +# endif + extern char etext[]; + extern char * GC_FreeBSDGetDataStart(); +# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) +# endif # ifdef NETBSD # define OS_TYPE "NETBSD" # ifdef __ELF__ diff --git a/os_dep.c b/os_dep.c index f64caeff..39cb513f 100644 --- a/os_dep.c +++ b/os_dep.c @@ -1396,7 +1396,7 @@ int * etext_addr; } # endif -# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR) +# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__) || defined(__x86_64__)) && !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.49.0