From: Sunil Pandey via Libc-alpha <libc-alpha@sourceware.org>
To: Noah Goldstein <goldstein.w.n@gmail.com>, libc-stable@sourceware.org
Cc: 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
prev parent reply other threads:[~2022-04-28 0:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 12:00 [PATCH] x86-64: Add Avoid_Short_Distance_REP_MOVSB H.J. Lu via Libc-alpha
2021-07-26 17:20 ` Noah Goldstein via Libc-alpha
2021-07-26 18:50 ` H.J. Lu via Libc-alpha
2021-07-27 2:15 ` Carlos O'Donell via Libc-alpha
2021-07-27 3:11 ` H.J. Lu via Libc-alpha
2021-07-27 4:05 ` Noah Goldstein via Libc-alpha
2021-07-27 16:05 ` [PATCH v2] " H.J. Lu via Libc-alpha
2021-07-27 19:12 ` Noah Goldstein via Libc-alpha
2021-07-27 19:22 ` [PATCH v3] " H.J. Lu via Libc-alpha
2021-07-27 19:50 ` Noah Goldstein via Libc-alpha
2021-07-27 19:55 ` H.J. Lu via Libc-alpha
2021-07-28 15:08 ` H.J. Lu via Libc-alpha
2021-08-28 0:27 ` [PATCH] " Alexey Tourbin via Libc-alpha
2021-08-28 2:57 ` Noah Goldstein via Libc-alpha
2022-04-28 0:15 ` Sunil Pandey via Libc-alpha [this message]
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
List information: https://www.gnu.org/software/libc/involved.html
* 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=libc-alpha@sourceware.org \
--cc=goldstein.w.n@gmail.com \
--cc=libc-stable@sourceware.org \
--cc=skpgkp2@gmail.com \
/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).