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

Stefan Westerfeld stefan at space.twc.de
Thu Jul 1 14:41:30 UTC 2010


   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.

Is there some code around for this?

   Cu... Stefan
-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan



More information about the Linux-audio-dev mailing list