From nobody Mon Feb 9 09:33:32 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.zohomail.com; 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 1500521526164620.7356665419802; Wed, 19 Jul 2017 20:32:06 -0700 (PDT) Received: from localhost ([::1]:35897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY2C4-0005ot-Am for importer@patchew.org; Wed, 19 Jul 2017 23:32:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY1qQ-00017V-Rq for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dY1qM-0005vS-LL for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:42 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58839) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dY1qM-0005tX-Ey for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:38 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C039020B5C; Wed, 19 Jul 2017 23:09:37 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 19 Jul 2017 23:09:37 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 85A2C7E057; Wed, 19 Jul 2017 23:09:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=FUJLAMy+bUx1Eod MccvwYc91f48oZh49i9Jgzy5qjNQ=; b=exj5gwAl62U6T0k9XHkLXVdIOLXCu96 Ke3zcfxhijmVlpLz76ySrFmWqMhzZJCBwG+07V0b1+QayMhWE9MrRwVstwk88NeM SyVXWH6/5zR5yFl6S+wEkwx91PveD/aVoKXf9qolz6KsQlixGJLSfrHHvWGtPknF ClotAThgMMcA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=FUJLAMy+bUx1EodMccvwYc91f48oZh49i9Jgzy5qjNQ=; b=ABrcTkaM m2+sjtHarsBhW5OBaRqQcLYGlCEdB9/84PK+Ud4EGKKzckwMFymrg6J0kipFct80 b/4kcX8L3+261RGuVSWe0XgUhiq21N6OuzSDcQP58E4PtILK8bIytm+v4AJn+INi bqOJSvL5EOK6Kca/jgKEqR1ahGi3FBCaHtTInMdYBTiwoODzLUzPaFxxxdKCoQxO DpPn/g4poFd+9LUr9c7CtYTh9FwrSCWE7r8EYcOQuAMAkLzuUUyqys7tnCH3NHO3 daxxSHwNmy/WpuSedUgoAzfJQ+ZM4gN+gzGAiHsikTGStUSQsXPwQpnAWZWeIdF/ fnodsbjSV5XNyw== X-ME-Sender: X-Sasl-enc: FMfevtgwghwB4JPuD5h6CBSvof4SDhjLr9/IRGWU2AAL 1500520177 From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 23:09:20 -0400 Message-Id: <1500520169-23367-35-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500520169-23367-1-git-send-email-cota@braap.org> References: <1500520169-23367-1-git-send-email-cota@braap.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v3 34/43] gen-icount: fold exitreq_label into TCGContext 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Groundwork for supporting multiple TCG contexts. Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Emilio G. Cota --- include/exec/gen-icount.h | 7 +++---- tcg/tcg.h | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c58b0b2..fe80176 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -6,13 +6,12 @@ /* Helpers for instruction counting code generation. */ =20 static int icount_start_insn_idx; -static TCGLabel *exitreq_label; =20 static inline void gen_tb_start(TranslationBlock *tb) { TCGv_i32 count, imm; =20 - exitreq_label =3D gen_new_label(); + tcg_ctx->exitreq_label =3D gen_new_label(); if (tb_cflags(tb) & CF_USE_ICOUNT) { count =3D tcg_temp_local_new_i32(); } else { @@ -34,7 +33,7 @@ static inline void gen_tb_start(TranslationBlock *tb) tcg_temp_free_i32(imm); } =20 - tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, exitreq_label); + tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); =20 if (tb_cflags(tb) & CF_USE_ICOUNT) { tcg_gen_st16_i32(count, tcg_ctx->tcg_env, @@ -52,7 +51,7 @@ static inline void gen_tb_end(TranslationBlock *tb, int n= um_insns) tcg_set_insn_param(icount_start_insn_idx, 1, num_insns); } =20 - gen_set_label(exitreq_label); + gen_set_label(tcg_ctx->exitreq_label); tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_REQUESTED); =20 /* Terminate the linked list. */ diff --git a/tcg/tcg.h b/tcg/tcg.h index c88746d..f83f9b0 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -712,6 +712,8 @@ struct TCGContext { /* The TCGBackendData structure is private to tcg-target.inc.c. */ struct TCGBackendData *be; =20 + TCGLabel *exitreq_label; + TCGTempSet free_temps[TCG_TYPE_COUNT * 2]; TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */ =20 --=20 2.7.4