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]

Re: passing information to back-end from source code?


Yes, FIRST_PSEUDO_REGISTER is one greater than this register's number
(which is the highest of all hard registers).  I listed a new
reg_class for R33 between NO_REGS and ALL_REGS (all other registers
can hold the same values, so I haven't needed any other classes), put
a name for the new class in REG_CLASS_NAMES, added an initializer in
REG_CLASS_CONTENTS for the new class that was set for only register
33, and added logic to REGNO_REG_CLASS to discriminate between R33
and the other hard regs.

The only reload macro I had defined before was
#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS

This looks like it could be part of the problem -- X is (reg/v:QI 33)
and CLASS is ALL_REGS, and so reload would (I think) want to put
reloads into an ALL_REGS register rather than reg 33's special class.
However, changing it to return that class when X was reg 33 does not
seem to help -- it still does a reload through a register.

On the other hand, if I do make R33 part of ALL_REGS, things look
workable.  The only place it is used is in loads of 0/1 into it,
and although those look like they matched the movqi pattern, I can
check there for the state I need to.

Many thanks to you both for helping me figure this out.

Michael

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