[tremor] A possible improvement for some of the processor where tables hit hard
Segher Boessenkool
segher at koffie.nl
Sun Oct 20 17:31:49 PDT 2002
David Willmore wrote:
>
> > > What's wrong here? 0xffffffffUL >> (32 - 0) should be 0 like the lookup
> > > table.
> >
> > Not on Intel, which limit a shift to five bits. Funny, I was pretty
> > certain ARM did too. Shift 32 == shift 0.
>
> And this from the company that produced the i432?
>
> Is shift 32 == shift 0 in the standard because it's not logically
> equivalent. ROT 32 on a 32 bit variable is equivalent to ROT 0,
> but not a shift. shift 32 == 0 on a 32 bit variable, right?
Shifts by a number of bits greater or equal to the number of bits in the
integer data type to shift are not defined by the C standard.
FWIW, x86 has shifts from 0 to 31, and ARM has shifts from 1 to 32, and
PowerPC has shifts from 0 to 63. Not sure about the others.
<p>Cheers,
Segher
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Tremor
mailing list