From fbbf66e77a385fc1901fdc33c1d977681cab39bf Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 21 Apr 2011 09:37:44 +0000 Subject: target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813 --- gcc/config/pa/pa.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/config/pa/pa.c') diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index aeb8061..ab0fe6a 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -187,6 +187,7 @@ static bool pa_can_eliminate (const int, const int); static void pa_conditional_register_usage (void); static enum machine_mode pa_c_mode_for_suffix (char); static section *pa_function_section (tree, enum node_frequency, bool, bool); +static bool pa_cannot_force_const_mem (enum machine_mode, rtx); /* The following extra sections are only used for SOM. */ static GTY(()) section *som_readonly_data_section; @@ -369,7 +370,7 @@ static const struct default_options pa_option_optimization_table[] = #define TARGET_SCALAR_MODE_SUPPORTED_P pa_scalar_mode_supported_p #undef TARGET_CANNOT_FORCE_CONST_MEM -#define TARGET_CANNOT_FORCE_CONST_MEM pa_tls_referenced_p +#define TARGET_CANNOT_FORCE_CONST_MEM pa_cannot_force_const_mem #undef TARGET_SECONDARY_RELOAD #define TARGET_SECONDARY_RELOAD pa_secondary_reload @@ -1563,6 +1564,14 @@ pa_tls_referenced_p (rtx x) return for_each_rtx (&x, &pa_tls_symbol_ref_1, 0); } +/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */ + +static bool +pa_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x) +{ + return pa_tls_referenced_p (x); +} + /* Emit insns to move operands[1] into operands[0]. Return 1 if we have written out everything that needs to be done to -- cgit v1.1