summaryrefslogtreecommitdiff
path: root/gcc/config/m68k
diff options
context:
space:
mode:
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-14 10:49:06 +0000
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-14 10:49:06 +0000
commit94b82d1190a19fd91ccff1675caf3aee6112d1d4 (patch)
tree0e026a86a319fb6826141d6e5becfbee3ec8c882 /gcc/config/m68k
parentaf4067fcb4c370dfab9fca5aef88ece681be2651 (diff)
downloadgcc-94b82d1190a19fd91ccff1675caf3aee6112d1d4.tar.gz
2008-11-14 Maxim Kuvyrkov <maxim@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com> Gunnar Von Boehn <gunnar@genesi-usa.com> gcc/ PR target/36134 * config/m68k/m68k.md (addsi3_5200): Add a new alternative preferring the shorter LEA insn over ADD.L where possible. gcc/testsuite/ PR target/36134 * gcc.target/m68k/pr36134.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r--gcc/config/m68k/m68k.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 9effb344ec5..cf3e120590f 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -2325,9 +2325,9 @@
"* return output_addsi3 (operands);")
(define_insn_and_split "*addsi3_5200"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=mr,mr,m,r, ?a,?a,?a,?a")
- (plus:SI (match_operand:SI 1 "general_operand" "%0, 0, 0,0, a, a, r, a")
- (match_operand:SI 2 "general_src_operand" " I, L, d,mrKi,Cj,r, a, J")))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=mr,mr,a,m,r, ?a, ?a,?a,?a")
+ (plus:SI (match_operand:SI 1 "general_operand" "%0, 0, 0,0,0, a, a, r, a")
+ (match_operand:SI 2 "general_src_operand" " I, L, J,d,mrKi,Cj, r, a, J")))]
"TARGET_COLDFIRE"
{
switch (which_alternative)
@@ -2339,21 +2339,22 @@
operands[2] = GEN_INT (- INTVAL (operands[2]));
return "subq%.l %2,%0";
- case 2:
case 3:
+ case 4:
return "add%.l %2,%0";
- case 4:
+ case 5:
/* move%.l %2,%0\n\tadd%.l %1,%0 */
return "#";
- case 5:
+ case 6:
return MOTOROLA ? "lea (%1,%2.l),%0" : "lea %1@(0,%2:l),%0";
- case 6:
+ case 7:
return MOTOROLA ? "lea (%2,%1.l),%0" : "lea %2@(0,%1:l),%0";
- case 7:
+ case 2:
+ case 8:
return MOTOROLA ? "lea (%c2,%1),%0" : "lea %1@(%c2),%0";
default:
@@ -2361,16 +2362,16 @@
return "";
}
}
- "&& reload_completed && (extract_constrain_insn_cached (insn), which_alternative == 4) && !operands_match_p (operands[0], operands[1])"
+ "&& reload_completed && (extract_constrain_insn_cached (insn), which_alternative == 5) && !operands_match_p (operands[0], operands[1])"
[(set (match_dup 0)
(match_dup 2))
(set (match_dup 0)
(plus:SI (match_dup 0)
(match_dup 1)))]
""
- [(set_attr "type" "aluq_l,aluq_l,alu_l,alu_l,*,lea,lea,lea")
- (set_attr "opy" "2,2,2,2,*,*,*,*")
- (set_attr "opy_type" "*,*,*,*,*,mem6,mem6,mem5")])
+ [(set_attr "type" "aluq_l,aluq_l,lea,alu_l,alu_l,*,lea,lea,lea")
+ (set_attr "opy" "2,2,*,2,2,*,*,*,*")
+ (set_attr "opy_type" "*,*,mem5,*,*,*,mem6,mem6,mem5")])
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=a")