aboutsummaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-09-28 13:44:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2010-09-28 13:44:58 -0700
commitf0a0390e691ece0d859b7d87c6e6617d227cb8dd (patch)
treeabc0f2fe4784df2eb251f4c04a0493fec3eac91d /gcc/defaults.h
parentc165dca7efdb3f4bdae82c01b409a6b9cf4dbd65 (diff)
downloadgcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.zip
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.gz
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.bz2
Hookize TARGET_UNWIND_INFO et al.
From-SVN: r164701
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r--gcc/defaults.h50
1 files changed, 3 insertions, 47 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h
index a50052e..6ecebb6 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -376,8 +376,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
the rest of the DWARF 2 frame unwind support is also provided. */
-#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) \
- && !defined (TARGET_UNWIND_INFO)
+#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
#define DWARF2_UNWIND_INFO 1
#endif
@@ -1238,49 +1237,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
functions.
*/
-/* Just because the user configured --with-sjlj-exceptions=no doesn't
- mean that we can use call frame exceptions. Detect that the target
- has appropriate support. */
-
-#ifndef MUST_USE_SJLJ_EXCEPTIONS
-# if defined (EH_RETURN_DATA_REGNO) \
- && (defined (TARGET_UNWIND_INFO) \
- || (DWARF2_UNWIND_INFO \
- && (defined (EH_RETURN_HANDLER_RTX) \
- || defined (HAVE_eh_return))))
-# define MUST_USE_SJLJ_EXCEPTIONS 0
-# else
-# define MUST_USE_SJLJ_EXCEPTIONS 1
-# endif
-#endif
-
-#ifdef CONFIG_SJLJ_EXCEPTIONS
-# if CONFIG_SJLJ_EXCEPTIONS == 1
-# define USING_SJLJ_EXCEPTIONS 1
-# endif
-# if CONFIG_SJLJ_EXCEPTIONS == 0
-# define USING_SJLJ_EXCEPTIONS 0
-# if !defined(EH_RETURN_DATA_REGNO)
- #error "EH_RETURN_DATA_REGNO required"
-# endif
-# if ! (defined(TARGET_UNWIND_INFO) || DWARF2_UNWIND_INFO)
- #error "{DWARF2,TARGET}_UNWIND_INFO required"
-# endif
-# if !defined(TARGET_UNWIND_INFO) \
- && !(defined(EH_RETURN_HANDLER_RTX) || defined(HAVE_eh_return))
- #error "EH_RETURN_HANDLER_RTX or eh_return required"
-# endif
-/* Usually the above error checks will have already triggered an
- error, but backends may set MUST_USE_SJLJ_EXCEPTIONS for their own
- reasons. */
-# if MUST_USE_SJLJ_EXCEPTIONS
- #error "Must use SJLJ exceptions but configured not to"
-# endif
-# endif
-#else
-# define USING_SJLJ_EXCEPTIONS MUST_USE_SJLJ_EXCEPTIONS
-#endif
-
/* The default branch cost is 1. */
#ifndef BRANCH_COST
#define BRANCH_COST(speed_p, predictable_p) 1
@@ -1388,7 +1344,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
#else
#define STACK_OLD_CHECK_PROTECT \
- (USING_SJLJ_EXCEPTIONS ? 75 * UNITS_PER_WORD : 8 * 1024)
+ (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 8 * 1024)
#endif
/* Minimum amount of stack required to recover from an anticipated stack
@@ -1396,7 +1352,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
of stack required to propagate an exception. */
#ifndef STACK_CHECK_PROTECT
#define STACK_CHECK_PROTECT \
- (USING_SJLJ_EXCEPTIONS ? 75 * UNITS_PER_WORD : 12 * 1024)
+ (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 12 * 1024)
#endif
/* Make the maximum frame size be the largest we can and still only need