This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GC 6.0 alpha 3 imported


I've imported the GC 6.0 alpha 3 release into the GCC tree, now that I 
found the GC_all_interior_pointers problem. Sorry for the delay.

It turned out to be harder than I expected to try and get it to use the 
top-level ltconfig, config.guess, etc, so I've left things the way they 
are for now.

The diff below is the complete set of diffs between the GC in the GCC 
tree and that in the 6.0 alpha 3 release. I've included it here in case 
there are obvious errors in the merge or Hans wants to merge any of the 
differences back into his version.

regards

Bryce.

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.am,v
retrieving revision 1.1.1.4
retrieving revision 1.30
diff -u -r1.1.1.4 -r1.30
--- Makefile.am	2002/01/31 02:48:48	1.1.1.4
+++ Makefile.am	2002/02/12 04:37:53	1.30
@@ -1,16 +1,3 @@
-# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
-# 
-# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
-# Permission is hereby granted to use or copy this program
-# for any purpose,  provided the above notices are retained on all copies.
-# Permission to modify the code and to distribute modified code is granted,
-# provided the above notices are retained, and a notice that the code was
-# modified is included with the above copyright notice.
-#
-# Original author: Tom Tromey
-
 ## Process this file with automake to produce Makefile.in.
 
 ## FIXME: `make dist' in this directory will not currently work.  Many
@@ -37,8 +24,8 @@
 endif
 
 toolexeclib_LTLIBRARIES = $(target_all)
-EXTRA_LTLIBRARIES = libgc.la
-libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
+EXTRA_LTLIBRARIES = libgcjgc.la
+libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
 dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
 linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
 obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
@@ -47,11 +34,11 @@
 
 # Include THREADLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
-libgc_la_LIBADD = @addobjs@ $(THREADLIBS)
-libgc_la_DEPENDENCIES = @addobjs@
-libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
+libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
+libgcjgc_la_DEPENDENCIES = @addobjs@
+libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
 
-EXTRA_libgc_la_SOURCES = alpha_mach_dep.s \
+EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s \
 mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
 rs6000_mach_dep.s sparc_mach_dep.s sparc_netbsd_mach_dep.s \
 sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
@@ -63,16 +50,17 @@
 # The following hack produces a warning from automake, but we need it in order 
 # to build a file from a subdirectory. FIXME.
 test.o:	tests/test.c
-	$(COMPILE) -c tests/test.c
+	$(COMPILE) -c $(srcdir)/tests/test.c
 # 	Using $< in the above seems to fail with the HP/UX on Itanium make.
 
 gctest_OBJECTS = test.o
-gctest_LDADD = ./libgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
+gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
+gctest_LDFLAGS = -shared-libgcc
 TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
 TESTS = gctest
 
 ## FIXME: relies on internal code generated by automake.
-all_objs = @addobjs@ $(libgc_la_OBJECTS)
+all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
 $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
 include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
 
Index: Makefile.direct
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.direct,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -r1.1.1.3 -r1.2
--- Makefile.direct	2002/01/31 02:48:50	1.1.1.3
+++ Makefile.direct	2002/02/12 04:37:53	1.2
@@ -10,20 +10,13 @@
 #	 c++ interface to gc.a
 # cord/de - builds dumb editor based on cords.
 ABI_FLAG= 
-# ABI_FLAG should be the cc flag that specifies the ABI.  On most
-# platforms this will be the empty string.  Possible values:
-# +DD64 for 64-bit executable on HP/UX.
-# -n32, -n64, -o32 for SGI/MIPS ABIs.
-
-AS_ABI_FLAG=$(ABI_FLAG)
-# ABI flag for assembler.  On HP/UX this is +A64 for 64 bit
-# executables.
-
 CC=cc $(ABI_FLAG)
 CXX=g++ $(ABI_FLAG)
-AS=as $(AS_ABI_FLAG)
+AS=as $(ABI_FLAG)
 #  The above doesn't work with gas, which doesn't run cpp.
 #  Define AS as `gcc -c -x assembler-with-cpp' instead.
+#  Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
+#  if you use something other than the default ABI on your machine.
 
 # Redefining srcdir allows object code for the nonPCR version of the collector
 # to be generated in different directories.
@@ -61,15 +54,12 @@
 #   gc.h before performing thr_ or dl* or GC_ operations.)
 #   Must also define -D_REENTRANT.
 # -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
