qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction
Date: Fri, 24 Jul 2015 13:16:18 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On 2015-07-24 13:14, Aurelien Jarno wrote:
> The SH4 shad instruction can shift in both direction, depending on the
> sign of the shift. This is currently implemented using branches, which
> is not really efficient and prevents the optimizer to do its job. In
> practice it is often used with a constant loaded in a register just
> before.
> 
> Simplify the implementation by computing both the value shifted to the
> left and to the right, and then selecting the correct one with a
> movcond. As with a negative value the shift amount can go up to 32 which
> is undefined, we shift the value in two steps.
> 
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
>  target-sh4/translate.c | 53 
> +++++++++++++++++++++-----------------------------
>  1 file changed, 22 insertions(+), 31 deletions(-)

Despite the subject, this patch is of course also for 2.5.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
address@hidden                 http://www.aurel32.net



reply via email to

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