re PR target/55301 ([SH] broken sp_switch function attribute)
authorChristian Bruel <chrbr@gcc.gnu.org>
Wed, 16 Jan 2013 08:29:54 +0000 (09:29 +0100)
committerChristian Bruel <chrbr@gcc.gnu.org>
Wed, 16 Jan 2013 08:29:54 +0000 (09:29 +0100)
commit8b0a1e0b4371c8c2597a5f310f2a1843832d38da
tree857fdfe16236f5fe35daa750a92b7fbbe40b29ce
parent19006c45f5153e69530a26b8dc35ae255aa118c7
re PR target/55301 ([SH] broken sp_switch function attribute)

PR target/55301
* config/sh/sh.c (sh_expand_prologue): Postpone new_stack mem symbol.
(broken_move): Handle UNSPECV_SP_SWITCH_B.
* config/sh/sh.md (sp_switch_1): Use set (reg:SI SP_REG).

* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
(UNSPECV_SP_SWITCH_E): New.
(sp_switch_1): Change to an unspec.
(sp_switch_2): Change to an unspec.  Don't use post-inc when we
replace $r15.

* gcc.target/sh/sh-switch.c: New testcase.

From-SVN: r195230
gcc/ChangeLog
gcc/config/sh/sh.c
gcc/config/sh/sh.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sh/sp-switch.c [new file with mode: 0644]