Sandra Loosemore <san...@codesourcery.com> writes: > The MIPS back end has an option -mno-float that is supported by > bare-metal configs using the SDE library. However, this option is not > properly documented in the manual, and MIPS_ARCH_FLOAT_SPEC doesn't know > about it as one of the explicit floating-point configuration changes > that should override architecture defaults. This patch addresses both > problems. OK to commit?
OK, you're touching a sore spot here, but... > +@item -mno-float > +@opindex mno-float > +Prevents the use of all floating-point operations. This option is presently > +supported only by some bare-metal MIPS configurations. ...unfortunately, it doesn't prevent the use floating-point operations. That's why it's such a bad option. The only difference from the compiler proper's point of view between -msoft-float and -mno-float is that they define different preprocessor macros. The onus is instead on the programmer to avoid writing anything that might tempt the compiler into using floating-point operations. If the user gets it wrong, they get (at best) a link-time error rather than a compile-time error. I think we should document it that way. E.g. something like: @item -mno-float @opindex mno-float Equivalent to @option{-msoft-float}, but asserts that the user is trying to avoid all floating-point operations. This option is presently supported only by some bare-metal MIPS configurations, where it selects a special set of libraries that lack all floating-point support (including, for example, the floating-point @code{printf} formats). If code compiled with @code{-mno-float} accidentally contains floating-point operations, it is likely to suffer a link-time or run-time failure. but you're better at the wordsmithing than I am. Perhaps we should document the __mips_no_float preprocessor macro too, since that's how things like printf() know that they don't need the floating-point stuff. The mips.h part is OK though, thanks. Feel free to apply it separately if that's more convenient than keeping the patch together. Richard