Reset HWCAP2_AFP bits in FPCR for default fenv.
Florian Weimer
fweimer@redhat.com
Wed Jun 29 09:54:45 GMT 2022
* 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
More information about the Libc-alpha
mailing list