Commit f4864588 by Philip Blundell Committed by Phil Blundell

arm.c (arm_output_epilogue): Don't generate separate return instruction if PC was popped.

2002-03-20  Philip Blundell  <pb@nexus.co.uk>

	* config/arm/arm.c (arm_output_epilogue): Don't generate separate
	return instruction if PC was popped.

From-SVN: r51083
parent e3fe84e5
2002-03-20 Philip Blundell <pb@nexus.co.uk>
* config/arm/arm.c (arm_output_epilogue): Don't generate separate
return instruction if PC was popped.
2002-03-20 Bob Wilson <bob.wilson@acm.org> 2002-03-20 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.md: Remove unused type attributes. * config/xtensa/xtensa.md: Remove unused type attributes.
......
...@@ -7669,7 +7669,7 @@ arm_output_epilogue (really_return) ...@@ -7669,7 +7669,7 @@ arm_output_epilogue (really_return)
to load use the LDR instruction - it is faster. */ to load use the LDR instruction - it is faster. */
if (saved_regs_mask == (1 << LR_REGNUM)) if (saved_regs_mask == (1 << LR_REGNUM))
{ {
/* The excpetion handler ignores the LR, so we do /* The exception handler ignores the LR, so we do
not really need to load it off the stack. */ not really need to load it off the stack. */
if (eh_ofs) if (eh_ofs)
asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
...@@ -7695,7 +7695,10 @@ arm_output_epilogue (really_return) ...@@ -7695,7 +7695,10 @@ arm_output_epilogue (really_return)
REGNO (eh_ofs)); REGNO (eh_ofs));
#endif #endif
if (! really_return) if (! really_return
|| (ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
&& current_function_pretend_args_size == 0
&& saved_regs_mask & (1 << PC_REGNUM)))
return ""; return "";
/* Generate the return instruction. */ /* Generate the return instruction. */
......
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