[PATCH v6 1/4] powerpc/64: Align bytes before fall back to .Lshort in powerpc64 memcmp()

Simon Guo wei.guo.simon at gmail.com
Wed May 30 19:02:17 AEST 2018


On Wed, May 30, 2018 at 03:27:39AM -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, May 30, 2018 at 04:11:50PM +0800, Simon Guo wrote:
> > On Mon, May 28, 2018 at 05:35:12AM -0500, Segher Boessenkool wrote:
> > > On Fri, May 25, 2018 at 12:07:33PM +0800, wei.guo.simon at gmail.com wrote:
> > > If this doesn't use cr0 anymore, you can do  rlwinm r6,r6,0,7  instead of
> > > andi r6,r6,7 .
> > > 
> > CR0 is used at .Lno_short handling.
> 
> Tricky.
> 
> > > > +	subfc.	r5,r6,r5
> > > 
> > > Why subfc?  You don't use the carry.
> > OK. I will use subfc instead.
> 
> I meant subf -- no carry.  If you want CR0 set there is subf. just fine.
> 
> > > > +	bgt	cr0,8f
> > > > +	li	r3,-1
> > > > +8:
> > > > +	blr
> > > 
> > >   blelr
> > >   li r3,-1
> > >   blr
> > Sure. That looks more impact.
> 
> Should have been bgtlr of course -- well check please :-)
Yes :)

Thanks,
- Simon


More information about the Linuxppc-dev mailing list