]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: fix PR target/65416
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 19 Jun 2018 21:01:22 +0000 (21:01 +0000)
committerMax Filippov <jcmvbkbc@gcc.gnu.org>
Tue, 19 Jun 2018 21:01:22 +0000 (21:01 +0000)
commitbdaa9e551f27298cbec244717c13ac68a4a52bf7
treee20026dcc8e48178a820e788ff957f8ef897e480
parent22e89a8f22cbd5471ad3fc0d5dd3710eb071214c
xtensa: fix PR target/65416

The issue is caused by reordering of stack pointer update after stack
space allocation with instructions that write to the allocated stack
space. In windowed ABI register spill area for the previous call frame
is located just below the stack pointer and may be reloaded back into
the register file on movsp.
Implement allocate_stack pattern for windowed ABI configuration and
insert an instruction that prevents reordering of frame memory access
and stack pointer update.

gcc/
2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>

Backport from mainline
2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
constant.
(allocate_stack, frame_blockage, *frame_blockage): New patterns.

From-SVN: r261764
gcc/ChangeLog
gcc/config/xtensa/xtensa.md