aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m32r
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-08-21 14:51:52 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-08-21 14:51:52 +0000
commit427764163985bbfb309ee43a85605d6b32c225d5 (patch)
treec3877024ed5bc29701e2274ee5c15ed2a72cca79 /gcc/config/m32r
parent2be65d9e98a1335e0d948c2de59946e715afcbe5 (diff)
downloadgcc-427764163985bbfb309ee43a85605d6b32c225d5.zip
gcc-427764163985bbfb309ee43a85605d6b32c225d5.tar.gz
gcc-427764163985bbfb309ee43a85605d6b32c225d5.tar.bz2
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 <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> 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. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251232
Diffstat (limited to 'gcc/config/m32r')
-rw-r--r--gcc/config/m32r/m32r.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index d7893d7..ae37388 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -70,8 +70,8 @@ static tree m32r_handle_model_attribute (tree *, tree, tree, int, bool *);
static void m32r_print_operand (FILE *, rtx, int);
static void m32r_print_operand_address (FILE *, machine_mode, rtx);
static bool m32r_print_operand_punct_valid_p (unsigned char code);
-static void m32r_output_function_prologue (FILE *, HOST_WIDE_INT);
-static void m32r_output_function_epilogue (FILE *, HOST_WIDE_INT);
+static void m32r_output_function_prologue (FILE *);
+static void m32r_output_function_epilogue (FILE *);
static void m32r_file_start (void);
@@ -1744,7 +1744,7 @@ m32r_expand_prologue (void)
m32r_compute_frame_size which calculates the prolog size. */
static void
-m32r_output_function_prologue (FILE * file, HOST_WIDE_INT size)
+m32r_output_function_prologue (FILE * file)
{
enum m32r_function_type fn_type = m32r_compute_function_type (current_function_decl);
@@ -1753,7 +1753,7 @@ m32r_output_function_prologue (FILE * file, HOST_WIDE_INT size)
fprintf (file, "\t%s interrupt handler\n", ASM_COMMENT_START);
if (! current_frame_info.initialized)
- m32r_compute_frame_size (size);
+ m32r_compute_frame_size (get_frame_size ());
/* This is only for the human reader. */
fprintf (file,
@@ -1880,8 +1880,7 @@ m32r_expand_epilogue (void)
and regs. */
static void
-m32r_output_function_epilogue (FILE * file ATTRIBUTE_UNUSED,
- HOST_WIDE_INT size ATTRIBUTE_UNUSED)
+m32r_output_function_epilogue (FILE *)
{
/* Reset state info for each function. */
current_frame_info = zero_frame_info;