From: Ivan Maidanski Date: Tue, 17 Apr 2012 03:52:08 +0000 (+0400) Subject: Minor code refactoring regarding HAVE_BUILTIN_UNWIND_INIT X-Git-Tag: gc7_3alpha2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2741d176b39fb3418d6186b82ca792098ee6eb1c;p=gc 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. --- 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 */