From patchwork Wed Oct 25 09:35:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117073 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp648780qgn; Wed, 25 Oct 2017 02:56:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TFM0qWbsLw5AJPzoBVAWUo8CNWOlNwfhH5+3OQInXypeknSIIHaWnpgOfm+OZGrQnOsAb0 X-Received: by 10.129.51.74 with SMTP id z71mr4327920ywz.169.1508925370364; Wed, 25 Oct 2017 02:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508925370; cv=none; d=google.com; s=arc-20160816; b=ucKHiX/XqNrJrquTDVjPwu9vjR9+tB+UxA/36YK2G7OIMDK8K8qPYBS6/5VsoHyVhQ 9D70Lo3AKJDd8QXihzzml8mF1jm1GMgIiSneRxdAcCi2QrvAAh3OKGbcNkTX/Kc+tj+u I6KbGlrjTwK5pGGxdZ3gqhwDTKyMNHl6jUCekobI/FxCF0l8YC7ZCl5j8cN4hf35J1tK s5WC3v3oSLwnQk/FuFag/4g0SVUkNyo1xwVFeLZzfhTw/94j0u2yG4dLBSqdO2z46Cvk 4KdPR6t8wfU6dirOPeIjzljsjOgbHVAq1Rt9lanihMRSpTDLrX5+/32EJkznvEDIM6Tf pYAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Sa6uo3rj/SL5EFTrIk1mR9VrwCgR8v1yqAwPesoy4+0=; b=O+G9+MRDjC0sf4Ul5JkPV75p4GBkoA16mV3NMTj6zNlmnQExNioUPgyzzoAC6dkca8 Ve5uslmoq9XVaWjqpDxJh88192h0sjMP33RhaJqWAJ1cxkvydx0hQD9JvXiyxC6MPM9e y72zfRE9i7PAyfAwCpql/SZiqkOapQZT3MeWKjzYcwA8er7c0sry9gfiYHlXuKEsEj87 /nR9aHJTKvr7VNuzX+mGhMjw56vTedW24MPEye8dPM+9/X13olHuxCokpqkIGGEiTEc0 5LuMqcLdQKzL1hvCxXakRhiAbjGBm2wzROS3s34pdzzST29IJSCviJ/nJHp1mWGCFTtp a8vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VUZUM3Jy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s83si361615yba.704.2017.10.25.02.56.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 25 Oct 2017 02:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VUZUM3Jy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7IPx-0000XX-SE for patch@linaro.org; Wed, 25 Oct 2017 05:56:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7I6z-0000JL-4c for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7I6y-0000EX-3j for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:33 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:46394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7I6x-0000DI-Tl for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:32 -0400 Received: by mail-wm0-x242.google.com with SMTP id m72so634438wmc.1 for ; Wed, 25 Oct 2017 02:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Sa6uo3rj/SL5EFTrIk1mR9VrwCgR8v1yqAwPesoy4+0=; b=VUZUM3JylPLzLDM0PxHXHPRqptO2Flqf3CeG6DxxRQojJSL91G0ncg3U76X/RI5aKp utcSXiFJ6KD6zCfd56nlyTYWfkqZudDNQElKLVSqTH/VVASxMUOoZgxq/L2NUb5gMiMn 12h1zQ2na5TRyQHX/Ae9tzD749eTIvHGr99YY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Sa6uo3rj/SL5EFTrIk1mR9VrwCgR8v1yqAwPesoy4+0=; b=UJOpgFVKJ1qAmYKpOXtupuHKXA2tWNZ7/xa60mHWkj5bgyvp8iyA66l1oFx0G7F02i wwAJMU4MoqRd3hNvQ3UEJ9CNM8QUNBteK+DvgJHcacu/TCYgGTXVNsT2Kkfx3ra7RUTe zvvgIsi7wOUa08O/XIsi8/M6H4Lcq2fG8X7yrsmlqPBiFQlGUDdV9VXtljjGsHNCh8tn u+DbLUeghKfAPJ9g9hxUoP+QDshZhj7VwfV2QeQcxVctMqW811h7m6BI1vmYiiLLWsWs uoOVKA+vxyZxiu0C4NH/a7+CSeepXmm++pTQBQM4IsIACbFrMVNK37isHIBsSOjhzdzB gQ/Q== X-Gm-Message-State: AMCzsaWNDysjZ8ol6sfzFnZ6jeL736YD2P8FWLL8gpA5fSPaR0+bESah qQp8GcR3bAxl+FNh62Acxe470r8EYPw= X-Received: by 10.28.211.66 with SMTP id k63mr1094812wmg.33.1508924190735; Wed, 25 Oct 2017 02:36:30 -0700 (PDT) Received: from cloudburst.twiddle.net ([62.168.35.107]) by smtp.gmail.com with ESMTPSA id v23sm2751025wmh.8.2017.10.25.02.36.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 02:36:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 11:35:26 +0200 Message-Id: <20171025093535.10175-43-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171025093535.10175-1-richard.henderson@linaro.org> References: <20171025093535.10175-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 42/51] 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: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 7 +++---- tcg/tcg.h | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) -- 2.13.6 diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c58b0b2585..fe80176462 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -6,13 +6,12 @@ /* Helpers for instruction counting code generation. */ static int icount_start_insn_idx; -static TCGLabel *exitreq_label; static inline void gen_tb_start(TranslationBlock *tb) { TCGv_i32 count, imm; - exitreq_label = gen_new_label(); + tcg_ctx->exitreq_label = gen_new_label(); if (tb_cflags(tb) & CF_USE_ICOUNT) { count = tcg_temp_local_new_i32(); } else { @@ -34,7 +33,7 @@ static inline void gen_tb_start(TranslationBlock *tb) tcg_temp_free_i32(imm); } - tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, exitreq_label); + tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); 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 num_insns) tcg_set_insn_param(icount_start_insn_idx, 1, num_insns); } - gen_set_label(exitreq_label); + gen_set_label(tcg_ctx->exitreq_label); tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_REQUESTED); /* Terminate the linked list. */ diff --git a/tcg/tcg.h b/tcg/tcg.h index 17fd146557..cca85b4d85 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -675,6 +675,8 @@ struct TCGContext { struct TCGLabelPoolData *pool_labels; #endif + TCGLabel *exitreq_label; + TCGTempSet free_temps[TCG_TYPE_COUNT * 2]; TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */