This is the mail archive of the gcc@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: [MIPS] Avoiding FP operations/register usage


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 
<https://sourceware.org/ml/libc-alpha/2014-01/msg00673.html>.

-- 
Joseph S. Myers
joseph@codesourcery.com


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