This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[m68k 03/13] boehm-gc fixes
- From: zippel at linux-m68k dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2007 12:26:18 +0100
- Subject: [m68k 03/13] boehm-gc fixes
- References: <20070130112615.782382000@linux-m68k.org>
Hi,
A few fixes to get gc working on m68k:
- the thread suspend handler has to save all registers
- reenable MPROTECT_VDB, it should work, otherwise it probably was a
kernel bug (and I couldn't find a reference to the original problem,
neither did I notice any problem)
- change STACKBOTTOM to LINUX_STACKBOTTOM so it works with 2.6 kernel
2007-01-30 Roman Zippel <zippel@linux-m68k.org>
* boehm-gc/include/private/gcconfig.h: use LINUX_STACKBOTTOM so
it works with Linux 2.6, reactivate MPROTECT_VDB
* boehm-gc/pthread_stop_world.c: save all register
on signal entry
---
boehm-gc/include/private/gcconfig.h | 4 ++--
boehm-gc/pthread_stop_world.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Index: gcc/boehm-gc/include/private/gcconfig.h
===================================================================
--- gcc.orig/boehm-gc/include/private/gcconfig.h 2006-12-21 16:18:52.000000000 +0100
+++ gcc/boehm-gc/include/private/gcconfig.h 2006-12-21 16:22:22.000000000 +0100
@@ -665,10 +665,10 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
-# define STACKBOTTOM ((ptr_t)0xf0000000)
+# define LINUX_STACKBOTTOM
# define USE_GENERIC_PUSH_REGS
/* We never got around to the assembly version. */
-/* # define MPROTECT_VDB - Reported to not work 9/17/01 */
+# define MPROTECT_VDB
# ifdef __ELF__
# define DYNAMIC_LOADING
# include <features.h>
Index: gcc/boehm-gc/pthread_stop_world.c
===================================================================
--- gcc.orig/boehm-gc/pthread_stop_world.c 2006-12-21 16:22:50.000000000 +0100
+++ gcc/boehm-gc/pthread_stop_world.c 2006-12-21 16:23:15.000000000 +0100
@@ -124,7 +124,7 @@ sem_t GC_suspend_ack_sem;
void GC_suspend_handler_inner(ptr_t sig_arg);
-#if defined(IA64) || defined(HP_PA)
+#if defined(IA64) || defined(HP_PA) || defined(M68K)
extern void GC_with_callee_saves_pushed();
void GC_suspend_handler(int sig)
--