Re: [EXTERNAL] Re: [Patch 1/5] rs6000, Add 128-bit sign extension support

2020-08-18 Thread Segher Boessenkool
On Thu, Aug 13, 2020 at 06:53:56PM -0500, will schmidt wrote:
> On Thu, 2020-08-13 at 17:55 -0500, Segher Boessenkool wrote:
> > > As long as there are no issues defining the builtins for 3.0 here.
> > > AFAIK they are not documented in ISA 3.0.  This is a happy accident
> > > that these ISA 3.1 builtins can be implemented with existing
> > > support.
> > 
> > There are *no* builtins defined in the ISA!  The insns are just ISA
> > 3.0
> > instructions.
> 
> Ok. 
> 
> So then maybe just "Sign extend builtins" and leave off the ISA
> reference all together.   

Sure.  Or you can say "builtins for the instructions introduced in
Power ISA 3.1" or such.

If we ever get the builtins documentation updated quickly (and updated),
it should go on https://gcc.gnu.org/readings.html , and live will be
good.


Segher


Re: [EXTERNAL] Re: [Patch 1/5] rs6000, Add 128-bit sign extension support

2020-08-13 Thread will schmidt via Gcc-patches
On Thu, 2020-08-13 at 17:55 -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Thu, Aug 13, 2020 at 05:11:11PM -0500, will schmidt wrote:
> > > > That is probably a level of detail that is not
> > > > really needed in the GCC code comment.  Probably best to just
> > > > change
> > > > the comment to read something like "ISA 3.0 sign extend
> > > > builtins". 
> > > 
> > > Sounds good.
> > 
> > As long as there are no issues defining the builtins for 3.0 here.
> > AFAIK they are not documented in ISA 3.0.  This is a happy accident
> > that these ISA 3.1 builtins can be implemented with existing
> > support.
> 
> There are *no* builtins defined in the ISA!  The insns are just ISA
> 3.0
> instructions.
> 

Ok. 

So then maybe just "Sign extend builtins" and leave off the ISA
reference all together.   

:-)

thanks
-WIll

> 
> Segher



Re: [EXTERNAL] Re: [Patch 1/5] rs6000, Add 128-bit sign extension support

2020-08-13 Thread will schmidt via Gcc-patches
On Thu, 2020-08-13 at 13:29 -0500, Segher Boessenkool wrote:
> On Thu, Aug 13, 2020 at 11:09:10AM -0700, Carl Love wrote:
> > The builtins
> > 
> > vector signed int vec_signexti (vector signed char a)
> > vector signed long long vec_signextll (vector signed char a)
> > vector signed int vec_signexti (vector signed short a)
> > vector signed long long vec_signextll (vector signed short a)
> > vector signed long long vec_signextll (vector signed int a)
> > 
> > were defined in the function prototypes directory in box called
> > "RFC
> > 2608 - 128-bit Binary Integer Operations".  The document the new
> > P10
> > builtins.  However, this subset of the newly defined builtins for
> > P10
> > can be implemented with existing Power 9 instructions.  That was
> > the
> > point of the comment.
> 
> Ah, I see :-)
> 
> > That is probably a level of detail that is not
> > really needed in the GCC code comment.  Probably best to just
> > change
> > the comment to read something like "ISA 3.0 sign extend builtins". 
> 
> Sounds good.

As long as there are no issues defining the builtins for 3.0 here.
AFAIK they are not documented in ISA 3.0.  This is a happy accident
that these ISA 3.1 builtins can be implemented with existing support.

> 
> > My thought for calling it out is that they could be back ported to
> > an
> > earlier GCC version since they use Power 9 instructions but it is
> > probably not worth the effort unless there is an explicit request
> > for
> > them. 
> 
> Yeah.  Thanks for the explanation!
> 
> 
> Segher