aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernardo Innocenti <bernie@develer.com>2003-09-09 08:40:46 +0200
committerBernardo Innocenti <bernie@gcc.gnu.org>2003-09-09 08:40:46 +0200
commited311a33ac239b2a754e1adbbde6479c6b148f20 (patch)
treeff876de98ee6dafb2349d0402f6841703f14d69e
parente517f636177b2379b1bd805efac97601f96062fc (diff)
downloadgcc-ed311a33ac239b2a754e1adbbde6479c6b148f20.zip
gcc-ed311a33ac239b2a754e1adbbde6479c6b148f20.tar.gz
gcc-ed311a33ac239b2a754e1adbbde6479c6b148f20.tar.bz2
m68k.c (m68k_output_function_prologue): Simplify by removing redundant variable cfa_store_offset.
* config/m68k/m68k.c (m68k_output_function_prologue): Simplify by removing redundant variable cfa_store_offset. From-SVN: r71230
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/m68k/m68k.c38
2 files changed, 18 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b16092f..bd9c479 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-08 Bernardo Innocenti <bernie@develer.com>
+
+ * config/m68k/m68k.c (m68k_output_function_prologue): Simplify
+ by removing redundant variable cfa_store_offset.
+
2003-09-08 Mark Mitchell <mark@codesourcery.com>
* langhooks-def.h (lhd_register_builtin_type): New function.
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 8cd6d6c..ccdedce 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -262,7 +262,6 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
int num_saved_regs = 0;
HOST_WIDE_INT fsize = (size + 3) & -4;
HOST_WIDE_INT cfa_offset = INCOMING_FRAME_SP_OFFSET;
- HOST_WIDE_INT cfa_store_offset = cfa_offset;
/* If the stack limit is a symbol, we can check it here,
before actually allocating the space. */
@@ -330,11 +329,10 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
{
char *l;
l = (char *) dwarf2out_cfi_label ();
- cfa_store_offset += 4;
- cfa_offset = cfa_store_offset;
- dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_store_offset);
+ cfa_offset += 4;
+ dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_offset);
dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset);
- cfa_store_offset += fsize;
+ cfa_offset += fsize;
}
}
else if (fsize)
@@ -406,8 +404,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
}
if (dwarf2out_do_frame ())
{
- cfa_store_offset += fsize + 4;
- cfa_offset = cfa_store_offset;
+ cfa_offset += fsize + 4;
dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset);
}
}
@@ -431,16 +428,13 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
char *l = (char *) dwarf2out_cfi_label ();
int n_regs;
- cfa_store_offset += num_saved_regs * 12;
+ cfa_offset += num_saved_regs * 12;
if (! frame_pointer_needed)
- {
- cfa_offset = cfa_store_offset;
- dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
- }
+ dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
for (regno = 16, n_regs = 0; regno < 24; regno++)
if (mask & (1 << (regno - 16)))
dwarf2out_reg_save (l, regno,
- -cfa_store_offset + n_regs++ * 12);
+ -cfa_offset + n_regs++ * 12);
}
}
mask = 0;
@@ -495,13 +489,10 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
{
char *l = (char *) dwarf2out_cfi_label ();
- cfa_store_offset += 4;
+ cfa_offset += 4;
if (! frame_pointer_needed)
- {
- cfa_offset = cfa_store_offset;
- dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
- }
- dwarf2out_reg_save (l, 15 - i, -cfa_store_offset);
+ dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
+ dwarf2out_reg_save (l, 15 - i, -cfa_offset);
}
}
}
@@ -547,16 +538,13 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
char *l = (char *) dwarf2out_cfi_label ();
int n_regs;
- cfa_store_offset += num_saved_regs * 4;
+ cfa_offset += num_saved_regs * 4;
if (! frame_pointer_needed)
- {
- cfa_offset = cfa_store_offset;
- dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
- }
+ dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
for (regno = 0, n_regs = 0; regno < 16; regno++)
if (mask & (1 << (15 - regno)))
dwarf2out_reg_save (l, regno,
- -cfa_store_offset + n_regs++ * 4);
+ -cfa_offset + n_regs++ * 4);
}
}
if (flag_pic && current_function_uses_pic_offset_table)