public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] x86-64: Add Avoid_Short_Distance_REP_MOVSB
       [not found]   ` <CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com>
@ 2022-04-28  0:15     ` Sunil Pandey
  0 siblings, 0 replies; only message in thread
From: Sunil Pandey @ 2022-04-28  0:15 UTC (permalink / raw)
  To: Noah Goldstein, libc-stable; +Cc: Alexey Tourbin, GNU C Library

On Fri, Aug 27, 2021 at 7:58 PM Noah Goldstein via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On Fri, Aug 27, 2021 at 8:28 PM Alexey Tourbin via Libc-alpha <
> libc-alpha@sourceware.org> wrote:
>
> > On Mon, Jul 26, 2021 at 3:03 PM H.J. Lu via Libc-alpha
> > <libc-alpha@sourceware.org> wrote:
> > > --- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
> > > +++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
> > > @@ -325,12 +325,16 @@ L(movsb):
> > >         /* Avoid slow backward REP MOVSB.  */
> > >         jb      L(more_8x_vec_backward)
> > >  # if AVOID_SHORT_DISTANCE_REP_MOVSB
> > > +       andl    $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB,
> > __x86_string_control(%rip)
> > > +       jz      3f
> > >         movq    %rdi, %rcx
> > >         subq    %rsi, %rcx
> > >         jmp     2f
> > >  # endif
> > >  1:
> > >  # if AVOID_SHORT_DISTANCE_REP_MOVSB
> > > +       andl    $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB,
> > __x86_string_control(%rip)
> > > +       jz      3f
> > >         movq    %rsi, %rcx
> > >         subq    %rdi, %rcx
> > >  2:
> >
> > Why "andl" rather than "testl"?
> >
>
> +1. I missed that before.
>
> My patches: [PATCH 5/5] X86-64: Optimize memmove-vec-unaligned-erms.S
>
> uses `testl` instead. Although my patch might not be checked in (and it may
> be a
> while) as we are still looking into the causes of the slowdown.

I would like to backport this patch to release branches.
Any comments or objections?

--Sunil

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-28  0:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210726120055.1089971-1-hjl.tools@gmail.com>
     [not found] ` <CA+qzen=Th5h3TyeTPza3whXbeWobY+mHZvBGC=qHWXLtukXCzg@mail.gmail.com>
     [not found]   ` <CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com>
2022-04-28  0:15     ` [PATCH] x86-64: Add Avoid_Short_Distance_REP_MOVSB Sunil Pandey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).