[backport gcc-4.8/trunk r189410 ] gcc/ 2012-07-10 Andreas Schwab PR bootstrap/53913 * config/m68k/m68k.c (m68k_epilogue_uses): New. * config/m68k/m68k.h (EPILOGUE_USES): Use it. * config/m68k/m68k-protos.h (m68k_epilogue_uses): Add prototype. --- gcc-4.8-20120708/gcc/config/m68k/m68k-protos.h.~1~ 2012-05-07 14:29:05.000000000 +0200 +++ gcc-4.8-20120708/gcc/config/m68k/m68k-protos.h 2012-07-10 14:15:26.000000000 +0200 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. - Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -68,6 +68,7 @@ extern int emit_move_sequence (rtx *, en extern bool m68k_movem_pattern_p (rtx, rtx, HOST_WIDE_INT, bool); extern const char *m68k_output_movem (rtx *, rtx, HOST_WIDE_INT, bool); extern void m68k_final_prescan_insn (rtx, rtx *, int); +extern bool m68k_epilogue_uses (int); /* Functions from m68k.c used in constraints.md. */ extern rtx m68k_unwrap_symbol (rtx, bool); --- gcc-4.8-20120708/gcc/config/m68k/m68k.c.~1~ 2012-07-03 11:46:01.000000000 +0200 +++ gcc-4.8-20120708/gcc/config/m68k/m68k.c 2012-07-10 14:15:26.000000000 +0200 @@ -6506,4 +6506,14 @@ m68k_init_sync_libfuncs (void) init_sync_libfuncs (UNITS_PER_WORD); } +/* Implements EPILOGUE_USES. All registers are live on exit from an + interrupt routine. */ +bool +m68k_epilogue_uses (int regno ATTRIBUTE_UNUSED) +{ + return (reload_completed + && (m68k_get_function_kind (current_function_decl) + == m68k_fk_interrupt_handler)); +} + #include "gt-m68k.h" --- gcc-4.8-20120708/gcc/config/m68k/m68k.h.~1~ 2012-05-21 20:43:27.000000000 +0200 +++ gcc-4.8-20120708/gcc/config/m68k/m68k.h 2012-07-10 14:15:26.000000000 +0200 @@ -802,11 +802,7 @@ do { if (cc_prev_status.flags & CC_IN_68 /* Before the prologue, the top of the frame is at 4(%sp). */ #define INCOMING_FRAME_SP_OFFSET 4 -/* All registers are live on exit from an interrupt routine. */ -#define EPILOGUE_USES(REGNO) \ - (reload_completed \ - && (m68k_get_function_kind (current_function_decl) \ - == m68k_fk_interrupt_handler)) +#define EPILOGUE_USES(REGNO) m68k_epilogue_uses (REGNO) /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \