This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]