aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-09-23 19:21:45 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-09-23 19:21:45 -0400
commitfd8c9e1cb9a9fb0e65087a8a507d168ec5845f22 (patch)
tree019439d8c2217b097f52a37bba7fa7ef64363c91 /gcc
parent305aa9e2b1256fb8c170e9ff4832ed728f30a029 (diff)
downloadgcc-fd8c9e1cb9a9fb0e65087a8a507d168ec5845f22.zip
gcc-fd8c9e1cb9a9fb0e65087a8a507d168ec5845f22.tar.gz
gcc-fd8c9e1cb9a9fb0e65087a8a507d168ec5845f22.tar.bz2
(define_attr "type"): New type "ibranch".
(define_attr "length"): Set length for "ibranch" type. (define_attr "in_delay_slot"): Add new type "ibranch"; for "branch", only has delay slot if length is 4. (define_attr "cc_type"): Add new type "ibranch". (indirect branches): Now type "ibranch". From-SVN: r2213
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/romp/romp.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/gcc/config/romp/romp.md b/gcc/config/romp/romp.md
index 93b121c..93d61c4 100644
--- a/gcc/config/romp/romp.md
+++ b/gcc/config/romp/romp.md
@@ -26,7 +26,7 @@
;; Insn type. Used to default other attribute values.
(define_attr "type"
- "branch,return,fp,load,loadz,store,call,address,arith,compare,multi,misc"
+ "branch,ibranch,return,fp,load,loadz,store,call,address,arith,compare,multi,misc"
(const_string "arith"))
;; Length in bytes.
@@ -39,7 +39,7 @@
(const_int 254)))
(const_int 2)
(const_int 4))
- (eq_attr "type" "return") (const_int 2)
+ (eq_attr "type" "return,ibranch") (const_int 2)
(eq_attr "type" "fp") (const_int 10)
(eq_attr "type" "call") (const_int 4)
(eq_attr "type" "load")
@@ -60,12 +60,19 @@
(define_attr "in_delay_slot" "yes,no"
(cond [(eq_attr "length" "8,10,38") (const_string "no")
- (eq_attr "type" "branch,return,call,multi") (const_string "no")]
+ (eq_attr "type" "branch,ibranch,return,call,multi")
+ (const_string "no")]
(const_string "yes")))
-;; Whether insn needs a delay slot.
+;; Whether insn needs a delay slot. We have to say that two-byte
+;; branches do not need a delay slot. Otherwise, branch shortening will
+;; try to do something with delay slot insns (we want it to on the PA).
+;; This is a kludge, which should be cleaned up at some point.
+
(define_attr "needs_delay_slot" "yes,no"
- (if_then_else (eq_attr "type" "branch,return,call")
+ (if_then_else (ior (and (eq_attr "type" "branch")
+ (eq_attr "length" "4"))
+ (eq_attr "type" "ibranch,return,call"))
(const_string "yes") (const_string "no")))
;; What insn does to the condition code.
@@ -75,7 +82,7 @@
(cond [(eq_attr "type" "load,loadz") (const_string "change0")
(eq_attr "type" "store") (const_string "none")
(eq_attr "type" "fp,call") (const_string "clobber")
- (eq_attr "type" "branch,return") (const_string "none")
+ (eq_attr "type" "branch,ibranch,return") (const_string "none")
(eq_attr "type" "address") (const_string "change0")
(eq_attr "type" "compare") (const_string "compare")
(eq_attr "type" "arith") (const_string "sets")]
@@ -2711,8 +2718,7 @@
[(set (pc) (match_operand:SI 0 "register_operand" "r"))]
""
"br%# %0"
- [(set_attr "type" "branch")
- (set_attr "length" "2")])
+ [(set_attr "type" "ibranch")])
;; Table jump for switch statements:
(define_insn "tablejump"
@@ -2721,8 +2727,7 @@
(use (label_ref (match_operand 1 "" "")))]
""
"br%# %0"
- [(set_attr "type" "branch")
- (set_attr "length" "2")])
+ [(set_attr "type" "ibranch")])
;;- Local variables:
;;- mode:emacs-lisp