This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [MIPS] Avoiding FP operations/register usage
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 7 Feb 2014 17:39:12 +0000
- Subject: Re: [MIPS] Avoiding FP operations/register usage
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235349A3EA at LEMAIL01 dot le dot imgtec dot org>
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