]> git.ipfire.org Git - thirdparty/glibc.git/commit - sysdeps/x86/Makefile
x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]
authorNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 15 Feb 2022 14:18:15 +0000 (08:18 -0600)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Thu, 17 Feb 2022 21:43:05 +0000 (15:43 -0600)
commitc6272098323153db373f2986c67786ea8c85f1cf
treef0285e4cd04dfd97b6faaf4601034b7d37560bef
parentaa5a720056d37cf24924c138a3dbe6dace98e97c
x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]

In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
call strcmp-avx2 and wcscmp-avx2 respectively. This would have
not checks around vzeroupper and would trigger spurious
aborts. This commit fixes that.

test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
AVX2 machines with and without RTM.

Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/x86/Makefile
sysdeps/x86/tst-strncmp-rtm.c
sysdeps/x86_64/multiarch/strcmp-avx2.S
sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S
sysdeps/x86_64/multiarch/strncmp-avx2.S
sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S
sysdeps/x86_64/multiarch/wcsncmp-avx2.S