This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [DOC PATCH] Change the name of truncM2 insn pattern to btruncM2
Quoting Eric Botcazou <ebotcazou@libertysurf.fr>:
> > 2005-05-05 Uros Bizjak <uros@kss-loka.si>
> >
> > * doc/md.texi (Standard Names): Change insn pattern
> > name from truncM2 to btruncM2 for 'trunc' built-in description.
> > Add rintM2 insn pattern description to nearbyintM2 insn
> > pattern description.
>
> Sorry for being picky, but I think you're going to confuse back-end hackers.
>
> Either the patterns are the same and get rid of one of them, or they are not
>
> and document them separately.
They have the same functionality (they return the integral value nearest x in
direction of current rounding mode), but rint functions will raise the inexact
exception when the result differs in value from the argument.
Do you think we should emphasize this in gcc document (as the manpage for rint
already says that)? In this case, I would suggest to add another entry for rint:
`rintM2'
Store the argument rounded according to the default rounding mode and
raise the inexact exception
when the result differs in value from the argument.
The `nearbyint' and `rint' built-in functions of C always use the
mode which corresponds to the C data type `double', `nearbyintf'
and `rintf' built-in functions use the mode which corresponds to
the C data type `float'.