aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorLingling Kong <lingling.kong@intel.com>2024-07-04 16:45:46 +0800
committerCui, Lili <lili.cui@intel.com>2024-07-05 18:25:59 +0800
commit97bf50bb61085cb516929e736b20377bd651a8c5 (patch)
tree365a28a43fe2ac293df0a340032e895c6025f219 /gas/config/tc-i386.c
parent8c1d0aea1df1ad659d1c46a816ee2e41cbcdce77 (diff)
downloadbinutils-97bf50bb61085cb516929e736b20377bd651a8c5.zip
binutils-97bf50bb61085cb516929e736b20377bd651a8c5.tar.gz
binutils-97bf50bb61085cb516929e736b20377bd651a8c5.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9539957..28903a7 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