From f5250cd71c5c79188feb585ed7a5f295619bb7e2 Mon Sep 17 00:00:00 2001 From: clyon Date: Mon, 5 Aug 2013 13:16:00 +0000 Subject: [PATCH] 2013-08-05 Yvan Roux Backport from trunk r200519. 2013-06-28 Marcus Shawcroft * config/aarch64/aarch64-protos.h aarch64_classify_symbol_expression): Define. (aarch64_symbolic_constant_p): Remove. * config/aarch64/aarch64.c (aarch64_classify_symbol_expression): Remove static. Fix line length and white space. (aarch64_symbolic_constant_p): Remove. * config/aarch64/predicates.md (aarch64_valid_symref): Use aarch64_classify_symbol_expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro@201487 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc-4_8-branch/gcc/ChangeLog.linaro | 14 ++++++++++++ gcc-4_8-branch/gcc/config/aarch64/aarch64-protos.h | 4 ++-- gcc-4_8-branch/gcc/config/aarch64/aarch64.c | 25 +++++----------------- gcc-4_8-branch/gcc/config/aarch64/predicates.md | 5 ++--- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/gcc-4_8-branch/gcc/ChangeLog.linaro b/gcc-4_8-branch/gcc/ChangeLog.linaro index 7b04d8af6d8..50ba54af37b 100644 --- a/gcc-4_8-branch/gcc/ChangeLog.linaro +++ b/gcc-4_8-branch/gcc/ChangeLog.linaro @@ -1,5 +1,19 @@ 2013-08-05 Yvan Roux + Backport from trunk r200519. + 2013-06-28 Marcus Shawcroft + + * config/aarch64/aarch64-protos.h + aarch64_classify_symbol_expression): Define. + (aarch64_symbolic_constant_p): Remove. + * config/aarch64/aarch64.c (aarch64_classify_symbol_expression): Remove + static. Fix line length and white space. + (aarch64_symbolic_constant_p): Remove. + * config/aarch64/predicates.md (aarch64_valid_symref): + Use aarch64_classify_symbol_expression. + +2013-08-05 Yvan Roux + Backport from trunk r200466, r200467. 2013-06-27 Yufeng Zhang diff --git a/gcc-4_8-branch/gcc/config/aarch64/aarch64-protos.h b/gcc-4_8-branch/gcc/config/aarch64/aarch64-protos.h index 8e099bf7f91..2a66bf332eb 100644 --- a/gcc-4_8-branch/gcc/config/aarch64/aarch64-protos.h +++ b/gcc-4_8-branch/gcc/config/aarch64/aarch64-protos.h @@ -137,6 +137,8 @@ struct tune_params HOST_WIDE_INT aarch64_initial_elimination_offset (unsigned, unsigned); bool aarch64_bitmask_imm (HOST_WIDE_INT val, enum machine_mode); +enum aarch64_symbol_type +aarch64_classify_symbolic_expression (rtx, enum aarch64_symbol_context); bool aarch64_constant_address_p (rtx); bool aarch64_float_const_zero_rtx_p (rtx); bool aarch64_function_arg_regno_p (unsigned); @@ -162,8 +164,6 @@ bool aarch64_simd_shift_imm_p (rtx, enum machine_mode, bool); bool aarch64_simd_valid_immediate (rtx, enum machine_mode, bool, struct simd_immediate_info *); bool aarch64_symbolic_address_p (rtx); -bool aarch64_symbolic_constant_p (rtx, enum aarch64_symbol_context, - enum aarch64_symbol_type *); bool aarch64_uimm12_shift (HOST_WIDE_INT); const char *aarch64_output_casesi (rtx *); enum aarch64_symbol_type aarch64_classify_symbol (rtx, diff --git a/gcc-4_8-branch/gcc/config/aarch64/aarch64.c b/gcc-4_8-branch/gcc/config/aarch64/aarch64.c index cc460060961..4898728cd1c 100644 --- a/gcc-4_8-branch/gcc/config/aarch64/aarch64.c +++ b/gcc-4_8-branch/gcc/config/aarch64/aarch64.c @@ -3047,10 +3047,13 @@ aarch64_symbolic_address_p (rtx x) /* Classify the base of symbolic expression X, given that X appears in context CONTEXT. */ -static enum aarch64_symbol_type -aarch64_classify_symbolic_expression (rtx x, enum aarch64_symbol_context context) + +enum aarch64_symbol_type +aarch64_classify_symbolic_expression (rtx x, + enum aarch64_symbol_context context) { rtx offset; + split_const (x, &x, &offset); return aarch64_classify_symbol (x, context); } @@ -5071,24 +5074,6 @@ aarch64_classify_symbol (rtx x, return SYMBOL_FORCE_TO_MEM; } -/* Return true if X is a symbolic constant that can be used in context - CONTEXT. If it is, store the type of the symbol in *SYMBOL_TYPE. */ - -bool -aarch64_symbolic_constant_p (rtx x, enum aarch64_symbol_context context, - enum aarch64_symbol_type *symbol_type) -{ - rtx offset; - split_const (x, &x, &offset); - if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF) - *symbol_type = aarch64_classify_symbol (x, context); - else - return false; - - /* No checking of offset at this point. */ - return true; -} - bool aarch64_constant_address_p (rtx x) { diff --git a/gcc-4_8-branch/gcc/config/aarch64/predicates.md b/gcc-4_8-branch/gcc/config/aarch64/predicates.md index 3248f610da0..3e2b6b34357 100644 --- a/gcc-4_8-branch/gcc/config/aarch64/predicates.md +++ b/gcc-4_8-branch/gcc/config/aarch64/predicates.md @@ -118,9 +118,8 @@ (define_predicate "aarch64_valid_symref" (match_code "const, symbol_ref, label_ref") { - enum aarch64_symbol_type symbol_type; - return (aarch64_symbolic_constant_p (op, SYMBOL_CONTEXT_ADR, &symbol_type) - && symbol_type != SYMBOL_FORCE_TO_MEM); + return (aarch64_classify_symbolic_expression (op, SYMBOL_CONTEXT_ADR) + != SYMBOL_FORCE_TO_MEM); }) (define_predicate "aarch64_tls_ie_symref" -- 2.11.4.GIT