diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-07-26 09:47:33 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-07-26 09:47:33 +0000 |
commit | 093a6c996efdb16e7cf20f2677dbe128e618031d (patch) | |
tree | cfe6d5164490a03236fafa60c8d95b2fe0ded477 /gcc/config/pa/pa.c | |
parent | 82e3a7199574db824fc468831c6db6378fb7f87e (diff) | |
download | gcc-093a6c996efdb16e7cf20f2677dbe128e618031d.zip gcc-093a6c996efdb16e7cf20f2677dbe128e618031d.tar.gz gcc-093a6c996efdb16e7cf20f2677dbe128e618031d.tar.bz2 |
rtl.h (tls_referenced_p): Declare.
gcc/
* rtl.h (tls_referenced_p): Declare.
* rtlanal.c (tls_referenced_p_1, tls_referenced_p): New functions.
* config/mips/mips.c (mips_tls_symbol_ref_1): Delete.
(mips_cannot_force_const_mem): Use tls_referenced_p.
* config/pa/pa-protos.h (pa_tls_referenced_p): Delete.
* config/pa/pa.h (CONSTANT_ADDRESS_P): Use tls_referenced_p
instead of pa_tls_referenced_p.
* config/pa/pa.c (hppa_legitimize_address, pa_cannot_force_const_mem)
(pa_emit_move_sequence, pa_emit_move_sequence): Likewise.
(pa_legitimate_constant_p): Likewise.
(pa_tls_symbol_ref_1, pa_tls_referenced_p): Delete.
* config/rs6000/rs6000.c (rs6000_tls_referenced_p): Delete.
(rs6000_cannot_force_const_mem, rs6000_emit_move)
(rs6000_address_for_altivec): Use tls_referenced_p instead of
rs6000_tls_referenced_p.
(rs6000_tls_symbol_ref_1): Delete.
From-SVN: r213077
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r-- | gcc/config/pa/pa.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e136741..d52d52f 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1037,7 +1037,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, && !REG_POINTER (XEXP (x, 1))) return gen_rtx_PLUS (Pmode, XEXP (x, 1), XEXP (x, 0)); - if (pa_tls_referenced_p (x)) + if (tls_referenced_p (x)) return legitimize_tls_address (x); else if (flag_pic) return legitimize_pic_address (x, mode, gen_reg_rtx (Pmode)); @@ -1542,31 +1542,12 @@ force_mode (enum machine_mode mode, rtx orig) return gen_rtx_REG (mode, REGNO (orig)); } -/* Return 1 if *X is a thread-local symbol. */ - -static int -pa_tls_symbol_ref_1 (rtx *x, void *data ATTRIBUTE_UNUSED) -{ - return PA_SYMBOL_REF_TLS_P (*x); -} - -/* Return 1 if X contains a thread-local symbol. */ - -bool -pa_tls_referenced_p (rtx x) -{ - if (!TARGET_HAVE_TLS) - return false; - - return for_each_rtx (&x, &pa_tls_symbol_ref_1, 0); -} - /* Implement TARGET_CANNOT_FORCE_CONST_MEM. */ static bool pa_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x) { - return pa_tls_referenced_p (x); + return tls_referenced_p (x); } /* Emit insns to move operands[1] into operands[0]. @@ -1921,7 +1902,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg) || (GET_CODE (operand1) == HIGH && symbolic_operand (XEXP (operand1, 0), mode)) || function_label_operand (operand1, VOIDmode) - || pa_tls_referenced_p (operand1)) + || tls_referenced_p (operand1)) { int ishighonly = 0; @@ -2081,7 +2062,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg) } return 1; } - else if (pa_tls_referenced_p (operand1)) + else if (tls_referenced_p (operand1)) { rtx tmp = operand1; rtx addend = NULL; @@ -10293,7 +10274,7 @@ pa_legitimate_constant_p (enum machine_mode mode, rtx x) /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not legitimate constants. The other variants can't be handled by the move patterns after reload starts. */ - if (pa_tls_referenced_p (x)) + if (tls_referenced_p (x)) return false; if (TARGET_64BIT && GET_CODE (x) == CONST_DOUBLE) |