qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] target-i386: guest variable shift by 0 provokes shift b


From: Richard Henderson
Subject: Re: [Qemu-devel] target-i386: guest variable shift by 0 provokes shift by -1
Date: Tue, 18 Mar 2014 08:19:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 03/18/2014 08:01 AM, Peter Maydell wrote:
> Unless all our host architectures have undefined-result
> behaviour for variable shifts by out of range values
> then we can't make the TCG op semantics do that.
> (They probably can; the only counterexample I know
> of is the 8086, where the variable-shift cycle count
> was proportional to the value of the shift, so feeding
> it -1 would effectively cause it to hang.)

ARM is our only host architecture that does not mask the input to the width of
the operand.  That one, of course, masks with 255 and produces zero for shifts
larger than the width of the operand.

There are several host architectures for which we do not have backends that
e.g. always mask with 63, even for the 32-bit shifts.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]