]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86-64: Fix support for APX NF TLS IE with 2 operands
authorLingling Kong <lingling.kong@intel.com>
Thu, 4 Jul 2024 08:45:46 +0000 (16:45 +0800)
committerCui, Lili <lili.cui@intel.com>
Fri, 5 Jul 2024 10:25:59 +0000 (18:25 +0800)
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.

gas/config/tc-i386.c

index 9539957f10cbb32a8d1a91bd1df624eeeb2d04c1..28903a77156db9b9d78b4bec43b5e6a3aab217c9 100644 (file)
@@ -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