public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation
@ 2018-07-26 13:39 Kelvin Nilsen
       [not found] ` <6def80ed-43ef-14c0-3482-129f44c1244e@linux.ibm.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Kelvin Nilsen @ 2018-07-26 13:39 UTC (permalink / raw)
  To: gcc-patches List

To improve internal consistency and to improve consistency with published ABI documents, this patch replaces the __uint128_t type with __uint128 and replaces __int128_t with __int128.

I have built and regression tested this patch on powerpc64le-unknown-linux with no regressions.  I have also built and reviewed the gcc.pdf file.

Is this ok for trunk?

gcc/ChangeLog:

2018-07-25  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* doc/extend.texi (Basic PowerPC Built-in Functions Available on
	ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
	__int128 in built-in function prototypes.
	(PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
	(PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.

Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi	(revision 262977)
+++ gcc/doc/extend.texi	(working copy)
@@ -15762,9 +15762,9 @@ long long __builtin_divde (long long, long long);
 unsigned long long __builtin_divdeu (unsigned long long, unsigned long long);
 int __builtin_divwe (int, int);
 unsigned int __builtin_divweu (unsigned int, unsigned int);
-vector __int128_t __builtin_pack_vector_int128 (long long, long long);
+vector __int128 __builtin_pack_vector_int128 (long long, long long);
 void __builtin_rs6000_speculation_barrier (void);
-long long __builtin_unpack_vector_int128 (vector __int128_t, signed char);
+long long __builtin_unpack_vector_int128 (vector __int128, signed char);
 @end smallexample
 
 Of these, the @code{__builtin_divde} and @code{__builtin_divdeu} functions
@@ -18331,57 +18331,57 @@ vector unsigned long long vec_vupklsw (vector int)
 If the ISA 2.07 additions to the vector/scalar (power8-vector)
 instruction set are available, the following additional functions are
 available for 64-bit targets.  New vector types
-(@var{vector __int128_t} and @var{vector __uint128_t}) are available
-to hold the @var{__int128_t} and @var{__uint128_t} types to use these
+(@var{vector __int128} and @var{vector __uint128}) are available
+to hold the @var{__int128} and @var{__uint128} types to use these
 builtins.
 
 The normal vector extract, and set operations work on
-@var{vector __int128_t} and @var{vector __uint128_t} types,
+@var{vector __int128} and @var{vector __uint128} types,
 but the index value must be 0.
 
 @smallexample
-vector __int128_t vec_vaddcuq (vector __int128_t, vector __int128_t);
-vector __uint128_t vec_vaddcuq (vector __uint128_t, vector __uint128_t);
+vector __int128 vec_vaddcuq (vector __int128, vector __int128);
+vector __uint128 vec_vaddcuq (vector __uint128, vector __uint128);
 
-vector __int128_t vec_vadduqm (vector __int128_t, vector __int128_t);
-vector __uint128_t vec_vadduqm (vector __uint128_t, vector __uint128_t);
+vector __int128 vec_vadduqm (vector __int128, vector __int128);
+vector __uint128 vec_vadduqm (vector __uint128, vector __uint128);
 
-vector __int128_t vec_vaddecuq (vector __int128_t, vector __int128_t,
-                                vector __int128_t);
-vector __uint128_t vec_vaddecuq (vector __uint128_t, vector __uint128_t,
-                                 vector __uint128_t);
+vector __int128 vec_vaddecuq (vector __int128, vector __int128,
+                                vector __int128);
+vector __uint128 vec_vaddecuq (vector __uint128, vector __uint128,
+                                 vector __uint128);
 
-vector __int128_t vec_vaddeuqm (vector __int128_t, vector __int128_t,
-                                vector __int128_t);
-vector __uint128_t vec_vaddeuqm (vector __uint128_t, vector __uint128_t,
-                                 vector __uint128_t);
+vector __int128 vec_vaddeuqm (vector __int128, vector __int128,
+                                vector __int128);
+vector __uint128 vec_vaddeuqm (vector __uint128, vector __uint128,
+                                 vector __uint128);
 
-vector __int128_t vec_vsubecuq (vector __int128_t, vector __int128_t,
-                                vector __int128_t);
-vector __uint128_t vec_vsubecuq (vector __uint128_t, vector __uint128_t,
-                                 vector __uint128_t);
+vector __int128 vec_vsubecuq (vector __int128, vector __int128,
+                                vector __int128);
+vector __uint128 vec_vsubecuq (vector __uint128, vector __uint128,
+                                 vector __uint128);
 
-vector __int128_t vec_vsubeuqm (vector __int128_t, vector __int128_t,
-                                vector __int128_t);
-vector __uint128_t vec_vsubeuqm (vector __uint128_t, vector __uint128_t,
-                                 vector __uint128_t);
+vector __int128 vec_vsubeuqm (vector __int128, vector __int128,
+                                vector __int128);
+vector __uint128 vec_vsubeuqm (vector __uint128, vector __uint128,
+                                 vector __uint128);
 
-vector __int128_t vec_vsubcuq (vector __int128_t, vector __int128_t);
-vector __uint128_t vec_vsubcuq (vector __uint128_t, vector __uint128_t);
+vector __int128 vec_vsubcuq (vector __int128, vector __int128);
+vector __uint128 vec_vsubcuq (vector __uint128, vector __uint128);
 
-__int128_t vec_vsubuqm (__int128_t, __int128_t);
-__uint128_t vec_vsubuqm (__uint128_t, __uint128_t);
+__int128 vec_vsubuqm (__int128, __int128);
+__uint128 vec_vsubuqm (__uint128, __uint128);
 
-vector __int128_t __builtin_bcdadd (vector __int128_t, vector __int128_t);
-int __builtin_bcdadd_lt (vector __int128_t, vector __int128_t);
-int __builtin_bcdadd_eq (vector __int128_t, vector __int128_t);
-int __builtin_bcdadd_gt (vector __int128_t, vector __int128_t);
-int __builtin_bcdadd_ov (vector __int128_t, vector __int128_t);
-vector __int128_t bcdsub (vector __int128_t, vector __int128_t);
-int __builtin_bcdsub_lt (vector __int128_t, vector __int128_t);
-int __builtin_bcdsub_eq (vector __int128_t, vector __int128_t);
-int __builtin_bcdsub_gt (vector __int128_t, vector __int128_t);
-int __builtin_bcdsub_ov (vector __int128_t, vector __int128_t);
+vector __int128 __builtin_bcdadd (vector __int128, vector __int128);
+int __builtin_bcdadd_lt (vector __int128, vector __int128);
+int __builtin_bcdadd_eq (vector __int128, vector __int128);
+int __builtin_bcdadd_gt (vector __int128, vector __int128);
+int __builtin_bcdadd_ov (vector __int128, vector __int128);
+vector __int128 bcdsub (vector __int128, vector __int128);
+int __builtin_bcdsub_lt (vector __int128, vector __int128);
+int __builtin_bcdsub_eq (vector __int128, vector __int128);
+int __builtin_bcdsub_gt (vector __int128, vector __int128);
+int __builtin_bcdsub_ov (vector __int128, vector __int128);
 @end smallexample
 
 @node PowerPC AltiVec Built-in Functions Available on ISA 3.0
@@ -18751,14 +18751,14 @@ are available:
 @smallexample
 vector long vec_vprtyb (vector long);
 vector unsigned long vec_vprtyb (vector unsigned long);
-vector __int128_t vec_vprtyb (vector __int128_t);
-vector __uint128_t vec_vprtyb (vector __uint128_t);
+vector __int128 vec_vprtyb (vector __int128);
+vector __uint128 vec_vprtyb (vector __uint128);
 
 vector long vec_vprtybd (vector long);
 vector unsigned long vec_vprtybd (vector unsigned long);
 
-vector __int128_t vec_vprtybq (vector __int128_t);
-vector __uint128_t vec_vprtybd (vector __uint128_t);
+vector __int128 vec_vprtybq (vector __int128);
+vector __uint128 vec_vprtybd (vector __uint128);
 @end smallexample
 
 The following built-in vector functions are available for the PowerPC family
@@ -18960,8 +18960,8 @@ are available:
 @smallexample
 vector long vec_revb (vector long);
 vector unsigned long vec_revb (vector unsigned long);
-vector __int128_t vec_revb (vector __int128_t);
-vector __uint128_t vec_revb (vector __uint128_t);
+vector __int128 vec_revb (vector __int128);
+vector __uint128 vec_revb (vector __uint128);
 @end smallexample
 
 The @code{vec_revb} built-in function reverses the bytes on an element

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: [PATCH, rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation
       [not found] ` <6def80ed-43ef-14c0-3482-129f44c1244e@linux.ibm.com>
