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: condition codes, haifa-sched and virtual-stack-vars

Geoff Keating wrote:

> Ulrich Weigand <> writes:
> > The problem is that reload simply calls gen_add2_insn whenever it
> > feels like it, without consideration that this might introduce
> > a CC clobber at an inappropriate point ...
> On xstormy16, this problem existed with the carry register.  I believe
> it was fixed by having a reload_inhi pattern and an appropriate
> definition of SECONDARY_RELOAD_CLASS.  The result appears to work.

This is interesting, but I'm not sure I understand *why* it works ;-)

The reload_inhi pattern tries to allocate the carry register as the
secondary reload scratch register.  Now, in the interesting case 
where the carry register is in fact live at the location where the
insn is inserted, this would mean that reload would need to spill
the carry register and later on restore its old value, right?
(Because there is only a single register in this class ...)

However, I'm not sure how the carry register can be spilled,
given that there is no mov* insn that touches it, unless I'm
missing something ...


  Dr. Ulrich Weigand

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