On Fri, Mar 26, 2010 at 04:06:58PM +0000, Riku Voipio wrote: > +uint32_t HELPER(neon_rshl_u32)(uint32_t val, uint32_t shiftop) > +{ > + int8_t shift = (int8_t)shiftop; > + if (shift >= 32 || shift < -32) { > + val = 0; > + } else if (shift == -32) { > + val >>= shift - 1; ^^^^^^^^^^^^^^^^^
This looks wrong. Compare the equivalent case for 64-bit: > uint64_t HELPER(neon_rshl_u64)(uint64_t val, uint64_t shiftop) > } else if (shift == -64) { > /* Rounding a 1-bit result just preserves that bit. */ > val >>= 63; Bonus points for factoring out the duplicated 32/64-bit code. -Nathan