about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2022-02-07 05:55:15 -0800
committerH.J. Lu <hjl.tools@gmail.com>2022-02-08 15:58:56 -0800
commit3d9f171bfb5325bd5f427e9fc386453358c6e840 (patch)
tree5caeddafa6cb494bbe102c34f7f2ee630f5d83cf /sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
parentdc98eeeb952f59bdbd51da0409e732756fe30170 (diff)
downloadglibc-3d9f171bfb5325bd5f427e9fc386453358c6e840.tar.gz
glibc-3d9f171bfb5325bd5f427e9fc386453358c6e840.tar.xz
glibc-3d9f171bfb5325bd5f427e9fc386453358c6e840.zip
x86-64: Optimize bzero
memset with zero as the value to set is by far the majority value (99%+
for Python3 and GCC).

bzero can be slightly more optimized for this case by using a zero-idiom
xor for broadcasting the set value to a register (vector or GPR).

Co-developed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S')
-rw-r--r--sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
index 8a6f0c561a..329c58ee46 100644
--- a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
@@ -22,6 +22,7 @@
 
 #if IS_IN (libc)
 # define MEMSET_SYMBOL(p,s)	p##_sse2_##s
+# define BZERO_SYMBOL(p,s)	MEMSET_SYMBOL (p, s)
 # define WMEMSET_SYMBOL(p,s)	p##_sse2_##s
 
 # ifdef SHARED