From patchwork Wed Jul 19 04:57:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9850499 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 F25C3602BD for ; Wed, 19 Jul 2017 05:01:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0BEC285FB for ; Wed, 19 Jul 2017 05:01:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D487828607; Wed, 19 Jul 2017 05:01:55 +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 676BB285FB for ; Wed, 19 Jul 2017 05:01:55 +0000 (UTC) Received: from localhost ([::1]:59902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXh7S-00067h-M8 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Jul 2017 01:01:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXh3s-0003k8-A2 for qemu-devel@nongnu.org; Wed, 19 Jul 2017 00:58:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXh3r-0002Fd-H7 for qemu-devel@nongnu.org; Wed, 19 Jul 2017 00:58:12 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:34058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXh3r-0002FI-BQ for qemu-devel@nongnu.org; Wed, 19 Jul 2017 00:58:11 -0400 Received: by mail-pf0-x244.google.com with SMTP id o88so5095190pfk.1 for ; Tue, 18 Jul 2017 21:58:11 -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=yGHbeaQ3U2f9GH6HQY1sViQUX3H+MCPvgP5m2em63xk=; b=WJ8Psf7iECLEfxwdj5pfUJzYjUYnqMWcXQ05zC1L6XkAR018y10yOR7jkgaHW9sfWt R2bbPQhytfqZucrBwftQ1KKkZcj9IF53qZW1Jf1kMdwgXBMV/rOu7ARx2tuegvcdelNy PSySh5abIlOPyEQatnQ0beGT+m9Po94XqD6A2IYbGVtwXgz9o8cYImu7mjrDcEf35HJ2 FQKvQwtrFWAvBVbCEB+4ZBFiAB9jvcpaD7pmaw2zvwleg10iip8Q4iAtzxMxPZx+oIkR otH46Pnef+6jdto4P2YN7VYXO1Z2FqyWjuEDj/bJpCqOyr8gXDRLKwJzCdQyZdHlWyh0 mBMQ== 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=yGHbeaQ3U2f9GH6HQY1sViQUX3H+MCPvgP5m2em63xk=; b=n/kubDUiwYOIkDWm5Szj4T+WLkr8EFuzF2CErXb8dGsQjbsQgihXMqmTIo0rz2KJq0 CfZvVKDtbshgm/Y/ZqKot9tXye+bApPU5EtI/+uT6kcS+B47tZLX+RXCHNvOdj7QIVFx ZSYVEuWzXn5JPGaAtCUzoe8WF8V3ahmTZHgWDltsPQOK+ObaKNcyeMwoTBMmyW6qaBzd ZAuu857vXeXR1ugft6Pmpzwgb13e1WMUfDd4lcThNsPxzvsjMxHB2/61K0/drxxGJgr0 Ph6amfR2g82n2ROqD8DT0zLTq+pjxMf7Zicr6m5ZVjwebntkHzNrJ8ePCMgzP4Zac5KU cZXQ== X-Gm-Message-State: AIVw110VF5qKYqOakrnJ2ZdwJR9giR+t2/g29dG/tiUSGVBry/pqa4xr T/N7DiU4wKfc2snfHnU= X-Received: by 10.101.75.197 with SMTP id p5mr1214695pgr.164.1500440290216; Tue, 18 Jul 2017 21:58:10 -0700 (PDT) Received: from bigtime.twiddle.net (14-203-207-215.tpgi.com.au. [14.203.207.215]) by smtp.gmail.com with ESMTPSA id m196sm9062855pga.33.2017.07.18.21.58.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 21:58:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 18 Jul 2017 18:57:20 -1000 Message-Id: <20170719045722.25492-13-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170719045722.25492-1-rth@twiddle.net> References: <20170719045722.25492-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:400e:c00::244 Subject: [Qemu-devel] [PULL 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 232af9e..2bffbae 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -756,11 +756,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); }