added_clobbers_hard_reg_p and FLAGS_REGNUM

Richard Sandiford richard.sandiford@linaro.org
Tue Oct 11 13:09:00 GMT 2011


"Paulo J. Matos" <paulo@matos-sorge.com> writes:
> On 26/09/11 17:23, Ian Lance Taylor wrote:
>>
>> The function added_clobbers_hard_reg_p is a generated function.  So
>> another approach would be some sort of attribute which directs the
>> generator (genemit) to ignore certain hard registers.
>>
>
> This definitely sounds like the best approach for my specific case. I 
> understand that for such a change to be integrated in GCC there might be 
> other implications due to the vast number of different backends 
> supported by GCC.

I don't understand why FLAGS_REGNUM is special.  I'm not sure which port
you're working on, but presumably the point of modelling FLAGS_REGNUM is
that it can be live across instructions.  The problem described by the
comment you quote then applies: we can't know (because the caller isn't
guaranteed to have checked) that FLAGS_REGNUM isn't already live.

Richard



More information about the Gcc mailing list