Commit 40d2032b by Jim Wilson

(sh_expand_prologue): Clear extra_push at start.

(sh_expand_prologue): Clear extra_push at start.  Clear
current_function_anonymous_args if set.  Clear shiftsyms array.
(sh_expand_epilogue): Don't clear extra_push,
current_function_pretend_args_size, current_function_anonymous_args,
and shiftsyms array.

From-SVN: r8697
parent 369c7ab6
...@@ -2106,7 +2106,7 @@ void ...@@ -2106,7 +2106,7 @@ void
sh_expand_prologue () sh_expand_prologue ()
{ {
int live_regs_mask; int live_regs_mask;
int d; int d, i;
extern tree current_function_decl; extern tree current_function_decl;
live_regs_mask = calc_live_regs (&d); live_regs_mask = calc_live_regs (&d);
...@@ -2114,10 +2114,15 @@ sh_expand_prologue () ...@@ -2114,10 +2114,15 @@ sh_expand_prologue ()
and partially on the stack - eg a large structure */ and partially on the stack - eg a large structure */
output_stack_adjust (-current_function_pretend_args_size); output_stack_adjust (-current_function_pretend_args_size);
extra_push = 0;
/* This is set by SETUP_VARARGS to indicate that this is a varargs
routine. Clear it here so that the next function isn't affected. */
if (current_function_anonymous_args) if (current_function_anonymous_args)
{ {
current_function_anonymous_args = 0;
/* Push arg regs as if they'd been provided by caller in stack */ /* Push arg regs as if they'd been provided by caller in stack */
int i;
for (i = 0; i < NPARM_REGS; i++) for (i = 0; i < NPARM_REGS; i++)
{ {
int rn = NPARM_REGS + FIRST_PARM_REG - i - 1; int rn = NPARM_REGS + FIRST_PARM_REG - i - 1;
...@@ -2139,19 +2144,20 @@ sh_expand_prologue () ...@@ -2139,19 +2144,20 @@ sh_expand_prologue ()
add_function (IDENTIFIER_POINTER (DECL_NAME (current_function_decl))); add_function (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)));
} }
/* ??? Hack. Clear out the table set up by gen_shifty_op since this
info does not apply to the next function. */
for (i = 0; i < 32; i++)
shiftsyms[i] = 0;
} }
void void
sh_expand_epilogue () sh_expand_epilogue ()
{ {
int live_regs_mask; int live_regs_mask;
int d; int d, i;
int i;
live_regs_mask = calc_live_regs (&d); live_regs_mask = calc_live_regs (&d);
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx)); emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx));
...@@ -2170,13 +2176,6 @@ sh_expand_epilogue () ...@@ -2170,13 +2176,6 @@ sh_expand_epilogue ()
} }
output_stack_adjust (extra_push + current_function_pretend_args_size); output_stack_adjust (extra_push + current_function_pretend_args_size);
extra_push = 0;
current_function_pretend_args_size = 0;
current_function_anonymous_args = 0;
for (i = 0; i < 32; i++)
shiftsyms[i] = 0;
} }
/* Define the offset between two registers, one to be eliminated, and /* Define the offset between two registers, one to be eliminated, and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment