summaryrefslogtreecommitdiff
path: root/gcc/config/cris/cris.md
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-26 02:56:00 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-26 02:56:00 +0000
commitaf9c3aeb6d36ff82d223d18b91deb6bea7b5fad0 (patch)
tree4e95b3ce27d3e140c98d36d5755a157eb6141710 /gcc/config/cris/cris.md
parent7e73413ffc20fc0eabcea0c34610530a9d20a4c0 (diff)
downloadgcc-af9c3aeb6d36ff82d223d18b91deb6bea7b5fad0.tar.gz
PR target/25947
* config/cris/cris.c (cris_order_for_addsi3): New function. * config/cris/cris-protos.h: Prototype it. * config/cris/cris.md (split for "move.S1 [rx=rx+i],ry") (split for "move.S1 ry,[rx=rx+i]", split for "clear.[bwd] [rx=rx+i]") (split for "mov(s|u).S1 [rx=rx+i],ry", split for "op.S1 [rx=rx+i],ry") (split for "op.S1 [rx=rx+i],ry (swapped)") (split for "op(s|u).S1 [rx=rx+i],ry") (split for "op(s|u).S1 [rx=rx+i],ry (swapped, plus or bound)"): Apply cris_order_for_addsi3 when generating addsi3 insns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris/cris.md')
-rw-r--r--gcc/config/cris/cris.md45
1 files changed, 33 insertions, 12 deletions
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index 9fcc4b01e4b..1618887cd7a 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -3285,7 +3285,10 @@
|| rtx_equal_p (operands[3], operands[2]))"
[(set (match_dup 3) (plus:SI (match_dup 1) (match_dup 2)))
(set (match_dup 0) (match_dup 4))]
- "operands[4] = replace_equiv_address (operands[5], operands[3]);")
+{
+ operands[4] = replace_equiv_address (operands[5], operands[3]);
+ cris_order_for_addsi3 (operands, 1);
+})
;; move.S1 ry,[rx=rx+rz.S2]
@@ -3325,7 +3328,10 @@
|| rtx_equal_p (operands[3], operands[1]))"
[(set (match_dup 3) (plus:SI (match_dup 0) (match_dup 1)))
(set (match_dup 5) (match_dup 2))]
- "operands[5] = replace_equiv_address (operands[6], operands[3]);")
+{
+ operands[5] = replace_equiv_address (operands[6], operands[3]);
+ cris_order_for_addsi3 (operands, 0);
+})
;; clear.[bwd] [rx=rx+rz.S2]
@@ -3362,7 +3368,7 @@
|| rtx_equal_p (operands[2], operands[1]))"
[(set (match_dup 2) (plus:SI (match_dup 0) (match_dup 1)))
(set (mem:BWD (match_dup 2)) (const_int 0))]
- "")
+ "cris_order_for_addsi3 (operands, 0);")
;; mov(s|u).S1 [rx=rx+rz.S2],ry
@@ -3404,7 +3410,10 @@
|| rtx_equal_p (operands[2], operands[3]))"
[(set (match_dup 3) (plus:SI (match_dup 1) (match_dup 2)))
(set (match_dup 0) (match_op_dup 4 [(match_dup 5)]))]
- "operands[5] = replace_equiv_address (XEXP (operands[4], 0), operands[3]);")
+{
+ operands[5] = replace_equiv_address (XEXP (operands[4], 0), operands[3]);
+ cris_order_for_addsi3 (operands, 1);
+})
;; op.S1 [rx=rx+i],ry
@@ -3424,7 +3433,10 @@
|| rtx_equal_p (operands[4], operands[3]))"
[(set (match_dup 4) (plus:SI (match_dup 2) (match_dup 3)))
(set (match_dup 0) (match_op_dup 5 [(match_dup 1) (match_dup 6)]))]
- "operands[6] = replace_equiv_address (XEXP (operands[5], 1), operands[4]);")
+{
+ operands[6] = replace_equiv_address (XEXP (operands[5], 1), operands[4]);
+ cris_order_for_addsi3 (operands, 2);
+})
;; op.S1 [rx=rx+rz.S2],ry
@@ -3492,7 +3504,10 @@
|| rtx_equal_p (operands[4], operands[3]))"
[(set (match_dup 4) (plus:SI (match_dup 2) (match_dup 3)))
(set (match_dup 0) (match_op_dup 5 [(match_dup 6) (match_dup 1)]))]
- "operands[6] = replace_equiv_address (XEXP (operands[5], 0), operands[4]);")
+{
+ operands[6] = replace_equiv_address (XEXP (operands[5], 0), operands[4]);
+ cris_order_for_addsi3 (operands, 2);
+})
;; op(s|u).S1 [rx=rx+rz.S2],ry
@@ -3543,9 +3558,12 @@
|| rtx_equal_p (operands[4], operands[3]))"
[(set (match_dup 4) (plus:SI (match_dup 2) (match_dup 3)))
(set (match_dup 0) (match_op_dup 5 [(match_dup 1) (match_dup 7)]))]
- "operands[7] = gen_rtx_fmt_e (GET_CODE (operands[6]), GET_MODE (operands[6]),
- replace_equiv_address (XEXP (operands[6], 0),
- operands[4]));")
+{
+ operands[7] = gen_rtx_fmt_e (GET_CODE (operands[6]), GET_MODE (operands[6]),
+ replace_equiv_address (XEXP (operands[6], 0),
+ operands[4]));
+ cris_order_for_addsi3 (operands, 2);
+})
;; op(s|u).S1 [rx=rx+rz.S2],ry (swapped, plus or bound)
@@ -3594,9 +3612,12 @@
|| rtx_equal_p (operands[4], operands[3]))"
[(set (match_dup 4) (plus:SI (match_dup 2) (match_dup 3)))
(set (match_dup 0) (match_op_dup 6 [(match_dup 7) (match_dup 1)]))]
- "operands[7] = gen_rtx_fmt_e (GET_CODE (operands[5]), GET_MODE (operands[5]),
- replace_equiv_address (XEXP (operands[5], 0),
- operands[4]));")
+{
+ operands[7] = gen_rtx_fmt_e (GET_CODE (operands[5]), GET_MODE (operands[5]),
+ replace_equiv_address (XEXP (operands[5], 0),
+ operands[4]));
+ cris_order_for_addsi3 (operands, 2);
+})
;; Splits for addressing prefixes that have no side-effects, so we can
;; fill a delay slot. Never split if we lose something, though.