From: Philip Blundell Date: Wed, 20 Mar 2002 20:09:36 +0000 (+0000) Subject: arm.c (arm_output_epilogue): Don't generate separate return instruction if PC was... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f48645880f8831835e0fa67ad8ed06979dc37a91;p=gcc.git arm.c (arm_output_epilogue): Don't generate separate return instruction if PC was popped. 2002-03-20 Philip Blundell * config/arm/arm.c (arm_output_epilogue): Don't generate separate return instruction if PC was popped. From-SVN: r51083 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25fa8e1f061..f441576f18b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-03-20 Philip Blundell + + * config/arm/arm.c (arm_output_epilogue): Don't generate separate + return instruction if PC was popped. + 2002-03-20 Bob Wilson * config/xtensa/xtensa.md: Remove unused type attributes. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 8ed4c6db131..f07a281f4a3 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7669,7 +7669,7 @@ arm_output_epilogue (really_return) to load use the LDR instruction - it is faster. */ 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. */ if (eh_ofs) asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); @@ -7695,7 +7695,10 @@ arm_output_epilogue (really_return) REGNO (eh_ofs)); #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 ""; /* Generate the return instruction. */