public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] AArch64: Reset HWCAP2_AFP bits in FPCR for default fenv
Date: Tue,  5 Jul 2022 13:02:44 +0000 (GMT)	[thread overview]
Message-ID: <20220705130244.277FF3858292@sourceware.org> (raw)

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

commit 05844d18f7893bf96965f163c428214fd5ebe10a
Author: Tejas Belagod <Tejas.Belagod@arm.com>
Date:   Tue Jul 5 11:35:24 2022 +0100

    AArch64: Reset HWCAP2_AFP bits in FPCR for default fenv
    
    The AFP feature (Alternate floating-point behavior) was added in armv8.7 and
    introduced new FPCR bits.
    
    Currently, HWCAP2_AFP bits (bit 0, 1, 2) in FPCR are preserved when fenv is
    set to default environment.  This is a deviation from standard behaviour.
    Clear these bits when setting the fenv to default.
    
    There is no libc API to modify the new FPCR bits.  Restoring those bits matters
    if the user changed them directly.

Diff:
---
 sysdeps/aarch64/fpu/fpu_control.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/aarch64/fpu/fpu_control.h b/sysdeps/aarch64/fpu/fpu_control.h
index 764ed5cdbb..429f4910e7 100644
--- a/sysdeps/aarch64/fpu/fpu_control.h
+++ b/sysdeps/aarch64/fpu/fpu_control.h
@@ -46,7 +46,7 @@
    contents. These two masks indicate which bits in each of FPCR and
    FPSR should not be changed.  */
 
-#define _FPU_RESERVED		0xfe0fe0ff
+#define _FPU_RESERVED		0xfe0fe0f8
 #define _FPU_FPSR_RESERVED	0x0fffffe0
 
 #define _FPU_DEFAULT		0x00000000


                 reply	other threads:[~2022-07-05 13:02 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=20220705130244.277FF3858292@sourceware.org \
    --to=nsz@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).