From 04780ee7ea605cb7157502cd427fe8555d98d3f5 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 19 Jul 1993 18:10:12 -0400 Subject: [PATCH] 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 --- gcc/config/rs6000/rs6000.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 45c6a1281d6..d04b249ad87 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -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")) @@ -3049,6 +3061,14 @@ brl\;l 2,20(1) 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")) -- 2.30.2