This is the mail archive of the gcc-bugs@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: -mfpmath=387 flag does not prevent gcc from using SSE/SSE2 instructions


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


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