]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000.c (rs6000_real_tls_symbol_ref_p): New function.
authorRichard Sandiford <rdsandiford@googlemail.com>
Sat, 17 May 2014 07:34:57 +0000 (07:34 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 17 May 2014 07:34:57 +0000 (07:34 +0000)
gcc/
* config/rs6000/rs6000.c (rs6000_real_tls_symbol_ref_p): New function.
(rs6000_delegitimize_address): Use it.

From-SVN: r210544

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 352a109bc203cf9f98c9498ec5c8dbef5bde55a7..79ab2476722769d636830e15297523f95eba0332 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-17  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/rs6000/rs6000.c (rs6000_real_tls_symbol_ref_p): New function.
+       (rs6000_delegitimize_address): Use it.
+
 2014-05-17  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * emit-rtl.h (replace_equiv_address, replace_equiv_address_nv): Add an
index 7b19b422662eed24f29f55c4c7520147bd18d0af..37b6b7d5ed99b464c25d36db413035e5a0e93af1 100644 (file)
@@ -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