similar clang options for : -mno-80387 -mno-fp-ret-in-387

Hi !

Are there options similar to:

  -mno-80387:

           On machines where a function returns floating-point results in the
     80387
           register stack, some floating-point opcodes may be emitted even if
           -msoft-float is used.

       -mno-fp-ret-in-387
           Do not use the FPU registers for return values of functions.

           The usual calling convention has functions return values of types
           "float"
           and "double" in an FPU register, even if there is no FPU. The idea
           is that
           the operating system should emulate an FPU.

           The option -mno-fp-ret-in-387 causes such values to be returned in
           ordinary
           CPU registers instead.

Or what combination of flags makes sure we won't hit these quirks in the first
place ?

Thanks.

No, we don’t support these options, and I don’t think we’ll want to implement -mno-fp-ret-in-387. To my knowledge, nobody actually needs to return floating point values in GPRs. What the Linux kernel probably wants is to completely disable floating point. In an ideal world, both gcc and clang would grow an -f[no-]floating-point flag, which would reject floating point code in the frontend.