From: Noah Goldstein via Libc-alpha <libc-alpha@sourceware.org>
To: Alexey Tourbin <alexey.tourbin@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] x86-64: Add Avoid_Short_Distance_REP_MOVSB
Date: Fri, 27 Aug 2021 22:57:30 -0400 [thread overview]
Message-ID: <CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com> (raw)
In-Reply-To: <CA+qzen=Th5h3TyeTPza3whXbeWobY+mHZvBGC=qHWXLtukXCzg@mail.gmail.com>
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.
next prev parent reply other threads:[~2021-08-28 2:58 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 [this message]
2022-04-28 0:15 ` Sunil Pandey via Libc-alpha
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='CAFUsyfL-xLHMYw_4qHCsJJRL75Y7UKZ7Tx+Mhf4KoxKQ=XzYAg@mail.gmail.com' \
--to=libc-alpha@sourceware.org \
--cc=alexey.tourbin@gmail.com \
--cc=goldstein.w.n@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).