-#   (Internally this define GC_SOLARIS_THREADS as well.)
+#   Define SOLARIS_THREADS as well.
 # -DGC_IRIX_THREADS enables support for Irix pthreads.  See README.irix.
 # -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
 #   Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
 # -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
 #   see README.linux.  -D_REENTRANT may also be required.
-# -DGC_OSF1_THREADS enables support for Tru64 pthreads.  Untested.
-# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.  Untested.
-#   Appeared to run into some underlying thread problems.
 # -DALL_INTERIOR_POINTERS allows all pointers to the interior
 #   of objects to be recognized.  (See gc_priv.h for consequences.)
 #   Alternatively, GC_all_interior_pointers can be set at process
@@ -207,8 +197,8 @@
 #   15% or so.
 # -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
 #   prefetch instructions.  Same restrictions as USE_I686_PREFETCH.
-#   Minimally tested.  Didn't appear to be an obvious win on a K6-2/500.
-# -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
+#   UNTESTED!!
+# -DGC_USE_LD_WRAP in combination with the gld flags listed in README.linux
 #   causes the collector some system and pthread calls in a more transparent
 #   fashion than the usual macro-based approach.  Requires GNU ld, and
 #   currently probably works only with Linux.
@@ -266,8 +256,7 @@
     include/gc_local_alloc.h include/private/dbg_mlc.h \
     include/private/specific.h powerpc_macosx_mach_dep.s \
     include/leak_detector.h include/gc_amiga_redirects.h \
-    include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
-    $(CORD_SRCS)
+    include/gc_pthread_redirects.h $(CORD_SRCS)
 
 DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
 	doc/README.amiga doc/README.cords doc/debugging.html \

Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/acinclude.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.17
diff -u -r1.1.1.1 -r1.17
--- acinclude.m4	2001/08/17 18:39:16	1.1.1.1
+++ acinclude.m4	2001/10/16 09:01:35	1.17
@@ -42,11 +42,20 @@
   gc_basedir="[$]{srcdir}/$1"
 fi
 AC_SUBST(gc_basedir)
-AC_CONFIG_AUX_DIR($gc_basedir)
+AC_CONFIG_AUX_DIR($gc_basedir/..)
+if :; then :; else
+  # This overrides the previous occurrence for automake, but not for
+  # autoconf, which is exactly what we want.
+  AC_CONFIG_AUX_DIR(..)
+fi
 
 AC_CANONICAL_SYSTEM
+
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
 
-AM_INIT_AUTOMAKE(gc, 6.0, no-define)
+AM_INIT_AUTOMAKE(gc, 6.1a1, no-define)
 
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
@@ -175,7 +184,7 @@
 
 ))))
 
-sinclude(libtool.m4)
+sinclude(../libtool.m4)
 dnl The line below arranges for aclocal not to bring a definition of
 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
 dnl to add a definition of LIBTOOL to Makefile.in.
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/aclocal.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.20
diff -u -r1.1.1.1 -r1.20
--- aclocal.m4	2001/08/17 18:39:16	1.1.1.1
+++ aclocal.m4	2001/08/18 01:04:42	1.20
@@ -54,10 +54,19 @@
   gc_basedir="[$]{srcdir}/$1"
 fi
 AC_SUBST(gc_basedir)
-AC_CONFIG_AUX_DIR($gc_basedir)
+AC_CONFIG_AUX_DIR($gc_basedir/..)
+if :; then :; else
+  # This overrides the previous occurrence for automake, but not for
+  # autoconf, which is exactly what we want.
+  AC_CONFIG_AUX_DIR(..)
+fi
 
 AC_CANONICAL_SYSTEM
 
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
 AM_INIT_AUTOMAKE(gc, 6.0, no-define)
 
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
@@ -187,7 +196,7 @@
 
 ))))
 
-sinclude(libtool.m4)
+sinclude(../libtool.m4)
 dnl The line below arranges for aclocal not to bring a definition of
 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
 dnl to add a definition of LIBTOOL to Makefile.in.

Index: alloc.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/alloc.c,v
retrieving revision 1.1.1.7
retrieving revision 1.9
diff -u -r1.1.1.7 -r1.9
--- alloc.c	2002/01/31 02:48:39	1.1.1.7
+++ alloc.c	2002/02/12 04:37:53	1.9
@@ -119,6 +119,7 @@
     unsigned long time_diff;
     
     if ((count++ & 3) != 0) return(0);
