From patchwork Tue Sep 25 22:57:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 186916 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 181302C0085 for ; Wed, 26 Sep 2012 08:57:55 +1000 (EST) Received: from localhost ([::1]:59242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGe4f-00048E-Ah for incoming@patchwork.ozlabs.org; Tue, 25 Sep 2012 18:57:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGe4Z-00047r-2D for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGe4Y-00081v-3z for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:57:47 -0400 Received: from hall.aurel32.net ([88.191.126.93]:55094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGe4X-00081h-SS for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:57:46 -0400 Received: from [2001:470:d4ed:0:ea11:32ff:fea1:831a] (helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TGe4V-0007zq-St; Wed, 26 Sep 2012 00:57:44 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1TGe4U-0004Vx-Pr; Wed, 26 Sep 2012 00:57:42 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2012 00:57:39 +0200 Message-Id: <1348613859-17321-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Max Filippov , Aurelien Jarno Subject: [Qemu-devel] [PATCH] target-xtensa: de-optimize EXTUI 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 Now that and with 0xff, 0xffff and 0xffffffff is optimized in tcg/tcg-op.h, there is no need to do it in target-xtensa/translate.c. Cc: Max Filippov Signed-off-by: Aurelien Jarno --- target-xtensa/translate.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index ba3ffcb..c1358ee 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/translate.c @@ -1835,20 +1835,7 @@ static void disas_xtensa_insn(DisasContext *dc) } else { tcg_gen_mov_i32(tmp, cpu_R[RRR_T]); } - - switch (maskimm) { - case 0xff: - tcg_gen_ext8u_i32(cpu_R[RRR_R], tmp); - break; - - case 0xffff: - tcg_gen_ext16u_i32(cpu_R[RRR_R], tmp); - break; - - default: - tcg_gen_andi_i32(cpu_R[RRR_R], tmp, maskimm); - break; - } + tcg_gen_andi_i32(cpu_R[RRR_R], tmp, maskimm); tcg_temp_free(tmp); } break;