This is the mail archive of the
mailing list for the binutils project.
RE: [PATCH][MIPS] Optionally disable odd-numbered single-precision registers
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "macro at codesourcery dot com" <macro at codesourcery dot com>, "Joseph Myers (joseph at codesourcery dot com)" <joseph at codesourcery dot com>, Rich Fuhler <Rich dot Fuhler at imgtec dot com>, "qiuji at loongson dot cn" <qiuji at loongson dot cn>
- Date: Tue, 3 Jun 2014 21:02:03 +0000
- Subject: RE: [PATCH][MIPS] Optionally disable odd-numbered single-precision registers
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235353AE75 at LEMAIL01 dot le dot imgtec dot org> <877g5af45u dot fsf at talisman dot default> <6D39441BF12EF246A7ABCE6654B02353540CE4 at LEMAIL01 dot le dot imgtec dot org> <877g4x6cz6 dot fsf at talisman dot default> <6D39441BF12EF246A7ABCE6654B02353547C7E at LEMAIL01 dot le dot imgtec dot org> <87tx814tme dot fsf at talisman dot default>
Richard Sandiford <email@example.com> writes:
> Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> > Richard Sandiford <firstname.lastname@example.org> writes:
> >> Is that right? If so, I agree that would work as far as the diagnostics
> >> But would it be useful to keep track of which objects are -moddspreg and
> >> which aren't, especially if we're using -mfpxx with both? E.g. maybe we
> >> could use one of the flags1 bits in the abiflags structure. If we did
> >> then I imagine we'd want to know which -moddspreg setting was "really"
> >> in use.
> > I did think about this and I suspect the only reason I did not do it in
> > end was actually laziness so I think I should add a flag. The overall
> > effect of the flag should record if all modules only use 16 registers so
> > flag would have to be 'nooddspreg' and be AND (rather than OR as flags1 is
> > defined) so would need to go in flags2.
> I was thinking of it the other way around: set the flag if the odd registers
> might be used and OR the input flags. I think that fits the scheme better,
> with the bit saying whether a particular architecture feature
> (independent odd-numbered registers) is used.
OK. It was the assumption we make about existing objects that concerned me
however if this is introduced with the initial .MIPS.abiflags then we have
the opportunity to infer the flag as being true.
> Whether we assume 0 or 1 for old objects is kind-of a separate question.
> I suppose there are arguments both ways...
I'd try to make the most pessimistic assumption. For 32-bit FP ABIs then the
oddspreg would be true for isa_rev>=1 (as determined by the EF_MIPS_MACH/ARCH).