|
|
513694 |
From 4412c21a9027bbe6546b2a329a741d26c2477136 Mon Sep 17 00:00:00 2001
|
|
|
513694 |
From: Noah Goldstein <goldstein.w.n@gmail.com>
|
|
|
513694 |
Date: Mon, 7 Feb 2022 00:32:23 -0600
|
|
|
513694 |
Subject: [PATCH] x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2
|
|
|
513694 |
Only)
|
|
|
513694 |
|
|
|
513694 |
commit b62ace2740a106222e124cc86956448fa07abf4d
|
|
|
513694 |
Author: Noah Goldstein <goldstein.w.n@gmail.com>
|
|
|
513694 |
Date: Sun Feb 6 00:54:18 2022 -0600
|
|
|
513694 |
|
|
|
513694 |
x86: Improve vec generation in memset-vec-unaligned-erms.S
|
|
|
513694 |
|
|
|
513694 |
Revert usage of 'pshufb' in broadcast logic as it is an SSSE3
|
|
|
513694 |
instruction and memset.S is restricted to only SSE2 instructions.
|
|
|
513694 |
|
|
|
513694 |
(cherry picked from commit 1b0c60f95bbe2eded80b2bb5be75c0e45b11cde1)
|
|
|
513694 |
---
|
|
|
513694 |
sysdeps/x86_64/memset.S | 7 ++++---
|
|
|
513694 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
513694 |
|
|
|
513694 |
diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
|
|
|
513694 |
index 27debd2b..4cb4aa71 100644
|
|
|
513694 |
--- a/sysdeps/x86_64/memset.S
|
|
|
513694 |
+++ b/sysdeps/x86_64/memset.S
|
|
|
513694 |
@@ -30,9 +30,10 @@
|
|
|
513694 |
|
|
|
513694 |
# define MEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
|
|
|
513694 |
movd d, %xmm0; \
|
|
|
513694 |
- pxor %xmm1, %xmm1; \
|
|
|
513694 |
- pshufb %xmm1, %xmm0; \
|
|
|
513694 |
- movq r, %rax
|
|
|
513694 |
+ movq r, %rax; \
|
|
|
513694 |
+ punpcklbw %xmm0, %xmm0; \
|
|
|
513694 |
+ punpcklwd %xmm0, %xmm0; \
|
|
|
513694 |
+ pshufd $0, %xmm0, %xmm0
|
|
|
513694 |
|
|
|
513694 |
# define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
|
|
|
513694 |
movd d, %xmm0; \
|
|
|
513694 |
--
|
|
|
513694 |
GitLab
|
|
|
513694 |
|