Skip to content

arm: support FEAT_AFP FTZ/DAZ semantics and tests - #766

Draft
howjmay wants to merge 1 commit into
masterfrom
afp
Draft

arm: support FEAT_AFP FTZ/DAZ semantics and tests#766
howjmay wants to merge 1 commit into
masterfrom
afp

Conversation

@howjmay

@howjmay howjmay commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Map FTZ and DAZ independently on ARMv8.7+ FEAT_AFP by using FPCR.FZ and FPCR.FIZ with AH handling, while preserving the pre-AFP unified fallback. Update _mm_setcsr/_mm_getcsr and denormal helpers accordingly, and expand IEEE754 tests to validate AFP independence plus legacy ARM coupling behavior.


Summary by cubic

Add independent FTZ (outputs) and DAZ (inputs) on ARMv8.7+ with FEAT_AFP by mapping FTZ to FPCR.FZ and DAZ to FPCR.FIZ, with FPCR.AH set when either is enabled. Keeps the unified FTZ+DAZ fallback on older ARM; updates MXCSR helpers and tests to verify AFP independence and legacy coupling.

  • New Features
    • FEAT_AFP (ARMv8.7+): FTZ → FPCR.FZ, DAZ → FPCR.FIZ; set FPCR.AH when FZ or FIZ is on.
    • Pre-AFP fallback: DAZ unified with FTZ via FPCR.FZ.
    • _mm_setcsr/_mm_getcsr: read/write FZ and FIZ independently on AFP; preserve unified behavior otherwise.
    • Denormal helpers (_sse2neon_mm_get_denormals_zero_mode/_sse2neon_mm_set_denormals_zero_mode): use FIZ on AFP.
    • IEEE754 tests: update round-trip expectations and add AFP-only tests for FTZ-only (no input flush) and DAZ-only (no output flush).

Written for commit eea7145. Summary will update on new commits.

@github-actions

This comment was marked as off-topic.

Map FTZ and DAZ independently on ARMv8.7+ FEAT_AFP by using FPCR.FZ and FPCR.FIZ with AH handling, while preserving the pre-AFP unified fallback. Update _mm_setcsr/_mm_getcsr and denormal helpers accordingly, and expand IEEE754 tests to validate AFP independence plus legacy ARM coupling behavior.
@jserv

jserv commented Jun 11, 2026

Copy link
Copy Markdown
Member

update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants