summaryrefslogtreecommitdiff
path: root/gcc/sibcall.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-24 21:48:01 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-24 21:48:01 +0000
commit7a8d641ba517ba6ed3bbb4ea693797cc12837fb1 (patch)
treef90c05f553aeeb028e19de1c5837ae1bb6663362 /gcc/sibcall.c
parent1f33a3756376c728e99caa8dbeffd7a3d675deaa (diff)
downloadgcc-7a8d641ba517ba6ed3bbb4ea693797cc12837fb1.tar.gz
* sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for
comparison if regno's are equal. * calls.c (initialize_argument_informat): Add ecf_flags argument. Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL. (expand_call): Update caller. Avoid making a sibling call if argument size of the callee is larger than argument size of the caller. Call hard_function_value with outgoing set if in sibcall pass. Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL. * final.c (permitted_reg_in_leaf_functions, only_leaf_regs_used): Change LEAF_REGISTERS from an array initializer to actual array identifier. Move static global variable into the function. (leaf_function_p): Allow SIBLING_CALL_P calls even outside of sequences for leaf functions. * global.c (global_alloc): Likewise. * tm.texi (LEAF_REGISTERS): Update documentation. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Remove the ugly TARGET_FLAT leaf disabling hack. (LEAF_REGISTERS): Changed from an array initializer to actual array identifier to avoid duplication and remove the above hack. (FUNCTION_OK_FOR_SIBCALL): Define. * config/sparc/sparc.md (sibcall): New attr type. Use it almost always like call attribute. (eligible_for_sibcall_delay): New attribute. (sibcall): New delay type. (sibcall, sibcall_value, sibcall_epilogue): New expands. (sibcall_symbolic_sp32, sibcall_symbolic_sp64, sibcall_value_symbolic_sp32, sibcall_value_symbolic_sp64): New insns. * config/sparc/sparc.c (sparc_leaf_regs): New array. (eligible_for_sibcall_delay, output_restore_regs, output_sibcall): New functions. (output_function_epilogue): Move part of the code into output_restore_regs. (ultra_code_from_mask, ultrasparc_sched_reorder): Handle TYPE_SIBCALL. * sparc-protos.h (output_sibcall, eligible_for_sibcall_delay): New prototypes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sibcall.c')
-rw-r--r--gcc/sibcall.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/sibcall.c b/gcc/sibcall.c
index bbb70243e72..1a3a310388d 100644
--- a/gcc/sibcall.c
+++ b/gcc/sibcall.c
@@ -140,9 +140,13 @@ skip_copy_to_return_value (orig_insn, hardret, softret)
called function's return value was copied. Otherwise we're returning
some other value. */
+#ifndef OUTGOING_REGNO
+#define OUTGOING_REGNO(N) (N)
+#endif
+
if (SET_DEST (set) == current_function_return_rtx
&& REG_P (SET_DEST (set))
- && REGNO (SET_DEST (set)) == REGNO (hardret)
+ && OUTGOING_REGNO (REGNO (SET_DEST (set))) == REGNO (hardret)
&& SET_SRC (set) == softret)
return insn;
@@ -353,7 +357,6 @@ replace_call_placeholder (insn, use)
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
}
-
/* Given a (possibly empty) set of potential sibling or tail recursion call
sites, determine if optimization is possible.