This is the mail archive of the gcc-patches@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: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro


On Wed, 2007-02-14 at 17:31 +0000, Richard Sandiford wrote:
> > modes.
> 
> Well, I agree making double_reg_address_ok an array of booleans
> make sense in principle.  However, I think we first need to make
> INDEX_REG_CLASS and BASE_REG_CLASS agree with G_I_L_A.  (INDEX_REG_CLASS
> is supposed to be NO_REGS if indexing isn't supported.)
But the issue here isn't that some index registers are valid in some
cases and not in others.  The issue is that indexing as a whole is valid
in some cases and not others.  


> 
> Once you do that, there is no current need to make double_reg_address_ok
> an array of booleans, and doing so would just make the compiler slightly
> slower.  So although I agree we should it if some other port needs it
> (i.e. if some other port allows disp(base,index) addresses for some
> modes and allows only plain (base,index) address for others), I don't
> think we should otherwise.
But I strongly feel that "fixing" INDEX_REG_CLASS is just papering over
the bogus double_reg_address_ok bits.    I really wish I had pushed on
getting double_reg_address_ok fixed eons ago, but it was a different
time and a different development environment.

If we look at the MODE_BASE_blah macros they were introduced to deal
with different problems. 

For the thumb the set of valid base registers differs based on the mode
of the memory reference.  Note that indexing is still valid, only the
set of valid base registers changes.

For the blackfin the set of valid registers changes based on the type
of memory reference as well (reg+d vs autoinc).

The coldfire issue is completely and totally different.  For the
coldfire the set of valid index registers does not change.  ie,
every mode that allows indexing allows the same set of index
registers.  But you're trying to use that hook to deal with your
coldfire issues (where indexing is simply not allowed in some modes).

More shortly...

Jeff


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