Re: [linux-audio-dev] P4 kernel patch/option against denormals

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] P4 kernel patch/option against denormals
From: Ralf Beck (musical_snake_AT_gmx.de)
Date: Sun Sep 19 2004 - 20:07:32 EEST


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.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Sep 19 2004 - 21:17:00 EEST