public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2] [rs6000] Add documentation for __builtin_mtfsf
@ 2019-07-22 14:02 Paul Clarke
  2019-07-22 21:43 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Clarke @ 2019-07-22 14:02 UTC (permalink / raw)
  To: gcc-patches, Segher Boessenkool


2019-07-21  Paul A. Clarke  <pc@us.ibm.com>

[gcc]

	* doc/extend.texi: Add documentation for __builtin_mtfsf.

v2: wordsmithing at Segher's request.  I'm having a hard time not saying too much.  :-)

Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi	(revision 273615)
+++ gcc/doc/extend.texi	(working copy)
@@ -16848,6 +16848,7 @@ unsigned long __builtin_ppc_mftb ();
 double __builtin_unpack_ibm128 (__ibm128, int);
 __ibm128 __builtin_pack_ibm128 (double, double);
 double __builtin_mffs (void);
+double __builtin_mtfsf (const int, double);
 void __builtin_mtfsb0 (const int);
 void __builtin_mtfsb1 (const int);
 void __builtin_set_fpscr_rn (int);
@@ -16863,7 +16864,10 @@ the most significant word on 32-bit environments.
 return the value of the FPSCR register.  Note, ISA 3.0 supports the
 @code{__builtin_mffsl()} which permits software to read the control and
 non-sticky status bits in the FSPCR without the higher latency associated with
-accessing the sticky status bits.  The
+accessing the sticky status bits.  The @code{__builtin_mtfsf} takes a constant
+8-bit integer field mask and a representation of the new value of the FPSCR
+and generates the @code{mtfsf} (extended mnemonic) instruction to write new
+values to selected fields of the FPSCR.  The
 @code{__builtin_mtfsb0} and @code{__builtin_mtfsb1} take the bit to change
 as an argument.  The valid bit range is between 0 and 31.  The builtins map to
 the @code{mtfsb0} and @code{mtfsb1} instructions which take the argument and

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

* Re: [PATCH v2] [rs6000] Add documentation for __builtin_mtfsf
  2019-07-22 14:02 [PATCH v2] [rs6000] Add documentation for __builtin_mtfsf Paul Clarke
@ 2019-07-22 21:43 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2019-07-22 21:43 UTC (permalink / raw)
  To: Paul Clarke; +Cc: gcc-patches

On Mon, Jul 22, 2019 at 09:00:08AM -0500, Paul Clarke wrote:
> 
> 2019-07-21  Paul A. Clarke  <pc@us.ibm.com>
> 
> [gcc]
> 
> 	* doc/extend.texi: Add documentation for __builtin_mtfsf.

It should mention the section this is in...  That is "Basic PowerPC
Built-in Functions Available on all Configurations" I think?

> v2: wordsmithing at Segher's request.  I'm having a hard time not saying too much.  :-)

:-)

> -accessing the sticky status bits.  The
> +accessing the sticky status bits.  The @code{__builtin_mtfsf} takes a constant
> +8-bit integer field mask and a representation of the new value of the FPSCR
> +and generates the @code{mtfsf} (extended mnemonic) instruction to write new
> +values to selected fields of the FPSCR.  The

"The @code{__builtin_mtfsf} takes a constant 8-bit integer field mask
and a double precision floating point argument, and generates" etc.?

(It's not a representation of the new value, it says nothing about the
fields you do *not* write).

Okay for trunk with such a change.  All backports are fine as well.
Thanks!


Segher

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

end of thread, other threads:[~2019-07-22 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 14:02 [PATCH v2] [rs6000] Add documentation for __builtin_mtfsf Paul Clarke
2019-07-22 21:43 ` 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).