This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -mfpmath=387 flag does not prevent gcc from using SSE/SSE2 instructions
- From: Andrew Derrick Balsa <andrebalsa at mailingaddress dot org>
- To: Andi Kleen <ak at suse dot de>
- Cc: gcc-bugs at gcc dot gnu dot org,Andi Kleen <ak at suse dot de>,Andreas Jaeger <aj at suse dot de>,"Stanislav Shwartsman" <gate at fidonet dot org dot il>
- Date: Fri, 2 May 2003 13:55:58 +0800
- Subject: Re: -mfpmath=387 flag does not prevent gcc from using SSE/SSE2 instructions
- References: <200305020714.50606.andrebalsa@mailingaddress.org> <20030502041259.GA30009@oldwotan.suse.de>
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