+#ifndef NO_CLOCK
     GET_TIME(current_time);
     time_diff = MS_TIME_DIFF(current_time,GC_start_time);
     if (time_diff >= GC_time_limit) {
@@ -131,6 +132,7 @@
 #	endif
     	return(1);
     }
+#endif
     return(0);
   }
 #endif /* !SMALL_CONFIG */
Index: alpha_mach_dep.s
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/alpha_mach_dep.s,v
retrieving revision 1.1.1.4
retrieving revision 1.6
diff -u -r1.1.1.4 -r1.6
--- alpha_mach_dep.s	2001/08/17 18:39:16	1.1.1.4
+++ alpha_mach_dep.s	2001/08/17 18:30:45	1.6
@@ -1,4 +1,3 @@
- # $Id: alpha_mach_dep.s,v 1.1.1.4 2001/08/17 18:39:16 tromey Exp $
 	.arch ev6
 
         .text
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.in,v
retrieving revision 1.1.1.4
retrieving revision 1.38
diff -u -r1.1.1.4 -r1.38
--- configure.in	2002/01/31 02:48:48	1.1.1.4
+++ configure.in	2002/02/12 04:37:53	1.38
@@ -18,8 +18,6 @@
 dnl Can't be done in GC_CONFIGURE because that confuses automake. 
 AC_CONFIG_AUX_DIR(.)
 
-AC_CANONICAL_SYSTEM
-
 GC_CONFIGURE(.)
 
 AM_PROG_LIBTOOL
@@ -43,15 +41,12 @@
   AC_EXEEXT
 fi
 
-AC_MSG_CHECKING([for threads package to use])
-AC_ARG_ENABLE(threads, [  --enable-threads=TYPE   choose threading package],
-  THREADS=$enableval,
-  [ AC_MSG_CHECKING([for thread model used by GCC])
-    THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
-    if test -z "$THREADS"; then
-      THREADS=no
-    fi
-    AC_MSG_RESULT([$THREADS])])
+AC_MSG_CHECKING([for thread model used by GCC])
+THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+if test -z "$THREADS"; then
+   THREADS=no
+fi
+AC_MSG_RESULT([$THREADS])
 
 AC_ARG_ENABLE(parallel-mark,
 [  --enable-parallel-mark	parallelize marking and free list construction],
@@ -107,9 +102,15 @@
      *-*-irix*)
 	AC_DEFINE(GC_IRIX_THREADS)
 	;;
+     *-*-cygwin*)
+	THREADLIBS=
+	;;
     esac
+    ;;
+ win32)
+    AC_DEFINE(GC_WIN32_THREADS)
     ;;
- decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
+ decosf1 | irix | mach | os2 | solaris | dce | vxworks)
     AC_MSG_ERROR(thread package $THREADS not yet supported)
     ;;
  *)
@@ -121,8 +122,9 @@
 AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
 AC_SUBST(EXTRA_TEST_LIBS)
 
-target_all=libgc.la
+target_all=libgcjgc.la
 AC_SUBST(target_all)
+AC_SUBST(target_alias)
 
 dnl If the target is an eCos system, use the appropriate eCos
 dnl I/O routines.
@@ -232,12 +234,10 @@
 AC_DEFINE(ATOMIC_UNCOLLECTABLE)
 
 dnl This is something of a hack.  When cross-compiling we turn off
-dnl some functionality.  We also enable the "small" configuration.
-dnl These is only correct when targetting an embedded system.  FIXME.
+dnl some functionality. These is only correct when targetting an
+dnl embedded system.  FIXME.
 if test -n "${with_cross_host}"; then
    AC_DEFINE(NO_SIGSET)
-   AC_DEFINE(NO_CLOCK)
-   AC_DEFINE(SMALL_CONFIG)
    AC_DEFINE(NO_DEBUGGING)
 fi
 
@@ -267,7 +267,13 @@
   multilib_arg=
 fi
 
