From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction
Date: Fri, 24 Jul 2015 13:16:18 +0200 [thread overview]
Message-ID: <20150724111618.GC30591@aurel32.net> (raw)
In-Reply-To: <1437736471-26124-6-git-send-email-aurelien@aurel32.net>
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 <aurelien@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
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2015-07-24 11:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 11:14 [Qemu-devel] [PATCH for-2.5 0/5] target-sh4: TCG improvement Aurelien Jarno
2015-07-24 11:14 ` [Qemu-devel] [PATCH for-2.5 1/5] target-sh4: add flags markups for FP helpers Aurelien Jarno
2015-07-24 11:14 ` [Qemu-devel] [PATCH for-2.5 2/5] target-sh4: use deposit in swap.b instruction Aurelien Jarno
2015-07-24 11:14 ` [Qemu-devel] [PATCH for-2.5 3/5] target-sh4: improve cmp/str instruction Aurelien Jarno
2015-07-24 11:14 ` [Qemu-devel] [PATCH for-2.5 4/5] target-sh4: improve shld instruction Aurelien Jarno
2015-07-24 11:14 ` [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction Aurelien Jarno
2015-07-24 11:16 ` Aurelien Jarno [this message]
2015-07-24 13:29 ` [Qemu-devel] [PATCH for-2.5 0/5] target-sh4: TCG improvement Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150724111618.GC30591@aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.