Commit 9bba3b25 by Sandra Loosemore Committed by Sandra Loosemore

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
parent bf8d56e2
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> 2017-10-27 Eric Botcazou <ebotcazou@adacore.com>
* bb-reorder.c (find_traces_1_round): Fix off-by-one index. * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
...@@ -1114,7 +1114,9 @@ nios2_initial_elimination_offset (int from, int to) ...@@ -1114,7 +1114,9 @@ nios2_initial_elimination_offset (int from, int to)
switch (from) switch (from)
{ {
case FRAME_POINTER_REGNUM: 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; break;
case ARG_POINTER_REGNUM: case ARG_POINTER_REGNUM:
......
...@@ -252,6 +252,7 @@ enum reg_class ...@@ -252,6 +252,7 @@ enum reg_class
/* Stack layout. */ /* Stack layout. */
#define STACK_GROWS_DOWNWARD 1 #define STACK_GROWS_DOWNWARD 1
#define FRAME_GROWS_DOWNWARD 1
#define FIRST_PARM_OFFSET(FUNDECL) 0 #define FIRST_PARM_OFFSET(FUNDECL) 0
/* Before the prologue, RA lives in r31. */ /* Before the prologue, RA lives in r31. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment