From f586e3409b752748bf213520c2dbb0b44e0005d8 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 27 Sep 2023 10:54:23 +0200 Subject: [PATCH] x86: tighten .insn SAE and broadcast checking SAE / embedded rounding are invalid when there's the memory operand, as the bit encoding this specifies broadcast in that case. Broadcast needs to be specified on the memory operand. --- gas/config/tc-i386.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index aec4f211faa..5df9fde2b29 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -11546,8 +11546,9 @@ s_insn (int dummy ATTRIBUTE_UNUSED) ? i.broadcast.type || i.broadcast.bytes || i.rounding.type != rc_none || i.mask.reg - : (i.broadcast.type || i.broadcast.bytes) - && i.rounding.type != rc_none)) + : (i.mem_operands && i.rounding.type != rc_none) + || ((i.broadcast.type || i.broadcast.bytes) + && !(i.flags[i.broadcast.operand] & Operand_Mem)))) { as_bad (_("conflicting .insn operands")); goto done; -- 2.30.2