[linux-audio-dev] Re: Fixing Freeverb and Denormals

Christian Schoenebeck schoenebeck at software-engineering.org
Sat Jan 22 17:58:57 UTC 2005


Es geschah am Samstag 22 Januar 2005 17:49 als Steve Harris schrieb:
> On Sat, Jan 22, 2005 at 03:17:28PM +0100, Christian Schoenebeck wrote:
> > I think for such an important piece like freeverb it might be worth to
> > add architecture dependant assembly optimizations. E.g. with SSE(1) you
> > simply have to change the SSE control register to get rid of the denormal
> > problem. With that no denormal fixes for individual sample points are
> > necessary anymore which definitely pays off in performance.
>
> Agreed, but I'm not sure how doing that will affect the host - ie does
> -mfpumath=SSE (or whatever the option is) always leave the FPU stack in a
> sane state when control goes back to the host? I dont think it would
> normally return the FPU to 387 mode, which might do bad things to the
> host occasionally.
>
> OTOH it might be fine, I dont understand the interaction with the 387 and
> SSE.

SSE won't affect the 387 FPU stack at all. But the problem is, this doesn't 
account to MMX. And you often will have to stick with MMX, e.g. when you have 
to truncate / round SSE floating point values and you dont want to (or can) 
use a younger instruction set than SSE1.

If you can use SSE2 (or younger) as well, than you usually you don't have to 
use MMX and thus won't have that problem.

CU
Christian



More information about the Linux-audio-dev mailing list