From patchwork Thu Sep 7 22:40:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9942919 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 8505B604D5 for ; Thu, 7 Sep 2017 22:55:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B0BC26D08 for ; Thu, 7 Sep 2017 22:55:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6003A274A3; Thu, 7 Sep 2017 22:55:42 +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 00FC326D08 for ; Thu, 7 Sep 2017 22:55:42 +0000 (UTC) Received: from localhost ([::1]:42569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq5i1-00066T-AC for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Sep 2017 18:55:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq5UB-0003CD-KM for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dq5U7-0008KH-07 for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:23 -0400 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:35370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dq5U6-0008JY-R5 for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:18 -0400 Received: by mail-pf0-x230.google.com with SMTP id g13so1629864pfm.2 for ; Thu, 07 Sep 2017 15:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2N1o0vUjnZz5BCK8ZK7VFGbHwO2asiO5JbqCJsu9o+Y=; b=ic7ZBugQCPbzUP5aStxddpM+ys7WR/lxY0abfdStBcRYMnsSNXKJT5Jrpv79G1WJPe ELlS8ZRCfoanSXMJGjh+s9yLCy5mYPoXCKvdcyU3DE+wxo8Qr9hxCFWe07Uk/8gyVaeH 7Se/wQQlOz9jqXSY148eQMQzbT5g4xfQPAxaQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2N1o0vUjnZz5BCK8ZK7VFGbHwO2asiO5JbqCJsu9o+Y=; b=Bk78j1nctPxBEsv2JtI513K4L/zaZ9NmJb7w6hKaCS3YyVxwpXIXIC7v+GFNIGALlH y7FfhjLgB+7WrhC7GWGHLjXNjPPasykojwJWBUtr9zIUpqkhCZBVGC9Rb9iX8teWdRSQ eEF2OSwG1tDPpMyItEhiP3FRnZILWLg5mwvZdOxGUcgiJRYgqKOlR9UVN2mMpgdLegmc H30S/20gSZQ60jiSL+7MVBpZCmy7gdhqsN92gkUhW/ztbivIUT+XtjA8FG7lBVTTSxlB o+adp0uU8w/nrFpSohUJHaDucx9ZJHN+I1iERnXZwGNdkmh5A+11NsmzIGe34ThGeZZP 4JPw== X-Gm-Message-State: AHPjjUhEvwjJvOHSpn1FaGGS5gPAA2lep3SP5MS8PfTBlh+ThIX5wAbq UW/l4LEL99HQHygbooLXdQ== X-Google-Smtp-Source: ADKCNb4LqiJVX+xYU9Adv2kxiCFAuWu2qk4MFd6rriOIgZ5961o1yziJdSVJ5zOrbzex9XAgol+b9Q== X-Received: by 10.99.54.7 with SMTP id d7mr956281pga.115.1504824077525; Thu, 07 Sep 2017 15:41:17 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net. [97.126.108.236]) by smtp.gmail.com with ESMTPSA id h19sm770678pfh.142.2017.09.07.15.41.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2017 15:41:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 7 Sep 2017 15:40:44 -0700 Message-Id: <20170907224051.21518-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170907224051.21518-1-richard.henderson@linaro.org> References: <20170907224051.21518-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::230 Subject: [Qemu-devel] [PULL 16/23] tcg/arm: Tighten tlb indexing offset test 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, Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Richard Henderson We are not going to use ldrd for loading the comparator for 32-bit guests, so don't limit cmp_off to 8 bits then. This eliminates one insn in the tlb load for some guests. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 66c369c239..6c12b169ce 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc.c @@ -1202,7 +1202,9 @@ static TCGReg tcg_out_tlb_read(TCGContext *s, TCGReg addrlo, TCGReg addrhi, } /* We checked that the offset is contained within 16 bits above. */ - if (add_off > 0xfff || (use_armv6_instructions && cmp_off > 0xff)) { + if (add_off > 0xfff + || (use_armv6_instructions && TARGET_LONG_BITS == 64 + && cmp_off > 0xff)) { tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R2, base, (24 << 7) | (cmp_off >> 8)); base = TCG_REG_R2;