From 1f83c96159d55af9caa96aa8f335ca1fd501a953 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 4 Jul 2023 17:01:10 +0200 Subject: x86: flag EVEX.z set when destination is memory Zeroing-masking is not permitted in this case. See the code comment for how this is being dealt with. --- opcodes/i386-dis.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'opcodes') diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index e440b69..7c41302 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -11855,6 +11855,13 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) if (ins->vex.evex) { + + /* Zeroing-masking is invalid for memory destinations. Set the flag + uniformly, as the consumer will inspect it only for the destination + operand. */ + if (ins->vex.zeroing) + ins->illegal_masking = true; + switch (bytemode) { case dw_mode: -- cgit v1.1