-mfpmath=387 flag does not prevent gcc from using SSE/SSE2 instructions
Andrew Derrick Balsa
andrebalsa@mailingaddress.org
Fri May 2 05:50:00 GMT 2003
Hi Andi,
Thanks for the clarification.
I managed to force the compiler into changing this:
cvtsi2sdq -152(%rbp), %xmm0
movsd %xmm0, -216(%rbp)
...
to this
...
fildll -152(%rbp)
...
by adding an L suffix to my constants, and compiling with the -mfpmath=387
flag. It´s a workaround (80 bits i.e. long double arguments are passed in
memory), but it works.
Thanks again,
-Andrew
PS: perhaps a note should be added relative to the -mfpmath=387 flag in the
gcc docs, for the x86_64 architecture.
On Friday 02 May 2003 12:12, Andi Kleen wrote:
> > I thought the behaviour would be not to generate any SSE/SSE2 instruction
> > with this flag. Am I wrong, or could this be a (small) bug?
>
> The x86-64 ABI requires passing floating pointer arguments
> in SSE registers. Disabling it is not possible, you would
> be incompatible to all libraries.
>
> -Andi
More information about the Gcc-bugs
mailing list