Re: [linux-audio-dev] swh plugins and fixing undenormalize

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

Subject: Re: [linux-audio-dev] swh plugins and fixing undenormalize
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Thu Jun 24 2004 - 15:58:48 EEST


On Thu, Jun 24, 2004 at 01:20:34 +0200, Clemens Ladisch wrote:
> The IEEE standard specifies exactly what happens with denormals, so,
> in theory, the compiler must not optimize this away. However,
> optimization options for speed often disable strict IEEE
> compatibility. (I don't know how gcc's options behave.)

If you use -ffast-math then it note reuiqred to maintin strict IEEE
semantics. Its a lot faster for some operations if you do.
 
> > typedef union {
> > float f;
> > int32_t i;
> > } ls_pcast32;
>
> AFAIK this isn't safe either because the same type aliasing rules
> apply to unions, too. The only safe way is to go through char
> pointers.

OK, thats interesting. I though it was OK, in that compiler is required to
make &v.f == &v.i, where sizeof(v.f) == sizeof(v.i)? Maybe I misunderstood.

In any case my code is full of gcc-isms, I doubt it would build on any
signifiantly different compiler.

- Steve


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

This archive was generated by hypermail 2b28 : Thu Jun 24 2004 - 16:00:25 EEST