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 <aurel...@aurel32.net>
> ---
>  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
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to