summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-16 00:31:18 +0000
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-16 00:31:18 +0000
commit5ed5e9eb8c8636cb0c47786234886463bf8deda4 (patch)
treee1b88d44a6fccdd92eb73845827931f3e9041ce1 /gcc
parentfaafbab7f3bb6c1f03a410b9d52cbd2018e9c91f (diff)
downloadppe42-gcc-5ed5e9eb8c8636cb0c47786234886463bf8deda4.tar.gz
ppe42-gcc-5ed5e9eb8c8636cb0c47786234886463bf8deda4.zip
Try again!?
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/c4x/c4x.md73
1 files changed, 73 insertions, 0 deletions
diff --git a/gcc/config/c4x/c4x.md b/gcc/config/c4x/c4x.md
index 30eb83c7658..3b40c370c76 100644
--- a/gcc/config/c4x/c4x.md
+++ b/gcc/config/c4x/c4x.md
@@ -5040,6 +5040,40 @@
"
[(set_attr "type" "db,jmpc,jmpc,jmpc")])
+(define_insn "*db_noclobber"
+ [(set (pc)
+ (if_then_else (ne (match_operand:QI 0 "addr_reg_operand" "+a")
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))]
+ "reload_completed && TARGET_DB && TARGET_LOOP_UNSIGNED"
+ "dbu%#\\t%0,%l1"
+ [(set_attr "type" "db")])
+
+(define_split
+ [(set (pc)
+ (if_then_else (ne (match_operand:QI 0 "addr_reg_operand" "")
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))
+ (clobber (reg:CC_NOOV 21))]
+ "reload_completed && TARGET_DB && TARGET_LOOP_UNSIGNED"
+ [(parallel [(set (pc)
+ (if_then_else (ne (match_dup 0)
+ (const_int 0))
+ (label_ref (match_dup 1))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))])]
+ "")
+
; This insn is used for some loop tests, typically loops reversed when
; strength reduction is used. It is actually created when the instruction
@@ -5076,6 +5110,45 @@
"
[(set_attr "type" "db,jmpc,jmpc,jmpc")])
+(define_insn "*decrement_and_branch_until_zero_noclobber"
+ [(set (pc)
+ (if_then_else (ge (plus:QI (match_operand:QI 0 "addr_reg_operand" "+a")
+ (const_int -1))
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))]
+ "reload_completed && (TARGET_DB && (find_reg_note (insn, REG_NONNEG, 0)
+ || TARGET_LOOP_UNSIGNED))"
+ "dbu%#\\t%0,%l1"
+ [(set_attr "type" "db")])
+
+(define_split
+ [(set (pc)
+ (if_then_else (ge (plus:QI (match_operand:QI 0 "addr_reg_operand" "")
+ (const_int -1))
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))
+ (clobber (reg:CC_NOOV 21))]
+ "reload_completed && (TARGET_DB && (find_reg_note (insn, REG_NONNEG, 0)
+ || TARGET_LOOP_UNSIGNED))"
+ [(parallel [(set (pc)
+ (if_then_else (ge (plus:QI (match_dup 0)
+ (const_int -1))
+ (const_int 0))
+ (label_ref (match_dup 1))
+ (pc)))
+ (set (match_dup 0)
+ (plus:QI (match_dup 0)
+ (const_int -1)))])]
+ "")
+
;
; MISC INSTRUCTIONS
;
OpenPOWER on IntegriCloud