rs6000: Various fixes for the new fpscr builtins (PR87509)
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 5 Oct 2018 10:52:33 +0000 (12:52 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 5 Oct 2018 10:52:33 +0000 (12:52 +0200)
commit49022a8b837e77020b0e03ce8b9c70e67bd59872
tree15fd212e7641714976b9b20a7af8bd75e1cce615
parent3665f77c7f63737252fea0e153a6426aa1241a7a
rs6000: Various fixes for the new fpscr builtins (PR87509)

With these fixes all testcases test clean for me, both on
powerpc64-linux {-m32,-m64} and on powerpc64le-linux, with all
relevant -mcpu= settings.

PR target/87509
* config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
RS6000_BTM_DFP.
* config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
to be DImode.  When using mffscrn, force the operand to a register.

gcc/testsuite/
PR target/87509
* gcc.target/powerpc/test_fpscr_drn_builtin.c: Use hard_dfp instead
of dfp_hw.  Don't include <altivec.h>.
* gcc.target/powerpc/test_fpscr_drn_builtin_error.c: Ditto.  Require
lp64.
* gcc.target/powerpc/test_fpscr_rn_builtin.c: Don't include <altivec.h>.
* gcc.target/powerpc/test_fpscr_rn_builtin_error.c: Ditto.
* gcc.target/powerpc/test_mffsl.c: Ditto.

From-SVN: r264863
gcc/ChangeLog
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin.c
gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c
gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c
gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c
gcc/testsuite/gcc.target/powerpc/test_mffsl.c