[LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
arplynn at gmail.com
Fri Jul 1 15:55:02 PDT 2011
> Well -no-sse -mno-mmx works for EFI as it is pre-boot firmware and does not have any floating point C code. We use -no-sse and -mno-mmx code to prevent optimized code gen using these registers for optimizations.
Whether it's optimised or not doesn't particularly matter, the x86_64 ABI says that floating-point return values go into SSE registers, so that is where LLVM is required to put them. If you need to avoid these registers, then you may well need to write a separate calling convention for the backend which stores those return values elsewhere (like the x87 fp stack), or just do not return floating-point values.
More information about the llvm-dev