mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:25:11 +00:00
target-i386: tcg: Accept clwb instruction
Accept the clwb instruction (66 0F AE /6) if its corresponding feature flag is enabled on CPUID[7]. Backports commit 5e1fac2dba7780e0cb2c022d4b39586af70bea0d from qemu
This commit is contained in:
parent
479f36ef8e
commit
6d0dae872d
|
@ -8377,10 +8377,21 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: /* lfence */
|
case 5: /* lfence */
|
||||||
case 6: /* mfence */
|
|
||||||
if ((modrm & 0xc7) != 0xc0 || !(s->cpuid_features & CPUID_SSE2))
|
if ((modrm & 0xc7) != 0xc0 || !(s->cpuid_features & CPUID_SSE2))
|
||||||
goto illegal_op;
|
goto illegal_op;
|
||||||
break;
|
break;
|
||||||
|
case 6: /* mfence/clwb */
|
||||||
|
if (s->prefix & PREFIX_DATA) {
|
||||||
|
/* clwb */
|
||||||
|
if (!(s->cpuid_7_0_ebx_features & CPUID_7_0_EBX_CLWB))
|
||||||
|
goto illegal_op;
|
||||||
|
gen_nop_modrm(env, s, modrm);
|
||||||
|
} else {
|
||||||
|
/* mfence */
|
||||||
|
if ((modrm & 0xc7) != 0xc0 || !(s->cpuid_features & CPUID_SSE2))
|
||||||
|
goto illegal_op;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 7: /* sfence / clflush */
|
case 7: /* sfence / clflush */
|
||||||
if ((modrm & 0xc7) == 0xc0) {
|
if ((modrm & 0xc7) == 0xc0) {
|
||||||
/* sfence */
|
/* sfence */
|
||||||
|
|
Loading…
Reference in a new issue