From 3a769784968e6d24092cedc1eb363b60b4066484 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 21 Jun 2011 00:35:05 +0930 Subject: [PATCH] rs6000.c (rs6000_cannot_force_const_mem): Match CONST high part large-toc address. * config/rs6000/rs6000.c (rs6000_cannot_force_const_mem): Match CONST high part large-toc address. (rs6000_tls_referenced_p): Make static. * config/rs6000/rs6000-protos.h (rs6000_tls_referenced_p): Delete. From-SVN: r175219 --- gcc/ChangeLog | 7 +++++++ gcc/config/rs6000/rs6000-protos.h | 1 - gcc/config/rs6000/rs6000.c | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4b5faf714c..455fdcffb6b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-06-21 Alan Modra + + * config/rs6000/rs6000.c (rs6000_cannot_force_const_mem): Match + CONST high part large-toc address. + (rs6000_tls_referenced_p): Make static. + * config/rs6000/rs6000-protos.h (rs6000_tls_referenced_p): Delete. + 2011-06-20 H.J. Lu PR middle-end/47725 diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index b7b60c0485f..36f2a4c124a 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -171,7 +171,6 @@ extern unsigned int rs6000_dbx_register_number (unsigned int); extern void rs6000_emit_epilogue (int); extern void rs6000_emit_eh_reg_restore (rtx, rtx); extern const char * output_isel (rtx *); -extern bool rs6000_tls_referenced_p (rtx); extern void rs6000_aix_asm_output_dwarf_table_ref (char *); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index df6e7d93a5d..cea1650ac61 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6045,7 +6045,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) /* Return 1 if X contains a thread-local symbol. */ -bool +static bool rs6000_tls_referenced_p (rtx x) { if (! TARGET_HAVE_TLS) @@ -6059,6 +6059,11 @@ rs6000_tls_referenced_p (rtx x) static bool rs6000_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x) { + if (GET_CODE (x) == CONST + && GET_CODE (XEXP (x, 0)) == PLUS + && GET_CODE (XEXP (XEXP (x, 0), 1)) == HIGH) + return true; + return rs6000_tls_referenced_p (x); } -- 2.30.2