]> git.ipfire.org Git - thirdparty/gcc.git/commit
[ARC] Emit blockage regardless to avoid delay slot scheduling.
authorclaziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2019 10:20:40 +0000 (10:20 +0000)
committerclaziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2019 10:20:40 +0000 (10:20 +0000)
commite1b5cb5d875f070ecda561dcdcde623ddfdc58e6
treeb628d53ee95b6c7f6630155a8974c13e8a192393
parentb8d62c24266c9531e1241f00bfb0500ea0fcd64f
[ARC] Emit blockage regardless to avoid delay slot scheduling.

1.The delay slot scheduler can reschedule some of the frame related
instructions resulting in having incorect CFI information. This patch
introduces a schedule blockage to avoid this problem.

2.There are cases when an interrupt may happen and not all the current
function stack operations are done, which may result in stack
corruption. Such an example is accessing an returning a local
structure members, which members are allocated on stack. The stack
adjustment and the accessing of the struct member can be reorder as
they may not use both the SP register for the access.

3.Also, do not save/restore SP when in interrupt. The SP is switch by
the core IRQ machinery.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_expand_prologue): Emit blockage regardless
to avoid delay slot scheduling.
(arc_must_save_register): Don't save SP.
* config/arc/arc.md (stack_tie): Remove.
(UNSPEC_ARC_STKTIE): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270384 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/arc/arc.md