This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Allow -msoft-float -mlong-double-128 without a warning


David Edelsohn wrote:
>>>>>>Mark Mitchell writes:
> 
> 
> Mark> Why not an error?  And, why does it matter whether or not the long
> Mark> double option was explicit?  What about something like:
> 
> 	-msoft-float is overloaded with two meanings and two uses: 1) do
> not use FPRs and 2) provide emulated floating point computations.

If I understand correctly, the first use is what the various
incarnations of -mno-implicit-fp were trying to accomplish.

> 	Next, Glibc wants to build some source files that do not use
> floating point with -msoft-float to avoid use of FPRs.  The files do need
> to have -mlong-double-128 set properly to ensure that any ABI-based
> structures have the correct size and alignment.

So, in an ideal world, it sounds like GLIBC would use -mno-implicit-fp
instead of -msoft-float, here, but, of course, we don't have
-mno-implicit-fp yet, and since we're trying to get this into 4.1, we
can't wait until we do.

> 	The plan is to issue a warning if both options explicitly are
> specified, implying that the user really is trying to use and combine the
> conflicting options, as opposed to inheriting defaults.

I understand the pragmatic argument.

However, a user who happens to have a compiler configured with
-mlong-double-128 by default (like, presumably, a future GNU/Linux
compiler, where that will be the default) and who then wishes to build
soft-float code (in the sense of emulated floating-point) will (a) not
get the warning (because TARGET_LONG_DOUBLE_128 is the default) and (b)
will get code that does not work, because the emulation routines will
not exist or will do the wrong thing.

I'm sympathetic to the fact that we're not issuing an error, in view of
the fact that we don't have -mno-implicit-fp, and, thus issuing an error
would prevent compliation of GLIBC, but why shouldn't we issue a
warning, even when TARGET_LONG_DOUBLE_128 is the default?

Or change GLIBC so that instead of using -msoft-float it uses
-ffixed-fp0 -ffixed-fp1 ... -ffixed-fp31?  I know that's ugly, but it
sounds like a better way of saying what GLIBC means to say.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]