On 12-10-25 4:21 PM, Richard Sandiford wrote:
Vladimir Makarov <vmaka...@redhat.com> writes:
On 10/25/2012 05:18 AM, Richard Sandiford wrote:
Hi Vlad,
When testing other patches, I was misled by:
/* Addresses were legitimate before LRA. So if the address has
two registers than it can have two of them. We should also
not worry about scale for the same reason. */
which I took to mean that process_address only handles pre-LRA addresses.
I see now that it actually has to handle addresses created within LRA too,
some of which might never have been valid. That also explains why we have
to handle invalid addresses that have no base or index, just a displacement.
Here's an attempt to enumerate the cases. Does it look OK?
Tested on x86_64-linux-gnu.
It is a good start. We definitely need to have a better understanding
GCC addresses therefore good comments are important. It is ok for me to
commit. Thanks for working on this. You make my life easier.
But I guess it does not describe all cases, e.g. displacement was valid
but after updating offsets for eliminated regs (because stack slots were
allocated) it became invalid.
Ah, yeah, thanks. How about this instead?
This is good. Thanks, Richard. This is ok to commit.