This is the mail archive of the
mailing list for the GCC project.
Re: added_clobbers_hard_reg_p and FLAGS_REGNUM
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: "Paulo J. Matos" <paulo at matos-sorge dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 11 Oct 2011 10:41:02 +0100
- Subject: Re: added_clobbers_hard_reg_p and FLAGS_REGNUM
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
"Paulo J. Matos" <firstname.lastname@example.org> 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.