mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-06 20:17:12 +08:00
(output_return_instruction): Do not writeback the stack pointer when it is being loaded.
(output_return_instruction): Do not writeback the stack pointer when it is being loaded. (arm_output_epilogue): Likewise. From-SVN: r57256
This commit is contained in:
parent
24491a0950
commit
f1acdf8b0f
@ -1,3 +1,9 @@
|
||||
2002-09-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/arm/arm.c (output_return_instruction): Do not
|
||||
writeback the stack pointer when it is being loaded.
|
||||
(arm_output_epilogue): Likewise.
|
||||
|
||||
2002-09-17 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* optabs.c (prepare_cmp_insn): Let emit_library_call_value
|
||||
|
@ -7325,6 +7325,8 @@ output_return_instruction (operand, really_return, reverse)
|
||||
/* Generate the load multiple instruction to restore the registers. */
|
||||
if (frame_pointer_needed)
|
||||
sprintf (instr, "ldm%sea\t%%|fp, {", conditional);
|
||||
else if (live_regs_mask & (1 << SP_REGNUM))
|
||||
sprintf (instr, "ldm%sfd\t%%|sp, {", conditional);
|
||||
else
|
||||
sprintf (instr, "ldm%sfd\t%%|sp!, {", conditional);
|
||||
|
||||
@ -7736,7 +7738,16 @@ arm_output_epilogue (really_return)
|
||||
asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||
}
|
||||
else if (saved_regs_mask)
|
||||
print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
{
|
||||
if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
/* Note - write back to the stack register is not enabled
|
||||
(ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
in the list of registers and if we add writeback the
|
||||
instruction becomes UNPREDICTABLE. */
|
||||
print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
else
|
||||
print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
}
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user