@ 2018-07-26 14:54   ` Segher Boessenkool
  2018-07-27 15:07     ` Kelvin Nilsen
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2018-07-26 14:54 UTC (permalink / raw)
  To: Kelvin Nilsen; +Cc: gcc-patches

On Thu, Jul 26, 2018 at 08:40:01AM -0500, Kelvin Nilsen wrote:
> To improve internal consistency and to improve consistency with published ABI documents, this patch replaces the __uint128_t type with __uint128 and replaces __int128_t with __int128.

> Is this ok for trunk?

Looks good, thanks!  Most (all?) of these functions are not documented
in the ABI, but this is a step forward anyway.  Okay for trunk.

What do things like error messages involving these functions look like?
What types do those say?


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: [PATCH, rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation
  2018-07-26 14:54   ` Fwd: " Segher Boessenkool
@ 2018-07-27 15:07     ` Kelvin Nilsen
  2018-07-30 21:20       ` Segher Boessenkool
  0 siblings, 1 reply; 4+ messages in thread
From: Kelvin Nilsen @ 2018-07-27 15:07 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches

Thanks for review and approval.  To respond to your question about error messages:
> 
> microdoc3.c:22:3: error: invalid parameter combination for AltiVec intrinsic ‘__builtin_vec_vaddcuq’
>    u1 = vec_vaddcuq (d2, d3);
>    ^~

On 7/26/18 9:54 AM, Segher Boessenkool wrote:
> On Thu, Jul 26, 2018 at 08:40:01AM -0500, Kelvin Nilsen wrote:
>> To improve internal consistency and to improve consistency with published ABI documents, this patch replaces the __uint128_t type with __uint128 and replaces __int128_t with __int128.
> 
>> Is this ok for trunk?
> 
> Looks good, thanks!  Most (all?) of these functions are not documented
> in the ABI, but this is a step forward anyway.  Okay for trunk.
> 
> What do things like error messages involving these functions look like?
> What types do those say?
> 
> 
> Segher
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: [PATCH, rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation
  2018-07-27 15:07     ` Kelvin Nilsen
@ 2018-07-30 21:20       ` Segher Boessenkool
  0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2018-07-30 21:20 UTC (permalink / raw)
  To: Kelvin Nilsen; +Cc: gcc-patches

On Fri, Jul 27, 2018 at 10:07:20AM -0500, Kelvin Nilsen wrote:
> On 7/26/18 9:54 AM, Segher Boessenkool wrote:
> > On Thu, Jul 26, 2018 at 08:40:01AM -0500, Kelvin Nilsen wrote:
> >> To improve internal consistency and to improve consistency with published ABI documents, this patch replaces the __uint128_t type with __uint128 and replaces __int128_t with __int128.
> > 
> >> Is this ok for trunk?
> > 
> > Looks good, thanks!  Most (all?) of these functions are not documented
> > in the ABI, but this is a step forward anyway.  Okay for trunk.
> > 
> > What do things like error messages involving these functions look like?
> > What types do those say?
> 
> Thanks for review and approval.  To respond to your question about error messages:
> > 
> > microdoc3.c:22:3: error: invalid parameter combination for AltiVec intrinsic ‘__builtin_vec_vaddcuq’
> >    u1 = vec_vaddcuq (d2, d3);
> >    ^~

Ah, so no type at all.  Well that's good :-)  Thanks,


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-30 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 13:39 [PATCH, rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation Kelvin Nilsen
     [not found] ` <6def80ed-43ef-14c0-3482-129f44c1244e@linux.ibm.com>
2018-07-26 14:54   ` Fwd: " Segher Boessenkool
2018-07-27 15:07     ` Kelvin Nilsen
2018-07-30 21:20       ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).