On 05/20/2011 05:39 AM, Kirill Batuzov wrote:
> +    case INDEX_op_sar_i32:
> +#if TCG_TARGET_REG_BITS == 64
> +        x &= 0xffffffff;
> +        y &= 0xffffffff;
> +#endif
> +        r = x & 0x80000000;
> +        x &= ~0x80000000;
> +        x >>= y;
> +        r |= r - (r >> y);
> +        x |= r;
> +        return x;
> +

Any reason you're emulating the 32-bit shift by
hand, rather than letting the compiler do it?  I.e.

  x = (int32_t)x >> (int32_t)y;


r~

Reply via email to