From: Sunil Pandey <skpgkp2@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>, libc-stable@sourceware.org
Cc: Alexey Tourbin <alexey.tourbin@gmail.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] x86-64: Add Avoid_Short_Distance_REP_MOVSB
Date: Wed, 27 Apr 2022 17:15:03 -0700 [thread overview]
Message-ID: <CAMAf5_fcarMsXrH5SNqEz3syJdF1GBYRqm9arZTS_7y55qyPsw@mail.gmail.com> (raw)
In-Reply-To: <CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com>
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
parent reply other threads:[~2022-04-28 0:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMAf5_fcarMsXrH5SNqEz3syJdF1GBYRqm9arZTS_7y55qyPsw@mail.gmail.com \
--to=skpgkp2@gmail.com \
--cc=alexey.tourbin@gmail.com \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-stable@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).