This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] MIPS: Add a GNU attribute for -mips32 -mfp64 objects
On Thu, 15 Nov 2007, Thiemo Seufer wrote:
> The -mfp64 is passed, but it is AFAICS unlikely to generate invalid
> tagging: Presumably the reason to use the compiler's -mfp64 option is
> to generate 64-bit FP code, which isn't compatible to the other variants
> as soon as e.g. a mfhc1 instruction is used.
This tagging in the assembler would need of course to be conditioned on
generating O32 code, since as I understand it -mfp64 only selects a novel
ABI variant for O32, N32 and N64 are covered by the normal hard-float ABI
> The idea is to pass the relevent options to the assembler (at least for
> .s/.S source files, for compiler generated files it would be redundant).
Indeed - for compiler generated files, if you need to modify the compiler
to pass down the option, you may as well modify it to set the attribute
> A hard-float object which happens not to use floating point at all wouldn't
> be link compatible any more, this is the same effect which was evidently
> regarded as acceptable in newer GCC compilers.
Acceptable but not ideal; we'd hope in future to make GCC detect whether
the particular source file is or is not affected, and then set the
attribute saying it's unaffected if it's unaffected. I suppose unaffected
assembler files can always explicitly set the attribute to say so.
Joseph S. Myers