]> granicus.if.org Git - gc/commitdiff
Minor code refactoring regarding HAVE_BUILTIN_UNWIND_INIT
authorIvan Maidanski <ivmai@mail.ru>
Tue, 17 Apr 2012 03:52:08 +0000 (07:52 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Apr 2012 11:52:35 +0000 (15:52 +0400)
* 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.

include/private/gcconfig.h
mach_dep.c

index 89c502858e0b7bccd9aad242454c7383367cf398..0cfa1542bc76b5b06dfe48ed1522f65cfc8025e3 100644 (file)
 # 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
index cf842fcca2f5ffc8265750c8686392908a3c2baa..fc7dd8cfde7b53e89674edfd01ec17844dc11361 100644 (file)
@@ -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                       */