rs6000-c.c: Add support for built-in functions vector signed int vec_signed (vector...
authorCarl Love <cel@us.ibm.com>
Thu, 29 Jun 2017 15:39:57 +0000 (15:39 +0000)
committerCarl Love <carll@gcc.gnu.org>
Thu, 29 Jun 2017 15:39:57 +0000 (15:39 +0000)
commite5898daf4cd10d161d6f768cd31fb26e1dd60051
tree82cba1c196681466f4224a133e283111b09c4090
parent84eb0f1a3bfc8007e8d6ecf4bf208682fbf5b4dd
rs6000-c.c: Add support for built-in functions vector signed int vec_signed (vector float)...

gcc/ChangeLog:

2017-06-29  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c: Add support for built-in functions
vector signed int vec_signed (vector float);
vector signed long long vec_signed (vector double);
vector signed int vec_signed2 (vector double, vector double);
vector signed int vec_signede (vector double);
vector signed int vec_signedo (vector double);
* config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
instruction generator.
* config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
UNSPEC_VSX_VSIGNED2): Add UNSPECS.
(vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
Add define_insn.
(vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
vunsignede_v2df): Add define_expands.
* config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
VEC_UNSIGNEDO): Add definitions.
* config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
UNSPEC_VSX_VSIGNED2): Add UNSPECs.
(vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
(vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
* config/rs6000/altivec.h (vec_signed, vec_signed2,
vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
vec_unsignede, vec_unsignedo): Add builtin defines.
* config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
declaration.
* doc/extend.texi: Update the built-in documentation file for the
new built-in functions.

gcc/testsuite/ChangeLog:

2017-06-29  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-3-runnable.c (test_int_result,
test_unsigned_int_result, test_ll_int_result,
test_ll_unsigned_int_result): Add result checking functions, add
debug support.
(main): Add builtin function tests.

From-SVN: r249798
gcc/ChangeLog
gcc/config/rs6000/altivec.h
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/vsx.md
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c