diff options
-rw-r--r-- | target-i386/translate.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c index 8085467945..731b10de06 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -8008,6 +8008,11 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, } /* fallthru */ case 0xf9 ... 0xff: /* sfence */ + if (!(s->cpuid_features & CPUID_SSE) + || (prefixes & PREFIX_LOCK)) { + goto illegal_op; + } + break; case 0xe8 ... 0xef: /* lfence */ case 0xf0 ... 0xf7: /* mfence */ if (!(s->cpuid_features & CPUID_SSE2) |