Document sincos standard pattern name

Submitted by Oleg Endo on June 3, 2012, 12:29 p.m.

Details

Message ID 1338726571.2493.4.camel@yam-132-YW-E178-FTW
State New
Headers show

Commit Message

Oleg Endo June 3, 2012, 12:29 p.m.
Hi,

The attached patch adds some documentation for the sincos standard
pattern name.  Tested with 'make info dvi pdf'.
Is the text correct and OK to apply?
Maybe it would also make sense to apply it to the 4.7 branch?

Cheers,
Oleg

ChangeLog:

	* gcc/doc/md.texi (Standard Pattern Names For Generation):
	Document sincos pattern.

Comments

Richard Guenther June 4, 2012, 9:34 a.m.
On Sun, Jun 3, 2012 at 2:29 PM, Oleg Endo <oleg.endo@t-online.de> wrote:
> Hi,
>
> The attached patch adds some documentation for the sincos standard
> pattern name.  Tested with 'make info dvi pdf'.
> Is the text correct and OK to apply?
> Maybe it would also make sense to apply it to the 4.7 branch?

Looks good to me.  Internal docs tweaks are enough to fix on trunk.

Thanks,
Richard.

> Cheers,
> Oleg
>
> ChangeLog:
>
>        * gcc/doc/md.texi (Standard Pattern Names For Generation):
>        Document sincos pattern.
>

Patch hide | download patch | download mbox

Index: gcc/doc/md.texi
===================================================================
--- gcc/doc/md.texi	(revision 188148)
+++ gcc/doc/md.texi	(working copy)
@@ -4795,6 +4795,22 @@ 
 built-in function uses the mode which corresponds to the C data
 type @code{float}.
 
+@cindex @code{sincos@var{m}3} instruction pattern
+@item @samp{sincos@var{m}3}
+Store the sine of operand 2 into operand 0 and the cosine of
+operand 2 into operand 1.
+
+The @code{sin} and @code{cos} built-in functions of C always use the
+mode which corresponds to the C data type @code{double} and the
+@code{sinf} and @code{cosf} built-in function use the mode which
+corresponds to the C data type @code{float}.
+Targets that can calculate the sine and cosine simultaneously can
+implement this pattern as opposed to implementing individual
+@code{sin@var{m}2} and @code{cos@var{m}2} patterns.  The @code{sin}
+and @code{cos} built-in functions will then be expanded to the
+@code{sincos@var{m}3} pattern, with one of the output values
+left unused.
+
 @cindex @code{exp@var{m}2} instruction pattern
 @item @samp{exp@var{m}2}
 Store the exponential of operand 1 into operand 0.