[MIPS] Avoiding FP operations/register usage

Joseph S. Myers joseph@codesourcery.com
Fri Feb 7 17:39:00 GMT 2014

On Fri, 7 Feb 2014, Matthew Fortune wrote:

> My most recent reason for looking at this is because I am starting to 
> understand/look at mips ld.so from glibc and it appears to make such an 
> assumption. I.e. I cannot see it using any specific options to prevent 
> the use of floating point but the path into the dynamic linker for 
> resolving symbols only preserves integer argument registers and ignores 
> floating point. I have to therefore assume that the MIPS backend manages 
> to avoid what I thought was a common problem of using floating point 
> registers as integer scratch in extreme circumstances.

Even if you avoid use of floating point (via -ffixed-* options - check 
carefully that those are actually effective, as for some targets there are 
or have been initialization order issues for registers that are only 
conditionally available, that may make such options ineffective - not 
-msoft-float, as that would mark the objects ABI-incompatible), you'd 
still need to save and restore call-clobbered registers used for argument 
passing, because IFUNC resolvers, audit modules and user implementations 
of malloc might clobber them.  Thus, I think ld.so needs to save and 
restore those registers (and so there isn't much point making it avoid 
floating point).  See 

Joseph S. Myers

More information about the Gcc mailing list