Re: [PATCH, rs6000] Alphabetize prototypes of AltiVec built-in functions in extend.texi

2018-07-13 Thread Segher Boessenkool
On Tue, Jul 10, 2018 at 06:13:50PM -0500, Kelvin Nilsen wrote:
> This patch alphabetizes the list of AltiVec built-in function prototypes that 
> consume about 15 pages of the gcc.pdf file.  As part of the alphabetization 
> effort, certain functions that should not be documented in this section of 
> the manual are separated from the others and moved to the end of the section 
> with comments to explain their role.
> 
> This patch prepares the way for future patches that will remove certain 
> prototypes from this section and will insert certain prototypes that are 
> currently missing from this section.  It also improves readability and 
> maintainability of the section.

I don't think having these thing alphabetical is a good idea; there are
much better orderings possible.  But it is a step towards sorting out the
mess that is the current documentation, so okay for trunk!

Thanks for working on this.


Segher


>   * doc/extend.texi (PowerPC AltiVec Built-in Functions):
>   Alphabetize prototypes of built-in functions, separating out
>   built-in functions that are listed in this section but should be
>   described elsewhere.


[PATCH, rs6000] Alphabetize prototypes of AltiVec built-in functions in extend.texi

2018-07-10 Thread Kelvin Nilsen
This patch alphabetizes the list of AltiVec built-in function prototypes that 
consume about 15 pages of the gcc.pdf file.  As part of the alphabetization 
effort, certain functions that should not be documented in this section of the 
manual are separated from the others and moved to the end of the section with 
comments to explain their role.

This patch prepares the way for future patches that will remove certain 
prototypes from this section and will insert certain prototypes that are 
currently missing from this section.  It also improves readability and 
maintainability of the section.

This patch has bootstrapped and tested without regressions on 
powerpc64le-unknown-linux (P8).  I have also built the gcc.pdf file and 
reviewed its contents.

In total, the diffs may appear daunting.  A condensation of the diffs is 
obtained by separating out the insertions (+ in the first column) from the 
deletions (- in the first column), sorting the respective files, and performing 
a diff.  This condensed diff reveals that the entirety of this patch results 
only in the following "net changes", all of which are (temporary) additions to 
the extend.texi file:

< 
< 
< 
< 
< 
< @end smallexample
< /* __int128, long long, and double arguments and results require -mvsx.  */
< @smallexample
< The following built-in functions which are currently documented in
< this section are not alphabetized with other built-in functions of
< this section because they belong in different sections.
< /* vec_doublee requires -mvsx.  */
< /* vec_doubleh requires -mvsx.  */
< /* vec_doublel requires -mvsx.  */
< /* vec_doubleo requires -mvsx.  */
< /* vec_float2 requires -mvsx.  */
< /* vec_floate requires -mvsx.  */
< /* vec_floato requires -mvsx.  */
< /* vec_float requires -mvsx.  */
< /* vec_neg requires P8_vector */
< /* vec_signed2 requires -mcpu=power8.  */
< /* vec_signede requires -mvsx.  */
< /* vec_signedo requires -mvsx.  */
< /* vec_signed requires -mvsx.  */
< /* vec_sldw requires -mvsx.  */
< /* vec_unsignede requires -mcpu=power8.  */
< /* vec_unsignede requires -mvsx.  */
< /* vec_unsignedo requires -mvsx.  */
< /* vec_unsigned requires -mvsx.  */

Is this patch ok for trunk?

gcc/ChangeLog:

2018-07-10  Kelvin Nilsen  

* doc/extend.texi (PowerPC AltiVec Built-in Functions):
Alphabetize prototypes of built-in functions, separating out
built-in functions that are listed in this section but should be
described elsewhere.

Index: gcc/doc/extend.texi
===
--- gcc/doc/extend.texi (revision 262542)
+++ gcc/doc/extend.texi (working copy)
@@ -16065,29 +16065,6 @@ vector unsigned int vec_add (vector unsigned int,
 vector unsigned int vec_add (vector unsigned int, vector unsigned int);
 vector float vec_add (vector float, vector float);
 
-vector float vec_vaddfp (vector float, vector float);
-
-vector signed int vec_vadduwm (vector bool int, vector signed int);
-vector signed int vec_vadduwm (vector signed int, vector bool int);
-vector signed int vec_vadduwm (vector signed int, vector signed int);
-vector unsigned int vec_vadduwm (vector bool int, vector unsigned int);
-vector unsigned int vec_vadduwm (vector unsigned int, vector bool int);
-vector unsigned int vec_vadduwm (vector unsigned int, vector unsigned int);
-
-vector signed short vec_vadduhm (vector bool short, vector signed short);
-vector signed short vec_vadduhm (vector signed short, vector bool short);
-vector signed short vec_vadduhm (vector signed short, vector signed short);
-vector unsigned short vec_vadduhm (vector bool short, vector unsigned short);
-vector unsigned short vec_vadduhm (vector unsigned short, vector bool short);
-vector unsigned short vec_vadduhm (vector unsigned short, vector unsigned 
short);
-
-vector signed char vec_vaddubm (vector bool char, vector signed char);
-vector signed char vec_vaddubm (vector signed char, vector bool char);
-vector signed char vec_vaddubm (vector signed char, vector signed char);
-vector unsigned char vec_vaddubm (vector bool char, vector unsigned char);
-vector unsigned char vec_vaddubm (vector unsigned char, vector bool char);
-vector unsigned char vec_vaddubm (vector unsigned char, vector unsigned char);
-
 vector unsigned int vec_addc (vector unsigned int, vector unsigned int);
 
 vector unsigned char vec_adds (vector bool char, vector unsigned char);
@@ -16109,34 +16086,151 @@ vector signed int vec_adds (vector bool int, vecto
 vector signed int vec_adds (vector signed int, vector bool int);
 vector signed int vec_adds (vector signed int, vector signed int);
 
-vector signed int vec_vaddsws (vector bool int, vector signed int);
-vector signed int vec_vaddsws (vector signed int, vector bool int);
-vector signed int vec_vaddsws (vector signed int, vector signed int);
+int vec_all_eq (vector signed char, vector bool char);
+int vec_all_eq (vector signed char, vector signed char);
+int vec_all_eq (vector unsigned char