-AC_OUTPUT(Makefile,,
+AC_OUTPUT(Makefile include/Makefile, [
+dnl Put all the -D options in a file.
+echo "$DEFS" > boehm-cflags
+
+if test -n "$CONFIG_FILES"; then
+  ac_file=Makefile . ${gc_basedir}/../config-ml.in
+fi],
 srcdir=${srcdir}
 host=${host}
 target=${target}
Index: dbg_mlc.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/dbg_mlc.c,v
retrieving revision 1.1.1.9
retrieving revision 1.11
diff -u -r1.1.1.9 -r1.11
--- dbg_mlc.c	2002/01/31 02:48:42	1.1.1.9
+++ dbg_mlc.c	2002/02/12 04:37:53	1.11
@@ -429,6 +429,35 @@
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
 }
 
+# ifdef __STDC__
+    GC_PTR GC_debug_generic_malloc(size_t lb, int k, GC_EXTRA_PARAMS)
+# else
+    GC_PTR GC_debug_malloc(lb, k, s, i)
+    size_t lb;
+    int k;
+    char * s;
+    int i;
+#   ifdef GC_ADD_CALLER
+	--> GC_ADD_CALLER not implemented for K&R C
+#   endif
+# endif
+{
+    GC_PTR result = GC_generic_malloc(lb + DEBUG_BYTES, k);
+    
+    if (result == 0) {
+        GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
+        	       (unsigned long) lb);
+        GC_err_puts(s);
+        GC_err_printf1(":%ld)\n", (unsigned long)i);
+        return(0);
+    }
+    if (!GC_debugging_started) {
+    	GC_start_debugging();
+    }
+    ADD_CALL_CHAIN(result, ra);
+    return (GC_store_debug_info(result, (word)lb, s, (word)i));
+}
+
 # ifdef DBG_HDRS_ALL
 /* 
  * An allocation function for internal use.
Index: dyn_load.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/dyn_load.c,v
retrieving revision 1.1.1.9
retrieving revision 1.15
diff -u -r1.1.1.9 -r1.15
--- dyn_load.c	2002/01/31 02:48:42	1.1.1.9
+++ dyn_load.c	2002/02/12 04:37:53	1.15
@@ -617,7 +617,6 @@
 	/* The type is a lie, since the real type doesn't make sense here, */
 	/* and we only test for NULL.					   */
 
-
 /* We use /proc to track down all parts of the address space that are	*/
 /* mapped by the process, and throw out regions we know we shouldn't	*/
 /* worry about.  This may also work under other SVR4 variants.		*/
Index: linux_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/linux_threads.c,v
retrieving revision 1.1.1.9
retrieving revision 1.18
diff -u -r1.1.1.9 -r1.18
--- linux_threads.c	2002/01/31 02:48:43	1.1.1.9
+++ linux_threads.c	2002/02/12 04:37:53	1.18
@@ -204,11 +204,7 @@
 
 static GC_bool parallel_initialized = FALSE;
 
-# if defined(__GNUC__)
-    void GC_init_parallel() __attribute__ ((constructor));
-# else
-    void GC_init_parallel();
-# endif
+void GC_init_parallel();
 
 # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
 
@@ -897,6 +893,7 @@
     #if DEBUG_THREADS
       GC_printf0("World started\n");
     #endif
+    GC_stopping_thread = 0;  /* debugging only */
 }
 
 # ifdef IA64
Index: misc.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/misc.c,v
retrieving revision 1.1.1.8
retrieving revision 1.21
diff -u -r1.1.1.8 -r1.21
--- misc.c	2002/01/31 02:48:39	1.1.1.8
+++ misc.c	2002/02/12 04:37:53	1.21
@@ -70,7 +70,7 @@
 #   endif
 # endif
 
-#ifdef ECOS
+#if defined(NOSYS) || defined(ECOS)
 #undef STACKBASE
 #endif
 
@@ -439,6 +439,11 @@
     DCL_LOCK_STATE;
     
     DISABLE_SIGNALS();
+
+#ifdef MSWIN32
+    if (!GC_is_initialized) InitializeCriticalSection(&GC_allocate_ml);
+#endif /* MSWIN32 */
+
     LOCK();
     GC_init_inner();
     UNLOCK();
@@ -769,7 +774,8 @@
 # endif
 #endif
 
-#if !defined(MSWIN32) && !defined(MSWINCE) && !defined(OS2) && !defined(MACOS)
+#if !defined(MSWIN32) && !defined(MSWINCE) && !defined(OS2) \
+    && !defined(MACOS)  && !defined(ECOS) && !defined(NOSYS)
 int GC_write(fd, buf, len)
 int fd;
 GC_CONST char *buf;
