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: Paolo Bonzini
Subject: Re: [Qemu-devel] target-i386: guest variable shift by 0 provokes shift by -1
Date: Tue, 18 Mar 2014 17:34:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 18/03/2014 16:01, Peter Maydell ha scritto:
By whether the backend or the frontend has trivial
access to the value to be able to avoid doing bad
things if it's out of range. If either do, they can
do a translate-time check to avoid issues. If neither
does then we need the host CPU architecture to be
OK with the out of range value, or we need to insert
an explicit mask op in the backend (which is likely
to be a duplicate of an explicit mask op already
inserted at the frontend to get the frontend-target
mandated behaviour for out of range ops).

Isn't that exactly what SPARC does? But the optimizer should be able to remove a redundant AND (not sure it is able to optimize & 255 & 31 to a single instruction, but it certainly can remove the second AND in "& 31 & 255").

Paolo



reply via email to

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