On 13 May 2013 14:20, Petar Jovanovic <petar.jovano...@rt-rk.com> wrote: > @@ -3439,10 +3439,9 @@ target_ulong helper_extpdp(target_ulong ac, > target_ulong size, > if (sub >= -1) { > acc = ((uint64_t)env->active_tc.HI[ac] << 32) | > ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); > - temp = (acc >> (start_pos - size)) & > - (((uint32_t)0x01 << (size + 1)) - 1); > + temp = (acc >> (start_pos - size)) & (~0U >> (31 - size));
temp = extract64(acc, start_pos - size, size + 1); I think? thanks -- PMM