[MIPS] Avoiding FP operations/register usage
Richard Sandiford
rdsandiford@googlemail.com
Sat Feb 15 15:53:00 GMT 2014
Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
>> Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
>> > I'm still interested in how successfully the MIPS backend is managing
>> > to avoid floating point but I am also convinced there are bugs in
>> > ld.so entry points for MIPS.
>>
>> It uses the standard mechanism to avoid it, which is marking uses of FP
>> registers for integer moves, loads and stores with "*". This tells
>> the register
>> allocator to ignore those alternatives. AFAIK it is effective and I think any
>> cases where it doesn't work would be fair bug reports.
>
> I understand that '*' has no effect on whether reload/LRA will use the
> alternative though so I take that to mean they could still allocate FP
> regs as part of an integer move?
No, they shouldn't. Admittedly the mechanism for reload is a bit indirect:
the GPR alternatives have priority and there is no GPR-and-FPR register
class that could be used to sum up separate "d" and "*f" alternatives.
It should be effective though. There too I think any case where it
didn't work would be a bug.
ISTR LRA handles reloads by generating reload pseudos. IMO it should
never do that for a '*' class, since that's tantamount to allocating
a pseudo to that class. I haven't checked whether LRA enforces that
or not though.
Thanks,
Richard
More information about the Gcc
mailing list