From a1242f174c5ce62d9cad343e16dbba697cb2d386 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 17 May 2014 07:34:57 +0000 Subject: rs6000.c (rs6000_real_tls_symbol_ref_p): New function. gcc/ * config/rs6000/rs6000.c (rs6000_real_tls_symbol_ref_p): New function. (rs6000_delegitimize_address): Use it. From-SVN: r210544 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 352a109..79ab247 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-05-17 Richard Sandiford + * config/rs6000/rs6000.c (rs6000_real_tls_symbol_ref_p): New function. + (rs6000_delegitimize_address): Use it. + +2014-05-17 Richard Sandiford + * emit-rtl.h (replace_equiv_address, replace_equiv_address_nv): Add an inplace argument. Store the new address in the original MEM when true. * emit-rtl.c (change_address_1): Likewise. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7b19b42..37b6b7d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6803,6 +6803,16 @@ rs6000_output_dwarf_dtprel (FILE *file, int size, rtx x) fputs ("@dtprel+0x8000", file); } +/* Return true if X is a symbol that refers to real (rather than emulated) + TLS. */ + +static bool +rs6000_real_tls_symbol_ref_p (rtx x) +{ + return (GET_CODE (x) == SYMBOL_REF + && SYMBOL_REF_TLS_MODEL (x) >= TLS_MODEL_REAL); +} + /* In the name of slightly smaller debug output, and to cater to general assembler lossage, recognize various UNSPEC sequences and turn them back into a direct symbol reference. */ @@ -6860,7 +6870,7 @@ rs6000_delegitimize_address (rtx orig_x) if (TARGET_XCOFF && GET_CODE (y) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (y) - && SYMBOL_REF_TLS_MODEL (get_pool_constant (y)) >= TLS_MODEL_REAL) + && rs6000_real_tls_symbol_ref_p (get_pool_constant (y))) return orig_x; #endif -- cgit v1.1