From e82d5a2460b0e176128027651ff9b104e4bdf5cc Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Sun, 16 Jul 2017 15:13:52 -0400 Subject: tcg: check CF_PARALLEL instead of parallel_cpus Thereby decoupling the resulting translated code from the current state of the system. The tb->cflags field is not passed to tcg generation functions. So we add a field to TCGContext, storing there a copy of tb->cflags. Most architectures have <= 32 registers, which results in a 4-byte hole in TCGContext. Use this hole for the new field. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 1 + 1 file changed, 1 insertion(+) (limited to 'accel/tcg') diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 91fd6e444b..dcd47cd692 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1296,6 +1296,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tb->flags = flags; tb->cflags = cflags; tb->trace_vcpu_dstate = *cpu->trace_dstate; + tcg_ctx.tb_cflags = cflags; #ifdef CONFIG_PROFILER tcg_ctx.tb_count1++; /* includes aborted translations because of -- cgit v1.2.3