[ARC] Emit blockage regardless to avoid delay slot scheduling.
authorClaudiu Zissulescu <claziss@synopsys.com>
Tue, 16 Apr 2019 10:20:40 +0000 (12:20 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Tue, 16 Apr 2019 10:20:40 +0000 (12:20 +0200)
commit1ec86e1eaa90fb5cbce6a658ebd797f73b4cab6d
treeb628d53ee95b6c7f6630155a8974c13e8a192393
parent85b242968bf34b60ff7ef0fcb8ac94eacfa762a0
[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.

From-SVN: r270384
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/arc/arc.md