[AArch64] Optimize epilogue in the presence of an outgoing args area.
From-SVN: r212976
This commit is contained in:
parent
8ae9698d08
commit
8f454e9f8a
|
@ -1,3 +1,8 @@
|
|||
2014-07-24 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* config/aarch64/aarch64.c (aarch64_expand_epilogue): Don't
|
||||
subtract outgoing area size when restoring stack_pointer_rtx.
|
||||
|
||||
2014-07-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/rx/rx.md (stack_push): Adjust RTL to account for the fact
|
||||
|
|
|
@ -2363,7 +2363,8 @@ aarch64_expand_epilogue (bool for_sibcall)
|
|||
{
|
||||
insn = emit_insn (gen_add3_insn (stack_pointer_rtx,
|
||||
hard_frame_pointer_rtx,
|
||||
GEN_INT (- fp_offset)));
|
||||
GEN_INT (0)));
|
||||
offset = offset - fp_offset;
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
/* As SP is set to (FP - fp_offset), according to the rules in
|
||||
dwarf2cfi.c:dwarf2out_frame_debug_expr, CFA should be calculated
|
||||
|
@ -2371,28 +2372,17 @@ aarch64_expand_epilogue (bool for_sibcall)
|
|||
cfa_reg = stack_pointer_rtx;
|
||||
}
|
||||
|
||||
aarch64_restore_callee_saves (DFmode, fp_offset, V0_REGNUM, V31_REGNUM);
|
||||
aarch64_restore_callee_saves (DFmode, frame_pointer_needed ? 0 : fp_offset,
|
||||
V0_REGNUM, V31_REGNUM);
|
||||
|
||||
if (offset > 0)
|
||||
{
|
||||
if (frame_pointer_needed)
|
||||
{
|
||||
if (fp_offset)
|
||||
{
|
||||
aarch64_restore_callee_saves (DImode, fp_offset, R0_REGNUM,
|
||||
R30_REGNUM);
|
||||
insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
|
||||
GEN_INT (offset)));
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
aarch64_restore_callee_saves (DImode, fp_offset, R0_REGNUM,
|
||||
R28_REGNUM);
|
||||
aarch64_restore_callee_saves (DImode, 0, R0_REGNUM, R28_REGNUM);
|
||||
aarch64_popwb_pair_reg (DImode, R29_REGNUM, R30_REGNUM, offset,
|
||||
cfa_reg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aarch64_restore_callee_saves (DImode, fp_offset, R0_REGNUM,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-07-24 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* gcc.target/aarch64/test_frame_12.c: Match optimized instruction
|
||||
sequences.
|
||||
|
||||
2014-07-24 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/57653
|
||||
|
|
|
@ -12,4 +12,8 @@ t_frame_pattern_outgoing (test12, 400, , 8, a[8])
|
|||
t_frame_run (test12)
|
||||
|
||||
/* { dg-final { scan-assembler-times "sub\tsp, sp, #\[0-9\]+" 1 } } */
|
||||
|
||||
/* Check epilogue using write-back. */
|
||||
/* { dg-final { scan-assembler-times "ldp\tx29, x30, \\\[sp\\\], \[0-9\]+" 3 } } */
|
||||
|
||||
/* { dg-final { cleanup-saved-temps } } */
|
||||
|
|
Loading…
Reference in New Issue