summaryrefslogtreecommitdiff
path: root/boehm-gc/mach_dep.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-25 03:03:14 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-25 03:03:14 +0000
commit8e86a8789d7a82b6f389c7c9052ba250933fafcb (patch)
tree575ef0143266ff2f57b09fe0143e9a412b1fb27f /boehm-gc/mach_dep.c
parent81aeb57750e78fcb33d69a741e75754851058883 (diff)
downloadgcc-8e86a8789d7a82b6f389c7c9052ba250933fafcb.tar.gz
Import Boehm GC version 6.6.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110204 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/mach_dep.c')
-rw-r--r--boehm-gc/mach_dep.c32
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");