All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PULL 2/6] target-sh4: use deposit in swap.b instruction
Date: Sun, 13 Sep 2015 23:18:41 +0200	[thread overview]
Message-ID: <1442179125-29608-3-git-send-email-aurelien@aurel32.net> (raw)
In-Reply-To: <1442179125-29608-1-git-send-email-aurelien@aurel32.net>

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-sh4/translate.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index be0cb32..50043cf 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -612,15 +612,11 @@ static void _decode_opc(DisasContext * ctx)
 	return;
     case 0x6008:		/* swap.b Rm,Rn */
 	{
-	    TCGv high, low;
-	    high = tcg_temp_new();
-	    tcg_gen_andi_i32(high, REG(B7_4), 0xffff0000);
-	    low = tcg_temp_new();
+            TCGv low = tcg_temp_new();;
 	    tcg_gen_ext16u_i32(low, REG(B7_4));
 	    tcg_gen_bswap16_i32(low, low);
-	    tcg_gen_or_i32(REG(B11_8), high, low);
+            tcg_gen_deposit_i32(REG(B11_8), REG(B7_4), low, 0, 16);
 	    tcg_temp_free(low);
-	    tcg_temp_free(high);
 	}
 	return;
     case 0x6009:		/* swap.w Rm,Rn */
-- 
2.1.4

  parent reply	other threads:[~2015-09-13 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 21:18 [Qemu-devel] [PULL 0/6] sh4-next queue Aurelien Jarno
2015-09-13 21:18 ` [Qemu-devel] [PULL 1/6] target-sh4: add flags markups for FP helpers Aurelien Jarno
2015-09-13 21:18 ` Aurelien Jarno [this message]
2015-09-13 21:18 ` [Qemu-devel] [PULL 3/6] target-sh4: improve cmp/str instruction Aurelien Jarno
2015-09-13 21:18 ` [Qemu-devel] [PULL 4/6] target-sh4: improve shld instruction Aurelien Jarno
2015-09-13 21:18 ` [Qemu-devel] [PULL 5/6] target-sh4: improve shad instruction Aurelien Jarno
2015-09-13 21:18 ` [Qemu-devel] [PULL 6/6] sh4: Fix initramfs initialization for endiannes-mismatched targets Aurelien Jarno
2015-09-14 13:05 ` [Qemu-devel] [PULL 0/6] sh4-next queue Peter Maydell

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=1442179125-29608-3-git-send-email-aurelien@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.