[rs6000] Correct descriptions of __builtin_bcdadd* and _builtin_bcdsub* functions
diff mbox series

Message ID 25b9e662-243d-eed1-3b6f-00b1ef9e43a7@linux.ibm.com
State New
Headers show
Series
  • [rs6000] Correct descriptions of __builtin_bcdadd* and _builtin_bcdsub* functions
Related show

Commit Message

Kelvin Nilsen Aug. 1, 2018, 7:55 p.m. UTC
Several errors were discovered in the descriptions of the __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub, __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt, and __builtin_bcdsub_ov functions.  This patch corrects these documentation errors.

I have built the gcc.pdf file and reviewed the formatting, and all looks good.

Is this ok for trunk?

gcc/ChangeLog:

2018-08-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
	ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
	third argument of type "const signed char" to descriptions of
	__builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
	__builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
	__builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
	__builtin_bcdsub_ov functions.

Comments

Segher Boessenkool Aug. 2, 2018, 4:38 p.m. UTC | #1
Hi Kelvin,

On Wed, Aug 01, 2018 at 02:55:22PM -0500, Kelvin Nilsen wrote:
> Several errors were discovered in the descriptions of the __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub, __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt, and __builtin_bcdsub_ov functions.  This patch corrects these documentation errors.

What did you check this against?  The ABI doc, or what is currently
implemented?  Neither is very clear to me :-/


Segher
Kelvin Nilsen Aug. 7, 2018, 10:42 p.m. UTC | #2
My "consistency" check was against the implementation.

On 8/2/18 11:38 AM, Segher Boessenkool wrote:
> Hi Kelvin,
> 
> On Wed, Aug 01, 2018 at 02:55:22PM -0500, Kelvin Nilsen wrote:
>> Several errors were discovered in the descriptions of the __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub, __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt, and __builtin_bcdsub_ov functions.  This patch corrects these documentation errors.
> 
> What did you check this against?  The ABI doc, or what is currently
> implemented?  Neither is very clear to me :-/
> 
> 
> Segher
> 
>
Segher Boessenkool Aug. 7, 2018, 11:11 p.m. UTC | #3
Hi Kelvin,

On Tue, Aug 07, 2018 at 05:42:48PM -0500, Kelvin Nilsen wrote:
> 
> My "consistency" check was against the implementation.
> 
> On 8/2/18 11:38 AM, Segher Boessenkool wrote:
> > On Wed, Aug 01, 2018 at 02:55:22PM -0500, Kelvin Nilsen wrote:
> >> Several errors were discovered in the descriptions of the __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub, __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt, and __builtin_bcdsub_ov functions.  This patch corrects these documentation errors.
> > 
> > What did you check this against?  The ABI doc, or what is currently
> > implemented?  Neither is very clear to me :-/

The ABI calls for "const int" here.  Ah, the code only check for 0 or
1 I think?  Please change the documentation to const int then.  Or,
alternatively, what do I miss?

Okay for trunk with const int.  Thanks!


Segher

Patch
diff mbox series

Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi	(revision 263068)
+++ gcc/doc/extend.texi	(working copy)
@@ -18383,16 +18383,16 @@  vector __uint128 vec_vsubcuq (vector __uint128, ve
 __int128 vec_vsubuqm (__int128, __int128);
 __uint128 vec_vsubuqm (__uint128, __uint128);
 
-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);
+vector __int128 __builtin_bcdadd (vector __int128, vector __int128, const signed char);
+int __builtin_bcdadd_lt (vector __int128, vector __int128, const signed char);
+int __builtin_bcdadd_eq (vector __int128, vector __int128, const signed char);
+int __builtin_bcdadd_gt (vector __int128, vector __int128, const signed char);
+int __builtin_bcdadd_ov (vector __int128, vector __int128, const signed char);
+vector __int128 __builtin_bcdsub (vector __int128, vector __int128, const signed char);
+int __builtin_bcdsub_lt (vector __int128, vector __int128, const signed char);
+int __builtin_bcdsub_eq (vector __int128, vector __int128, const signed char);
+int __builtin_bcdsub_gt (vector __int128, vector __int128, const signed char);
+int __builtin_bcdsub_ov (vector __int128, vector __int128, const signed char);
 @end smallexample
 
 @node PowerPC AltiVec Built-in Functions Available on ISA 3.0