diff options
author | Carl Love <cel@us.ibm.com> | 2020-05-26 22:44:50 -0500 |
---|---|---|
committer | Carl Love <carll@us.ibm.com> | 2020-08-04 23:12:43 -0500 |
commit | 82f10dee344bf0807cab9f32745b35af3f2139d8 (patch) | |
tree | e25d1489b98335599f579a606919e0cf3c104819 /gcc/doc/extend.texi | |
parent | 3f029aea51a9b48b03a0671e445339a5ab1607eb (diff) | |
download | gcc-82f10dee344bf0807cab9f32745b35af3f2139d8.zip gcc-82f10dee344bf0807cab9f32745b35af3f2139d8.tar.gz gcc-82f10dee344bf0807cab9f32745b35af3f2139d8.tar.bz2 |
rs6000, Add vector shift double builtin support
GCC maintainers:
The following patch adds support for the vector shift double builtins.
The patch has been compiled and tested on
powerpc64le-unknown-linux-gnu (Power 8 LE)
powerpc64le-unknown-linux-gnu (Power 9 LE)
and Mambo with no regression errors.
Please let me know if this patch is acceptable for the mainline branch.
Thanks.
Carl Love
-------------------------------------------------------
gcc/ChangeLog
2020-08-04 Carl Love <cel@us.ibm.com>
* config/rs6000/altivec.h (vec_sldb, vec_srdb): New defines.
* config/rs6000/altivec.md (UNSPEC_SLDB, UNSPEC_SRDB): New.
(SLDB_lr): New attribute.
(VSHIFT_DBL_LR): New iterator.
(vs<SLDB_lr>db_<mode>): New define_insn.
* config/rs6000/rs6000-builtin.def (VSLDB_V16QI, VSLDB_V8HI,
VSLDB_V4SI, VSLDB_V2DI, VSRDB_V16QI, VSRDB_V8HI, VSRDB_V4SI,
VSRDB_V2DI): New BU_P10V_3 definitions.
(SLDB, SRDB): New BU_P10_OVERLOAD_3 definitions.
* config/rs6000/rs6000-call.c (P10_BUILTIN_VEC_SLDB,
P10_BUILTIN_VEC_SRDB): New definitions.
(rs6000_expand_ternop_builtin) [CODE_FOR_vsldb_v16qi,
CODE_FOR_vsldb_v8hi, CODE_FOR_vsldb_v4si, CODE_FOR_vsldb_v2di,
CODE_FOR_vsrdb_v16qi, CODE_FOR_vsrdb_v8hi, CODE_FOR_vsrdb_v4si,
CODE_FOR_vsrdb_v2di]: Add clauses.
* doc/extend.texi: Add description for vec_sldb and vec_srdb.
gcc/testsuite/ChangeLog
2020-08-04 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/vec-shift-double-runnable.c: New test file.
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r-- | gcc/doc/extend.texi | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index f9b57e4..d74f3a6 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -21140,6 +21140,59 @@ The programmer is responsible for understanding the endianness issues involved with the first argument and the result. @findex vec_replace_unaligned +Vector Shift Left Double Bit Immediate +@smallexample +@exdent vector signed char vec_sldb (vector signed char, vector signed char, +const unsigned int); +@exdent vector unsigned char vec_sldb (vector unsigned char, +vector unsigned char, const unsigned int); +@exdent vector signed short vec_sldb (vector signed short, vector signed short, +const unsigned int); +@exdent vector unsigned short vec_sldb (vector unsigned short, +vector unsigned short, const unsigned int); +@exdent vector signed int vec_sldb (vector signed int, vector signed int, +const unsigned int); +@exdent vector unsigned int vec_sldb (vector unsigned int, vector unsigned int, +const unsigned int); +@exdent vector signed long long vec_sldb (vector signed long long, +vector signed long long, const unsigned int); +@exdent vector unsigned long long vec_sldb (vector unsigned long long, +vector unsigned long long, const unsigned int); +@end smallexample + +Shift the combined input vectors left by the amount specified by the low-order +three bits of the third argument, and return the leftmost remaining 128 bits. +Code using this instruction must be endian-aware. + +@findex vec_sldb + +Vector Shift Right Double Bit Immediate + +@smallexample +@exdent vector signed char vec_srdb (vector signed char, vector signed char, +const unsigned int); +@exdent vector unsigned char vec_srdb (vector unsigned char, vector unsigned char, +const unsigned int); +@exdent vector signed short vec_srdb (vector signed short, vector signed short, +const unsigned int); +@exdent vector unsigned short vec_srdb (vector unsigned short, vector unsigned short, +const unsigned int); +@exdent vector signed int vec_srdb (vector signed int, vector signed int, +const unsigned int); +@exdent vector unsigned int vec_srdb (vector unsigned int, vector unsigned int, +const unsigned int); +@exdent vector signed long long vec_srdb (vector signed long long, +vector signed long long, const unsigned int); +@exdent vector unsigned long long vec_srdb (vector unsigned long long, +vector unsigned long long, const unsigned int); +@end smallexample + +Shift the combined input vectors right by the amount specified by the low-order +three bits of the third argument, and return the remaining 128 bits. Code +using this built-in must be endian-aware. + +@findex vec_srdb + @smallexample @exdent vector unsigned long long int @exdent vec_pext (vector unsigned long long int, vector unsigned long long int) |