From: "H.J. Lu" <hjl.tools@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
"Carlos O'Donell" <carlos@systemhalted.org>
Subject: Re: [PATCH v2] x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)
Date: Mon, 7 Feb 2022 11:49:08 -0800 [thread overview]
Message-ID: <CAMe9rOo0UQ8U6cvYE1YvSU3x0AimW4oQkX+fVjh4MQ_v_FVkYQ@mail.gmail.com> (raw)
In-Reply-To: <20220207193906.2111349-1-goldstein.w.n@gmail.com>
On Mon, Feb 7, 2022 at 11:39 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> commit b62ace2740a106222e124cc86956448fa07abf4d
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date: Sun Feb 6 00:54:18 2022 -0600
>
> x86: Improve vec generation in memset-vec-unaligned-erms.S
>
> Revert usage of 'pshufb' in broadcast logic as it is an SSSE3
> instruction and memset.S is restricted to only SSE2 instructions.
> ---
> sysdeps/x86_64/memset.S | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
> index ccf036be53..3f0517bbfc 100644
> --- a/sysdeps/x86_64/memset.S
> +++ b/sysdeps/x86_64/memset.S
> @@ -30,9 +30,10 @@
>
> # define MEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
> movd d, %xmm0; \
> - pxor %xmm1, %xmm1; \
> - pshufb %xmm1, %xmm0; \
> - movq r, %rax
> + movq r, %rax; \
> + punpcklbw %xmm0, %xmm0; \
> + punpcklwd %xmm0, %xmm0; \
> + pshufd $0, %xmm0, %xmm0
>
> # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
> movd d, %xmm0; \
> --
> 2.25.1
>
LGTM.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
--
H.J.
next prev parent reply other threads:[~2022-02-07 19:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 6:38 [PATCH v1] x86: Remove SSE3 " Noah Goldstein
2022-02-07 12:54 ` H.J. Lu
2022-02-07 14:32 ` H.J. Lu
2022-02-07 19:40 ` Noah Goldstein
2022-02-07 19:39 ` [PATCH v2] x86: Remove SSSE3 " Noah Goldstein
2022-02-07 19:49 ` H.J. Lu [this message]
2022-02-07 20:56 ` Noah Goldstein
2022-05-04 5:48 ` Sunil Pandey
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=CAMe9rOo0UQ8U6cvYE1YvSU3x0AimW4oQkX+fVjh4MQ_v_FVkYQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=carlos@systemhalted.org \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@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).