Re: [LAD] How to find out if denormals are zero?

From: Paul Davis <paul@email-addr-hidden>
Date: Thu Jul 01 2010 - 18:09:18 EEST

On Thu, Jul 1, 2010 at 10:41 AM, Stefan Westerfeld <stefan@email-addr-hidden> wrote:
>   Hi!
>
> I am trying to fix a problem in beast, where an algorithm (subnormal
> cancellation and the associated unit test) will work on "normal" computers, but
> not on AMD64, because denormals are treated as zero on this platform with the
> compiler options we are using (-ffast-math and others).
>
> So ideally I need a snippet of code (maybe assembler) that will just return
> whether the processor/platform will have subnormals, like on x86, or not,
> like on AMD64, by querying the processor status registers.

i don't have that, but ardour has libs/pbd/fpu.cc which does contain
code to determine if the processor has DAZ (denormals are zero).

libs/ardour/globals.cc has code to turn DAZ on.

--p
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Jul 1 20:15:03 2010

This archive was generated by hypermail 2.1.8 : Thu Jul 01 2010 - 20:15:03 EEST