The flags for input and output denormals (DAZ and FTZ) are currently translated into the single FZ flag:
|
// ARM Platform Behavior: |
|
// - ARM FPCR/FPSCR bit 24 provides unified FZ+DAZ behavior. Setting either |
|
// _MM_FLUSH_ZERO_ON or _MM_DENORMALS_ZERO_ON enables the same ARM bit. |
|
// - ARMv7 NEON: "Flush-to-zero mode always enabled" per ARM ARM (impl may vary) |
|
// - ARMv8: FPCR.FZ correctly controls denormal handling for NEON operations |
|
FORCE_INLINE void _mm_setcsr(unsigned int a) |
|
{ |
|
_MM_SET_ROUNDING_MODE(a & _MM_ROUND_MASK); |
|
// ARM FPCR.bit24 handles both FZ and DAZ - set if either is requested |
|
_MM_SET_FLUSH_ZERO_MODE( |
|
(a & _MM_FLUSH_ZERO_MASK) | |
|
((a & _MM_DENORMALS_ZERO_MASK) ? _MM_FLUSH_ZERO_ON : 0)); |
|
} |
However, Armv8.7 introduced FEAT_AFP with the new flags AH (Alternate Handling) and FIZ (Flush Inputs to Zero) in the FPCR register that make the independent control of flushing denormal inputs and/or outputs to zero possible. Are there any plans to use this for a more correct translation of DAZ and FTZ?
The flags for input and output denormals (DAZ and FTZ) are currently translated into the single FZ flag:
sse2neon/sse2neon.h
Lines 3272 to 3284 in 1741f18
However, Armv8.7 introduced FEAT_AFP with the new flags AH (Alternate Handling) and FIZ (Flush Inputs to Zero) in the FPCR register that make the independent control of flushing denormal inputs and/or outputs to zero possible. Are there any plans to use this for a more correct translation of DAZ and FTZ?