From patchwork Wed Jul 19 23:34:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9853373 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 3E24160392 for ; Wed, 19 Jul 2017 23:42:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C7182870B for ; Wed, 19 Jul 2017 23:42:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F8F728717; Wed, 19 Jul 2017 23:42:20 +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 902102870B for ; Wed, 19 Jul 2017 23:42:19 +0000 (UTC) Received: from localhost ([::1]:35409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXybi-0004TR-NC for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Jul 2017 19:42:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXyVu-0008S7-Cd for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXyVr-0006z9-9d for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:18 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:33690) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXyVr-0006yn-4q for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:36:15 -0400 Received: by mail-qt0-x242.google.com with SMTP id 50so1793295qtz.0 for ; Wed, 19 Jul 2017 16:36:15 -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=BonAjKf1NSloQCaTI2LRcGUqgeX8sNAAOk3SsoGMlf8=; b=O5AHuqYeixPEVBiCyQlxD/pq+so/3czzs25++AFBK4wDnu0Y0IyBoPZGCkz0w/SSYI nC9LGs5UVILA5hUHCDFiVir/6MuIbS0A7dRsRd/K2Wb7NJQBNgM39cqqpWOgnCzcPbjs STiTOBKQWIi1IEObw6YYkZHEcj/p2lew2xRmsLyoRhD/3Ed8KYmt7r3p9LZcViY8m0fZ eovFY82UHVQcpa5STAt34hPv0nWrcbv1rtjdUvFq26RUwEk5z7pfnpUmrmY+vWdkSjTw z+fnxU6T6hImWa4R5yZ6XVO6AgAx5lkYewnhZn2SlMxuAmVsVBOAL1LpFGgaFnxb4Ma/ TFqA== 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=BonAjKf1NSloQCaTI2LRcGUqgeX8sNAAOk3SsoGMlf8=; b=ns0MlpkoOqYs84Cp0PT1gJSqdeHm8+BSxnKZ6j3QXjcY1l64uyEbK9skZ0iazdEA5R Usb62wj3yLyrsS+6VURZJed7GxWlI8/88I+rqxng9IRBIwNJkXnq9+osvPtU/Tk5aMme vuOzL1jfm/ktgTALKJvBumUQz096AucKh60p7BOGsyAW87YQzCd2153BfKDwzteKD6HL HmFfqKEiMP4AVUUAR8ESS7md6DhTLjquosfgOwZK1big9cwnc5PharZcvX90cQvHXAhy m8E1Nc62Wkn1LhB6Uh9BmjXXmMKGEgR73TZvmBwwgNFfmz7WTUtdWs5ZFadMrv2JnRJe 05Uw== X-Gm-Message-State: AIVw112N21NINY4cxTuDpvIl04mgTvg9d6wjGmhCh0VIWsvSZ0/JE6n9 DQQEfM7pPwCnFcxiG6k= X-Received: by 10.200.40.137 with SMTP id i9mr2634918qti.274.1500507374346; Wed, 19 Jul 2017 16:36:14 -0700 (PDT) Received: from bigtime.com ([203.221.203.174]) by smtp.gmail.com with ESMTPSA id w33sm857130qth.96.2017.07.19.16.36.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jul 2017 16:36:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 13:34:53 -1000 Message-Id: <20170719233455.8740-13-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::242 Subject: [Qemu-devel] [PULL v2 12/14] target/alpha: optimize gen_cvtlq() using deposit 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é Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718045540.16322-10-f4bug@amsat.org> Signed-off-by: Richard Henderson --- target/alpha/translate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 90e6d5285f..744d8bbf12 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -783,11 +783,9 @@ static void gen_cvtlq(TCGv vc, TCGv vb) /* The arithmetic right shift here, plus the sign-extended mask below yields a sign-extended result without an explicit ext32s_i64. */ - tcg_gen_sari_i64(tmp, vb, 32); - tcg_gen_shri_i64(vc, vb, 29); - tcg_gen_andi_i64(tmp, tmp, (int32_t)0xc0000000); - tcg_gen_andi_i64(vc, vc, 0x3fffffff); - tcg_gen_or_i64(vc, vc, tmp); + tcg_gen_shri_i64(tmp, vb, 29); + tcg_gen_sari_i64(vc, vb, 32); + tcg_gen_deposit_i64(vc, vc, tmp, 0, 30); tcg_temp_free(tmp); }