rs6000: Add pdepd and pextd
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Mon, 11 May 2020 21:16:15 +0000 (16:16 -0500)
committerBill Schmidt <wschmidt@linux.ibm.com>
Mon, 11 May 2020 21:16:15 +0000 (16:16 -0500)
commit2202299c2aa69385ca5e7574914dabc84fb6a40a
tree7cccdff490d7f9d5c84abb870ceb17768020f0ee
parent25bf7d32c31bb45993a9c81dd01043e77c4a44ed
rs6000: Add pdepd and pextd

Add scalar instructions for parallel bit deposit and extract, with
built-in function support.

[gcc]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-builtin.def (__builtin_pdepd): New built-in
function.
(__builtin_pextd): Likewise.
* config/rs6000/rs6000.md (UNSPEC_PDEPD): New constant.
(UNSPEC_PEXTD): Likewise.
(pdepd): New insn.
(pextd): Likewise.
* doc/extend.texi (Basic PowerPC Built-in Functions Available for
a Future Architecture): Add descriptions of __builtin_pdepd and
__builtin_pextd functions.

[gcc/testsuite]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/pdep-0.c: New.
* gcc.target/powerpc/pdep-1.c: New.
* gcc.target/powerpc/pextd-0.c: New.
* gcc.target/powerpc/pextd-1.c: New.
gcc/ChangeLog
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000.md
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pdep-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pdep-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pextd-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pextd-1.c [new file with mode: 0644]