]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86-64: Optimize bzero
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 7 Feb 2022 13:55:15 +0000 (05:55 -0800)
committerSunil K Pandey <skpgkp2@gmail.com>
Thu, 5 May 2022 16:33:50 +0000 (09:33 -0700)
commit2381bb056f89d2dfd43b03c53505bc0aa89e76a6
tree6dda271db2e949617971fcfd379416647582d2b4
parentf5e0ea6c0dbfd0761a5ce5d6c2226bdd45835c66
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>
(cherry picked from commit 3d9f171bfb5325bd5f427e9fc386453358c6e840)
sysdeps/x86_64/memset.S
sysdeps/x86_64/multiarch/Makefile
sysdeps/x86_64/multiarch/bzero.c [new file with mode: 0644]
sysdeps/x86_64/multiarch/ifunc-impl-list.c
sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S
sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S
sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S
sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S
sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S