From b1311c4acf503dc9c1a310cc40b64f05b08833dc Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Wed, 12 Jul 2017 17:15:52 -0400 Subject: tcg: define tcg_init_ctx and make tcg_ctx a pointer Groundwork for supporting multiple TCG contexts. The core of this patch is this change to tcg/tcg.h: > -extern TCGContext tcg_ctx; > +extern TCGContext tcg_init_ctx; > +extern TCGContext *tcg_ctx; Note that for now we set *tcg_ctx to whatever TCGContext is passed to tcg_context_init -- in this case &tcg_init_ctx. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/cris/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/cris/translate.c') diff --git a/target/cris/translate.c b/target/cris/translate.c index 6774acc7af..6687b838d5 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3369,7 +3369,7 @@ void cris_initialize_tcg(void) int i; cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env"); - tcg_ctx.tcg_env = cpu_env; + tcg_ctx->tcg_env = cpu_env; cc_x = tcg_global_mem_new(cpu_env, offsetof(CPUCRISState, cc_x), "cc_x"); cc_src = tcg_global_mem_new(cpu_env, -- cgit v1.2.1