diff options
author | Philip Blundell <pb@nexus.co.uk> | 2002-03-20 20:09:36 +0000 |
---|---|---|
committer | Phil Blundell <pb@gcc.gnu.org> | 2002-03-20 20:09:36 +0000 |
commit | f48645880f8831835e0fa67ad8ed06979dc37a91 (patch) | |
tree | c22c8b12d99cadb17de111b8e46ae380a0819593 | |
parent | e3fe84e5dc1d98095a9b29c55b396bc342f6266f (diff) | |
download | gcc-f48645880f8831835e0fa67ad8ed06979dc37a91.zip gcc-f48645880f8831835e0fa67ad8ed06979dc37a91.tar.gz gcc-f48645880f8831835e0fa67ad8ed06979dc37a91.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25fa8e1..f441576 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 8ed4c6d..f07a281 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. */ |