1
0
Fork 0
mirror of https://github.com/yuzu-emu/unicorn.git synced 2025-01-11 18:55:27 +00:00

tcg: Emit barriers with parallel_cpus

Backports commit 91682118aa330aff7e8ef0cc685c32d101f49940 from qemu
This commit is contained in:
Richard Henderson 2018-02-27 22:27:49 -05:00 committed by Lioncash
parent 064543a415
commit b48508a6c1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -149,17 +149,7 @@ void tcg_gen_op6(TCGContext *ctx, TCGOpcode opc, TCGArg a1, TCGArg a2,
void tcg_gen_mb(TCGContext *ctx, TCGBar mb_type)
{
bool emit_barriers = true;
#ifndef CONFIG_USER_ONLY
/* TODO: When MTTCG is available for system mode, we will check
* the following condition and enable emit_barriers
* (qemu_tcg_mttcg_enabled() && smp_cpus > 1)
*/
emit_barriers = false;
#endif
if (emit_barriers) {
if (ctx->uc->parallel_cpus) {
tcg_gen_op1(ctx, INDEX_op_mb, mb_type);
}
}