On Thu, Dec 19, 2019 at 04:08:39PM -0800, Ian Lance Taylor wrote:
> On Wed, Dec 18, 2019 at 7:58 AM Segher Boessenkool
> <seg...@kernel.crashing.org> wrote:
> >
> > On Sun, Dec 15, 2019 at 09:43:20AM -0800, Ian Lance Taylor wrote:
> > > On Sat, Dec 14, 2019 at 11:25 PM Segher Boessenkool
> > > <seg...@kernel.crashing.org> wrote:
> > > >
> > > > On Sat, Dec 14, 2019 at 10:51:50AM -0800, Ian Lance Taylor via gcc 
> > > > wrote:
> > > I should note that I don't really understand what purpose that
> > > constant is serving anyhow.
> >
> > It's the (old, changed months ago!) register number for CR7.  This code
> > creates the bitfield that says which CR fields to save or restore.
> 
> That much I got, but the bitfield doesn't seem to actually be used for
> anything.  It seems to be created and matched but not used.  Unless I
> missed something.  The constant doesn't seem to add anything we don't
> already know from the register number.

Ah okay, in that sense.  In *movsi_to_cr any combination of bits can be
set.  We still could derive the mask from the rtl vector every time it
is used, of course.

We use the mtocrf insn most of the time these days.  ("o" means "one",
exactly one of the eight bits is set, it works on just one cr field).
If we had a different unspec for that (which is probably a good idea
anyway, thanks for that :-) ) we could easily do as you suggest.

> > Anyway, should be fixed now.  If you can confirm, please do :-)
> 
> Confirmed.  Thanks.

Cheers!


Segher

Reply via email to