diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2017-10-28 22:55:32 -0400 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2017-10-28 22:55:32 -0400 |
commit | 9bba3b254ad702a3d8a6ac8e83b5d9a48df68382 (patch) | |
tree | dfe856be07bac1478854c0ed37e527a034b5281c /gcc | |
parent | bf8d56e201eae5708a48409d9ed376f01753f536 (diff) | |
download | gcc-9bba3b254ad702a3d8a6ac8e83b5d9a48df68382.zip gcc-9bba3b254ad702a3d8a6ac8e83b5d9a48df68382.tar.gz gcc-9bba3b254ad702a3d8a6ac8e83b5d9a48df68382.tar.bz2 |
nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
2017-10-28 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
* config/nios2/nios2.c (nios2_initial_elimination_offset): Make
FRAME_POINTER_REGNUM point at high end of local var area.
From-SVN: r254204
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/nios2/nios2.c | 4 | ||||
-rw-r--r-- | gcc/config/nios2/nios2.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2e2783..baa2405 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-28 Sandra Loosemore <sandra@codesourcery.com> + + * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1. + * config/nios2/nios2.c (nios2_initial_elimination_offset): Make + FRAME_POINTER_REGNUM point at high end of local var area. + 2017-10-27 Eric Botcazou <ebotcazou@adacore.com> * bb-reorder.c (find_traces_1_round): Fix off-by-one index. diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index cdd5e9a..5c70de7 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -1114,7 +1114,9 @@ nios2_initial_elimination_offset (int from, int to) switch (from) { case FRAME_POINTER_REGNUM: - offset = cfun->machine->args_size; + /* This is the high end of the local variable storage, not the + hard frame pointer. */ + offset = cfun->machine->args_size + cfun->machine->var_size; break; case ARG_POINTER_REGNUM: diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h index 420543e..9fdff02 100644 --- a/gcc/config/nios2/nios2.h +++ b/gcc/config/nios2/nios2.h @@ -252,6 +252,7 @@ enum reg_class /* Stack layout. */ #define STACK_GROWS_DOWNWARD 1 +#define FRAME_GROWS_DOWNWARD 1 #define FIRST_PARM_OFFSET(FUNDECL) 0 /* Before the prologue, RA lives in r31. */ |