diff mbox series

[rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation

Message ID 84e63e5f-e4fe-b2fe-b944-bbab22bdf295@linux.ibm.com
State New
Headers show
Series [rs6000] Replace __uint128_t and __int128_t with __uint128 and __int128 in Power PC built-in documentation | expand

Commit Message

Kelvin Nilsen July 26, 2018, 1:39 p.m. UTC
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.

Comments

Segher Boessenkool July 26, 2018, 2:54 p.m. UTC | #1
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
Kelvin Nilsen July 27, 2018, 3:07 p.m. UTC | #2
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
> 
>
Segher Boessenkool July 30, 2018, 9:19 p.m. UTC | #3
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
diff mbox series

Patch

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