From nobody Sat Feb 7 05:09:53 2026 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 1496851092384116.53053626613985; Wed, 7 Jun 2017 08:58:12 -0700 (PDT) Received: from localhost ([::1]:44788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIdLW-0002J1-Ro for importer@patchew.org; Wed, 07 Jun 2017 11:58:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIdJQ-0000eN-QC for qemu-devel@nongnu.org; Wed, 07 Jun 2017 11:56:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIdJP-0005cC-QG for qemu-devel@nongnu.org; Wed, 07 Jun 2017 11:56:00 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:36155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIdJP-0005b9-JP for qemu-devel@nongnu.org; Wed, 07 Jun 2017 11:55:59 -0400 Received: by mail-qt0-x243.google.com with SMTP id s33so1990432qtg.3 for ; Wed, 07 Jun 2017 08:55:59 -0700 (PDT) Received: from bigtime.twiddle.net.com (184-217-116-168.pools.spcsdns.net. [184.217.116.168]) by smtp.gmail.com with ESMTPSA id i28sm1272525qta.52.2017.06.07.08.55.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jun 2017 08:55:58 -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; bh=v2veKfHhEayApjwYm11wqpDdF+adv8/+qfr6Y9YSduc=; b=vFgeln4HDqp4PQg1TDRM9uRCvpCrxo1FaeXd5IThhd3dPfulNiAioYCnoKOG9ome6m yTLXwCmYmjILdBjSJhJhk+Y2sXa2YQImKHD1IR8PL24wlLxsC6zrY1FLylh2yVXVje++ w09y8JjibOAJ3sMz0CEVWOj09fqhjTx6ZyD+RBxOp9tyJK8rZjWjmV7ZZarENhgw8bl6 IJav+B+hqWE+AfqI9TUr64yfZrH5bxKqpk2w6w/K2mC9Oj2UifGrA+GQXq/aqPAYIEoo fzlfxpq2T0tii1wd39wmdjaukrv39WgHHod798mV2ltht4wPiqrYnC+Vz/cmpwo36NYG ymMA== 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; bh=v2veKfHhEayApjwYm11wqpDdF+adv8/+qfr6Y9YSduc=; b=pV2kzrwDISXA7ZmQ9QBmb/VCEdtD+9kPLJURP+N5iaVHK6OJTnJpv1WPDSnSONP+Ah O/d9+7xXLpDDC9pKuQdsxf4qPo361KOEnPcuNQ15pJwQ7Z3szmsMZP6OSPWxZPZvpzZ+ IlVQ6VXlJV9Szug5/Z/JIVcgLrhuBzm0JJtdohYchcHdVtBWwMp1Ap2Zjku6H9wmXUWB TcnMHmd9hGGopnfOUbg/i/cwWCKvdRYk8IctnvfE54xea29nHylxcMpO3qJuJqkivYnw YoEFraBpEvc1WhkjZpZcnQ20tDTf5ReHq4BUm6+et7oYySaciFx+cOPaT1U5KeHc8vAW Jjeg== X-Gm-Message-State: AKS2vOw5Y5bYdLvgY1ysyvtUZYCrinX2seXbGsZ1hhRluqYtKTRNWWIh lnFTYRxWwkiIAlknBjQ= X-Received: by 10.55.39.131 with SMTP id n125mr40449609qkn.223.1496850958686; Wed, 07 Jun 2017 08:55:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 7 Jun 2017 08:55:33 -0700 Message-Id: <20170607155536.1193-5-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170607155536.1193-1-rth@twiddle.net> References: <20170607155536.1193-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH v4 4/7] target/arm: Use indirect branch for goto_tb 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: cota@braap.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" Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5 +---- tcg/arm/tcg-target.inc.c | 17 ++--------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 87ae10b..724ec73 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -301,7 +301,7 @@ static inline void tlb_flush_by_mmuidx_all_cpus_synced(= CPUState *cpu, #define CODE_GEN_AVG_BLOCK_SIZE 150 #endif =20 -#if defined(__arm__) || defined(_ARCH_PPC) \ +#if defined(_ARCH_PPC) \ || defined(__x86_64__) || defined(__i386__) \ || defined(__sparc__) || defined(__aarch64__) \ || defined(__s390x__) || defined(__mips__) \ @@ -401,9 +401,6 @@ static inline void tb_set_jmp_target1(uintptr_t jmp_add= r, uintptr_t addr) #elif defined(__aarch64__) void aarch64_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr); #define tb_set_jmp_target1 aarch64_tb_set_jmp_target -#elif defined(__arm__) -void arm_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr); -#define tb_set_jmp_target1 arm_tb_set_jmp_target #elif defined(__sparc__) || defined(__mips__) void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr); #else diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 9f5cb66..fce382f 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc.c @@ -1026,16 +1026,6 @@ static void tcg_out_call(TCGContext *s, tcg_insn_uni= t *addr) } } =20 -void arm_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr) -{ - tcg_insn_unit *code_ptr =3D (tcg_insn_unit *)jmp_addr; - tcg_insn_unit *target =3D (tcg_insn_unit *)addr; - - /* we could use a ldr pc, [pc, #-4] kind of branch and avoid the flush= */ - reloc_pc24_atomic(code_ptr, target); - flush_icache_range(jmp_addr, jmp_addr + 4); -} - static inline void tcg_out_goto_label(TCGContext *s, int cond, TCGLabel *l) { if (l->has_value) { @@ -1665,11 +1655,8 @@ static inline void tcg_out_op(TCGContext *s, TCGOpco= de opc, } break; case INDEX_op_goto_tb: - if (s->tb_jmp_insn_offset) { - /* Direct jump method */ - s->tb_jmp_insn_offset[args[0]] =3D tcg_current_code_size(s); - tcg_out_b_noaddr(s, COND_AL); - } else { + tcg_debug_assert(s->tb_jmp_insn_offset =3D=3D 0); + { /* Indirect jump method */ intptr_t ptr =3D (intptr_t)(s->tb_jmp_target_addr + args[0]); tcg_out_movi32(s, COND_AL, TCG_REG_R0, ptr & ~0xfff); --=20 2.9.4