From nobody Wed Nov 5 18:19:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496681982341656.0102275291757; Mon, 5 Jun 2017 09:59:42 -0700 (PDT) Received: from localhost ([::1]:34382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvLv-0001hi-Fa for importer@patchew.org; Mon, 05 Jun 2017 12:59:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvFI-0004J0-K9 for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHvFH-0003gj-3q for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:52:48 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:34325) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHvFG-0003gD-Oc for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:52:46 -0400 Received: by mail-qt0-x241.google.com with SMTP id o21so13465259qtb.1 for ; Mon, 05 Jun 2017 09:52:46 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2602:47:d954:1500:5e51:4fff:fe40:9c64]) by smtp.gmail.com with ESMTPSA id c6sm1637044qtb.56.2017.06.05.09.52.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 09:52:45 -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=0zYjzo/efhOpgeBsqHWXDc30ZQYqtGwqLZDUBnSKFlA=; b=rdEanlKIwjyZxaFUJcfiQC5z9Ud6jacA8+TFuYj1Y9YauTYudZGvXm9/KLCAkF+l5o 54vw1euGbQ4j/S43YqVbHwFtRT8SIEZmRL3STW5cpJedNzOQVOZrVPdCAfVV3O4kK0cu GucwcwtVChXlzcJDi2tSXJvlmwRkY2AV1Y6HOM9BkSBLv+/dUrz/w/RlYlHzx2u88xPU YXFC3XgbpA0keq/C5hNKa+SK2+UMa61GnvBi95v2lZ+TGbRGxV0SiL4HRgrUoKGfGN82 w7egDpVF63HmLKRjY5liTHy8QAKNg4GixbiCNTSQfl08wfFZyi/1TZrjdMuDQrB/Qd7n i9Eg== 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=0zYjzo/efhOpgeBsqHWXDc30ZQYqtGwqLZDUBnSKFlA=; b=OzxYcEnwovAJ4QdmwUW7tfUx0w6rtZ96X0yaIwYLvz3yQijA6TLQknGN6XAnnIQQ+G 6630Sq2JWYr8KxurTXLqtj9lgN+4zEL+pSI7qBkFp/ndsr51YGexMRKtkCOC0nd06oj7 XK1tPkbAH+StVL6IAC2olUADcWbpzs+AeXtXTs4fVIxMSP/dBACL00FXMVfrddza11bz YAuYZHDl1SjkfDgYuZBNnLv/s0xrVGpeIMvBefNJ+kqqOq1Fz4cP8/VqfF5ZJyizehOh s0nUw1+btp1yMMs7gV58MU32GdTd9PukLjisHpcnHYNOpDM9VKPM7hDq5l2DAth71Hqg HpdQ== X-Gm-Message-State: AKS2vOw3ony3HvLOjxoBtBMCmE+xs/N4jqxi9Il9mjBSgn/hA6qEDGDY 8mZdeSJc1BVr+T8LCIc= X-Received: by 10.55.9.203 with SMTP id 194mr25470131qkj.20.1496681565988; Mon, 05 Jun 2017 09:52:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 5 Jun 2017 09:52:13 -0700 Message-Id: <20170605165233.4135-7-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170605165233.4135-1-rth@twiddle.net> References: <20170605165233.4135-1-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 06/26] target/arm: optimize cross-page direct jumps in softmmu 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, "Emilio G. Cota" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: "Emilio G. Cota" Instead of unconditionally exiting to the exec loop, use the lookup_and_goto_ptr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <1493263764-18657-7-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson --- target/arm/translate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index ae6646c..d72953f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4157,8 +4157,12 @@ static inline void gen_goto_tb(DisasContext *s, int = n, target_ulong dest) gen_set_pc_im(s, dest); tcg_gen_exit_tb((uintptr_t)s->tb + n); } else { + TCGv addr =3D tcg_temp_new(); + gen_set_pc_im(s, dest); - tcg_gen_exit_tb(0); + tcg_gen_extu_i32_tl(addr, cpu_R[15]); + tcg_gen_lookup_and_goto_ptr(addr); + tcg_temp_free(addr); } } =20 --=20 2.9.4