public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.33/master] x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)
Date: Thu,  5 May 2022 17:26:02 +0000 (GMT)	[thread overview]
Message-ID: <20220505172602.E087A3858002@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f5e0ea6c0dbfd0761a5ce5d6c2226bdd45835c66

commit f5e0ea6c0dbfd0761a5ce5d6c2226bdd45835c66
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Mon Feb 7 00:32:23 2022 -0600

    x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)
    
    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.
    
    (cherry picked from commit 1b0c60f95bbe2eded80b2bb5be75c0e45b11cde1)

Diff:
---
 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 34ee0bfdcb..954471e5a5 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; \


                 reply	other threads:[~2022-05-05 17:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220505172602.E087A3858002@sourceware.org \
    --to=skpgkp2@sourceware.org \
    --cc=glibc-cvs@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).