aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sparc-protos.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-06-30 12:31:30 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-06-30 10:31:30 +0000
commit9ac617d49582c168000b6e593e5c0b4bf2982ee0 (patch)
treeb97b5461a829ec280cef91bfec87507aa0ea48a1 /gcc/config/sparc/sparc-protos.h
parentdf62f18ae1401944493ecccd47f7b0714d0ab8f8 (diff)
downloadgcc-9ac617d49582c168000b6e593e5c0b4bf2982ee0.zip
gcc-9ac617d49582c168000b6e593e5c0b4bf2982ee0.tar.gz
gcc-9ac617d49582c168000b6e593e5c0b4bf2982ee0.tar.bz2
RTL prologue/epilogue for SPARC
RTL prologue/epilogue for SPARC * config/sparc/sparc-protos.h (sparc_emitting_epilogue): Delete. (sparc_skip_caller_unimp): Likewise. (load_pic_register): Likewise. (leaf_return_peephole_ok): Likewise. (compute_frame_size): Rename into sparc_compute_frame_size. (sparc_expand_prologue): New prototype. (sparc_expand_epilogue): Likewise. (output_return): Likewise. (eligible_for_epilogue_delay): Rename into eligible_for_return_delay. * config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Adjust call to compute_frame_size. Move comment up. (DELAY_SLOTS_FOR_EPILOGUE): Delete. (ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise. (EPILOGUE_USES): Return true for %g1 if the function uses EH return. * config/sparc/sparc.md (UNSPECV_SAVEW): New constant. (type attribute): Add 'return' and 'savew'. (eligible_for_return_delay): New attribute. (return): New delay_slot. (sibcall_epilogue): Call sparc_expand_epilogue. (prologue): Likewise. Move up. (save_register_window): New expander. (save_register_windowsi): New pattern. (save_register_windowdi): Likewise. (epilogue): New expander. (return_internal): New pattern. (Return peepholes): Delete. * config/sparc/sparc.c (SIBCALL_SLOT_EMPTY_P): New macro. (sparc_emitting_epilogue): Delete. (sparc_skip_caller_unimp): Likewise. (sparc_sr_alias_set): New global variable. (frame_base_name): Delete. (frame_base_reg): New global variable. (sparc_override_options): Get new alias set for save/restore. (leaf_return_peephole_ok): Delete. (eligible_for_epilogue_delay): Rename into eligible_for_return_delay. Factor out code into eligible_for_restore_insn_delay. (eligible_for_restore_insn_delay): New function extraced from above. Use IN_UNCOND_BRANCH_DELAY_TRUE instead of IN_BRANCH_DELAY_TRUE. (eligible_for_sibcall_delay): Use SIBCALL_SLOT_EMPTY_P. Factor out code into eligible_for_restore_insn_delay. (load_pic_register): Make static. Remove check. (save_regs): Delete. (restore_regs): Likewise. (compute_frame_size): Rename into sparc_compute_frame_size. Rename leaf_function into leaf_function_p. (build_big_number): Delete. (save_or_restore_regs): New function. (emit_save_regs): Likewise. (emit_restore_regs): Likewise. (emit_stack_pointer_increment ): Likewise. (emit_stack_pointer_decrement): Likewise. (sparc_expand_prologue): Likewise. (sparc_function_prologue): Rename into sparc_asm_function_prologue. Remove all code to emit instructions. (sparc_expand_epilogue): New function. (sparc_function_epilogue): Rename into sparc_asm_function_epilogue. Remove all code to emit instructions. (output_restore): New function. (output_return): Likewise. (output_sibcall): Factor out code into output_restore. (print_operand): Adjust for frame_base_reg. * target.h (struct gcc_target): New field 'late_rtl_prologue_epilogue'. * target-def.h (TARGET_LATE_RTL_PROLOGUE_EPILOGUE): New define. (TARGET_INITIALIZER): Add it. * passes.c (rest_of_compilation): Set the conditional predicate 'current_function_uses_only_leaf_regs' before sched2. If target has 'late_rtl_prologue_epilogue', emit RTL prologue/epilogue right before sched2. * reorg.c (return_insn_p): New predicate. (find_end_label): Use it. (relax_delay_slots): Do not thread an unconditional jump that points to the end return label. * doc/tm.texi (Registers) <Leaf Functions>: Clarify the validity domain of 'current_function_uses_only_leaf_regs'. (Stack and Calling) <Function Entry>: Document new target hook TARGET_LATE_RTL_PROLOGUE_EPILOGUE. From-SVN: r83901
Diffstat (limited to 'gcc/config/sparc/sparc-protos.h')
-rw-r--r--gcc/config/sparc/sparc-protos.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
index 4b1f9f0..2f2ee51 100644
--- a/gcc/config/sparc/sparc-protos.h
+++ b/gcc/config/sparc/sparc-protos.h
@@ -24,9 +24,6 @@ Boston, MA 02111-1307, USA. */
#ifndef __SPARC_PROTOS_H__
#define __SPARC_PROTOS_H__
-extern bool sparc_emitting_epilogue;
-extern bool sparc_skip_caller_unimp;
-
#ifdef TREE_CODE
extern struct rtx_def *function_value (tree, enum machine_mode, int);
extern void function_arg_advance (CUMULATIVE_ARGS *,
@@ -49,14 +46,14 @@ extern enum direction function_arg_padding (enum machine_mode, tree);
#endif /* ARGS_SIZE_RTX */
#endif /* TREE_CODE */
-extern void load_pic_register (void);
extern void order_regs_for_local_alloc (void);
-extern HOST_WIDE_INT compute_frame_size (HOST_WIDE_INT, int);
+extern HOST_WIDE_INT sparc_compute_frame_size (HOST_WIDE_INT, int);
+extern void sparc_expand_prologue (void);
+extern void sparc_expand_epilogue (void);
extern int check_pic (int);
extern int short_branch (int, int);
extern void sparc_profile_hook (int);
extern void sparc_override_options (void);
-extern int leaf_return_peephole_ok (void);
extern void sparc_output_scratch_registers (FILE *);
#ifdef RTX_CODE
@@ -87,6 +84,7 @@ extern void sparc_emit_set_symbolic_const64 (rtx, rtx, rtx);
extern int sparc_splitdi_legitimate (rtx, rtx);
extern int sparc_absnegfloat_split_legitimate (rtx, rtx);
extern char *output_cbranch (rtx, rtx, int, int, int, int, rtx);
+extern const char *output_return (rtx);
extern const char *output_sibcall (rtx, rtx);
extern char *output_v9branch (rtx, rtx, int, int, int, int, int, rtx);
extern void emit_v9_brxx_insn (enum rtx_code, rtx, rtx);
@@ -99,7 +97,7 @@ extern int fp_zero_operand (rtx, enum machine_mode);
extern int reg_or_0_operand (rtx, enum machine_mode);
extern int tls_symbolic_operand (rtx);
extern int empty_delay_slot (rtx);
-extern int eligible_for_epilogue_delay (rtx, int);
+extern int eligible_for_return_delay (rtx);
extern int eligible_for_sibcall_delay (rtx);
extern int tls_call_delay (rtx);
extern int emit_move_sequence (rtx, enum machine_mode);