From patchwork Wed Jul 19 23:34:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9853367 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 EDCEC60392 for ; Wed, 19 Jul 2017 23:40:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCE9E286FD for ; Wed, 19 Jul 2017 23:40:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1E0428703; Wed, 19 Jul 2017 23:40: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 3D2EE286FD for ; Wed, 19 Jul 2017 23:40:00 +0000 (UTC) Received: from localhost ([::1]:35398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXyZT-0001zT-ER for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Jul 2017 19:39:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXyVe-0008Eb-VN for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXyVe-0006lH-38 for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:02 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:34348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXyVd-0006kp-Lj for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:02 -0400 Received: by mail-qt0-x241.google.com with SMTP id 19so1789632qty.1 for ; Wed, 19 Jul 2017 16:36:01 -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=IMZ/E+YJtPFVxXJqOVkxn1s9v8BvzLY37dvSOiyXNH0=; b=WP4sp0rjPkicUk3HrxULZz4yGlGGOammxs7/rLEMVJPRWwu7IMK1e4UHWwhIVqEnPt koIpuLwtRSxLSU+Ao9XXb+JV685jU+2inbYfrMWvUoguQe6pBYkIb9u5IAY0QwLZIqdT JHSyA/NwTcRDVsS9g9hHeG/sQf8KoLDHpHi7FRyR0sTogDQzYytaoV/BS1O0NP6DtT9W GfMU2ldUylBHCy0S/zhY5LYyucLUihHMf0BthFA4k+DPCuj//MbuMt6rONtYaY+mriGK ut0xhNspRP61crjkpyniUloYQsjNI9fjKUIjyoAqABatSrupFSKONjX7JvDZ5FRwIaK5 t5GA== 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=IMZ/E+YJtPFVxXJqOVkxn1s9v8BvzLY37dvSOiyXNH0=; b=jZ3YgVXy1PZkLG0/adzA8u6/yo4YSJTJhFfxZdoGO0N/FQHZBiM4Fg5O3nJwheFBOd NbAoLBIi6CMPNKS1+9Bb3xT8+cJtFn5tizPkyDrBh3AncImP9iNXdJAjNWzJVhpXqD1t ravBKURJ5+g2Ez3fXCggY/jEvZqZoYp/3hpp+Dg5YzxlhQxQY4W7B1cw5pFRQmSrCiOM NF3Xy0ICkTZrTMQ60KOcXQ40PQfbqZjB/jy7hYEhDOYHnppusIMkm2z+9fuMMEV1rwKH 8aB6JGfm9JXRZNi0weSnd3rLpDsBMOIcnoK8icwlaGp776vHLKwQs7hpOdowRv40HieI 28Hg== X-Gm-Message-State: AIVw112EcLz/KIR4VzVUbkfz+OOBfblBs67yBzF0FTDUCuIb+RNsBLwl Css+g43ZyRcq1D0SBnM= X-Received: by 10.200.46.87 with SMTP id s23mr2627675qta.310.1500507360904; Wed, 19 Jul 2017 16:36:00 -0700 (PDT) Received: from bigtime.com ([203.221.203.174]) by smtp.gmail.com with ESMTPSA id w33sm857130qth.96.2017.07.19.16.35.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jul 2017 16:36:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 13:34:49 -1000 Message-Id: <20170719233455.8740-9-rth@twiddle.net> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170719233455.8740-1-rth@twiddle.net> References: <20170719233455.8740-1-rth@twiddle.net> 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::241 Subject: [Qemu-devel] [PULL v2 08/14] 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: peter.maydell@linaro.org, =?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 From: Philippe Mathieu-Daudé Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170718045540.16322-5-f4bug@amsat.org> Signed-off-by: Richard Henderson --- 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 3a519b790d..e709e6cde2 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1749,8 +1749,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); }