From patchwork Thu Apr 27 03:29:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 755747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wD2jp5B2kz9s84 for ; Thu, 27 Apr 2017 13:38:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=braap.org header.i=@braap.org header.b="wIPOqglf"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="eQle4HC/"; dkim-atps=neutral Received: from localhost ([::1]:58509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3a8p-00007q-Bn for incoming@patchwork.ozlabs.org; Wed, 26 Apr 2017 23:30:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3a7b-0007wF-1s for qemu-devel@nongnu.org; Wed, 26 Apr 2017 23:29:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3a7a-0001wp-5Q for qemu-devel@nongnu.org; Wed, 26 Apr 2017 23:29:35 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:43409) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d3a7U-0001sq-M7; Wed, 26 Apr 2017 23:29:28 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 58F07209CC; Wed, 26 Apr 2017 23:29:28 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 26 Apr 2017 23:29:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Ta4 tw3WmYm+qHdrHWjt66JRltdhuo18lj+g0a3/yfk4=; b=wIPOqglfUB6qnL1hh97 yWKkEcQ05lVu4TTiZFhx0aOqIIGnsnGBw09xrSN1QHa9MAN5J2Lfb1f+4bJZQZne jYn5xHuw5iy9qI53HvRuVTaDsNzyW7NsJ4l5hw92RzHAdbTbx6OEyDU4saQ/RgAt g9L+aSvtVE8z70Mzh7EkOLi0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=Ta4tw3WmYm+qHdrHWjt66JRltdhuo18lj+g0a3/yf k4=; b=eQle4HC/DPqLr37UDPeaznxsYbxJ6q8WCx7DI6Y2Mlod0w18ZDwCW3OcJ IQ04m2wjjSc/17667we2Y2eJO0XZxtc75IsoiH53fOLp1OkG5oGVHIdflSwWn2z1 ucXsvN1/WGh9tUExzXFzVwcVJ8BdMvVt59Ow+iMO/REgHt6kZQE92/dQShyt7WLe 1Nb/N8U/LCVOz2Et1rU+u7P0k0BFl+6GOMRNB6zljnliE8BX1MUMF5Ss/1VlGcL7 8jrtxOX6TfTtJzWaY4W/i81gh7Fnok+0AANBHk2eRjsuKayX6MBrajxB4gA6DQ8Z qLYxU1TkytzyoD4/HtKhbjTJ9D/og== X-ME-Sender: X-Sasl-enc: UmuCv6wx/fVooVIYAlBWmrOmqCewZc5mbqcq/7BLhlkm 1493263768 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 17B207E442; Wed, 26 Apr 2017 23:29:28 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Wed, 26 Apr 2017 23:29:22 -0400 Message-Id: <1493263764-18657-10-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493263764-18657-1-git-send-email-cota@braap.org> References: <1493263764-18657-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 Subject: [Qemu-devel] [PATCH v4 09/11] target/i386: 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 , Eduardo Habkost , Peter Crosthwaite , Stefan Weil , Alexander Graf , alex.bennee@linaro.org, qemu-arm@nongnu.org, Pranith Kumar , Paolo Bonzini , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Instead of unconditionally exiting to the exec loop, use the gen_jr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index f0e48dc..ea113fe 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -2154,9 +2154,9 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) gen_jmp_im(eip); tcg_gen_exit_tb((uintptr_t)s->tb + tb_num); } else { - /* jump to another page: currently not optimized */ + /* jump to another page */ gen_jmp_im(eip); - gen_eob(s); + gen_jr(s, cpu_tmp0); } }