From: Noah Goldstein Date: Fri, 3 Jun 2022 23:52:37 +0000 (-0500) Subject: x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions X-Git-Tag: glibc-2.36~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c28db9cb29a7d6cf3ce08fd8445e6b7dea03f35b;p=thirdparty%2Fglibc.git x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions Give fall-through path to `vzeroupper` and taken-path to `vzeroall`. Generally even on machines with RTM the expectation is the string-library functions will not be called in transactions. Reviewed-by: H.J. Lu --- diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h index 4f512d5566b..7f5defa4ecd 100644 --- a/sysdeps/x86_64/sysdep.h +++ b/sysdeps/x86_64/sysdep.h @@ -99,11 +99,11 @@ lose: \ to avoid RTM abort triggered by VZEROUPPER inside transactionally. */ #define ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST \ xtest; \ - jz 1f; \ - vzeroall; \ + jnz 1f; \ + vzeroupper; \ ret; \ 1: \ - vzeroupper; \ + vzeroall; \ ret /* Can be used to replace vzeroupper that is not directly before a