We should match GCC's behavior which allows floating-point type for -mno-x87 option on 32-bits. https://godbolt.org/z/KrbhfWc9o
The previous block issues have partially been fixed by D112143.
Differential D114162
[X86][clang] Enable floating-point type for -mno-x87 option on 32-bits pengfei on Nov 18 2021, 6:49 AM. Authored by
Details We should match GCC's behavior which allows floating-point type for -mno-x87 option on 32-bits. https://godbolt.org/z/KrbhfWc9o The previous block issues have partially been fixed by D112143.
Diff Detail
Event Timeline
Comment Actions I think we still need this flag, maybe the error message should be changed to "SSE register return with SSE disabled"? https://godbolt.org/z/KcGf751GE |
I see that D112143 changed the ABI so that FP return values do not use x87 registers on i386. Therefore HasFPReturn flag can be removed.
However, operations with long double (x87 80-bit) should still be unsupported on both targets, because IIRC there is no SSE equivalent for them. GCC compiles them as soft-fp when -mno-x87 is set, but I haven't found 80-bit soft-fp implementation in LLVM.
For some reason GCC only does this for for i386 target, for x86_64 it just emits the diagnostic about disabled x87.