aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa/pa.md
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-03-24 10:53:14 -0700
committerJeff Law <law@gcc.gnu.org>1993-03-24 10:53:14 -0700
commitb8be8876caf6bd18a0f1088f78876a6b49ad2c52 (patch)
tree48b7a72312c6e58f6af0eb8a87df7629a6b02668 /gcc/config/pa/pa.md
parent469adec3fbf61d1e28ae727859e3e047811f9c33 (diff)
downloadgcc-b8be8876caf6bd18a0f1088f78876a6b49ad2c52.zip
gcc-b8be8876caf6bd18a0f1088f78876a6b49ad2c52.tar.gz
gcc-b8be8876caf6bd18a0f1088f78876a6b49ad2c52.tar.bz2
pa.md (sh[123\add): Collapse into a single pattern.
* pa.md (sh[123\add): Collapse into a single pattern. (sh[123]add for reload): Likewise. * pa.c (shadd_operand): New function. (print_operand): Handle "%O" for shadd patterns. From-SVN: r3866
Diffstat (limited to 'gcc/config/pa/pa.md')
-rw-r--r--gcc/config/pa/pa.md48
1 files changed, 5 insertions, 43 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index 11a0830..ed528b4 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -2336,61 +2336,23 @@
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 2))
+ (match_operand:SI 3 "shadd_operand" ""))
(match_operand:SI 1 "register_operand" "r")))]
""
- "sh1add %2,%1,%0")
+ "sh%O3add %2,%1,%0")
-(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 4))
- (match_operand:SI 1 "register_operand" "r")))]
- ""
- "sh2add %2,%1,%0")
-
-(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 8))
- (match_operand:SI 1 "register_operand" "r")))]
- ""
- "sh3add %2,%1,%0")
-
-;; These variants of the above insns can occur if the first operand
+;; This variant of the above insn can occur if the first operand
;; is the frame pointer. This is a kludge, but there doesn't
;; seem to be a way around it. Only recognize them while reloading.
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=&r")
(plus:SI (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 2))
- (match_operand:SI 1 "register_operand" "r"))
- (match_operand:SI 3 "const_int_operand" "rJ")))]
- "reload_in_progress"
- "sh1add %2,%1,%0\;add%I3 %3,%0,%0"
- [(set_attr "type" "multi")
- (set_attr "length" "2")])
-
-(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=&r")
- (plus:SI (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 4))
- (match_operand:SI 1 "register_operand" "r"))
- (match_operand:SI 3 "const_int_operand" "rJ")))]
- "reload_in_progress"
- "sh2add %2,%1,%0\;add%I3 %3,%0,%0"
- [(set_attr "type" "multi")
- (set_attr "length" "2")])
-
-(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=&r")
- (plus:SI (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
- (const_int 8))
+ (match_operand:SI 4 "shadd_operand" ""))
(match_operand:SI 1 "register_operand" "r"))
(match_operand:SI 3 "const_int_operand" "rJ")))]
"reload_in_progress"
- "sh3add %2,%1,%0\;add%I3 %3,%0,%0"
+ "sh%O4add %2,%1,%0\;add%I3 %3,%0,%0"
[(set_attr "type" "multi")
(set_attr "length" "2")])