public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.35/master] x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions
Date: Mon, 18 Jul 2022 20:58:12 +0000 (GMT)	[thread overview]
Message-ID: <20220718205812.3C0873852742@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e74385736c659915b26c4c85a32e2ebb4806ffa4

commit e74385736c659915b26c4c85a32e2ebb4806ffa4
Author: Noah Goldstein <goldstein.w.n@gmail.com>
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 <hjl.tools@gmail.com>
    
    (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


                 reply	other threads:[~2022-07-18 20:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220718205812.3C0873852742@sourceware.org \
    --to=skpgkp2@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).