summaryrefslogtreecommitdiff
path: root/gcc/config/m68k/predicates.md
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2007-03-06 09:00:00 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-03-06 09:00:00 +0000
commitf7e70894412aa334b68cceb241496c302c663dd9 (patch)
tree42894032f4078acc16635d591497216eb2419087 /gcc/config/m68k/predicates.md
parent31c5b44477907faf937f859808c9aca9879a96f4 (diff)
downloadgcc-f7e70894412aa334b68cceb241496c302c663dd9.tar.gz
m68k-protos.h (output_sibcall): Declare.
gcc/ * config/m68k/m68k-protos.h (output_sibcall): Declare. (mips_expand_epilogue): Add a bool parameter. (m68k_legitimize_sibcall_address): Declare. * config/m68k/m68k.c (TARGET_FUNCTION_OK_FOR_SIBCALL): Define. (m68k_expand_epilogue): Add a parameter to select between sibling and normal epilogues. Only generate a return for the latter. (m68k_ok_for_sibcall_p): New function. (m68k_legitimize_sibcall_address, output_sibcall): New functions. * config/m68k/m68k.md (sibcall, *sibcall): New patterns. (sibcall_value, *sibcall_value): Likewise. (*call, *call_value): Require !SIBLING_CALL_P. (epilogue): Update call to m68k_expand_epilogue. (sibcall_epilogue): New pattern. * config/m68k/predicates.md (const_call_operand): Say that this predicate applies to sibling calls too. (sibcall_operand): New predicate. From-SVN: r122607
Diffstat (limited to 'gcc/config/m68k/predicates.md')
-rw-r--r--gcc/config/m68k/predicates.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md
index 11e10f189b6..ae091f181ed 100644
--- a/gcc/config/m68k/predicates.md
+++ b/gcc/config/m68k/predicates.md
@@ -159,7 +159,7 @@
}
})
-;; A constant that can be used the address in a call insn.
+;; A constant that can be used the address in a call or sibcall insn.
(define_predicate "const_call_operand"
(ior (match_operand 0 "const_int_operand")
(and (match_test "m68k_symbolic_call != NULL")
@@ -170,6 +170,12 @@
(ior (match_operand 0 "const_call_operand")
(match_operand 0 "register_operand")))
+;; An operand that can be used as the address in a sibcall insn.
+(define_predicate "sibcall_operand"
+ (ior (match_operand 0 "const_call_operand")
+ (and (match_code "reg")
+ (match_test "REGNO (op) == STATIC_CHAIN_REGNUM"))))
+
;; TODO: Add a comment here.
(define_predicate "post_inc_operand"