From: Lingling Kong Date: Thu, 4 Jul 2024 08:45:46 +0000 (+0800) Subject: x86-64: Fix support for APX NF TLS IE with 2 operands X-Git-Tag: binutils-2_43~189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97bf50bb61085cb516929e736b20377bd651a8c5;p=thirdparty%2Fbinutils-gdb.git x86-64: Fix support for APX NF TLS IE with 2 operands Added the restriction in assemble for APX TLS IE that the destination can only be a register. gas/ * config/tc-i386.c (md_assemble): Added stricter restrictions for APX TLS IE. --- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 9539957f10c..28903a77156 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7543,9 +7543,8 @@ md_assemble (char *line) && i.mem_operands == 1 && i.base_reg && i.base_reg->reg_num == RegIP - && i.tm.operand_types[0].bitfield.class == Reg - && (i.tm.operand_types[2].bitfield.class == Reg - || i.tm.operands == 2)) + && i.reg_operands == (i.operands - 1) + && i.types[i.operands - 1].bitfield.class == Reg) /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2 add foo@gottpoff(%rip), %reg, %reg2