[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tci: Add implementation of rotl_i64, rotr_i64
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] tci: Add implementation of rotl_i64, rotr_i64 |
Date: |
Thu, 05 Sep 2013 13:33:50 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/05/2013 01:17 PM, Stefan Weil wrote:
> I added assertions for (t2 > 0) and (t2 < 64). They never raised an abort.
> Are those cases possible? We already have similar code for 32 bit shifts,
> and tcg/optimize.c also includes an implementation which is identical to
> my rotl_i64, rotr_i64.
It is possible, but very rare. In the tcg optimizer, by looking through
constants that the tcg-op.h routines couldn't filter. In the tci backend
by seeing the real data that wasn't constant for the optimizer.
We should handle zero and modulo count rotates in both places.
r~