diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-11 18:40:04 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-11 18:40:04 +0000 |
commit | e8f53f72e927eccf2f52a7568eecf9fc7d4c364d (patch) | |
tree | bd2ddc451cd395bd4cbcd63344363a4cedf06d81 /gcc/config/epiphany/epiphany.c | |
parent | 4af44dbd9c18076f261f3906d2016be0560232a7 (diff) | |
download | gcc-e8f53f72e927eccf2f52a7568eecf9fc7d4c364d.tar.gz |
gcc:
* common/config/epiphany/epiphany-common.c
(epiphany_option_optimization_table): Enable section anchors by
default at -O1 or higher.
* config/epiphany/epiphany.c (TARGET_MAX_ANCHOR_OFFSET): Define.
(TARGET_MIN_ANCHOR_OFFSET): Likewise.
(epiphany_rtx_costs) <SET>: For binary operators, the set as such
carries no extra cost.
(epiphany_legitimate_address_p): For BLKmode, apply SImode check.
* config/epiphany/epiphany.h (ASM_OUTPUT_DEF): Define.
* config/epiphany/predicates.md (memclob_operand): New predicate.
* config/epiphany/epiphany.md (stack_adjust_add, stack_adjust_str):
Use memclob_operand predicate and X constraint for operand 3.
gcc/testsuite:
* gcc.target/epiphany/t1068-2.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209320 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/epiphany/epiphany.c')
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 8e45ea756d2..f3955b916e9 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -145,6 +145,13 @@ static rtx frame_insn (rtx); hook_bool_const_tree_hwi_hwi_const_tree_true #define TARGET_ASM_OUTPUT_MI_THUNK epiphany_output_mi_thunk +/* ??? we can use larger offsets for wider-mode sized accesses, but there + is no concept of anchors being dependent on the modes that they are used + for, so we can only use an offset range that would suit all modes. */ +#define TARGET_MAX_ANCHOR_OFFSET (optimize_size ? 31 : 2047) +/* We further restrict the minimum to be a multiple of eight. */ +#define TARGET_MIN_ANCHOR_OFFSET (optimize_size ? 0 : -2040) + #include "target-def.h" #undef TARGET_ASM_ALIGNED_HI_OP @@ -776,6 +783,15 @@ epiphany_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED, return false; } + + case SET: + { + rtx src = SET_SRC (x); + if (BINARY_P (src)) + *total = 0; + return false; + } + default: return false; } @@ -2016,7 +2032,7 @@ epiphany_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) && LEGITIMATE_OFFSET_ADDRESS_P (mode, XEXP ((x), 1))) return true; if (mode == BLKmode) - return true; + return epiphany_legitimate_address_p (SImode, x, strict); return false; } |