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: Jan Depner (eviltwin69_AT_cableone.net)
Date: Sun Jun 27 2004 - 18:48:36 EEST


On Sun, 2004-06-27 at 08:30, Tim Goetze wrote:
> [Simon Jenkins]
> >Tim Goetze wrote:
> >>8-bit exponent and no assumption about its value made, 8 binary
> >>'shift', 7 'or' and 1 'and' statement if i'm not badly mistaken. and
> >>if i'm not, a branch will probably hurt less.
> >>
> >Three shifts, three copys, three 'or's and an 'and':
> >
> > copy = value;
> > value |= copy >> 4;
> > copy = value;
> > value |= copy >> 2;
> > copy = value;
> > value |= copy >> 1;
> > value &= 0x01;
>
> elegant indeed (though the exponent is not in the lowest 8 bits so it
> needs another shift, no?)
>

        You'd probably need to AND and shift by 23 prior to starting this.
This is much nicer than my first cut. I was using brute force on the
ORs. Also, I believe you're right about the FPU short-cutting a
multiply by zero.

Jan


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

This archive was generated by hypermail 2b28 : Sun Jun 27 2004 - 18:38:37 EEST