Stelian Pop wrote:
        #define PREFERRED_RELOAD_CLASS(X, CLASS)        \
          ((CONSTANT_P(X)) ? EIGHT_REGS :               \
           (MEM_P(X)) ? EVEN_REGS : CLASS)

        #define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS) \
          ((CONSTANT_P(X)) ? EIGHT_REGS :               \
           (MEM_P(X)) ? EVEN_REGS : CLASS)

I think most of your trouble is here. Suppose we are trying to reload a constant into an even-reg. We call PREFERRED_RELOAD_CLASS, which says to use eight_regs instead, and you get a fatal_insn error because you didn't get the even-reg that the instruction needed.

PREFERRED_RELOAD_CLASS must always return a class that is a strict subset of the class that was passed in.

So define another register class which is the intersection of eight regs and even regs, and when we call PREFERRED_RELOAD_CLASS with a constant and even regs, then return the eight/even intersection class.

Likewise in all of the other cases you are trying to handle.

Fix this problem, and you probably don't need most of the other changes you have made recently.

Jim

Reply via email to