[cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?

Eli Friedman eli.friedman at gmail.com
Fri Jul 1 17:36:30 PDT 2011

On Fri, Jul 1, 2011 at 12:59 PM, Andrew Fish <afish at apple.com> wrote:
> We are using clang for EFI firmware and in general it is a lot like a kernel and we turn off floating point. So the default build flags for our project set -mno-sse -mno-mmx. I'm trying to compile a standard C library that has a few functions with double in it, so I tried to reenable the floating point on the command line for just that package. I thought if you had -mno* and -m the last one wins?  It does not seem to work?
> ~/work/Compiler>cat float.c
> double
> ErrorInBackEnd ()
> {
>  return 1.0;
> }
> ~/work/Compiler>clang -mno-sse -mno-mmx -msse -mmmx float.c
> fatal error: error in backend: SSE2 register return with SSE2 disabled
> Is this a bug? Or functioning as intended

Bug, at least in the sense that we weren't gcc-compatible; r134296.
(As a workaround, you could specify -msse2.)


More information about the cfe-dev mailing list