Commit 3bf1c6b5 by Jeff Law

pa.md (call_value+1): For non-dynamic calls...

	* pa.md (call_value+1): For non-dynamic calls, use the "call"
	attribute, set length to 1, and fix output template to work
	properly with delay slots.

	* pa.md (address and use_call_clobbered attributes): Deleted,
	these attributes are useless.  All references deleted.
	(call define delay): Use "in_branch_delay" as the condition since
	"call" delay slots and unconditional "branch" delay slots allow the
	same type of insns.
	(in_call_delay conditional): Deleted.
	(branch define delay): Do not define an annul-if-true delay slot.
	It is useless for an unconditional branch.
	(all delay branch conditionals): Make sure "call", "dyncall", "multi",
	and "milli" insns are explicitly disallowed in delay slots.

From-SVN: r1920
parent 3d83d496
...@@ -30,16 +30,9 @@ ...@@ -30,16 +30,9 @@
;; type "binary" insns have two input operands (1,2) and one output (0) ;; type "binary" insns have two input operands (1,2) and one output (0)
(define_attr "type" (define_attr "type"
"move,unary,binary,compare,load,store,branch,cbranch,call,dyncall,address,fpload,fpstore,fpalu,fpcc,fpmul,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,misc,milli" "move,unary,binary,compare,load,store,branch,cbranch,call,dyncall,fpload,fpstore,fpalu,fpcc,fpmul,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,misc,milli"
(const_string "binary")) (const_string "binary"))
;; Set true if insn uses call-clobbered intermediate register.
(define_attr "use_clobbered" "false,true"
(if_then_else (and (eq_attr "type" "address")
(match_operand 0 "clobbered_register" ""))
(const_string "true")
(const_string "false")))
;; Length (in # of insns). ;; Length (in # of insns).
(define_attr "length" "" (define_attr "length" ""
(cond [(eq_attr "type" "load,fpload") (cond [(eq_attr "type" "load,fpload")
...@@ -50,8 +43,6 @@ ...@@ -50,8 +43,6 @@
(if_then_else (match_operand 0 "symbolic_memory_operand" "") (if_then_else (match_operand 0 "symbolic_memory_operand" "")
(const_int 2) (const_int 1)) (const_int 2) (const_int 1))
(eq_attr "type" "address") (const_int 2)
(eq_attr "type" "binary") (eq_attr "type" "binary")
(if_then_else (match_operand 2 "arith_operand" "") (if_then_else (match_operand 2 "arith_operand" "")
(const_int 1) (const_int 3)) (const_int 1) (const_int 3))
...@@ -68,47 +59,28 @@ ...@@ -68,47 +59,28 @@
;; Attributes for instruction and branch scheduling ;; Attributes for instruction and branch scheduling
(define_attr "in_call_delay" "false,true" (define_delay (eq_attr "type" "call")
(cond [(eq_attr "type" "branch,cbranch,call,dyncall,multi,milli") [(eq_attr "in_branch_delay" "true") (nil) (nil)])
(const_string "false")
(eq_attr "type" "load,fpload,store,fpstore")
(if_then_else (eq_attr "length" "1")
(const_string "true")
(const_string "false"))
(eq_attr "type" "address")
(if_then_else (eq_attr "use_clobbered" "false")
(const_string "true")
(const_string "false"))]
(if_then_else (eq_attr "length" "1") (define_attr "in_branch_delay" "false,true"
(if_then_else (and (eq_attr "type" "!branch,cbranch,call,dyncall,multi,milli")
(eq_attr "length" "1"))
(const_string "true") (const_string "true")
(const_string "false")))) (const_string "false")))
(define_attr "in_milli_delay" "false,true" (define_attr "in_milli_delay" "false,true"
(cond [(eq_attr "length" "!1") (cond [(eq_attr "length" "!1")
(const_string "false") (const_string "false")
(eq_attr "type" "branch,cbranch,call,dyncall,milli") (eq_attr "type" "branch,cbranch,call,dyncall,multi,milli")
(const_string "false") (const_string "false")
(ne (symbol_ref "use_milli_regs (insn)") (const_int 0)) (ne (symbol_ref "use_milli_regs (insn)") (const_int 0))
(const_string "false")] (const_string "false")]
(const_string "true"))) (const_string "true")))
(define_delay (eq_attr "type" "call")
[(eq_attr "in_call_delay" "true") (nil) (nil)])
(define_attr "in_branch_delay" "false,true"
(if_then_else (and (eq_attr "type" "!branch,cbranch,call,multi,milli")
(eq_attr "length" "1"))
(const_string "true")
(const_string "false")))
(define_delay (eq_attr "type" "branch") (define_delay (eq_attr "type" "branch")
[(eq_attr "in_branch_delay" "true") [(eq_attr "in_branch_delay" "true") (nil) (nil)])
(eq_attr "in_branch_delay" "true") (nil)])
(define_delay (eq_attr "type" "cbranch") (define_delay (eq_attr "type" "cbranch")
[(eq_attr "in_branch_delay" "true") (nil) (nil)]) [(eq_attr "in_branch_delay" "true") (nil) (nil)])
...@@ -2136,11 +2108,11 @@ ...@@ -2136,11 +2108,11 @@
else else
{ {
output_arg_descriptor (insn); output_arg_descriptor (insn);
return \"bl %1,2\;nop\"; return \"bl %1,2%#\";
} }
}" }"
[(set_attr "type" "dyncall") [(set_attr "type" "dyncall,call")
(set_attr "length" "3,2")]) (set_attr "length" "3,1")])
(define_insn "nop" (define_insn "nop"
[(const_int 0)] [(const_int 0)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment