summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-04-17 07:52:08 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-04-17 15:52:35 +0400
commit2741d176b39fb3418d6186b82ca792098ee6eb1c (patch)
tree2479ad3f5e8911cc2059b99742ea546152d179a3
parentac3228a123681396870064e39b86235ae15e8b09 (diff)
downloadbdwgc-2741d176b39fb3418d6186b82ca792098ee6eb1c.tar.gz
Minor code refactoring regarding HAVE_BUILTIN_UNWIND_INIT
* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Do not define for Darwin/ppc and RTEMS. * mach_dep.c (GC_with_callee_saves_pushed): Remove target-specific checks for Darwin/ppc and RTEMS as HAVE_BUILTIN_UNWIND_INIT is not defined in that case.
-rw-r--r--include/private/gcconfig.h2
-rw-r--r--mach_dep.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 89c50285..0cfa1542 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -701,6 +701,8 @@
# if defined(__GNUC__) && ((__GNUC__ >= 3) \
|| (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) \
&& !defined(__INTEL_COMPILER) && !defined(__PATHCC__) \
+ && !(defined(POWERPC) && defined(DARWIN)) /* for MacOS X 10.3.9 */ \
+ && !defined(RTEMS) \
&& !defined(__clang__) /* since no-op in clang (3.0) */
# define HAVE_BUILTIN_UNWIND_INIT
# endif
diff --git a/mach_dep.c b/mach_dep.c
index cf842fcc..fc7dd8cf 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -266,14 +266,10 @@ GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
/* subsumed by the getcontext() call. */
GC_save_regs_ret_val = GC_save_regs_in_stack();
# endif /* register windows. */
-# elif defined(HAVE_BUILTIN_UNWIND_INIT) \
- && !(defined(POWERPC) && defined(DARWIN)) \
- && !(defined(I386) && defined(RTEMS))
+# elif defined(HAVE_BUILTIN_UNWIND_INIT)
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
- /* Mark Sibly points out that this doesn't seem to work */
- /* on MacOS 10.3.9/PowerPC. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT && !UNIX_LIKE */
/* && !HAVE_PUSH_REGS */