From 04886dc0ea22ed6b5acc56ab12e36f24e5d4403f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 25 Aug 2004 19:37:41 -0700 Subject: [PATCH] alpha.c (alpha_cannot_force_const_mem): New. * config/alpha/alpha.c (alpha_cannot_force_const_mem): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. From-SVN: r86602 --- gcc/ChangeLog | 5 +++++ gcc/config/alpha/alpha.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe284a98968..3dcb8338104 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-08-25 Richard Henderson + + * config/alpha/alpha.c (alpha_cannot_force_const_mem): New. + (TARGET_CANNOT_FORCE_CONST_MEM): New. + 2004-08-25 Andrew MacLeod * doc/tree-ssa.texi: Document new operand iterator. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index c6d93446a84..1e2b8dad1d1 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1180,6 +1180,17 @@ alpha_legitimize_address (rtx x, rtx scratch, } } +/* Primarily this is required for TLS symbols, but given that our move + patterns *ought* to be able to handle any symbol at any time, we + should never be spilling symbolic operands to the constant pool, ever. */ + +static bool +alpha_cannot_force_const_mem (rtx x) +{ + enum rtx_code code = GET_CODE (x); + return code == SYMBOL_REF || code == LABEL_REF || code == CONST; +} + /* We do not allow indirect calls to be optimized into sibling calls, nor can we allow a call to a function with a different GP to be optimized into a sibcall. */ @@ -9357,6 +9368,8 @@ alpha_init_libfuncs (void) #define TARGET_FUNCTION_OK_FOR_SIBCALL alpha_function_ok_for_sibcall #undef TARGET_CANNOT_COPY_INSN_P #define TARGET_CANNOT_COPY_INSN_P alpha_cannot_copy_insn_p +#undef TARGET_CANNOT_FORCE_CONST_MEM +#define TARGET_CANNOT_FORCE_CONST_MEM alpha_cannot_force_const_mem #if TARGET_ABI_OSF #undef TARGET_ASM_OUTPUT_MI_THUNK -- 2.30.2