]> Git Repo - qemu.git/commitdiff
tcg: introduce **tcg_ctxs to keep track of all TCGContext's
authorEmilio G. Cota <[email protected]>
Wed, 12 Jul 2017 22:26:40 +0000 (18:26 -0400)
committerRichard Henderson <[email protected]>
Tue, 24 Oct 2017 20:53:42 +0000 (13:53 -0700)
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.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Emilio G. Cota <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
tcg/tcg.c

index 62f418ac8a6846a0f3183142c64a5844e2e02b3d..24ef6df6b51994950c3db858b026dfe3965d4b3d 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -118,6 +118,9 @@ static bool tcg_out_ldst_finalize(TCGContext *s);
 
 #define TCG_HIGHWATER 1024
 
+static TCGContext **tcg_ctxs;
+static unsigned int n_tcg_ctxs;
+
 static TCGRegSet tcg_target_available_regs[2];
 static TCGRegSet tcg_target_call_clobber_regs;
 
@@ -384,6 +387,8 @@ void tcg_context_init(TCGContext *s)
     }
 
     tcg_ctx = s;
+    tcg_ctxs = &tcg_ctx;
+    n_tcg_ctxs = 1;
 }
 
 /*
This page took 0.029989 seconds and 4 git commands to generate.