[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
- [Qemu-devel] [PATCH for-2.5 0/5] target-sh4: TCG improvement, Aurelien Jarno, 2015/07/24
- [Qemu-devel] [PATCH for-2.5 4/5] target-sh4: improve shld instruction, Aurelien Jarno, 2015/07/24
- [Qemu-devel] [PATCH for-2.5 2/5] target-sh4: use deposit in swap.b instruction, Aurelien Jarno, 2015/07/24
- [Qemu-devel] [PATCH for-2.5 3/5] target-sh4: improve cmp/str instruction, Aurelien Jarno, 2015/07/24
- [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction, Aurelien Jarno, 2015/07/24
- Re: [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction,
Aurelien Jarno <=
- [Qemu-devel] [PATCH for-2.5 1/5] target-sh4: add flags markups for FP helpers, Aurelien Jarno, 2015/07/24
- Re: [Qemu-devel] [PATCH for-2.5 0/5] target-sh4: TCG improvement, Richard Henderson, 2015/07/24