This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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, MIPS] Add support for CPUs with no FPU


Adam Nemet <anemet@caviumnetworks.com> writes:
> Would it work for you if I added a new MIPS_DEFAULT_FP macro to configure
> similar to the other MIPS_DEFAULT_* macros and then define that to soft-float
> or single-float if one configures for an FPUless or single-float CPU target?

Hmm.  Well, another problem is that gcc has the --with-float configure
option, which you can use to change the default for any configuration.
If we try to teach the assembler about the correct default, I suppose we
would need to add the same thing there.  And for consistency, we would
have to duplicate the same logic as config.gcc when deciding what the
"default default" is for each config.  Even then, there's no guarantee
that the user will remember to use the same configure options for both
tools.

Or to approach it from the other direction: I think all a default
-msoft-float does is make the assembler more pedantic.  Is that right?
It doesn't set any .gnu_attributes based on the option, or anything
like that.[*]

If so, it doesn't seem that we gain all that much by making -msoft-float
the default, while we potentially lose by becoming out of sync with gcc.
(In my view of things, gcc should add -msoft-float to the assembler
command line when necessary.  MIPS_ARCH_FLOAT_SPEC would do that,
provided that ASM_SPEC is adjusted to pass down the new options if
configure detects that the assembler supports them.)

Ah well.  It's much simpler if folk do everything (compile, assemble
and link) using the gcc driver, but I suppose not everyone does...
Let's see what Thiemo and Eric think.

Richard

[*] Perhaps we'd want to set .gnu_attributes based on an
    explicit option, but I think for compatibility, it would be a bad
    idea to do it for the default.


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