RISC-V: Make sure stack is always aligned during adjusting stack.
gcc/ 2018-04-20 Kito Cheng <kito.cheng@gmail.com> * config/riscv/riscv.c (riscv_first_stack_step): Round up min step to make sure stack always aligned. From-SVN: r259530
This commit is contained in:
parent
b593a195f9
commit
9b922d6aaf
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2018-04-20 Kito Cheng <kito.cheng@gmail.com>
|
||||
|
||||
* config/riscv/riscv.c (riscv_first_stack_step): Round up min
|
||||
step to make sure stack always aligned.
|
||||
|
||||
2018-04-20 Carl Love <cel@us.ibm.com>
|
||||
|
||||
PR target/83402
|
||||
|
|
|
@ -3507,7 +3507,8 @@ riscv_first_stack_step (struct riscv_frame_info *frame)
|
|||
if (SMALL_OPERAND (frame->total_size))
|
||||
return frame->total_size;
|
||||
|
||||
HOST_WIDE_INT min_first_step = frame->total_size - frame->fp_sp_offset;
|
||||
HOST_WIDE_INT min_first_step =
|
||||
RISCV_STACK_ALIGN (frame->total_size - frame->fp_sp_offset);
|
||||
HOST_WIDE_INT max_first_step = IMM_REACH / 2 - PREFERRED_STACK_BOUNDARY / 8;
|
||||
HOST_WIDE_INT min_second_step = frame->total_size - max_first_step;
|
||||
gcc_assert (min_first_step <= max_first_step);
|
||||
|
|
Loading…
Add table
Reference in a new issue