]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Replace sse2 instructions with avx in memcmp-evex-movbe.S
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sat, 23 Oct 2021 05:26:47 +0000 (01:26 -0400)
committerSunil K Pandey <skpgkp2@gmail.com>
Mon, 2 May 2022 20:01:14 +0000 (13:01 -0700)
commit4df7e006ecc4a64a3af81b4ed7361124ec4a097f
tree953a62750b5aa2cd01f7e0e4bd128625dea0a5ae
parenta4e41f7253a9ad8a60016a2b8362ed261eb1d447
x86: Replace sse2 instructions with avx in memcmp-evex-movbe.S

This commit replaces two usages of SSE2 'movups' with AVX 'vmovdqu'.

it could potentially be dangerous to use SSE2 if this function is ever
called without using 'vzeroupper' beforehand. While compilers appear
to use 'vzeroupper' before function calls if AVX2 has been used, using
SSE2 here is more brittle. Since it is not absolutely necessary it
should be avoided.

It costs 2-extra bytes but the extra bytes should only eat into
alignment padding.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit bad852b61b79503fcb3c5fc379c70f768df3e1fb)
sysdeps/x86_64/multiarch/memcmp-evex-movbe.S