From nobody Mon May 20 01:26:37 2024 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 1498847919366484.81982958036053; Fri, 30 Jun 2017 11:38:39 -0700 (PDT) Received: from localhost ([::1]:45575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR0oO-0005eV-Qr for importer@patchew.org; Fri, 30 Jun 2017 14:38:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR0na-0005Ix-Nt for qemu-devel@nongnu.org; Fri, 30 Jun 2017 14:37:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dR0nX-0005Xp-JB for qemu-devel@nongnu.org; Fri, 30 Jun 2017 14:37:46 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:33110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dR0nX-0005XA-Cl; Fri, 30 Jun 2017 14:37:43 -0400 Received: by mail-qk0-x244.google.com with SMTP id p21so16479175qke.0; Fri, 30 Jun 2017 11:37:41 -0700 (PDT) Received: from bigtime.twiddle.net.com (97-113-165-157.tukw.qwest.net. [97.113.165.157]) by smtp.gmail.com with ESMTPSA id s3sm2613233qks.31.2017.06.30.11.37.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 11:37:39 -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; bh=bvU8V0Wry6i45+kQSyu0f8CK8rYd/ZdyY3lvEoNGoVk=; b=hphdV5EuOW0xQDlgc6qG4A90KSBPbGQS1I5GiJGslKx32PJxAubSKoNzSEJEh7q4cG dUu2rVnC2o1fSYDv99ymdOe7sg76VMPStEm+XqtxzC1RhQFIW8MenvgifJBhsNY0UJbL vQy06PY9J+EowDyZKpGuUCV8o9gFL3w7GG9WL4PX3xBfG8RMX7cC2HVF334OwM8eG72u ykR6MPwS/HgXTVB/em7OGZ0mN1iVbeho9Tm4iZZ4masX2Z1UnsE/kHlVqFQP6fU2hIcf cbMJRDuJDUfmXr+dOL7F6lj/ts7/wD7xiDpChkOzj4LKbkWfiJv9D1WIHMlcnAeN29jC yxKw== 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; bh=bvU8V0Wry6i45+kQSyu0f8CK8rYd/ZdyY3lvEoNGoVk=; b=eLA8LzF2NvY5kwpGDbEfDdaokeWXBjJ1OsnEQv20KHXAgnEcL6L80IwVlWUrM35eSG wMqQUYmyCVFyW9eRnKiMZgg52LkPCgGdxOdyhUVTcZWax6sTg7yCEWsIAL+LnJhZeKvs wMlaHeBnyC1UP/VsJ2dYRfcPj5tenJcSrj7iHLP1+xhUTaQlJ3UsR2tcCV1LxzM044Jh OERXPXLc86oN+qjanHl0sFxrroWQXOU2UnVQ1ZNa9H+++EJbNXwtJr95obeIZKt8CUPN gkfMZ5aODinSDEjnl3SrDdDJJoGeD1Ii8AKA9lpeJqu17N0W2zcbZJg7MWnJGkrY6hv0 2Qkg== X-Gm-Message-State: AIVw111sgfypNyaLRPwVotY80sxn1bmJucrF/Bj7A+DxdxLLnL2yiBKa PBn1LJNqugyKSknlSfw= X-Received: by 10.55.144.130 with SMTP id s124mr15845331qkd.136.1498847860682; Fri, 30 Jun 2017 11:37:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 30 Jun 2017 11:37:36 -0700 Message-Id: <20170630183736.13222-1-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH] target/ppc: Use tcg_gen_lookup_and_goto_ptr 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: qemu-ppc@nongnu.org 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 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: qemu-ppc@nongnu.org Signed-off-by: Richard Henderson Tested-by: Emilio G. Cota Tested-by: Thomas Huth --- target/ppc/translate.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index c0cd64d..9aa66f5 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -3419,7 +3419,7 @@ static inline bool use_goto_tb(DisasContext *ctx, tar= get_ulong dest) } =20 /*** Branch = ***/ -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) +static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { if (NARROW_MODE(ctx)) { dest =3D (uint32_t) dest; @@ -3441,7 +3441,7 @@ static inline void gen_goto_tb(DisasContext *ctx, int= n, target_ulong dest) gen_debug_exception(ctx); } } - tcg_gen_exit_tb(0); + tcg_gen_lookup_and_goto_ptr(cpu_nip); } } =20 @@ -3479,7 +3479,7 @@ static void gen_b(DisasContext *ctx) #define BCOND_CTR 2 #define BCOND_TAR 3 =20 -static inline void gen_bcond(DisasContext *ctx, int type) +static void gen_bcond(DisasContext *ctx, int type) { uint32_t bo =3D BO(ctx->opcode); TCGLabel *l1; @@ -3543,26 +3543,19 @@ static inline void gen_bcond(DisasContext *ctx, int= type) } else { gen_goto_tb(ctx, 0, li); } - if ((bo & 0x14) !=3D 0x14) { - gen_set_label(l1); - gen_goto_tb(ctx, 1, ctx->nip); - } } else { if (NARROW_MODE(ctx)) { tcg_gen_andi_tl(cpu_nip, target, (uint32_t)~3); } else { tcg_gen_andi_tl(cpu_nip, target, ~3); } - tcg_gen_exit_tb(0); - if ((bo & 0x14) !=3D 0x14) { - gen_set_label(l1); - gen_update_nip(ctx, ctx->nip); - tcg_gen_exit_tb(0); - } - } - if (type =3D=3D BCOND_LR || type =3D=3D BCOND_CTR || type =3D=3D BCOND= _TAR) { + tcg_gen_lookup_and_goto_ptr(cpu_nip); tcg_temp_free(target); } + if ((bo & 0x14) !=3D 0x14) { + gen_set_label(l1); + gen_goto_tb(ctx, 1, ctx->nip); + } } =20 static void gen_bc(DisasContext *ctx) --=20 2.9.4