aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mep
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-11-22 01:57:50 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-11-22 01:57:50 +0000
commit5efd84c50326ffd904e376abc150fec01cdb06fb (patch)
tree3a7c690a1660fef1696c27945d762dcb5b0ee8b9 /gcc/config/mep
parent87921b81c0b080370a1f3a9151fef5029852e374 (diff)
downloadgcc-5efd84c50326ffd904e376abc150fec01cdb06fb.zip
gcc-5efd84c50326ffd904e376abc150fec01cdb06fb.tar.gz
gcc-5efd84c50326ffd904e376abc150fec01cdb06fb.tar.bz2
target.def (conditional_register_usage): Define.
* target.def (conditional_register_usage): Define. * reginfo.c (init_reg_sets_1): Call targetm.conditional_register_usage. * system.h (CONDITIONAL_REGISTER_USAGE): Poison. * doc/tm.texi.in (CONDITIONAL_REGISTER_USAGE): Adjust language for making it a hook. * doc/tm.texi: Regenerate. * config/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/alpha/alpha.c (alpha_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arc/arc.c (arc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arm/arm.c (arm_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/bfin/bfin.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/bfin/bfin-protos.h (conditional_register_usage): Delete. * config/bfin/bfin.c (conditional_register_usage): Move code into... (bfin_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/cris/cris.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/cris/cris-protos.h (cris_conditional_register_usage): Delete. * config/cris/cris.c (cris_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/fr30/fr30.h (FIXED_REGISTERS): Adjust comment. * config/frv/frv.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/frv/frv-protos.h (frv_conditional_register_usage): Delete. * config/frv/frv.c (frv_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/h8300/h8300.c (h8300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/i386/i386-protos.h (ix86_conditional_register_usage): Delete. * config/i386/i386.c (ix86_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32c/m32c.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m32c/m32c-protos.h (m32c_conditional_register_usage): Delete. * config/m32c/m32c.c (m32c_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/m32r/m32r.c (m32r_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m68hc11/m68hc11.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_conditional_register_usage): Delete. * config/m68hc11/m68hc11.c (m68hc11_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mep/mep.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mep/mep-protos.h (mep_conditional_register_usage): Delete. * config/mep/mep.c (mep_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mips/mips-protos.h (mips_conditional_register_usage): Delete. * config/mips/mips.c (mips_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mmix/mmix.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mmix/mmix-protos.h (mmix_conditional_register_usage): Delete. * config/mmix/mmix.c (mmix_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/mn10300/mn10300.c (mn10300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): ...with this... * config/pa/pa.c (pa_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pdp11/pdp11.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pdp11/pdp11.c (pdp11_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rs6000/rs6000-protos.h (rs6000_conditional_register_usage): Delete. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rx/rx.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rx/rx-protos.h (rx_conditional_register_usage): Delete. * config/rx/rx.c (rx_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/s390/s390-protos.h (s390_conditional_register_usage): Delete. * config/s390/s390.c (s390_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/score/score.c (score_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sh/sh.c (sh_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sparc/sparc.c (sparc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/spu/spu.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/spu/spu-protos.h (spu_conditional_register_usage): Delete. * config/spu/spu.c (spu_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/v850/v850.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/v850/v850.c (v850_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. From-SVN: r167020
Diffstat (limited to 'gcc/config/mep')
-rw-r--r--gcc/config/mep/mep-protos.h1
-rw-r--r--gcc/config/mep/mep.c5
-rw-r--r--gcc/config/mep/mep.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/gcc/config/mep/mep-protos.h b/gcc/config/mep/mep-protos.h
index 857e6f2..12cef58 100644
--- a/gcc/config/mep/mep-protos.h
+++ b/gcc/config/mep/mep-protos.h
@@ -19,7 +19,6 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-extern void mep_conditional_register_usage (void);
extern int mep_regno_reg_class (int);
extern int mep_reg_class_from_constraint (int, const char *);
extern bool mep_const_ok_for_letter_p (HOST_WIDE_INT, int);
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 49954db..96b9eb2 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -231,6 +231,7 @@ static tree mep_build_builtin_va_list (void);
static void mep_expand_va_start (tree, rtx);
static tree mep_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
static bool mep_can_eliminate (const int, const int);
+static void mep_conditional_register_usage (void);
static void mep_trampoline_init (rtx, tree, rtx);
#define WANT_GCC_DEFINITIONS
@@ -278,7 +279,7 @@ mep_set_leaf_registers (int enable)
mep_leaf_registers[i] = enable;
}
-void
+static void
mep_conditional_register_usage (void)
{
int i;
@@ -7454,6 +7455,8 @@ mep_asm_init_sections (void)
#define TARGET_GIMPLIFY_VA_ARG_EXPR mep_gimplify_va_arg_expr
#undef TARGET_CAN_ELIMINATE
#define TARGET_CAN_ELIMINATE mep_can_eliminate
+#undef TARGET_CONDITIONAL_REGISTER_USAGE
+#define TARGET_CONDITIONAL_REGISTER_USAGE mep_conditional_register_usage
#undef TARGET_TRAMPOLINE_INIT
#define TARGET_TRAMPOLINE_INIT mep_trampoline_init
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index 9a7b285..73675a3 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -256,9 +256,6 @@ crtbegin.o%s"
1, CALL_USED_SHADOW_REGISTERS \
}
-#define CONDITIONAL_REGISTER_USAGE \
- mep_conditional_register_usage ();
-
#define REG_ALLOC_ORDER { \
/* core registers */ \
3, 2, 1, 0, 9, 10, 11, 12, 4, 5, 6, 7, 8, 13, 14, 15, \