[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 36/43] tcg: introduce **tcg_ctxs to keep track of
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v3 36/43] tcg: introduce **tcg_ctxs to keep track of all TCGContext's |
Date: |
Wed, 19 Jul 2017 23:09:22 -0400 |
Groundwork for supporting multiple TCG contexts.
Note that having n_tcg_ctxs is unnecessary. However, it is
convenient to have it, since it will simplify iterating over the
array: we'll have just a for loop instead of having to iterate
over a NULL-terminated array (which would require n+1 elems)
or having to check with ifdef's for usermode/softmmu.
Signed-off-by: Emilio G. Cota <address@hidden>
---
tcg/tcg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index f907c47..2217314 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -115,6 +115,8 @@ static int tcg_target_const_match(tcg_target_long val,
TCGType type,
static void tcg_out_tb_init(TCGContext *s);
static bool tcg_out_tb_finalize(TCGContext *s);
+static TCGContext **tcg_ctxs;
+static unsigned int n_tcg_ctxs;
static TCGRegSet tcg_target_available_regs[2];
static TCGRegSet tcg_target_call_clobber_regs;
@@ -382,6 +384,8 @@ void tcg_context_init(TCGContext *s)
}
tcg_ctx = s;
+ tcg_ctxs = &tcg_ctx;
+ n_tcg_ctxs = 1;
}
/*
--
2.7.4
- [Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers, (continued)
- [Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 43/43] tcg: enable multiple TCG contexts in softmmu, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 38/43] util: move qemu_real_host_page_size/mask to osdep.h, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 27/43] translate-all: use a binary search tree to track TBs in TBContext, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 30/43] tci: move tci_regs to tcg_qemu_tb_exec's stack, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 14/43] target/hppa: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 36/43] tcg: introduce **tcg_ctxs to keep track of all TCGContext's,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v3 31/43] tcg: take tb_ctx out of TCGContext, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 39/43] osdep: introduce qemu_mprotect_rwx/none, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 41/43] tcg: define TCG_HIGHWATER, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 12/43] tcg: convert tb->cflags reads to tb_cflags(tb), Emilio G. Cota, 2017/07/19
- Re: [Qemu-devel] [PATCH v3 00/43] tcg: support for multiple TCG contexts, no-reply, 2017/07/20