From 22ea31cdf752c3307c5008cb2987536e8f0d6930 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Wed, 20 Jul 2022 13:48:13 +0200 Subject: [PATCH] Fail when VEX.L is set in SSE instructions (AVX is not supported) Closes #1656 --- qemu/target/i386/translate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu/target/i386/translate.c b/qemu/target/i386/translate.c index eef26242..b4dc56f2 100644 --- a/qemu/target/i386/translate.c +++ b/qemu/target/i386/translate.c @@ -3378,6 +3378,10 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b, if (is_xmm) reg |= rex_r; mod = (modrm >> 6) & 3; + /* VEX.L (256 bit) encodings are not supported */ + if (s->vex_l != 0) { + goto illegal_op; // perhaps it should be unknown_op? + } if (sse_fn_epp == SSE_SPECIAL) { b |= (b1 << 8); switch(b) {