Does GHC still support x87 floating point math?

Herbert Valerio Riedel hvr at
Thu Dec 6 12:01:43 CET 2012

Ben Lippmeier <benl at> writes:

> On 06/12/2012, at 12:12 , Johan Tibell wrote:
>> I'm currently trying to implement word2Double#. Other such primops
>> support both x87 and sse floating point math. Do we still support x87
>> fp math? Which compiler flag enables it?
> It's on by default unless you use the -sse2 flag. The x87 support is
> horribly slow though. I don't think anyone would notice if you deleted
> the x87 code and made SSE the default, especially now that we have the
> LLVM code generator. SSE has been the way to go for over 10 years now.

btw, iirc GHC uses SSE2 for x86-64 code generation by default, and that
the -msse2 option has only an effect when generating x86(-32) code

More information about the Glasgow-haskell-users mailing list