This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: docs for soft float routines
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>, Joseph Myers <jsm28 at cam dot ac dot uk>
- Date: Tue, 11 Mar 2003 12:31:13 -0500 (EST)
- Subject: Re: patch: docs for soft float routines
On Tue, 11 Mar 2003, Aldy Hernandez wrote:
> >> + These functions return the result of converting its floating point
> >> + argument to an integer, still represented in floating point mode, by
> >> + rounding towards zero.
> >> +
> >> + @smallexample
> >> + int __fixdfsi (double);
> >
> > Um, in what way is the result "still represented in floating point
> > mode"?
>
> I was just quoting the docs, perhaps:
What docs?
> <<These functions return the result of converting its floating point
> argument to an integer, represented as a fixed point float. Any
> rounding done is rounding towards zero.>>
Where's that text? Can't find it in *.texi
> ...which I think is what this means (?):
>
> tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
> return a.sign ? (-tmp) : (tmp);
Looks like conversion to integer represented as integer to me.
So the fixdfsi text above needs fixing (to integer, not floating
point mode).
> Next version:
Uh, I saw another thing. (Sorry.) Sometimes it's not apparent
from the name which example the text refers to. Perhaps change
"these functions" to "the following functions" all over?
For example, the following:
> + @smallexample
> + int __fixdfsi (double);
> + int __fixsfsi (float);
> + int __fixtfsi (long double);
> + @end smallexample
> +
> + These functions represent the result of converting its fixed point
> + argument, regarded as signed, to a floating point value.
> +
> + @smallexample
> + double __floatsidf (int);
> + float __floatsisf (int);
> + long double __floatsitf (int);
> + @end smallexample
brgds, H-P