This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: passing information to back-end from source code?
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: passing information to back-end from source code?
- From: Michael Poole <poole at troilus dot org>
- Date: 15 Aug 2000 15:06:32 -0400
- Cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, gcc at gcc dot gnu dot org
- References: <200008151735.NAA21592@mal-ach.watson.ibm.com>
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