Fix sparc %gsr write elimination and add a testcase.
authorDavid S. Miller <davem@davemloft.net>
Mon, 26 Sep 2011 20:21:19 +0000 (20:21 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Mon, 26 Sep 2011 20:21:19 +0000 (13:21 -0700)
commitcaa06916332c09b639863c5021aaa1c1a4b40988
treef1a2d8655f444bedd16919923de7767bf94e1f5a
parentef71fdd925864fd461bd18cd52218495b457b29b
Fix sparc %gsr write elimination and add a testcase.

gcc/

* config/sparc/sparc.c (sparc_conditional_register_usage): When VIS
is enabled, mark %gsr as global.
* config/sparc/sparc.md (UNSPEC_WRGSR): Delete.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus): Don't wrap in an unspec.

gcc/testsuite/

* gcc.target/sparc/wrgsr.c: New test.

From-SVN: r179214
gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sparc/wrgsr.c [new file with mode: 0644]