Commit 04780ee7 by Richard Kenner

Add variants of call and call_value patterns for calls to functions defined in the same file.

Add variants of call and call_value patterns for calls to functions
defined in the same file.  Omit the TOC pointer reload after such
calls.

From-SVN: r4943
parent b4f892eb
......@@ -3040,6 +3040,18 @@
}
}")
;; Call to function in current module. No TOC pointer reload needed.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s"))
(match_operand 1 "" "g"))
(clobber (match_scratch:SI 2 "=l"))]
""
"bl %z0")
;; Call to function which may be in another module. Restore the TOC
;; pointer (r2) after the call.
(define_insn ""
[(call (mem:SI (match_operand:SI 0 "call_operand" "l,s"))
(match_operand 1 "" "fg,fg"))
......@@ -3050,6 +3062,14 @@
bl %z0\;cror %.,%.,%.")
(define_insn ""
[(set (match_operand 0 "" "=fg")
(call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s"))
(match_operand 2 "" "g")))
(clobber (match_scratch:SI 3 "=l"))]
""
"bl %z1")
(define_insn ""
[(set (match_operand 0 "" "=fg,fg")
(call (mem:SI (match_operand:SI 1 "call_operand" "l,s"))
(match_operand 2 "" "fg,fg")))
......
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