@@ -792,10 +798,18 @@
 }
 #endif /* UN*X */
 
-#if defined(ECOS)
+#ifdef ECOS
 int GC_write(fd, buf, len)
 {
   _Jv_diag_write (buf, len);
+  return len;
+}
+#endif
+
+#ifdef NOSYS
+int GC_write(fd, buf, len)
+{
+  /* No writing.  */
   return len;
 }
 #endif
Index: os_dep.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/os_dep.c,v
retrieving revision 1.1.1.10
retrieving revision 1.21
diff -u -r1.1.1.10 -r1.21
--- os_dep.c	2002/01/31 02:48:40	1.1.1.10
+++ os_dep.c	2002/02/12 04:37:53	1.21
@@ -333,7 +333,8 @@
 
 #  if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
       && !defined(MSWINCE) \
-      && !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW)
+      && !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
+      && !defined(NOSYS) && !defined(ECOS)
 
 #   if defined(sigmask) && !defined(UTS4) && !defined(HURD)
 	/* Use the traditional BSD interface */
@@ -516,7 +517,7 @@
 #   undef GC_AMIGA_SB
 # endif /* AMIGA */
 
-# if defined(NEED_FIND_LIMIT) || (defined(UNIX_LIKE) && !defined(ECOS))
+# if defined(NEED_FIND_LIMIT) || defined(UNIX_LIKE)
 
 #   ifdef __STDC__
 	typedef void (*handler)(int);
