diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2014-10-26 10:40:05 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-10-26 10:40:05 +0000 |
commit | a57841528cd3cb916985b4b650759f30eb37eaaa (patch) | |
tree | e151a81a71a0f6c553d900c4bdcdc8252807b82f /gcc | |
parent | 82eee4f108aaeb68cb5cd683ec8b800e96cddf87 (diff) | |
download | gcc-a57841528cd3cb916985b4b650759f30eb37eaaa.zip gcc-a57841528cd3cb916985b4b650759f30eb37eaaa.tar.gz gcc-a57841528cd3cb916985b4b650759f30eb37eaaa.tar.bz2 |
m68k.c (m68k_tls_reference_p_1): Delete.
gcc/
* config/m68k/m68k.c (m68k_tls_reference_p_1): Delete.
(m68k_tls_reference_p): Use FOR_EACH_SUBRTX_VAR.
From-SVN: r216700
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 33 |
2 files changed, 21 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ddd1991..cf177bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-10-26 Richard Sandiford <richard.sandiford@arm.com> + * config/m68k/m68k.c (m68k_tls_reference_p_1): Delete. + (m68k_tls_reference_p): Use FOR_EACH_SUBRTX_VAR. + +2014-10-26 Richard Sandiford <richard.sandiford@arm.com> + * config/m68k/m68k.c: Include rtl-iter.h. (m68k_final_prescan_insn_1): Delete. (m68k_final_prescan_insn): Use FOR_EACH_SUBRTX_VAR. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index b01110d..717c50e 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -2671,22 +2671,6 @@ m68k_tls_symbol_p (rtx x) return SYMBOL_REF_TLS_MODEL (x) != 0; } -/* Helper for m68k_tls_referenced_p. */ - -static int -m68k_tls_reference_p_1 (rtx *x_ptr, void *data ATTRIBUTE_UNUSED) -{ - /* Note: this is not the same as m68k_tls_symbol_p. */ - if (GET_CODE (*x_ptr) == SYMBOL_REF) - return SYMBOL_REF_TLS_MODEL (*x_ptr) != 0 ? 1 : 0; - - /* Don't recurse into legitimate TLS references. */ - if (m68k_tls_reference_p (*x_ptr, true)) - return -1; - - return 0; -} - /* If !LEGITIMATE_P, return true if X is a TLS symbol reference, though illegitimate one. If LEGITIMATE_P, return true if X is a legitimate TLS symbol reference. */ @@ -2698,7 +2682,22 @@ m68k_tls_reference_p (rtx x, bool legitimate_p) return false; if (!legitimate_p) - return for_each_rtx (&x, m68k_tls_reference_p_1, NULL) == 1 ? true : false; + { + subrtx_var_iterator::array_type array; + FOR_EACH_SUBRTX_VAR (iter, array, x, ALL) + { + rtx x = *iter; + + /* Note: this is not the same as m68k_tls_symbol_p. */ + if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x) != 0) + return true; + + /* Don't recurse into legitimate TLS references. */ + if (m68k_tls_reference_p (x, true)) + iter.skip_subrtxes (); + } + return false; + } else { enum m68k_reloc reloc = RELOC_GOT; |