From patchwork Fri Jul 24 11:14:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 499696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F03901401DE for ; Fri, 24 Jul 2015 21:15:28 +1000 (AEST) Received: from localhost ([::1]:44600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIawo-0000N6-Qn for incoming@patchwork.ozlabs.org; Fri, 24 Jul 2015 07:15:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIawC-0007cG-DN for qemu-devel@nongnu.org; Fri, 24 Jul 2015 07:14:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIawA-0000SO-Cl for qemu-devel@nongnu.org; Fri, 24 Jul 2015 07:14:48 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:51639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIawA-0000PP-5i for qemu-devel@nongnu.org; Fri, 24 Jul 2015 07:14:46 -0400 Received: from weber.rr44.fr ([2001:bc8:30d7:120:7e05:7ff:fe0d:f152]) by hall.aurel32.net with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZIaw0-0005Zc-Fu; Fri, 24 Jul 2015 13:14:36 +0200 Received: from aurel32 by weber.rr44.fr with local (Exim 4.85) (envelope-from ) id 1ZIavz-0006oU-N8; Fri, 24 Jul 2015 13:14:35 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Fri, 24 Jul 2015 13:14:28 +0200 Message-Id: <1437736471-26124-3-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437736471-26124-1-git-send-email-aurelien@aurel32.net> References: <1437736471-26124-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:bc8:30d7:100::1 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH for-2.5 2/5] target-sh4: use deposit in swap.b instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Aurelien Jarno --- 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 3b4a1b5..a6f3f59 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 */