Alistair Lynn
2011-Jul-01 21:43 UTC
[LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
Hi Andrew-> fatal error: error in backend: SSE2 register return with SSE2 disabledIs this for 32-bit or 64-bit x86? If it's the latter, the ABI demands that the return value in this case is in xmm0 - SSE is required. Alistair
Andrew Fish
2011-Jul-01 22:02 UTC
[LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
On Jul 1, 2011, at 2:43 PM, Alistair Lynn wrote:> Hi Andrew- > >> fatal error: error in backend: SSE2 register return with SSE2 disabled > > Is this for 32-bit or 64-bit x86?64-bit x86.> If it's the latter, the ABI demands > that the return value in this case is in xmm0 - SSE is required. >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. Andrew
Alistair Lynn
2011-Jul-01 22:55 UTC
[LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
Hi Andrew-> 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. Alistair
Maybe Matching Threads
- [LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
- [LLVMdev] [cfe-dev] should -mno-sse -mno-mmx -msse -mmmx work?
- [LLVMdev] MMX/SSE subtarget feature in IR
- [LLVMdev] MMX/SSE subtarget feature in IR
- Notes on 1.1.4 Windows. Testing of SSE Intrinics Code and others