HomeFreeBSD

zcommon: Refactor FPU state handling in fletcher4

Description

zcommon: Refactor FPU state handling in fletcher4

Currently calls to kfpu_begin() and kfpu_end() are split between
the init() and fini() functions of the particular SIMD
implementation. This was done in #14247 as an optimization measure
for the ABD adapter. Unfortunately the split complicates FPU
handling on platforms that use a local FPU state buffer, like
Windows and macOS.

To ease porting, we introduce a boolean struct member in
fletcher_4_ops_t, indicating use of the FPU, and move the FPU state
handling from the SIMD implementations to the call sites.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #14600

Details

Provenance
Attila Fülöp <attila@fueloep.org>Authored on Mar 14 2023, 4:45 PM
GitHub <noreply@github.com>Committed on Mar 14 2023, 4:45 PM
Parents
rGb15ab50c4d61: ABI files: sync with new Ubuntu release in CI
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG78289b84589e: zcommon: Refactor FPU state handling in fletcher4 (authored by Attila Fülöp <attila@fueloep.org>).Mar 14 2023, 4:45 PM