4.15. Platform-specific Flags

Some flags only make sense for particular target platforms.

-msse2:

(x86 only, added in GHC 7.0.1) Use the SSE2 registers and instruction set to implement floating point operations when using the native code generator. This gives a substantial performance improvement for floating point, but the resulting compiled code will only run on processors that support SSE2 (Intel Pentium 4 and later, or AMD Athlon 64 and later).

SSE2 is unconditionally used on x86-64 platforms.

-monly-[32]-regs:

(x86 only) GHC tries to “steal” four registers from GCC, for performance reasons; it almost always works. However, when GCC is compiling some modules with four stolen registers, it will crash, probably saying:

Foo.hc:533: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.

Just give some registers back with -monly-N-regs. Try `3' first, then `2'. If `2' doesn't work, please report the bug to us.