diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-08 11:25:32 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-08 11:25:32 +0000 |
commit | 868d8521752ace1e3ef69fbb5dbde1eb4626bd17 (patch) | |
tree | 7fde31384d3b0345454c771db2f6e4591b05656d | |
parent | 728209c2b0d9cfad5aa1b44a8274a1dea682165e (diff) | |
download | gcc-868d8521752ace1e3ef69fbb5dbde1eb4626bd17.tar.gz |
gcc/
* config/aarch64/aarch64.c: Include rtl-iter.h.
(aarch64_tls_operand_p_1): Delete.
(aarch64_tls_operand_p): Use FOR_EACH_SUBRTX.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217256 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 29 |
2 files changed, 18 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf8183186f3..4a513935160 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2014-11-08 Richard Sandiford <richard.sandiford@arm.com> + * config/aarch64/aarch64.c: Include rtl-iter.h. + (aarch64_tls_operand_p_1): Delete. + (aarch64_tls_operand_p): Use FOR_EACH_SUBRTX. + +2014-11-08 Richard Sandiford <richard.sandiford@arm.com> + * config/arm/arm.c (arm_note_pic_base): Delete. (arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 736ad903b70..0429d96710b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -2809,28 +2809,23 @@ aarch64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, reload_completed = 0; } -static int -aarch64_tls_operand_p_1 (rtx *x, void *data ATTRIBUTE_UNUSED) -{ - if (GET_CODE (*x) == SYMBOL_REF) - return SYMBOL_REF_TLS_MODEL (*x) != 0; - - /* Don't recurse into UNSPEC_TLS looking for TLS symbols; these are - TLS offsets, not real symbol references. */ - if (GET_CODE (*x) == UNSPEC - && XINT (*x, 1) == UNSPEC_TLS) - return -1; - - return 0; -} - static bool aarch64_tls_referenced_p (rtx x) { if (!TARGET_HAVE_TLS) return false; - - return for_each_rtx (&x, aarch64_tls_operand_p_1, NULL); + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, x, ALL) + { + const_rtx x = *iter; + if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x) != 0) + return true; + /* Don't recurse into UNSPEC_TLS looking for TLS symbols; these are + TLS offsets, not real symbol references. */ + if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS) + iter.skip_subrtxes (); + } + return false; } |