target-i386: Generate fences for x86
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Message-Id: <20160714202026.9727-15-bobby.prani@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
ce1bd93f94
commit
cc19e497a0
@ -8012,13 +8012,21 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
|
|||||||
|| (prefixes & PREFIX_LOCK)) {
|
|| (prefixes & PREFIX_LOCK)) {
|
||||||
goto illegal_op;
|
goto illegal_op;
|
||||||
}
|
}
|
||||||
|
tcg_gen_mb(TCG_MO_ST_ST | TCG_BAR_SC);
|
||||||
break;
|
break;
|
||||||
case 0xe8 ... 0xef: /* lfence */
|
case 0xe8 ... 0xef: /* lfence */
|
||||||
|
if (!(s->cpuid_features & CPUID_SSE)
|
||||||
|
|| (prefixes & PREFIX_LOCK)) {
|
||||||
|
goto illegal_op;
|
||||||
|
}
|
||||||
|
tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC);
|
||||||
|
break;
|
||||||
case 0xf0 ... 0xf7: /* mfence */
|
case 0xf0 ... 0xf7: /* mfence */
|
||||||
if (!(s->cpuid_features & CPUID_SSE2)
|
if (!(s->cpuid_features & CPUID_SSE2)
|
||||||
|| (prefixes & PREFIX_LOCK)) {
|
|| (prefixes & PREFIX_LOCK)) {
|
||||||
goto illegal_op;
|
goto illegal_op;
|
||||||
}
|
}
|
||||||
|
tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user