aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/epiphany/epiphany.c18
-rw-r--r--gcc/config/epiphany/epiphany.h11
-rw-r--r--gcc/config/epiphany/epiphany.md4
-rw-r--r--gcc/config/epiphany/predicates.md5
4 files changed, 35 insertions, 3 deletions
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 8e45ea7..f3955b9 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;
}
diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h
index cffb00c..1ca92e0 100644
--- a/gcc/config/epiphany/epiphany.h
+++ b/gcc/config/epiphany/epiphany.h
@@ -942,4 +942,15 @@ extern rtl_opt_pass *make_pass_resolve_sw_modes (gcc::context *ctxt);
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
epiphany_start_function ((FILE), (NAME), (DECL))
+/* This is how we tell the assembler that two symbols have the same value. */
+#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
+ do \
+ { \
+ assemble_name (FILE, NAME1); \
+ fputs (" = ", FILE); \
+ assemble_name (FILE, NAME2); \
+ fputc ('\n', FILE); \
+ } \
+ while (0)
+
#endif /* !GCC_EPIPHANY_H */
diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md
index 2844eee..d8d5555 100644
--- a/gcc/config/epiphany/epiphany.md
+++ b/gcc/config/epiphany/epiphany.md
@@ -2380,7 +2380,7 @@
(plus:SI (reg:SI GPR_SP) (match_operand:SI 0 "arith_operand" "rL")))
(clobber (reg:CC CC_REGNUM))
(clobber (reg:SI STATUS_REGNUM))
- (clobber (match_operand:BLK 1 "memory_operand" "=m"))]
+ (clobber (match_operand:BLK 1 "memclob_operand" "=X"))]
"reload_completed"
"add sp,sp,%0")
@@ -2396,7 +2396,7 @@
(match_operand 1 "any_gpr_operand" "r"))
(set (reg:SI GPR_SP)
(plus:SI (reg:SI GPR_SP) (match_operand:SI 2 "nonmemory_operand" "rn")))
- (clobber (match_operand:BLK 3 "memory_operand" "=m"))]
+ (clobber (match_operand:BLK 3 "memclob_operand" "=X"))]
"reload_completed"
{
return (GET_MODE_SIZE (GET_MODE (operands[0])) <= 4
diff --git a/gcc/config/epiphany/predicates.md b/gcc/config/epiphany/predicates.md
index fb8fd88..fb5ee12 100644
--- a/gcc/config/epiphany/predicates.md
+++ b/gcc/config/epiphany/predicates.md
@@ -358,6 +358,11 @@
(and (match_code "mem")
(match_test "post_modify_address (XEXP (op, 0), Pmode)")))
+; used in the memory clobber of stack_adjust_str, allows addresses with
+; large offsets.
+(define_predicate "memclob_operand"
+ (match_code "mem"))
+
(define_predicate "nonsymbolic_immediate_operand"
(ior (match_test "immediate_operand (op, mode)")
(match_code "const_vector"))) /* Is this specific enough? */