On Thu, Jan 10, 2013 at 4:36 AM, Simon Atanasyan <[email protected]> wrote: > Author: atanasyan > Date: Thu Jan 10 06:36:19 2013 > New Revision: 172062 > > URL: http://llvm.org/viewvc/llvm-project?rev=172062&view=rev > Log: > [Mips] Pass a combination of +soft-float and -mips16-hard-float flags to > the backend if hard float ABI is selected under -mips16 mode. > > Modified: > cfe/trunk/lib/Driver/Tools.cpp > cfe/trunk/test/Driver/mips-float.c > > Modified: cfe/trunk/lib/Driver/Tools.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=172062&r1=172061&r2=172062&view=diff > ============================================================================== > --- cfe/trunk/lib/Driver/Tools.cpp (original) > +++ cfe/trunk/lib/Driver/Tools.cpp Thu Jan 10 06:36:19 2013 > @@ -958,7 +958,9 @@ > > StringRef FloatABI = getMipsFloatABI(D, Args); > > - if (FloatABI == "soft") { > + bool IsMips16 = Args.getLastArg(options::OPT_mips16) != NULL; > + > + if (FloatABI == "soft" || (FloatABI == "hard" && IsMips16)) { > // Floating point operations and argument passing are soft. > CmdArgs.push_back("-msoft-float"); > CmdArgs.push_back("-mfloat-abi"); > @@ -969,6 +971,11 @@ > // Now it is the only method. > CmdArgs.push_back("-target-feature"); > CmdArgs.push_back("+soft-float"); > + > + if (FloatABI == "hard" && IsMips16) { > + CmdArgs.push_back("-mllvm"); > + CmdArgs.push_back("-mips16-hard-float"); > + } > } > else if (FloatABI == "single") { > // Restrict the use of hardware floating-point
I don't understand this change; -mips16-hard-float isn't soft-float at all. (Normally, I would consider "soft-float" to mean "doesn't use floating-point registers".) Why are we passing the soft-float flag in the first place? -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
