aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-02-12 12:25:44 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-12 05:25:44 -0700
commit01d5caad02c5c9b8dd14c7ca607d314aa8aca48f (patch)
treefb86637a99ff15575763487e6fdb38dd0e9e4115
parenta6207a2b7e0d334b7fdab31d7969256892577349 (diff)
downloadgcc-01d5caad02c5c9b8dd14c7ca607d314aa8aca48f.zip
gcc-01d5caad02c5c9b8dd14c7ca607d314aa8aca48f.tar.gz
gcc-01d5caad02c5c9b8dd14c7ca607d314aa8aca48f.tar.bz2
h8300.md (zero_extendhisi2 H8/300 variant): Correctly handle extending a CONST_INT.
Fri Feb 12 13:20:52 1999 Jeffrey A Law (law@cygnus.com) * h8300.md (zero_extendhisi2 H8/300 variant): Correctly handle extending a CONST_INT. * h8300.md (peephole for combining memrefs): Delete incorrect peephole. From-SVN: r25168
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/h8300/h8300.md36
2 files changed, 13 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1510fd1..2a8e938 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Fri Feb 12 13:20:52 1999 Jeffrey A Law (law@cygnus.com)
+
+ * h8300.md (zero_extendhisi2 H8/300 variant): Correctly handle
+ extending a CONST_INT.
+
+ * h8300.md (peephole for combining memrefs): Delete incorrect peephole.
+
Fri Feb 12 18:29:11 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* loop.c (loop_insn_first_p, biv_elimination_giv_has_0_offset):
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index a94a5ad..d892cad 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1687,15 +1687,17 @@
"TARGET_H8300"
"")
+;; %e prints the high part of a CONST_INT, not the low part. Arggh.
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))]
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r")
+ (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,i,g>")))]
"TARGET_H8300"
"@
sub.w %e0,%e0
+ mov.w %f1,%f0\;sub.w %e0,%e0
mov.w %e1,%f0\;sub.w %e0,%e0"
- [(set_attr "length" "2,4")
- (set_attr "cc" "clobber,clobber")])
+ [(set_attr "length" "2,4,4")
+ (set_attr "cc" "clobber,clobber,clobber")])
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r,r")
@@ -2245,32 +2247,6 @@
;; Peepholes go at the end.
;; ----------------------------------------------
-;; Notice when two byte moves in a row could be a word move.
-
-(define_peephole
- [(set (match_operand:QI 0 "register_operand" "=r")
- (mem:QI (plus:HI (match_operand:HI 1 "register_operand" "r")
- (match_operand:HI 2 "immediate_operand" "n"))))
- (set (match_operand:QI 3 "register_operand" "=r")
- (mem:QI (plus:HI (match_dup 1)
- (match_operand:HI 4 "immediate_operand" "n"))))]
- "(INTVAL(operands[2]) == INTVAL(operands[4])+1) && REGNO(operands[0]) +1 == REGNO(operands[3])"
- "mov.w @(%u4,%T1),%T0"
- [(set_attr "length" "6")
- (set_attr "cc" "set_znv")])
-
-(define_peephole
- [(set (mem:QI (plus:HI (match_operand:HI 1 "register_operand" "r")
- (match_operand:HI 2 "immediate_operand" "n")))
- (match_operand:QI 0 "register_operand" "r"))
- (set (mem:QI (plus:HI (match_dup 1)
- (match_operand:HI 4 "immediate_operand" "n")))
- (match_operand:QI 3 "register_operand" "r"))]
- "(INTVAL(operands[2]) == INTVAL(operands[4])+1) && REGNO(operands[0]) +1 == REGNO(operands[3])"
- "mov.w %T0,@(%u4,%T1)"
- [(set_attr "length" "6")
- (set_attr "cc" "set_znv")])
-
;; Notice a move which could be post incremented.
(define_peephole