diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2006-01-25 03:03:14 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2006-01-25 03:03:14 +0000 |
commit | 54f28c21ee515da92119551983d51118a3666e85 (patch) | |
tree | 575ef0143266ff2f57b09fe0143e9a412b1fb27f /boehm-gc/mach_dep.c | |
parent | ac42ec79e00a729e9d92fc1d254862936ee68bbe (diff) | |
download | gcc-54f28c21ee515da92119551983d51118a3666e85.tar.gz |
Import Boehm GC version 6.6.
From-SVN: r110204
Diffstat (limited to 'boehm-gc/mach_dep.c')
-rw-r--r-- | boehm-gc/mach_dep.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/boehm-gc/mach_dep.c b/boehm-gc/mach_dep.c index 5412b8b54fd..ba1e0b6fe50 100644 --- a/boehm-gc/mach_dep.c +++ b/boehm-gc/mach_dep.c @@ -27,6 +27,10 @@ # endif # endif +#if defined(RS6000) || defined(POWERPC) +# include <ucontext.h> +#endif + #if defined(__MWERKS__) && !defined(POWERPC) asm static void PushMacRegisters() @@ -413,6 +417,13 @@ ptr_t arg; /* the stack. */ __builtin_unwind_init(); # else /* !HAVE_BUILTIN_UNWIND_INIT */ +# if defined(RS6000) || defined(POWERPC) + /* FIXME: RS6000 means AIX. */ + /* This should probably be used in all Posix/non-gcc */ + /* settings. We defer that change to minimize risk. */ + ucontext_t ctxt; + getcontext(&ctxt); +# else /* Generic code */ /* The idea is due to Parag Patel at HP. */ /* We're not sure whether he would like */ @@ -426,7 +437,7 @@ ptr_t arg; for (; (char *)i < lim; i++) { *i = 0; } -# if defined(POWERPC) || defined(MSWIN32) || defined(MSWINCE) \ +# if defined(MSWIN32) || defined(MSWINCE) \ || defined(UTS4) || defined(LINUX) || defined(EWS4800) (void) setjmp(regs); # else @@ -435,15 +446,16 @@ ptr_t arg; /* SUSV3, setjmp() may or may not save signal mask. */ /* _setjmp won't, but is less portable. */ # endif +# endif /* !AIX ... */ # endif /* !HAVE_BUILTIN_UNWIND_INIT */ -# elif defined(PTHREADS) && !defined(MSWIN32) /* !USE_GENERIC_PUSH_REGS */ - /* We may still need this to save thread contexts. */ - /* This should probably be used in all Posix/non-gcc */ - /* settings. We defer that change to minimize risk. */ - ucontext_t ctxt; - getcontext(&ctxt); -# else /* Shouldn't be needed */ - ABORT("Unexpected call to GC_with_callee_saves_pushed"); +# else +# if defined(PTHREADS) && !defined(MSWIN32) /* !USE_GENERIC_PUSH_REGS */ + /* We may still need this to save thread contexts. */ + ucontext_t ctxt; + getcontext(&ctxt); +# else /* Shouldn't be needed */ + ABORT("Unexpected call to GC_with_callee_saves_pushed"); +# endif # endif # if (defined(SPARC) && !defined(HAVE_BUILTIN_UNWIND_INIT)) \ || defined(IA64) @@ -480,7 +492,7 @@ ptr_t cold_gc_frame; /* the stack. Return sp. */ # ifdef SPARC asm(" .seg \"text\""); -# if defined(SVR4) || defined(NETBSD) +# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD) asm(" .globl GC_save_regs_in_stack"); asm("GC_save_regs_in_stack:"); asm(" .type GC_save_regs_in_stack,#function"); |