From 09445e53c567910f204085af7dd24f6e2ed1d35a Mon Sep 17 00:00:00 2001 From: bernie Date: Sun, 26 Oct 2003 22:02:05 +0000 Subject: [PATCH] * config/m68k/m68k.c (m68k_output_function_prologue): Eliminate num_saved_regs, use current_frame.reg_no instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72963 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/m68k/m68k.c | 9 +++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a13d77..3d9ea8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,9 @@ 2003-10-26 Bernardo Innocenti + + * config/m68k/m68k.c (m68k_output_function_prologue): Eliminate + num_saved_regs, use current_frame.reg_no instead. + +2003-10-26 Bernardo Innocenti Paul Dale * doc/extend.texi (interrupt_handler): Add m68k to the diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 78d21a3..59bd544 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -452,7 +452,6 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler) static void m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED) { - int num_saved_regs = 0; HOST_WIDE_INT fsize_with_regs; HOST_WIDE_INT cfa_offset = INCOMING_FRAME_SP_OFFSET; @@ -473,12 +472,10 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED } /* On ColdFire add register save into initial stack frame setup, if possible. */ - num_saved_regs = 0; + fsize_with_regs = current_frame.size; if (TARGET_COLDFIRE && current_frame.reg_no > 2) - num_saved_regs = current_frame.reg_no; + fsize_with_regs += current_frame.reg_no * 4; - fsize_with_regs = current_frame.size + num_saved_regs * 4; - if (frame_pointer_needed) { if (current_frame.size == 0 && TARGET_68040) @@ -649,7 +646,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED warning ("stack limit expression is not supported"); } - if (num_saved_regs <= 2) + if (current_frame.reg_no <= 2) { /* Store each separately in the same order moveml uses. Using two movel instructions instead of a single moveml -- 2.7.4