public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] x86_64: Fix asm constraints in feraiseexcept (bug 30305) Date: Mon, 24 Apr 2023 14:17:47 +0000 (GMT) [thread overview] Message-ID: <20230424141747.71E64385840C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=71eb9cc1ffd79e96549dfb16f8e86aaf88a3bac8 commit 71eb9cc1ffd79e96549dfb16f8e86aaf88a3bac8 Author: Florian Weimer <fweimer@redhat.com> Date: Mon Apr 3 17:23:11 2023 +0200 x86_64: Fix asm constraints in feraiseexcept (bug 30305) The divss instruction clobbers its first argument, and the constraints need to reflect that. Fortunately, with GCC 12, generated code does not actually change, so there is no externally visible bug. Suggested-by: Jakub Jelinek <jakub@redhat.com> Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> (cherry picked from commit 5d1ccdda7b0c625751661d50977f3dfbc73f8eae) Diff: --- NEWS | 1 + sysdeps/x86_64/fpu/fraiseexcpt.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 41e0685ca7..545ede4f55 100644 --- a/NEWS +++ b/NEWS @@ -140,6 +140,7 @@ The following bugs are resolved with this release: [29953] x86: Check minimum/maximum of non_temporal_threshold [30053] time: strftime %s returns -1 after 2038 on 32 bits systems [30151] gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling + [30305] x86_64: Fix asm constraints in feraiseexcept \f Version 2.34 diff --git a/sysdeps/x86_64/fpu/fraiseexcpt.c b/sysdeps/x86_64/fpu/fraiseexcpt.c index 44a1d93b34..a301b657c4 100644 --- a/sysdeps/x86_64/fpu/fraiseexcpt.c +++ b/sysdeps/x86_64/fpu/fraiseexcpt.c @@ -33,7 +33,7 @@ __feraiseexcept (int excepts) /* One example of an invalid operation is 0.0 / 0.0. */ float f = 0.0; - __asm__ __volatile__ ("divss %0, %0 " : : "x" (f)); + __asm__ __volatile__ ("divss %0, %0 " : "+x" (f)); (void) &f; } @@ -43,7 +43,7 @@ __feraiseexcept (int excepts) float f = 1.0; float g = 0.0; - __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g)); + __asm__ __volatile__ ("divss %1, %0" : "+x" (f) : "x" (g)); (void) &f; }
reply other threads:[~2023-04-24 14:17 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=20230424141747.71E64385840C@sourceware.org \ --to=fw@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: linkBe 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).