summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/rs6000/rs6000.md')
-rw-r--r--gcc/config/rs6000/rs6000.md57
1 files changed, 49 insertions, 8 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index e3912c76646..461eda7c6a5 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -14421,12 +14421,25 @@
"{stm|stmw} %2,%1"
[(set_attr "type" "store_ux")])
+(define_insn "*save_gpregs_<mode>"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (reg:P 65))
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (match_operand:P 2 "gpc_reg_operand" "r"))
+ (set (match_operand:P 3 "memory_operand" "=m")
+ (match_operand:P 4 "gpc_reg_operand" "r"))])]
+ ""
+ "bl %z1"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
(define_insn "*save_fpregs_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(clobber (reg:P 65))
- (use (match_operand:P 1 "call_operand" "s"))
- (set (match_operand:DF 2 "memory_operand" "=m")
- (match_operand:DF 3 "gpc_reg_operand" "f"))])]
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (match_operand:P 2 "gpc_reg_operand" "r"))
+ (set (match_operand:DF 3 "memory_operand" "=m")
+ (match_operand:DF 4 "gpc_reg_operand" "f"))])]
""
"bl %z1"
[(set_attr "type" "branch")
@@ -14514,15 +14527,43 @@
; FIXME: This would probably be somewhat simpler if the Cygnus sibcall
; stuff was in GCC. Oh, and "any_parallel_operand" is a bit flexible...
+(define_insn "*restore_gpregs_<mode>"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (match_operand:P 3 "gpc_reg_operand" "r"))
+ (set (match_operand:P 4 "gpc_reg_operand" "=r")
+ (match_operand:P 5 "memory_operand" "m"))])]
+ ""
+ "bl %z2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_gpregs_<mode>"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (match_operand:P 3 "gpc_reg_operand" "r"))
+ (set (match_operand:P 4 "gpc_reg_operand" "=r")
+ (match_operand:P 5 "memory_operand" "m"))])]
+ ""
+ "b %z2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
(define_insn "*return_and_restore_fpregs_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(return)
- (use (reg:P 65))
- (use (match_operand:P 1 "call_operand" "s"))
- (set (match_operand:DF 2 "gpc_reg_operand" "=f")
- (match_operand:DF 3 "memory_operand" "m"))])]
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (match_operand:P 3 "gpc_reg_operand" "r"))
+ (set (match_operand:DF 4 "gpc_reg_operand" "=f")
+ (match_operand:DF 5 "memory_operand" "m"))])]
""
- "b %z1")
+ "b %z2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
; This is used in compiling the unwind routines.
(define_expand "eh_return"