aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorLingling Kong <lingling.kong@intel.com>2024-07-02 15:49:19 +0800
committerLingling Kong <lingling.kong@intel.com>2024-07-03 10:18:36 +0800
commit2d5428d8cdd9c72f0a1738de775c2c841b334d55 (patch)
tree94a14d79b190092e955fe6eb748b744fb8ab8261 /gas/config/tc-i386.c
parent0c43f0a1bc2bf44ddd6d93441330a56883de2ede (diff)
downloadfsf-binutils-gdb-2d5428d8cdd9c72f0a1738de775c2c841b334d55.zip
fsf-binutils-gdb-2d5428d8cdd9c72f0a1738de775c2c841b334d55.tar.gz
fsf-binutils-gdb-2d5428d8cdd9c72f0a1738de775c2c841b334d55.tar.bz2
x86-64: Support APX NF TLS IE with 2 operands
Support APX NF TLS IE with 2 operands.Verify it with ld and gold. gas/ * config/tc-i386.c (md_assemble): Allow APX NF TLS IE with 2 operands. * testsuite/gas/i386/x86-64-gottpoff.d: Updated. * testsuite/gas/i386/x86-64-gottpoff.s: Add APX NF TLS IE tests with 2 operands. gold/ * testsuite/x86_64_ie_to_le.s: Add APX NF TLS IE tests with 2 operands. * testsuite/x86_64_ie_to_le.sh: Updated. ld/ * testsuite/ld-x86-64/tlsbindesc.s: Add APX NF TLS IE tests with 2 operands. * testsuite/ld-x86-64/tlsbindesc.d: Updated. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2e19431..3b4d9ca 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -7545,8 +7545,14 @@ md_assemble (char *line)
&& 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)
- /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2. */
+ && (i.tm.operand_types[2].bitfield.class == Reg
+ || i.tm.operands == 2))
+ /* Allow APX:
+ add %reg1, foo@gottpoff(%rip), %reg2
+ add foo@gottpoff(%rip), %reg, %reg2
+ {nf} add foo@gottpoff(%rip), %reg
+ {nf} add %reg1, foo@gottpoff(%rip), %reg2
+ {nf} add foo@gottpoff(%rip), %reg, %reg2. */
break;
/* Fall through. */
case BFD_RELOC_386_TLS_GOTIE: