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: Invalid address after reload


Vander Aa Tom wrote:
This fails the "legitimate address" constraint since I'm not allowing a
mem inside another mem.

Sounds like a REG_OK_STRICT bug. GO_IF_LEGITIMATE_ADDRESS should accept a pseudo-reg when !REG_OK_STRICT, and should reject a pseudo-reg when REG_OK_STRICT. In reload, an unallocated pseudo-reg is really a memory reference in disguise. This is typically handled by having two different versions of macros like REG_OK_FOR_BASE_P. GO_IF_LEGITIMATE_ADDRESS then uses these macros for its checks. This is a common mistake in first time ports.


See also strict_memory_address_p in reload.c, and memory_address_p in recog.c.

Jim


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