From 718e6d56fb04f242a13f8122ae5f7660dc46d454 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Mon, 21 Aug 2017 14:51:52 +0000 Subject: Remove the frame size argument from function_prologue/epilogue Later patches will add support for frame sizes that are a run-time invariant but not a compile-time constant. This then raised the question of whether the frame size argument to the function_prologue/ epilogue hooks should be updated accordingly. It turned out that only two targets actually used this argument, and even they got other frame-related information from the cached machine structure. This patch therefore removes the argument and makes the two targets use get_frame_size () instead. 2017-08-21 Richard Sandiford Alan Hayward David Sherwood gcc/ * target.def (function_prologue): Remove frame size argument. (function_epilogue): Likewise. * doc/tm.texi: Regenerate. * final.c (final_start_function): Update call to function_prologue. (final_end_function): Update call to function_epilogue. (default_function_pro_epilogue): Remove frame size argument. * output.h (default_function_pro_epilogue): Likewise. * config/arm/arm.c (arm_output_function_epilogue): Likewise. (arm_output_function_prologue): Likewise. * config/frv/frv.c (frv_function_prologue): Likewise. (frv_function_epilogue): Likewise. * config/i386/i386.c (ix86_output_function_epilogue): Likewise. * config/ia64/ia64.c (ia64_output_function_prologue): Likewise. (ia64_output_function_epilogue): Likewise. * config/m32r/m32r.c (m32r_output_function_prologue): Likewise. (m32r_output_function_epilogue): Likewise. * config/microblaze/microblaze.c (microblaze_function_prologue) (microblaze_function_epilogue): Likewise. * config/mips/mips.c (mips_output_function_prologue): Likewise. (mips_output_function_epilogue): Likewise. * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise. (mmix_target_asm_function_epilogue): Likewise. * config/msp430/msp430.c (msp430_start_function): Likewise. * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise. (nds32_asm_function_epilogue): Likewise. * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise. * config/pa/pa.c (pa_output_function_prologue): Likewise. (pa_output_function_epilogue): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue) (rs6000_output_function_epilogue): Likewise. * config/rl78/rl78.c (rl78_start_function): Likewise. * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise. (rs6000_output_function_epilogue): Likewise. * config/rx/rx.c (rx_output_function_prologue): Likewise. * config/sh/sh.c (sh_output_function_epilogue): Likewise. * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise. (sparc_asm_function_epilogue): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251232 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/pa/pa.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'gcc/config/pa') diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 52f76cfd5f1..071cdb521ed 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -116,9 +116,9 @@ static void set_reg_plus_d (int, int, HOST_WIDE_INT, int); static rtx pa_function_value (const_tree, const_tree, bool); static rtx pa_libcall_value (machine_mode, const_rtx); static bool pa_function_value_regno_p (const unsigned int); -static void pa_output_function_prologue (FILE *, HOST_WIDE_INT); +static void pa_output_function_prologue (FILE *); static void update_total_code_bytes (unsigned int); -static void pa_output_function_epilogue (FILE *, HOST_WIDE_INT); +static void pa_output_function_epilogue (FILE *); static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int); static int pa_adjust_priority (rtx_insn *, int); static int pa_issue_rate (void); @@ -3822,15 +3822,6 @@ pa_compute_frame_size (HOST_WIDE_INT size, int *fregs_live) & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1)); } -/* Generate the assembly code for function entry. FILE is a stdio - stream to output the code to. SIZE is an int: how many units of - temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers to - save; `regs_ever_live[I]' is nonzero if register number I is ever - used in the function. This function is responsible for knowing - which registers should not be saved even if used. */ - /* On HP-PA, move-double insns between fpu and cpu need an 8-byte block of memory. If any fpu reg is used in the function, we allocate such a block here, at the bottom of the frame, just in case it's needed. @@ -3840,7 +3831,7 @@ pa_compute_frame_size (HOST_WIDE_INT size, int *fregs_live) to do this is made in regclass.c. */ static void -pa_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) +pa_output_function_prologue (FILE *file) { /* The function's label and associated .PROC must never be separated and must be output *after* any profiling declarations @@ -4254,7 +4245,7 @@ update_total_code_bytes (unsigned int nbytes) adjustments before returning. */ static void -pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) +pa_output_function_epilogue (FILE *file) { rtx_insn *insn = get_last_insn (); bool extra_nop; -- cgit v1.2.1