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: gcc-3.3 problem with reloading byte into address register onColdFire


Peter Barada wrote:
I've stumbled across a problem with reload trying to load a byte into
an address register, something legal on m68k, but illegal on ColdFire:

There is nothing in LIMIT_RELOAD_CLASS or PREFERRED_RELOAD_CLASS to handle this. Note that both of them handle the case where CLASS != ADDR_REGS. I.e., if we don't have ADDR_REGS, then we force it into DATA_REGS because we know both DATA_REGS is OK. And if it is ADDR_REGS then we leave it alone because we know ADDR_REGS is OK. It looks like the 5200 specific movqi pattern is bogus.


I'd wonder if the problem is BASE_REG_CLASS which is ADDR_REGS. There is MODE_BASE_REG_CLASS which lets you define one which is mode specific.

Otherwise, maybe you need to define CANNOT_CHANGE_MODE_CLASS to prevent reload from changing an ADDR_REGS/SImode reference to a ADDR_REGS/QImode reference when TARGET_5200.

Jim


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