@@ -540,7 +541,7 @@
       handler h;
 #   endif
     {
-#	if defined(SUNOS5SIGS) || defined(IRIX5)  \
+#     if defined(SUNOS5SIGS) || defined(IRIX5)  \
         || defined(OSF1) || defined(HURD)
 	  struct sigaction	act;
 
@@ -600,19 +601,19 @@
     
     void GC_reset_fault_handler()
     {
-#       if defined(SUNOS5SIGS) || defined(IRIX5) \
-	   || defined(OSF1) || defined(HURD)
-	  (void) sigaction(SIGSEGV, &old_segv_act, 0);
-#	  if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-	     || defined(HPUX) || defined(HURD)
-	      (void) sigaction(SIGBUS, &old_bus_act, 0);
-#	  endif
-#       else
-  	  (void) signal(SIGSEGV, old_segv_handler);
-#	  ifdef SIGBUS
-	    (void) signal(SIGBUS, old_bus_handler);
-#	  endif
-#       endif
+#     if defined(SUNOS5SIGS) || defined(IRIX5) \
+	 || defined(OSF1) || defined(HURD)
+	(void) sigaction(SIGSEGV, &old_segv_act, 0);
+#	if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
+	   || defined(HPUX) || defined(HURD)
+	    (void) sigaction(SIGBUS, &old_bus_act, 0);
+#	endif
+#      else
+	(void) signal(SIGSEGV, old_segv_handler);
+#	ifdef SIGBUS
+	  (void) signal(SIGBUS, old_bus_handler);
+#	endif
+#     endif
     }
 
     /* Return the first nonaddressible location > p (up) or 	*/
@@ -621,34 +622,42 @@
     ptr_t p;
     GC_bool up;
     {
-        static VOLATILE ptr_t result;
-    		/* Needs to be static, since otherwise it may not be	*/
-    		/* preserved across the longjmp.  Can safely be 	*/
-    		/* static since it's only called once, with the		*/
-    		/* allocation lock held.				*/
-
-
-	GC_setup_temporary_fault_handler();
-	if (setjmp(GC_jmp_buf) == 0) {
-	    result = (ptr_t)(((word)(p))
-			      & ~(MIN_PAGE_SIZE-1));
-	    for (;;) {
- 	        if (up) {
-		    result += MIN_PAGE_SIZE;
- 	        } else {
-		    result -= MIN_PAGE_SIZE;
- 	        }
-		GC_noop1((word)(*result));
-	    }
-	}
-	GC_reset_fault_handler();
- 	if (!up) {
+      static VOLATILE ptr_t result;
+  		/* Needs to be static, since otherwise it may not be	*/
+  		/* preserved across the longjmp.  Can safely be 	*/
+  		/* static since it's only called once, with the		*/
+  		/* allocation lock held.				*/
+
+
+      GC_setup_temporary_fault_handler();
+      if (setjmp(GC_jmp_buf) == 0) {
+	result = (ptr_t)(((word)(p))
+			 & ~(MIN_PAGE_SIZE-1));
+	for (;;) {
+	  if (up) {
 	    result += MIN_PAGE_SIZE;
- 	}
-	return(result);
+	  } else {
+	    result -= MIN_PAGE_SIZE;
+	  }
+	  GC_noop1((word)(*result));
+	}
+      }
+      GC_reset_fault_handler();
+      if (!up) {
+	result += MIN_PAGE_SIZE;
+      }
+      return(result);
     }
 # endif
 
+# if defined(ECOS) || defined(NOSYS)
+ptr_t GC_get_stack_base()
+{
+  return STACKBOTTOM;
+}
+
+#else
+
 #ifdef LINUX_STACKBOTTOM
 
 #include <sys/types.h>
@@ -751,7 +760,7 @@
 #endif /* FREEBSD_STACKBOTTOM */
 
 #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
-    && !defined(MSWINCE) && !defined(OS2) && !defined(ECOS)
+    && !defined(MSWINCE) && !defined(OS2)
 
 ptr_t GC_get_stack_base()
 {
@@ -805,6 +814,7 @@
     	return(result);
 #   endif /* STACKBOTTOM */
 }
+# endif /* NOSYS ECOS */
 
 # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS */
 
Index: rs6000_mach_dep.s
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/rs6000_mach_dep.s,v
retrieving revision 1.1.1.1
retrieving revision 1.4
diff -u -r1.1.1.1 -r1.4
--- rs6000_mach_dep.s	1999/04/07 14:56:06	1.1.1.1
+++ rs6000_mach_dep.s	2002/01/25 18:06:23	1.4
@@ -1,4 +1,3 @@
-    .csect
     .set   r0,0
     .set   r1,1
     .set   r2,2
@@ -32,10 +31,18 @@
     .set   r30,30
     .set   r31,31
 
+    .extern .GC_push_one
  # Mark from machine registers that are saved by C compiler
     .globl  .GC_push_regs
+.csect .text[PR]
+    .align 2
+    .globl  GC_push_regs
+    .globl  .GC_push_regs
+.csect GC_push_regs[DS]
+GC_push_regs:
+    .long .GC_push_regs, TOC[tc0], 0
+.csect .text[PR]
 .GC_push_regs:
-    .extern .GC_push_one
     stu	    r1,-64(r1)  # reserve stack frame
     mflr    r0		# save link register
     st      r0,0x48(r1)
@@ -103,3 +110,5 @@
     mtlr    r0
     ai      r1,r1,64
     br
+    .long 0
+    .byte 0,0,0,0,0,0,0,0
Index: solaris_pthreads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/solaris_pthreads.c,v
retrieving revision 1.1.1.6
retrieving revision 1.8
diff -u -r1.1.1.6 -r1.8
--- solaris_pthreads.c	2002/01/31 02:48:44	1.1.1.6
+++ solaris_pthreads.c	2002/02/12 04:37:53	1.8
@@ -16,7 +16,6 @@
  * Modified Peter C. for Solaris Posix Threads.
  */
 /* Boehm, September 14, 1994 4:44 pm PDT */
-/* $Id: solaris_pthreads.c,v 1.1.1.6 2002/01/31 02:48:44 bryce Exp $ */
 
 # if defined(GC_SOLARIS_PTHREADS)
 # include "private/gc_priv.h"
Index: win32_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/win32_threads.c,v
retrieving revision 1.1.1.5
retrieving revision 1.8
diff -u -r1.1.1.5 -r1.8
--- win32_threads.c	2001/10/15 04:58:00	1.1.1.5
+++ win32_threads.c	2002/02/07 03:56:40	1.8
@@ -331,9 +331,19 @@
     if (*lo < start) *lo = start;
 }
 
+#if !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL))
 
-# ifdef MSWINCE
+HANDLE WINAPI GC_CreateThread(
+    LPSECURITY_ATTRIBUTES lpThreadAttributes, 
+    DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, 
+    LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+{
+    return CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress,
+                        lpParameter, dwCreationFlags, lpThreadId);
+}
 
