]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
authorSandra Loosemore <sandra@codesourcery.com>
Sun, 29 Oct 2017 02:55:32 +0000 (22:55 -0400)
committerSandra Loosemore <sandra@gcc.gnu.org>
Sun, 29 Oct 2017 02:55:32 +0000 (22:55 -0400)
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

gcc/ChangeLog
gcc/config/nios2/nios2.c
gcc/config/nios2/nios2.h

index b2e27831df813decc91cd9b44a1226b9b4d0cd38..baa24058a55f348fa99326fc28bb8f74b6112776 100644 (file)
@@ -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.
index cdd5e9aab658cefa32eafc8142de8d5ad0f4f8fa..5c70de7baf5a00f84e8a0cbc68e696a1914cf152 100644 (file)
@@ -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:
index 420543e4f46874f34f1ac13bd3662fdacd63ec52..9fdff024cd859495160b3aa31cc80c08dd3f9258 100644 (file)
@@ -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.  */