arm.c (arm_output_epilogue): Don't generate separate return instruction if PC was...
authorPhilip Blundell <pb@nexus.co.uk>
Wed, 20 Mar 2002 20:09:36 +0000 (20:09 +0000)
committerPhil Blundell <pb@gcc.gnu.org>
Wed, 20 Mar 2002 20:09:36 +0000 (20:09 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c

index 25fa8e1..f441576 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        * config/xtensa/xtensa.md: Remove unused type attributes.
index 8ed4c6d..f07a281 100644 (file)
@@ -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.  */