The AVX instruction set is not supported by Qemu.
However, some AVX instructions are properly decoded and emulated as their
legacy SSE version.
This patch prevent this by generating an illegal_op instead of a bogus SSE
instruction.
Signed-off-by: Stevie Lavern <stevie.lavern@gmail.com>
---
target/i386/tcg/translate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 05f9336c9b..996fce65b2 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -4706,6 +4706,11 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
}
}
+ if (s->vex_l & 1) {
+ /* If set, registers are 256bits.
+ Fail as AVX extension is not supported. */
+ goto illegal_op;
+ }
s->prefix = prefixes;
s->aflag = aflag;
s->dflag = dflag;
--