"Thomas Preud'homme" <thomas.preudho...@arm.com> writes: >> From: Richard Sandiford [mailto:rdsandif...@googlemail.com] >> >> "Thomas Preud'homme" <thomas.preudho...@arm.com> writes: >> >> -mno-float causes gcc to define the macro __mips_no_float, which the >> implementation can use when deciding whether to bother handling %f, etc. >> I'm afraid there's nothing more sophisticated to it than that. >> > > So the libc needs to be compiled with -mno-float as well so that printf and > scanf drop the float handling?
Yes. The configurations that support -mno-float have separate -mno-float multilibs. In a sense, the point of -mno-float instead of -msoft-float is to select these cut-down libraries. >> A more general restriction would be "must pass arguments in the same >> way for both option set A and option set B". That too could be done >> using existing hooks and SWITCHABLE_TARGET, although it might not be >> hyper-efficient. > > I don't know how exactly that would work. You would switch twice for > each function and ask the register used for each function call? Yeah, that's the idea. More generally, run initialize_argument_information once for each ABI and compare the two arg_data arrays. Similarly for function.c. Thanks, Richard