From a3ef8a0c3d81ac9e480512137d4eb880cb875a6a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Tue, 15 Feb 2022 08:18:15 -0600 Subject: 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 (cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf) --- sysdeps/x86_64/multiarch/strncmp-avx2.S | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/x86_64/multiarch/strncmp-avx2.S') diff --git a/sysdeps/x86_64/multiarch/strncmp-avx2.S b/sysdeps/x86_64/multiarch/strncmp-avx2.S index 1678bcc..f138e9f 100644 --- a/sysdeps/x86_64/multiarch/strncmp-avx2.S +++ b/sysdeps/x86_64/multiarch/strncmp-avx2.S @@ -1,3 +1,4 @@ #define STRCMP __strncmp_avx2 #define USE_AS_STRNCMP 1 +#define OVERFLOW_STRCMP __strcmp_avx2 #include "strcmp-avx2.S" -- cgit v1.1