Description
Here's a godbolt reproducer: https://godbolt.org/z/GGfTEWcPT
This is basically the X86 version of #110383.
-mno-sse -mno-x87
switches to the softfloat ABI. I would expect this to only happen when I set -msoft-float
. (Though strangely, that flag on its own does not seem to change the ABI at all?)
Strangely, passing just -mno-sse
to clang behaves as expected: it shows an error. But adding -mno-x87
(which does not seem to exist for GCC) makes the error go away.
I am a Rust person so I care mostly about the behavior of the backend here, and less about the clang frontend. The underlying issue is that if Rust sets -x87
for the target features in createTargetMachine
we should get an error since the registers for the ABI are missing; +soft-float,-x87
should work because we requested soft-float and then it's fine for the registers to be missing.