Richard Sandiford - Re: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

Jeffrey Law law@redhat.com writes:

On Tue, 2007-02-27 at 19:12 +0000, Richard Sandiford wrote:

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.

And you haven't addressed that point. Do you disagree that INDEX_REG_CLASS is supposed to be NO_REGS if no index regs are allowed? The validity of indexing is mode dependent on your target. For every mode that allows indexed addressing the set of valid index registers is the same.

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 honestly don't understand why you think my patch is unreasonable. Because it's not fixing the problem, it's papering over the problem.

I disagree. BASE_REG_CLASS is a guarantee from the backend that any register in that class is a valid base register. Reload relies on that fact. Why should INDEX_REG_CLASS by any different?

Richard


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