+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
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. */
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