aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.md
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-07-19 18:10:12 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-07-19 18:10:12 -0400
commit04780ee7ea605cb7157502cd427fe8555d98d3f5 (patch)
tree5dd5859a44b190de972c4560a4de1363fb4b494a /gcc/config/rs6000/rs6000.md
parentb4f892eb33fec0722db2d1edacdb5df4f149e54b (diff)
downloadgcc-04780ee7ea605cb7157502cd427fe8555d98d3f5.zip
gcc-04780ee7ea605cb7157502cd427fe8555d98d3f5.tar.gz
gcc-04780ee7ea605cb7157502cd427fe8555d98d3f5.tar.bz2
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
Diffstat (limited to 'gcc/config/rs6000/rs6000.md')
-rw-r--r--gcc/config/rs6000/rs6000.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 45c6a12..d04b249 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"))
@@ -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")))