summaryrefslogtreecommitdiff
path: root/gcc/config/m68k/m68k.md
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-02 08:14:57 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-02 08:14:57 +0000
commit1ee5bf27da8d3a46d7520e22e6916febff8e4a1d (patch)
tree2389ba6f9e306c92c79373dbc6454c807d6aca5f /gcc/config/m68k/m68k.md
parenta15552704bad94598ed925622d3df140cdefaa73 (diff)
downloadgcc-1ee5bf27da8d3a46d7520e22e6916febff8e4a1d.tar.gz
* config/m68k/m68k.md (dbcc peepholes): Match four forms of dbra.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k/m68k.md')
-rw-r--r--gcc/config/m68k/m68k.md51
1 files changed, 49 insertions, 2 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 41cf9b20468..35ca2baae55 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -7653,6 +7653,53 @@
;;
;; Which moves the jCC condition outside the inner loop for free.
;;
+
+(define_peephole
+ [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+ [(cc0) (const_int 0)])
+ (label_ref (match_operand 2 "" ""))
+ (pc)))
+ (parallel
+ [(set (pc)
+ (if_then_else
+ (ne (match_operand:HI 0 "register_operand" "")
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:HI (match_dup 0)
+ (const_int -1)))])]
+ "!TARGET_5200 && DATA_REG_P (operands[0]) && ! flags_in_68881 ()"
+ "*
+{
+ CC_STATUS_INIT;
+ output_dbcc_and_branch (operands);
+ return \"\";
+}")
+
+(define_peephole
+ [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+ [(cc0) (const_int 0)])
+ (label_ref (match_operand 2 "" ""))
+ (pc)))
+ (parallel
+ [(set (pc)
+ (if_then_else
+ (ne (match_operand:SI 0 "register_operand" "")
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:SI (match_dup 0)
+ (const_int -1)))])]
+ "!TARGET_5200 && DATA_REG_P (operands[0]) && ! flags_in_68881 ()"
+ "*
+{
+ CC_STATUS_INIT;
+ output_dbcc_and_branch (operands);
+ return \"\";
+}")
+
(define_peephole
[(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
[(cc0) (const_int 0)])
@@ -7661,7 +7708,7 @@
(parallel
[(set (pc)
(if_then_else
- (ge (plus:HI (match_operand:HI 0 "register_operand" "+d")
+ (ge (plus:HI (match_operand:HI 0 "register_operand" "")
(const_int -1))
(const_int 0))
(label_ref (match_operand 1 "" ""))
@@ -7685,7 +7732,7 @@
(parallel
[(set (pc)
(if_then_else
- (ge (plus:SI (match_operand:SI 0 "register_operand" "+d")
+ (ge (plus:SI (match_operand:SI 0 "register_operand" "")
(const_int -1))
(const_int 0))
(label_ref (match_operand 1 "" ""))