diff options
author | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-29 22:51:04 +0000 |
---|---|---|
committer | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-29 22:51:04 +0000 |
commit | 5a1c68c319e09fab3a9288938bc1844bd19f8f66 (patch) | |
tree | 0f2937085f496ccc9d16a12f644463d2113bf657 /gcc/config/bfin | |
parent | 275b769bf477e9dd3d9b7a9855a8919c40d503bb (diff) | |
download | gcc-5a1c68c319e09fab3a9288938bc1844bd19f8f66.tar.gz |
* target.h (struct gcc_target): Add frame_pointer_required field.
* target-def.h (TARGET_FRAME_POINTER_REQUIRED): New.
(TARGET_INITIALIZER): Use TARGET_FRAME_POINTER_REQUIRED.
* ira.c (setup_eliminable_regset): Use frame_pointer_required target
hook.
* reload1.c (update_eliminables): (Ditto.).
* gcc/system.h (FRAME_POINTER_REQUIRED): Poison.
* doc/tm.texi (FRAME_POINTER_REQUIRED): Revise documentation.
(INITIAL_FRAME_POINTER_OFFSET): (Ditto.).
* config/arc/arc.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/arm/arm.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/arm/arm.c (TARGET_FRAME_POINTER_REQUIRED): Define.
(arm_frame_pointer_required): New function.
* config/avr/avr.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/avr/avr.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(avr_frame_pointer_required_p): Declare as static.
* config/avr/avr-protos.h (avr_frame_pointer_required_p): Remove.
* config/bfin/bfin.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/bfin/bfin.c (TARGET_FRAME_POINTER_REQUIRED): Define.
(bfin_frame_pointer_required): Make as static, change return type
to bool.
* config/bfin/bfin-protos.h (bfin_frame_pointer_required): Remove.
* config/cris/cris.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/cris/cris.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(cris_frame_pointer_required): New function.
* config/crx/crx.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/fr30/fr30.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/fr30/fr30.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(fr30_frame_pointer_required): New function.
* config/frv/frv.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/frv/frv.c (TARGET_FRAME_POINTER_REQUIRED): Define.
(frv_frame_pointer_required): Make as static, change return type
to bool.
* config/bfin/bfin-protos.h (frv_frame_pointer_required): Remove.
* config/i386/i386.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/i386/i386.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(ix86_frame_pointer_required): Make as static, change return type to
bool.
* config/i386/i386-protos.h (ix86_frame_pointer_required): Remove.
* config/m32c/m32c.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/m32c/m32c.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/mcore/mcore.h (CAN_ELIMINATE): Remove macro.
* config/mep/mep.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/mips/mips.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/mips/mips.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(mips_frame_pointer_required): Make as static.
* config/mips/mips-protos.h (mips_frame_pointer_required): Remove.
* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/mmix/mmix.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(mmix_frame_pointer_required): Mew function.
* config/moxie/moxie.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/moxie/moxie.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
* config/pa/pa.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/score/score.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/sh/sh.h (CAN_ELIMINATE): Remove macro.
* config/sparc/sparc.h (FRAME_POINTER_REQUIRED): Remove macro.
(CAN_ELIMINATE): Redefine.
* config/sparc/sparc.c (TARGET_FRAME_POINTER_REQUIRED): Define macro.
(sparc_frame_pointer_required): New function.
(sparc_can_eliminate): New function.
* config/sparc/sparc-protos.h (sparc_can_eliminate): Declare.
* config/vax/vax.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/vax/vax.c (TARGET_FRAME_POINTER_REQUIRED): Define.
* config/xtensa/xtensa.h (FRAME_POINTER_REQUIRED): Remove macro.
* config/xtensa/xtensa.c (TARGET_FRAME_POINTER_REQUIRED): Define.
(xtensa_frame_pointer_required): Make as static, change return type
to bool.
* config/xtensa/xtensa-protos.h (xtensa_frame_pointer_required):
Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r-- | gcc/config/bfin/bfin-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 11 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.h | 9 |
3 files changed, 9 insertions, 14 deletions
diff --git a/gcc/config/bfin/bfin-protos.h b/gcc/config/bfin/bfin-protos.h index 13542411221..72698a2b0a1 100644 --- a/gcc/config/bfin/bfin-protos.h +++ b/gcc/config/bfin/bfin-protos.h @@ -1,5 +1,5 @@ /* Prototypes for Blackfin functions used in the md file & elsewhere. - Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU CC. @@ -112,7 +112,6 @@ extern int log2constp (unsigned HOST_WIDE_INT); extern bool bfin_legitimate_constant_p (rtx); extern int hard_regno_mode_ok (int, Mmode); extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx); -extern int bfin_frame_pointer_required (void); extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int); extern int effective_address_32bit_p (rtx, Mmode); diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 715ec818cf5..4f213062a4f 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -812,20 +812,20 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, Zero means the frame pointer need not be set up (and parms may be accessed via the stack pointer) in functions that seem suitable. */ -int +static bool bfin_frame_pointer_required (void) { e_funkind fkind = funkind (TREE_TYPE (current_function_decl)); if (fkind != SUBROUTINE) - return 1; + return true; /* We turn on -fomit-frame-pointer if -momit-leaf-frame-pointer is used, so we have to override it for non-leaf functions. */ if (TARGET_OMIT_LEAF_FRAME_POINTER && ! current_function_is_leaf) - return 1; + return true; - return 0; + return false; } /* Return the number of registers pushed during the prologue. */ @@ -6339,4 +6339,7 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P bfin_legitimate_address_p +#undef TARGET_FRAME_POINTER_REQUIRED +#define TARGET_FRAME_POINTER_REQUIRED bfin_frame_pointer_required + struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index 29e4f910842..a79420476c6 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -1,5 +1,5 @@ /* Definitions for the Blackfin port. - Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Analog Devices. This file is part of GCC. @@ -313,13 +313,6 @@ extern const char *bfin_library_id_string; found in the variable crtl->outgoing_args_size. */ #define ACCUMULATE_OUTGOING_ARGS 1 -/* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. -*/ -#define FRAME_POINTER_REQUIRED (bfin_frame_pointer_required ()) - /*#define DATA_ALIGNMENT(TYPE, BASIC-ALIGN) for arrays.. */ /* If defined, a C expression to compute the alignment for a local |