version 1.1, 2005/07/12 01:23:20 |
version 1.3, 2008/02/13 10:24:24 |
Line 109 diff -u -r gc6.5/configure gc6.5-risa/configure |
|
Line 109 diff -u -r gc6.5/configure gc6.5-risa/configure |
|
diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa/include/private/gcconfig.h |
diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa/include/private/gcconfig.h |
--- gc6.5/include/private/gcconfig.h 2005-05-21 05:48:29.000000000 +0900 |
--- gc6.5/include/private/gcconfig.h 2005-05-21 05:48:29.000000000 +0900 |
+++ gc6.5-risa/include/private/gcconfig.h 2005-07-11 18:18:53.000000000 +0900 |
+++ gc6.5-risa/include/private/gcconfig.h 2005-07-11 18:18:53.000000000 +0900 |
@@ -60,6 +60,13 @@ |
@@ -61,9 +61,16 @@ |
# endif |
# endif |
|
|
/* Determine the machine type: */ |
/* Determine the machine type: */ |
Line 122 diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa |
|
Line 122 diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa |
|
+/* Determine the machine type: */ |
+/* Determine the machine type: */ |
# if defined(__arm__) || defined(__thumb__) |
# if defined(__arm__) || defined(__thumb__) |
# define ARM32 |
# define ARM32 |
# if !defined(LINUX) && !defined(NETBSD) |
-# if !defined(LINUX) && !defined(NETBSD) |
@@ -1936,6 +1943,28 @@ |
+# if !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) |
extern char etext[]; |
# define NOSYS |
# define SEARCH_FOR_DATA_START |
# define mach_type_known |
|
# endif |
|
@@ -342,10 +349,22 @@ |
|
# define X86_64 |
|
# define mach_type_known |
|
# endif |
|
+# if defined(__FreeBSD__) && defined(__amd64__) |
|
+# define X86_64 |
|
+# define mach_type_known |
|
+# endif |
|
# if defined(FREEBSD) && defined(__sparc__) |
|
# define SPARC |
|
# define mach_type_known |
|
-#endif |
|
+# endif |
|
+# if defined(FREEBSD) && defined(__powerpc__) |
|
+# define POWERPC |
|
+# define mach_type_known |
|
+# endif |
|
+# if defined(FREEBSD) && defined(__arm__) |
|
+# define ARM32 |
|
+# define mach_type_known |
|
+# endif |
|
# if defined(bsdi) && (defined(i386) || defined(__i386__)) |
|
# define I386 |
|
# define BSDI |
|
@@ -860,6 +879,16 @@ |
|
# define DATASTART GC_data_start |
|
# define DYNAMIC_LOADING |
# endif |
# endif |
|
+# ifdef FREEBSD |
|
+# define ALIGNMENT 4 |
|
+# define OS_TYPE "FREEBSD" |
|
+# ifdef __ELF__ |
|
+# define DYNAMIC_LOADING |
|
+# endif |
|
+# define HEURISTIC2 |
|
+ extern char etext[]; |
|
+# define SEARCH_FOR_DATA_START |
|
+# endif |
|
# ifdef NOSYS |
|
# define ALIGNMENT 4 |
|
# define OS_TYPE "NOSYS" |
|
@@ -1862,6 +1891,17 @@ |
|
# endif |
|
# define USE_GENERIC_PUSH_REGS |
|
# endif |
|
+# ifdef FREEBSD |
|
+# define ALIGNMENT 4 |
|
+# define OS_TYPE "FREEBSD" |
|
+# ifdef __ELF__ |
|
+# define DYNAMIC_LOADING |
|
+# endif |
|
+# define HEURISTIC2 |
|
+ extern char etext[]; |
|
+# define SEARCH_FOR_DATA_START |
|
+# endif |
|
+ |
|
# ifdef LINUX |
|
# define OS_TYPE "LINUX" |
|
# define LINUX_STACKBOTTOM |
|
@@ -1943,6 +1983,28 @@ |
|
# define USE_GENERIC_PUSH_REGS |
|
# define DYNAMIC_LOADING |
|
# endif |
+# ifdef FREEBSD /* T.Saito */ |
+# ifdef FREEBSD /* T.Saito */ |
+# define OS_TYPE "FREEBSD" |
+# define OS_TYPE "FREEBSD" |
+# ifndef GC_FREEBSD_THREADS |
+# ifndef GC_FREEBSD_THREADS |
Line 150 diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa |
|
Line 213 diff -u -r gc6.5/include/private/gcconfig.h gc6.5-risa |
|
+# define DATAEND2 ((ptr_t)(&end)) |
+# define DATAEND2 ((ptr_t)(&end)) |
+# endif /* end T.Saito */ |
+# endif /* end T.Saito */ |
# endif |
# endif |
|
|
#if defined(LINUX) && defined(USE_MMAP) |
# ifdef SH4 |
|
@@ -2038,6 +2100,17 @@ |
|
extern char etext[]; |
|
# define SEARCH_FOR_DATA_START |
|
# endif |
|
+# ifdef FREEBSD |
|
+# define OS_TYPE "FREEBSD" |
|
+# define SIG_SUSPEND SIGUSR1 |
|
+# define SIG_THR_RESTART SIGUSR2 |
|
+# ifdef __ELF__ |
|
+# define DYNAMIC_LOADING |
|
+# endif |
|
+# define HEURISTIC2 |
|
+ extern char etext[]; |
|
+# define SEARCH_FOR_DATA_START |
|
+# endif |
|
# ifdef SOLARIS |
|
# define OS_TYPE "SOLARIS" |
|
# define ELF_CLASS ELFCLASS64 |
diff -u -r gc6.5/reclaim.c gc6.5-risa/reclaim.c |
diff -u -r gc6.5/reclaim.c gc6.5-risa/reclaim.c |
--- gc6.5/reclaim.c 2004-11-23 02:58:18.000000000 +0900 |
--- gc6.5/reclaim.c 2004-11-23 02:58:18.000000000 +0900 |
+++ gc6.5-risa/reclaim.c 2005-07-11 18:01:16.000000000 +0900 |
+++ gc6.5-risa/reclaim.c 2005-07-11 18:01:16.000000000 +0900 |
Line 173 diff -u -r gc6.5/reclaim.c gc6.5-risa/reclaim.c |
|
Line 254 diff -u -r gc6.5/reclaim.c gc6.5-risa/reclaim.c |
|
# ifdef PRINTTIMES |
# ifdef PRINTTIMES |
GET_TIME(done_time); |
GET_TIME(done_time); |
GC_printf1("Disposing of reclaim lists took %lu msecs\n", |
GC_printf1("Disposing of reclaim lists took %lu msecs\n", |
|
diff -u -r gc6.5/include/private/gc_priv.h gc6.5-risa/include/private/gc_priv.h |
|
--- gc6.5/include/private/gc_priv.h Sat Feb 11 04:38:40 2006 |
|
+++ gc6.5-risa/include/private/gc_priv.h Tue May 22 20:00:39 2007 |
|
@@ -227,6 +227,10 @@ |
|
# define EXTRA_BYTES 0 |
|
#endif |
|
|
|
+/* Added by ohara */ |
|
+# ifndef LARGE_CONFIG |
|
+# define LARGE_CONFIG |
|
+# endif |
|
|
|
# ifndef LARGE_CONFIG |
|
# define MINHINCR 16 /* Minimum heap increment, in blocks of HBLKSIZE */ |
|
diff -u -r gc6.5/os_dep.c gc6.5-risa/os_dep.c |
|
--- gc6.5/os_dep.c 2006-04-22 08:26:47.000000000 +0900 |
|
+++ gc6.5-risa/os_dep.c 2008-02-13 18:32:47.000000000 +0900 |
|
@@ -694,7 +694,7 @@ |
|
|| defined(HURD) || defined(NETBSD) |
|
static struct sigaction old_segv_act; |
|
# if defined(IRIX5) || defined(HPUX) \ |
|
- || defined(HURD) || defined(NETBSD) |
|
+ || defined(HURD) || defined(NETBSD) || defined(FREEBSD) |
|
static struct sigaction old_bus_act; |
|
# endif |
|
# else |
|
@@ -709,7 +709,7 @@ |
|
# endif |
|
{ |
|
# if defined(SUNOS5SIGS) || defined(IRIX5) \ |
|
- || defined(OSF1) || defined(HURD) || defined(NETBSD) |
|
+ || defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD) |
|
struct sigaction act; |
|
|
|
act.sa_handler = h; |
|
@@ -731,7 +731,7 @@ |
|
# else |
|
(void) sigaction(SIGSEGV, &act, &old_segv_act); |
|
# if defined(IRIX5) \ |
|
- || defined(HPUX) || defined(HURD) || defined(NETBSD) |
|
+ || defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD) |
|
/* Under Irix 5.x or HP/UX, we may get SIGBUS. */ |
|
/* Pthreads doesn't exist under Irix 5.x, so we */ |
|
/* don't have to worry in the threads case. */ |
|
diff -u -r gc6.5/dyn_load.c gc6.5-risa/dyn_load.c |
|
--- gc6.5/dyn_load.c 2006-06-07 14:01:52.000000000 +0900 |
|
+++ gc6.5-risa/dyn_load.c 2008-02-13 18:31:52.000000000 +0900 |
|
@@ -102,6 +102,12 @@ |
|
# else |
|
# define ElfW(type) Elf64_##type |
|
# endif |
|
+# elif defined(__FreeBSD__) |
|
+# if __ELF_WORD_SIZE == 32 |
|
+# define ElfW(type) Elf32_##type |
|
+# else |
|
+# define ElfW(type) Elf64_##type |
|
+# endif |
|
# else |
|
# ifdef NETBSD |
|
# if ELFSIZE == 32 |