Hello! >> However, it is used in the form of selecting hard underflow using a >> compilation option, and not within the program. You certainly DO have >> targets where it would work, even dynamically within the program, and I >> think that it could be done even on x86. That isn't the same as it >> should be done, of course! > > Indeed, 387/SSE has flush-to-zero modes. But other APIs do not (glibc, SysV, > AIX). > I’m perfectly willing to add it, especially to 387/SSE, if given a bit of > help (someone to write the > assembly code).
Just set FTZ bit in mxcsr. Please see libgcc/config/i386/crtfastmath.c, this mode is used when -ffast-math is used. Uros.