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]

HARD_REGNO_MODE_OK vs the register allocator

[ Subject line changed in hopes of piquing new-ra folk's interest.  ]

On Wed, Apr 30, 2003 at 05:23:28PM -0700, Geoff Keating wrote:
> > How about this one?  This should stop everyone from putting an SI in
> > $r7.  Too bad we can't check both operands for this, as it stops us
> > from doing reg-reg moves to/from $r7/$r8 also.
> I really think it would be better to fix reload than to keep trying to
> work around this in the port.

Lemme get this straight:  You *could* have an SImode value in $r7/$r8
if the constraint were GENERAL_REGS, but not if it were EIGHT_REGS?

If so, I agree with Geoff that the register allocator should be 
handling this.  It's kind of an edge condition though -- we've said
elsewhere that it's wrong for HARD_REGNO_MODE_OK to return true for
a double-word value in the last register of the physical reg set.

We should make up our mind.  Either it's the allocator's job to test
that there are indeed HARD_REGNO_NREGS remaining in the chosen class,
or HARD_REGNO_MODE_OK should instead also take the class it's supposed
to be testing against.

Personally I prefer the former.


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