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


Jeffrey Law <law@redhat.com> writes:

> The problem, ISTM, is that reload assumes that if reg+reg addressing
> is valid for QImode (per the double_reg_address_ok computation) then
> reg+reg addressing must be valid for all modes which is clearly 
> incorrect for coldfire (as well as the PA).    If we twiddle reload
> to made double_reg_address_ok be mode dependent, then instead of
> reloading the displacement into a register and creating a bogus 
> addressing mode, we'll instead reload the entire sum into a register
> and use register indirect which is clearly valid.  Note you'll still
> get full use of indexed addressing in cases where your G_I_L_A 
> allows it.

The thing I think is odd about this approach is that as far as I know
reg+reg addressing is not actually mode dependent; it's dependent on
the register class which is the destination of the load.  We are using
the mode as a proxy for that.  In principle we can do better.

> I haven't really tested the attached patch except to verify that 
> the provided testcase no longer aborts and that the reloads we
> generate for the problem insn look correct.  However, I feel its a
> much more correct solution than what you're trying to do.

I think you forgot to attach the patch.

Ian


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