This is the mail archive of the 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: Extending constraints using register subclasses

Jamie Prescott wrote:
enum reg_class
        NO_REGS = 0,
        R0_REG, R1_REG, R2_REG, R3_REG,

The only obvious thing I notice is that you have the largest classes first. The docs say to put the smaller classes first. The compiler always assumes that if a register matches more than one class, then the class with the lowest number is the smallest one (most specific one). This matters when looking for the smallest matching class.

In tm.texi, REGISTER CLASSES, it says
Order the classes so that if class @var{x} is contained in class @var{y}
then @var{x} has a lower class number than @var{y}.

Otherwise, you should try to debug this a little. The place in reload1.c where the error message is printed isn't hard to find. Put a break point before the constrain_operands call. Check to see if the instruction was reloaded correctly, or if constrain_operands is failing. If the failure is in constrain_operands, then it shouldn't be too hard to find the problem. If the insn rtl is wrong, then this will take some work to figure out where it went wrong.


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