From: Trevor Saunders Date: Sun, 15 Nov 2015 00:18:01 +0000 (+0000) Subject: always define EH_RETURN_HANDLER_RTX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd4fb6097ad6c16af5ba806c56513e5d756ab852;p=gcc.git always define EH_RETURN_HANDLER_RTX gcc/ChangeLog: 2015-11-14 Trevor Saunders * defaults.h (EH_RETURN_HANDLER_RTX): New default definition. * df-scan.c (df_get_exit_block_use_set): Adjust. * except.c (expand_eh_return): Likewise. From-SVN: r230392 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2254c009260..5b3bf501ad0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-14 Trevor Saunders + + * defaults.h (EH_RETURN_HANDLER_RTX): New default definition. + * df-scan.c (df_get_exit_block_use_set): Adjust. + * except.c (expand_eh_return): Likewise. + 2015-11-14 Trevor Saunders * config/i386/i386.h (TARGET_PECOFF): Remove define. diff --git a/gcc/defaults.h b/gcc/defaults.h index eca624ca1be..0f1c713c889 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1305,6 +1305,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_PECOFF 0 #endif +#ifndef EH_RETURN_HANDLER_RTX +#define EH_RETURN_HANDLER_RTX NULL +#endif + #ifdef GCC_INSN_FLAGS_H /* Dependent default target macro definitions diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 2e5fe974a5a..a7359259d33 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3714,7 +3714,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses) } #endif -#ifdef EH_RETURN_HANDLER_RTX if ((!targetm.have_epilogue () || ! epilogue_completed) && crtl->calls_eh_return) { @@ -3722,7 +3721,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses) if (tmp && REG_P (tmp)) df_mark_reg (tmp, exit_block_uses); } -#endif /* Mark function return value. */ diddle_return_value (df_mark_reg, (void*) exit_block_uses); diff --git a/gcc/except.c b/gcc/except.c index 1801fe726d1..1a41a34cd04 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2255,11 +2255,10 @@ expand_eh_return (void) emit_insn (targetm.gen_eh_return (crtl->eh.ehr_handler)); else { -#ifdef EH_RETURN_HANDLER_RTX - emit_move_insn (EH_RETURN_HANDLER_RTX, crtl->eh.ehr_handler); -#else - error ("__builtin_eh_return not supported on this target"); -#endif + if (rtx handler = EH_RETURN_HANDLER_RTX) + emit_move_insn (handler, crtl->eh.ehr_handler); + else + error ("__builtin_eh_return not supported on this target"); } emit_label (around_label);