+#else /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) 
+
 typedef struct {
     HANDLE child_ready_h, parent_ready_h;
     volatile struct thread_entry * entry;
@@ -450,6 +460,9 @@
 
     return ret;
 }
+#endif /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) 
+
+#ifdef MSWINCE
 
 typedef struct {
     HINSTANCE hInstance;
Index: include/gc.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/gc.h,v
retrieving revision 1.1.1.9
retrieving revision 1.9
diff -u -r1.1.1.9 -r1.9
--- gc.h	2002/01/31 02:48:50	1.1.1.9
+++ gc.h	2002/02/12 04:37:56	1.9
@@ -86,7 +86,7 @@
     typedef long ptrdiff_t;	/* ptrdiff_t is not defined */
 # endif
 
-#if defined(__MINGW32__) && defined(GC_WIN32_THREADS)
+#if defined(__MINGW32__) &&defined(_DLL) && !defined(GC_NOT_DLL)
 # ifdef GC_BUILD
 #   define GC_API __declspec(dllexport)
 # else
@@ -296,6 +296,15 @@
 				/* Interferes with blacklisting.	*/
 				/* Wizards only.			*/
 
+/* Public procedures */
+
+/* Initialize the collector.  This is only required when using thread-local
+ * allocation, since unlike the regular allocation routines, GC_local_malloc
+ * is not self-initializing.  If you use GC_local_malloc you should arrange
+ * to call this somehow (e.g. from a constructor) before doing any allocation.
+ */
+GC_API void GC_init GC_PROTO((void));
+
 GC_API unsigned long GC_time_limit;
 				/* If incremental collection is enabled, */
 				/* We try to terminate collections	 */
@@ -310,7 +319,6 @@
 				/* will disable the "pause time exceeded */
 				/* tests.				 */
 
-/* Public procedures */
 /*
  * general purpose allocation routines, with roughly malloc calling conv.
  * The atomic versions promise that no relevant pointers are contained
@@ -865,10 +873,20 @@
 
 #endif /* THREADS && !SRC_M3 */
 
-#if defined(GC_WIN32_THREADS) && defined(_WIN32_WCE)
+#if defined(GC_WIN32_THREADS)
 # include <windows.h>
 
   /*
+   * All threads must be created using GC_CreateThread, so that they will be
+   * recorded in the thread table.
+   */
+  HANDLE WINAPI GC_CreateThread(
+      LPSECURITY_ATTRIBUTES lpThreadAttributes,
+      DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+      LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
+
+# if defined(_WIN32_WCE)
+  /*
    * win32_threads.c implements the real WinMain, which will start a new thread
    * to call GC_WinMain after initializing the garbage collector.
    */
@@ -878,21 +896,13 @@
       LPWSTR lpCmdLine,
       int nCmdShow );
 
-  /*
-   * All threads must be created using GC_CreateThread, so that they will be
-   * recorded in the thread table.
-   */
-  HANDLE WINAPI GC_CreateThread(
-      LPSECURITY_ATTRIBUTES lpThreadAttributes, 
-      DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, 
-      LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
-
-# ifndef GC_BUILD
-#   define WinMain GC_WinMain
-#   define CreateThread GC_CreateThread
-# endif
+#  ifndef GC_BUILD
+#    define WinMain GC_WinMain
+#    define CreateThread GC_CreateThread
+#  endif
+# endif /* defined(_WIN32_WCE) */
 
-#endif
+#endif /* defined(GC_WIN32_THREADS) */
 
 /*
  * If you are planning on putting
@@ -904,7 +914,7 @@
 #   define GC_INIT() { extern end, etext; \
 		       GC_noop(&end, &etext); }
 #else
-# if defined(__CYGWIN32__) && defined(GC_USE_DLL)
+# if (defined(__CYGWIN32__) && defined(GC_USE_DLL)) || defined (_AIX)
     /*
      * Similarly gnu-win32 DLLs need explicit initialization
      */
Index: include/private/gc_pmark.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gc_pmark.h,v
retrieving revision 1.1.1.3
retrieving revision 1.5
diff -u -r1.1.1.3 -r1.5
--- gc_pmark.h	2002/01/31 02:48:52	1.1.1.3
+++ gc_pmark.h	2002/02/12 04:37:57	1.5
@@ -145,7 +145,7 @@
   ptr_t GC_find_start();
 #endif
 
-mse * GC_signal_mark_stack_overflow();
+mse *GC_signal_mark_stack_overflow(mse *msp);
 
 # ifdef GATHERSTATS
 #   define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz)
@@ -236,7 +236,6 @@
 #   define SET_MARK_BIT_EXIT_IF_SET(hhdr,displ,exit_label) \
     { \
         register word * mark_word_addr = hhdr -> hb_marks + divWORDSZ(displ); \
-        register word mark_word = *mark_word_addr; \
           \
         OR_WORD_EXIT_IF_SET(mark_word_addr, (word)1 << modWORDSZ(displ), \
 			    exit_label); \
Index: include/private/gc_priv.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gc_priv.h,v
retrieving revision 1.1.1.9
retrieving revision 1.6
diff -u -r1.1.1.9 -r1.6
--- gc_priv.h	2002/01/31 02:48:52	1.1.1.9
+++ gc_priv.h	2002/02/12 04:37:57	1.6
@@ -1607,7 +1607,6 @@
   				/* blocks available.  Should be called	*/
   				/* until the blocks are available or	*/
   				/* until it fails by returning FALSE.	*/
-GC_API void GC_init GC_PROTO((void)); /* Initialize collector.		*/
 
 #if defined(MSWIN32) || defined(MSWINCE)
   void GC_deinit GC_PROTO((void));
Index: include/private/gcconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gcconfig.h,v
retrieving revision 1.1.1.8
retrieving revision 1.11
diff -u -r1.1.1.8 -r1.11
--- gcconfig.h	2002/01/31 02:48:52	1.1.1.8
+++ gcconfig.h	2002/02/12 04:37:57	1.11
@@ -39,6 +39,13 @@
 # endif
 
 /* Determine the machine type: */
+# if defined(__XSCALE__)
+#    define ARM32
+#    if !defined(LINUX)
+#      define NOSYS
+#      define mach_type_known
+#    endif
+# endif
 # if defined(sun) && defined(mc68000)
 #    define M68K
 #    define SUNOS4
@@ -1216,10 +1223,19 @@
 
 # ifdef RS6000
 #   define MACH_TYPE "RS6000"
-#   define ALIGNMENT 4
-#   define DATASTART ((ptr_t)0x20000000)
+#   ifdef __64BIT__
+#     define ALIGNMENT 8
+#     define CPP_WORDSZ 64
+#   else
+#     define ALIGNMENT 4
+#     define CPP_WORDSZ 32
+#   endif
+    extern int _data, _end;
+#   define DATASTART ((ptr_t)((ulong)&_data))
+#   define DATAEND ((ptr_t)((ulong)&_end))
     extern int errno;
 #   define STACKBOTTOM ((ptr_t)((ulong)&errno))
+#   define USE_GENERIC_PUSH_REGS
 #   define DYNAMIC_LOADING
 	/* For really old versions of AIX, this may have to be removed. */
 # endif
@@ -1291,11 +1307,6 @@
 # ifdef ALPHA
 #   define MACH_TYPE "ALPHA"
 #   define ALIGNMENT 8
-#   define USE_GENERIC_PUSH_REGS
-    /* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */
-    /* fp registers in some cases when the target is a 21264.  The assembly */
-    /* code doesn't handle that yet, and version dependencies make that a   */
-    /* bit tricky.  Do the easy thing for now.				    */
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
 #	define HEURISTIC2
@@ -1539,6 +1550,15 @@
 #     define OS_TYPE "MSWINCE"
 #     define DATAEND /* not needed */
 #   endif
+#   ifdef NOSYS
+      /* __data_start is usually defined in the target linker script.  */
+      extern int __data_start;
+#     define DATASTART (ptr_t)(&__data_start)
+#     define USE_GENERIC_PUSH_REGS
+      /* __stack_base__ is set in newlib/libc/sys/arm/crt0.S  */
+      extern void *__stack_base__;
+#     define STACKBOTTOM ((ptr_t) (__stack_base__))
+#   endif
 #endif
 
 # ifdef SH
@@ -1635,7 +1655,7 @@
 
 # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
     || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
-    || defined(BSD) || defined(AIX) || defined(MACOSX) || defined(OSF1)
+    || defined(BSD) || defined(_AIX) || defined(MACOSX) || defined(OSF1)
 #   define UNIX_LIKE   /* Basic Unix-like system calls work.	*/
 # endif
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]