From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7852) id 3C0873852742; Mon, 18 Jul 2022 20:58:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C0873852742 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sunil Pandey To: glibc-cvs@sourceware.org Subject: [glibc/release/2.35/master] x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions X-Act-Checkin: glibc X-Git-Author: Noah Goldstein X-Git-Refname: refs/heads/release/2.35/master X-Git-Oldrev: b4744d4414a92b1921ae8af8b2ff125ebd4dc2a6 X-Git-Newrev: e74385736c659915b26c4c85a32e2ebb4806ffa4 Message-Id: <20220718205812.3C0873852742@sourceware.org> Date: Mon, 18 Jul 2022 20:58:12 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2022 20:58:12 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e74385736c659915b26c4c85a32e2ebb4806ffa4 commit e74385736c659915b26c4c85a32e2ebb4806ffa4 Author: Noah Goldstein Date: Fri Jun 3 18:52:37 2022 -0500 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 (cherry picked from commit c28db9cb29a7d6cf3ce08fd8445e6b7dea03f35b) Diff: --- sysdeps/x86_64/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h index 4f512d5566..7f5defa4ec 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