qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/19] target/i386: validate VEX.W for AVX instructions


From: Richard Henderson
Subject: Re: [PATCH v2 02/19] target/i386: validate VEX.W for AVX instructions
Date: Thu, 19 Oct 2023 08:45:52 -0700
User-agent: Mozilla Thunderbird

On 10/19/23 03:46, Paolo Bonzini wrote:
Instructions in VEX exception class 6 generally look at the value of
VEX.W.  Note that the manual places some instructions incorrectly in
class 4, for example VPERMQ which has no non-VEX encoding and no legacy
SSE analogue.  AMD does a mess of its own, as documented in the comment
that this patch adds.

Most of them are checked for VEX.W=0, and are listed in the manual
(though with an omission) in table 2-16; VPERMQ and VPERMPD check for
VEX.W=1, which is only listed in the instruction description.  Others,
such as VPSRLV, VPSLLV and the FMA3 instructions, use VEX.W to switch
between a 32-bit and 64-bit operation.

Fix more of the class 4/class 6 mismatches, and implement the check for
VEX.W in TCG.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  target/i386/tcg/decode-new.c.inc | 133 +++++++++++++++++++++----------
  target/i386/tcg/decode-new.h     |   6 ++
  2 files changed, 99 insertions(+), 40 deletions(-)

Acked-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]