This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [fix] for: ra-colorize.c:1068: `inv_reg_alloc_order' undeclared


Hi,

On Wed, 24 Jul 2002, John David Anglin wrote:

> > +/* I don't want to clutter up the actual code with ifdef's.  */
> > +#ifdef REG_ALLOC_ORDER
> > +#define inv_reg_alloc_order(c) inv_reg_alloc_order[c]
> > +#else
> > +#define inv_reg_alloc_order(c) c
>
> Should the above be
>
> #define inv_reg_alloc_order(c) FIRST_PSEUDO_REGISTER - 1 - (c)
>
> to obtain the inverse of lowest to highest ordering?

No, it's not inverse ordering, but inverse mapping, so that
inv_order[order[i]] == i.  As this platform doesn't define REG_ALLOC_ORDER
it makes sense to begin allocating from the beginning, i.e. order[i]==i.
Ergo we have inv_order[order[i]] == inv_order[i] == i ;-)


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]