public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Tejas Belagod via Libc-alpha <libc-alpha@sourceware.org>
Cc: Tejas Belagod <Tejas.Belagod@arm.com>,
	 Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Subject: Re: Reset HWCAP2_AFP bits in FPCR for default fenv.
Date: Wed, 29 Jun 2022 11:54:45 +0200	[thread overview]
Message-ID: <87zghv3ica.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <AS8PR08MB7079624B79439292B360CCAAEABB9@AS8PR08MB7079.eurprd08.prod.outlook.com> (Tejas Belagod via Libc-alpha's message of "Wed, 29 Jun 2022 09:34:33 +0000")

* Tejas Belagod via Libc-alpha:

> The AFP feature (Alternate floating-point behavior) was added in
> Armv8.7-A 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
> behavior.  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.
>
> OK for master?

What do you propose as commit message?

I think we have that definition of _FPU_RESERVED because the we cannot
know the semantics of those bits (obviosuly), and changing them
underneath the user's code could be wrong.

What do these bits do, actually?  If this adds additional FPU state, how
does it interact with compiler behavior and optimizations?  Can it even
be safely changed after process startup?

Thanks,
Florian


  reply	other threads:[~2022-06-29  9:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  9:34 Tejas Belagod
2022-06-29  9:54 ` Florian Weimer [this message]
2022-06-29 11:24   ` Szabolcs Nagy
2022-06-29 16:53     ` Joseph Myers
2022-06-30 10:19       ` Tejas Belagod
2022-06-30 10:42         ` Florian Weimer
2022-06-30 10:56           ` Tejas Belagod
2022-07-01  6:40 Tejas Belagod
2022-07-04 13:51 ` Szabolcs Nagy

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=87zghv3ica.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=Tejas.Belagod@arm.com \
    --cc=libc-alpha@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).