From patchwork Fri May 12 03:35:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 9723555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41A7C600CB for ; Fri, 12 May 2017 03:41:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 356C4287C6 for ; Fri, 12 May 2017 03:41:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28CF5287D3; Fri, 12 May 2017 03:41:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B175C287C6 for ; Fri, 12 May 2017 03:40:59 +0000 (UTC) Received: from localhost ([::1]:51170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d91Rq-0001Q7-Tc for patchwork-qemu-devel@patchwork.kernel.org; Thu, 11 May 2017 23:40:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d91NK-0006ZO-4v for qemu-devel@nongnu.org; Thu, 11 May 2017 23:36:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d91NJ-0003eV-9I for qemu-devel@nongnu.org; Thu, 11 May 2017 23:36:18 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:33214) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d91NJ-0003eN-30 for qemu-devel@nongnu.org; Thu, 11 May 2017 23:36:17 -0400 Received: by mail-qt0-x244.google.com with SMTP id a46so5374112qte.0 for ; Thu, 11 May 2017 20:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U4h7F7PCvb/T+pCJbDsZWpNqNpff+PIWnBdVVeaKirc=; b=PzlA2VEZlFP3J2JsKhv1iHGFlYaRANinXZmOHk2JorY27xRfJIOd/4yB5UYNokH7+/ nq7Na+Z9nefhDOtAEAvgL4IiPKqQLPMfY+XyRKrwn87diLlgljZTAyH/Vn5EYqzfcrYG ag2KOfwVD8OqQd8f0JWG8r5UR0ONe/7KnhIf84tbkpLtUIMobCMcEv3Qe5CCAfw7JKuS /vYL4V5wAUt0k5cGMpwUx9H+i2JerYiJmDVwtLjmfs0uUyib9Nip3hqTrnNWQfi4Jz/4 o64Nlg6yvNBl3eYBPXp2flf5SD3yiTGlthZMtKIbnu+iySO9dC6y25uedZ9rOukFBtcw o9Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U4h7F7PCvb/T+pCJbDsZWpNqNpff+PIWnBdVVeaKirc=; b=Ph7HVxv+cETMz3zlZjrWehOAwXWc6l8xE2LOh4AEX7Zm3DD82cAgfA3m13KChyoHu1 twnPO6ykLW3dlWAb4ulfkqvIVJlfBD6cxb/wjWn3JmEuVceQoyo4TszHtfnouAbu8SP+ 6L7+Bb4ItWDEwi7DJQwsLD9j8h8EPI3zp7J9uwlvjeDSHOtpfTyAlHoTaLHC7ZAqiCfK Hcme4Rtmpzvvx8vxV7xpxhqyeMCXxB4lbXu4j/ub++qI1ZdNLZPryE7ejsGITbxDW7oC UYi9nuzYsZ403HQ+B6eXEjTM7R27JwxfzISNRsR6j7CJxBxetb12S+wUEGLux/2Fxg2g 1wlw== X-Gm-Message-State: AODbwcCZxTdYqYDB371DbKWVDU1PDHHElExVKWgTeWxPfxRWBXZCkqH7 JbMhWbDiJXDeVg== X-Received: by 10.200.49.46 with SMTP id g43mr1697067qtb.229.1494560176655; Thu, 11 May 2017 20:36:16 -0700 (PDT) Received: from localhost.localdomain ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id m188sm1443267qkc.5.2017.05.11.20.36.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 20:36:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Aurelien Jarno , Richard Henderson , Laurent Vivier Date: Fri, 12 May 2017 00:35:41 -0300 Message-Id: <20170512033543.6789-4-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170512033543.6789-1-f4bug@amsat.org> References: <20170512033543.6789-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH v3 3/5] target/m68k: optimize bcd_flags() using extract op X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Patch created mechanically using Coccinelle script via: $ spatch --macro-file scripts/cocci-macro-file.h --in-place \ --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target Signed-off-by: Philippe Mathieu-Daudé Acked-by: Laurent Vivier --- target/m68k/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 9f60fbc0db..babb9e2c5b 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1463,8 +1463,7 @@ static void bcd_flags(TCGv val) tcg_gen_andi_i32(QREG_CC_C, val, 0x0ff); tcg_gen_or_i32(QREG_CC_Z, QREG_CC_Z, QREG_CC_C); - tcg_gen_shri_i32(QREG_CC_C, val, 8); - tcg_gen_andi_i32(QREG_CC_C, QREG_CC_C, 1); + tcg_gen_extract_i32(QREG_CC_C, val, 8, 1); tcg_gen_mov_i32(QREG_CC_X, QREG_CC_C); }