From patchwork Mon Oct 16 17:26:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 115973 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3964318qgn; Mon, 16 Oct 2017 11:01:49 -0700 (PDT) X-Received: by 10.55.27.25 with SMTP id b25mr14506064qkb.144.1508176909168; Mon, 16 Oct 2017 11:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508176909; cv=none; d=google.com; s=arc-20160816; b=XNYxg406Ef4JlgU/h8INwZ5U7PpEMJAmojpLBhfIWjUGsISWrocqVzZjLu0mgwoIxt 4FsID2rxB91QxHPSGGSigtJPy4ya3iPTTeJVsJlZgTa/JCVnht2TYN8462gYUS8HZh45 z4E9nI27I6c76YTFyjFaX0Ue5V5RaKXOWmUIns950n0cBgRimyI2qGzUU5hsHNIPYidf K382K0rE9zH9CXiAGaoxojl2xYMCBJBJ324tSMGFtHzigMtaXefM4NwVxH1YIR69PiA+ or7J85C1j1Ef1Q+TFtE3YX9SqGrPNBFInokj/9s1BCVyQYVoMSuJu1M4QqxHqUzcZAox 26vA== 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=ViV/bGkaXUS0nCNcyrWZvDanioqzWbtSBi1CASquMq0=; b=YIzprxRwzk2HKMGakSbI8N5hjGwU50ghqvV+QMukepKkU1Yk5Y1ZoahRUcGRi1L7gK 2Abj61nZC25X+4ProA462NTn0TH88NV82+wkhLzrCjMeZDNzI7mWb7XVbq01C2TqBwX3 i32iSM7XKecltSZ4Lrds9Eb8JJhjntR+5gJke69Dl+ouinA1egq7CM13PqALhOpzrDBu mEaWaC1/bjZpZ/nFKdPb1YeY9PplwENP0xmcUs+hu34ZJegcFEmSdAyoCDoISBs0ssby 81JNXNaKZyEA/J02Md8GCPhsVwk9KeZc589oFuEUxWP9ZrvxhPUZBvdqg+8BuphRPGF8 ML5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=N42j7RRO; 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 o74si865944qka.351.2017.10.16.11.01.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 11:01:49 -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=N42j7RRO; 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]:34457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e49hz-0007PP-49 for patch@linaro.org; Mon, 16 Oct 2017 14:01:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e49Aa-0002oL-61 for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:27:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e49AZ-00040U-1T for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:27:16 -0400 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:46254) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e49AY-0003yr-Ra for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:27:14 -0400 Received: by mail-pf0-x233.google.com with SMTP id p87so16296477pfj.3 for ; Mon, 16 Oct 2017 10:27:14 -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=ViV/bGkaXUS0nCNcyrWZvDanioqzWbtSBi1CASquMq0=; b=N42j7RROlSU/aw6k3dy9sfXc76fzkIZXgDcVwT8ZcXFknXW2sn9XA3pG9r5MHQfusx 6In/CLfmt/g8oF3/cebxTA14iDFtTRMr3XaYNWN7tFSO9Fz9NK9ZdlCkIhkOatg5a1WD txNdruWyRCN9Wfim2KXjLem6z/nb9TG848kxk= 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=ViV/bGkaXUS0nCNcyrWZvDanioqzWbtSBi1CASquMq0=; b=MfrPtp8RzwLB1uZeV97o1rvb1Xg/Z7w88Lvg98Pt7cj9ljkdPFa9A0CQdUqj68iz+n 02J4G9AqklaK0OTjGD0DqsURN/U5ycgq2Ywlnl7/2iFxcNHhG9WPH8cv29y0mWEDIsyh 8gTCo7bTtEv7+h0/iMVYZFtg1zxHPKFuhh9lvCjC/inzaF7YMK94YT68gSWxN2V0WCj0 XQ6nl62o3Psxh3fOCJcE9gjtUIMRD3iRHqhpwaDMq6jPXJPxPwjsvICGluuON++TlkA4 WnGqgp8kwuZJ+8IStKz6mT84OgiFvfWEZcpOCVAiztqWwVZ/6LmBlGL7hJarQ+3owWwT kuSQ== X-Gm-Message-State: AMCzsaVaHQSwwPQ6KHo/aDc1amkNxpviNqj9e+GrjNTx4/WEC91grjJ8 WBC6yKkuyWusoToNxHbb0UxiGQy5Wes= X-Google-Smtp-Source: AOwi7QDf5u+1l5aRR63BdzHsJaVeDBGY3CDRRI6KgU/lurnlBuTfEgaxT0WQdDncJOm1lJG3C6IiEQ== X-Received: by 10.159.207.131 with SMTP id z3mr9725159plo.191.1508174833726; Mon, 16 Oct 2017 10:27:13 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-104-76.tukw.qwest.net. [97.126.104.76]) by smtp.gmail.com with ESMTPSA id i187sm5594249pfc.96.2017.10.16.10.27.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 10:27:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 16 Oct 2017 10:26:02 -0700 Message-Id: <20171016172609.23422-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171016172609.23422-1-richard.henderson@linaro.org> References: <20171016172609.23422-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: 2607:f8b0:400e:c00::233 Subject: [Qemu-devel] [PATCH v6 43/50] 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: cota@braap.org 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 --- 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 859020a0fd..dd11d9f835 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -717,6 +717,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 */