This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] x87 FLDx
> On Thu, Oct 18, 2001 at 02:03:38AM +0200, Jan Hubicka wrote:
> > > + u.d = REAL_VALUE_ATOF ("3.14159265358979", double_mode);
> > > + if (memcmp(&u, &CONST_DOUBLE_LOW (x), sizeof u) == 0) return 7;
> > Shouldn't this be done at long_double precisity, as the CPU loads long_double?
> > This is definitly wrong for XFmode, but I am not quite sure what to do
> > for SF/DFmode constants.
>
> Most definitely this can *only* be used for long double, since
> that's the precision used by the insn.
We are accepting extra precisity in other places, so perhaps we can tolerate
it here too if the value expected to be loaded is the PI rounded to SF/DFmode.
Thats what glibc does by hand at several places IMO.
Honza
>
>
> r~