aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2002-01-27 06:44:53 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-01-27 06:44:53 +0000
commitd8fd4914ea0dda06b02b870c0b485b97fa32c469 (patch)
tree557a2440d967092d0a440da0bc7b724a35cea615 /gcc
parent15e0e27547d6e9c258bb37ccd6e0db7c3b4b305b (diff)
downloadgcc-d8fd4914ea0dda06b02b870c0b485b97fa32c469.zip
gcc-d8fd4914ea0dda06b02b870c0b485b97fa32c469.tar.gz
gcc-d8fd4914ea0dda06b02b870c0b485b97fa32c469.tar.bz2
h8300.md (define_constants): New.
* config/h8300/h8300.md (define_constants): New. (anonymous patterns) Use defined constants appropriately. From-SVN: r49264
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/h8300/h8300.md27
2 files changed, 22 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1da14d9..8ce5613 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2002-01-27 Kazu Hirata <kazu@hxi.com>
+ * config/h8300/h8300.md (define_constants): New.
+ (anonymous patterns) Use defined constants appropriately.
+
+2002-01-27 Kazu Hirata <kazu@hxi.com>
+
* config/h8300/h8300.c (function_arg): Remove redundant code.
2002-01-26 Richard Henderson <rth@redhat.com>
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index f94778b..36c23d1 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -47,6 +47,13 @@
;; ??? Implement remaining bit ops available on the h8300
;; ----------------------------------------------------------------------
+;; CONSTANTS
+;; ----------------------------------------------------------------------
+
+(define_constants
+ [(SP_REG 7)])
+
+;; ----------------------------------------------------------------------
;; ATTRIBUTES
;; ----------------------------------------------------------------------
@@ -101,9 +108,9 @@
;; movqi
(define_insn "pushqi1_h8300"
- [(parallel [(set (reg:HI 7)
- (plus:HI (reg:HI 7) (const_int -2)))
- (set (mem:QI (plus:HI (reg:HI 7) (const_int -1)))
+ [(parallel [(set (reg:HI SP_REG)
+ (plus:HI (reg:HI SP_REG) (const_int -2)))
+ (set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -1)))
(match_operand:QI 0 "register_operand" "r"))])]
"TARGET_H8300"
"mov.w\\t%T0,@-r7"
@@ -111,9 +118,9 @@
(set_attr "cc" "clobber")])
(define_insn "pushqi1_h8300hs"
- [(parallel [(set (reg:SI 7)
- (plus:SI (reg:SI 7) (const_int -4)))
- (set (mem:QI (plus:SI (reg:SI 7) (const_int -3)))
+ [(parallel [(set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG) (const_int -4)))
+ (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3)))
(match_operand:QI 0 "register_operand" "r"))])]
"TARGET_H8300H || TARGET_H8300S"
"mov.l\\t%S0,@-er7"
@@ -195,15 +202,15 @@
;; movhi
(define_expand "pushhi1_h8300"
- [(set (mem:QI (pre_dec:HI (reg:HI 7)))
+ [(set (mem:QI (pre_dec:HI (reg:HI SP_REG)))
(match_operand:QI 0 "register_operand" ""))]
"TARGET_H8300"
"")
(define_insn "pushhi1_h8300hs"
- [(parallel [(set (reg:SI 7)
- (plus:SI (reg:SI 7) (const_int -4)))
- (set (mem:HI (plus:SI (reg:SI 7) (const_int -2)))
+ [(parallel [(set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG) (const_int -4)))
+ (set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2)))
(match_operand:HI 0 "register_operand" "r"))])]
"TARGET_H8300H || TARGET_H8300S"
"mov.l\\t%S0,@-er7"