This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sqrt via SSE2 registers
- From: Jan Hubicka <jh at suse dot cz>
- To: Tom Womack <tom at womack dot net>
- Cc: gcc at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Sun, 17 Feb 2002 17:10:50 +0100
- Subject: Re: sqrt via SSE2 registers
- References: <001b01c1b6ff$f11fe6c0$5637f380@maths.nottingham.ac.uk>
> Is there any way of telling gcc that I care so little about precision that
> I'm prepared to have it compute the square roots of objects in SSE2
> registers by using SQRTSD rather than by storing the register to memory,
> loading it onto the FP stack and calling fsqrt?
>
> I've tried (on the principle of sticking in anything that might have an
> effect)
>
> -O3 -march=pentium4 -msse2 -mfpmath=sse{,387} -ffast-math \
> -mno-fancy-math-387
The -mno-fancy-math-387 should not be needed. With -mfpmath=sse -ffast-math,
gcc should use sqrtsd, I will check what is going wrong.
>
> but nonetheless always get the worst-of-both-worlds behavior described
> above.
>
> Am I just being too optimistic about mainline gcc's current level of support
> for the P4? There is a sqrtdf2_1 instruction in i386.md which looks as if it
> should behave correctly.
NO, it should work. Your bugreports are very good for me - I spent today
half a day debugging spec2000 with SSE compilation and failed. I guess it
is the fabs problem reported.
Thanks and please continue! SSE support needs testing!
Honza
>
> Tom