target/i386: check CF_PARALLEL instead of parallel_cpus

Thereby decoupling the resulting translated code from the current state
of the system.

Backports commit b5e3b4c2aca8eb5a9cfeedfb273af623f17c3731 from qemu
This commit is contained in:
Emilio G. Cota 2019-05-04 22:45:45 -04:00 committed by Lioncash
parent 1715f382b4
commit ad2a4edd76
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5866,7 +5866,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
if (!(s->cpuid_ext_features & CPUID_EXT_CX16))
goto illegal_op;
gen_lea_modrm(env, s, modrm);
if ((s->prefix & PREFIX_LOCK) && tcg_ctx->uc->parallel_cpus) {
if ((s->prefix & PREFIX_LOCK) && (tb_cflags(s->base.tb) & CF_PARALLEL)) {
gen_helper_cmpxchg16b(tcg_ctx, cpu_env, s->A0);
} else {
gen_helper_cmpxchg16b_unlocked(tcg_ctx, cpu_env, s->A0);
@ -5877,7 +5877,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
if (!(s->cpuid_features & CPUID_CX8))
goto illegal_op;
gen_lea_modrm(env, s, modrm);
if ((s->prefix & PREFIX_LOCK) && tcg_ctx->uc->parallel_cpus) {
if ((s->prefix & PREFIX_LOCK) && (tb_cflags(s->base.tb) & CF_PARALLEL)) {
gen_helper_cmpxchg8b(tcg_ctx, cpu_env, s->A0);
} else {
gen_helper_cmpxchg8b_unlocked(tcg_ctx, cpu_env, s->A0);