[linux-audio-dev] P4 kernel patch/option against denormals
Ralf Beck
musical_snake at gmx.de
Sun Sep 19 17:07:32 UTC 2004
The following proggi does the job:
#include <xmmintrin.h>
#define _MM_DENORM_ZERO_ON 0x0040
main()
{
// enable flush to zero
_mm_setcsr(_MM_FLUSH_ZERO_ON | _MM_MASK_UNDERFLOW | _mm_getcsr());
// enable denormals are zero
_mm_setcsr(_MM_DENORM_ZERO_ON | _mm_getcsr());
}
Note: you will need compiler option -mfpmath=sse and -march=pentium4
(works for both P4 and Athlon64)
After reboot, both FZ and DAZ flags are reset to zero, so you should run this
program in your /etc/profile. But as said earlier, works only for
applications that use (are compiled to use) the SSE unit instead of the old
style X86 FPU.
More information about the Linux-audio-dev
mailing list