summaryrefslogtreecommitdiff
path: root/gcc/config/aarch64/aarch64.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/aarch64/aarch64.c')
-rw-r--r--gcc/config/aarch64/aarch64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a51bb210850..2ddab1b222f 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -2010,7 +2010,7 @@ aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT offset,
Establish the stack frame by decreasing the stack pointer with a
properly calculated size and, if necessary, create a frame record
filled with the values of LR and previous frame pointer. The
- current FP is also set up is it is in use. */
+ current FP is also set up if it is in use. */
void
aarch64_expand_prologue (void)
@@ -4143,7 +4143,7 @@ aarch64_initial_elimination_offset (unsigned from, unsigned to)
return offset - crtl->outgoing_args_size;
if (from == FRAME_POINTER_REGNUM)
- return cfun->machine->frame.saved_regs_size;
+ return cfun->machine->frame.saved_regs_size + get_frame_size ();
}
if (to == STACK_POINTER_REGNUM)
@@ -4152,6 +4152,7 @@ aarch64_initial_elimination_offset (unsigned from, unsigned to)
{
HOST_WIDE_INT elim = crtl->outgoing_args_size
+ cfun->machine->frame.saved_regs_size
+ + get_frame_size ()
- cfun->machine->frame.fp_lr_offset;
elim = AARCH64_ROUND_UP (elim, STACK_BOUNDARY / BITS_PER_UNIT);
return elim;