diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2013-11-13 10:11:00 +0000 |
---|---|---|
committer | Christophe Lyon <clyon@gcc.gnu.org> | 2013-11-13 11:11:00 +0100 |
commit | 6991c9774a471d4b96489d65df5a42940a298225 (patch) | |
tree | cc4939f03a8357ca1d56bce35af9ce91f99c8371 | |
parent | bed36869f037dc6c9a53c5d5b5ccfd5c0394cd75 (diff) | |
download | gcc-6991c9774a471d4b96489d65df5a42940a298225.zip gcc-6991c9774a471d4b96489d65df5a42940a298225.tar.gz gcc-6991c9774a471d4b96489d65df5a42940a298225.tar.bz2 |
aarch64.h (FRAME_GROWS_DOWNWARD): Define to 1.
2013-11-13 Christophe Lyon <christophe.lyon@linaro.org>
* config/aarch64/aarch64.h (FRAME_GROWS_DOWNWARD): Define to 1.
* config/aarch64/aarch64.c (aarch64_initial_elimination_offset):
Update offset calculations.
From-SVN: r204737
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 5 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.h | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e7f3ea..52d02b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-11-13 Christophe Lyon <christophe.lyon@linaro.org> + + * config/aarch64/aarch64.h (FRAME_GROWS_DOWNWARD): Define to 1. + * config/aarch64/aarch64.c (aarch64_initial_elimination_offset): + Update offset calculations. + 2013-11-13 Eric Botcazou <ebotcazou@adacore.com> PR ada/35998 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index a51bb21..2ddab1b 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; diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 7a80e96..0333069 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -443,7 +443,7 @@ enum reg_class #define INDEX_REG_CLASS CORE_REGS #define BASE_REG_CLASS POINTER_REGS -/* Register pairs used to eliminate unneeded registers that point intoi +/* Register pairs used to eliminate unneeded registers that point into the stack frame. */ #define ELIMINABLE_REGS \ { \ @@ -484,7 +484,7 @@ extern enum aarch64_processor aarch64_tune; /* Stack layout; function entry, exit and calling. */ #define STACK_GROWS_DOWNWARD 1 -#define FRAME_GROWS_DOWNWARD 0 +#define FRAME_GROWS_DOWNWARD 1 #define STARTING_FRAME_OFFSET 0 |