aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-05-28 16:00:00 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-05-28 16:00:00 +0000
commit2966b00e88d24531be8ff24ac6c82d5cf70ae116 (patch)
treea967c56fe5903307b9d9058d2e75f11218d8b716 /gcc
parent3c7ad43e58196cebcb3e912b4c35b38bf74a1e19 (diff)
downloadgcc-2966b00e88d24531be8ff24ac6c82d5cf70ae116.zip
gcc-2966b00e88d24531be8ff24ac6c82d5cf70ae116.tar.gz
gcc-2966b00e88d24531be8ff24ac6c82d5cf70ae116.tar.bz2
* config/arm/arm.c (arm_output_epilogue): Remove redundant code.
From-SVN: r82361
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arm/arm.c17
2 files changed, 6 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c42a0c..1ff5cd7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2004-05-28 Paul Brook <paul@codesourcery.com>
+ * config/arm/arm.c (arm_output_epilogue): Remove redundant code.
+
+2004-05-28 Paul Brook <paul@codesourcery.com>
+
* config/arm/arm.c (thumb_force_lr_save): New function.
(arm_get_frame_offsets, thumb_unexpanded_epilogue,
thumb_output_function_prologue): Use it.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a484eb7..6bbe8f6 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -9704,6 +9704,7 @@ arm_output_epilogue (rtx sibling)
}
}
+ /* We may have already restored PC directly from the stack. */
if (! really_return
|| (ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
&& current_function_pretend_args_size == 0
@@ -9714,8 +9715,6 @@ arm_output_epilogue (rtx sibling)
switch ((int) ARM_FUNC_TYPE (func_type))
{
case ARM_FT_EXCEPTION_HANDLER:
- /* Even in 26-bit mode we do a mov (rather than a movs)
- because we don't have the PSR bits set in the address. */
asm_fprintf (f, "\tmov\t%r, %r\n", PC_REGNUM, EXCEPTION_LR_REGNUM);
break;
@@ -9733,19 +9732,7 @@ arm_output_epilogue (rtx sibling)
break;
default:
- if (frame_pointer_needed)
- /* If we used the frame pointer then the return address
- will have been loaded off the stack directly into the
- PC, so there is no need to issue a MOV instruction
- here. */
- ;
- else if (current_function_pretend_args_size == 0
- && (saved_regs_mask & (1 << LR_REGNUM)))
- /* Similarly we may have been able to load LR into the PC
- even if we did not create a stack frame. */
- ;
- else
- asm_fprintf (f, "\tmov\t%r, %r\n", PC_REGNUM, LR_REGNUM);
+ asm_fprintf (f, "\tmov\t%r, %r\n", PC_REGNUM, LR_REGNUM);
break;
}