Commit bf97b967 by Jim Wilson

(call+1...

(call+1, call+2, call_value+1, untyped_call+1): Split
into two patterns, one using address_operand and 'p', the other
immediate_operand and 'i'.

From-SVN: r5223
parent e228410e
......@@ -2675,8 +2675,23 @@
DONE;
}")
;; We can't use the same pattern for these two insns, because then registers
;; in the address may not be properly reloaded.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
(match_operand 1 "" ""))
(clobber (reg:SI 15))]
;;- Do not use operand 1 for most machines.
""
"*
{
return \"call %a0,%1%#\";
}"
[(set_attr "type" "call")])
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
[(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(match_operand 1 "" ""))
(clobber (reg:SI 15))]
;;- Do not use operand 1 for most machines.
......@@ -2689,7 +2704,21 @@
;; This is a call that wants a structure value.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
[(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
(match_operand 1 "" ""))
(match_operand 2 "immediate_operand" "")
(clobber (reg:SI 15))]
;;- Do not use operand 1 for most machines.
"GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) > 0"
"*
{
return \"call %a0,%1\;nop\;unimp %2\";
}"
[(set_attr "type" "call_no_delay_slot")])
;; This is a call that wants a structure value.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(match_operand 1 "" ""))
(match_operand 2 "immediate_operand" "")
(clobber (reg:SI 15))]
......@@ -2735,7 +2764,20 @@
(define_insn ""
[(set (match_operand 0 "" "=rf")
(call (mem:SI (match_operand:SI 1 "call_operand_address" "rS"))
(call (mem:SI (match_operand:SI 1 "address_operand" "p"))
(match_operand 2 "" "")))
(clobber (reg:SI 15))]
;;- Do not use operand 2 for most machines.
""
"*
{
return \"call %a1,%2%#\";
}"
[(set_attr "type" "call")])
(define_insn ""
[(set (match_operand 0 "" "=rf")
(call (mem:SI (match_operand:SI 1 "immediate_operand" "i"))
(match_operand 2 "" "")))
(clobber (reg:SI 15))]
;;- Do not use operand 2 for most machines.
......@@ -2762,7 +2804,24 @@
;; returns a structure value and expects to skip an unimp instruction.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "call_operand_address" "rS"))
[(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
(const_int 0))
(match_operand:DI 1 "memory_operand" "o")
(match_operand 2 "" "")
(clobber (reg:SI 15))]
""
"*
{
operands[2] = adj_offsettable_operand (operands[1], 8);
return \"call %a0,0\;nop\;nop\;std %%o0,%1\;st %%f0,%2\";
}"
[(set_attr "type" "multi")])
;; Make a call followed by two nops in case the function being called
;; returns a structure value and expects to skip an unimp instruction.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(const_int 0))
(match_operand:DI 1 "memory_operand" "o")
(match_operand 2 "" "")
......@@ -3376,7 +3435,7 @@
(define_peephole
[(parallel [(set (match_operand 0 "" "")
(call (mem:SI (match_operand:SI 1 "call_operand_address" "S,r"))
(call (mem:SI (match_operand:SI 1 "call_operand_address" "pi"))
(match_operand 2 "" "")))
(clobber (reg:SI 15))])
(set (pc) (label_ref (match_operand 3 "" "")))]
......@@ -3387,7 +3446,7 @@
}")
(define_peephole
[(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
[(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "pi"))
(match_operand 1 "" ""))
(clobber (reg:SI 15))])
(set (pc) (label_ref (match_operand 2 "" "")))]
......
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