[PATCH] x86/gas: Fix APX TLS IE restrictions
H.J. Lu
hjl.tools@gmail.com
Thu Jul 25 20:15:06 GMT 2024
On Fri, Jul 5, 2024, 11:11 AM Kong, Lingling <lingling.kong@intel.com>
wrote:
> If there are no comments, I will check it by the end of today.
>
> > -----Original Message-----
> > From: Kong, Lingling
> > Sent: Thursday, July 4, 2024 5:38 PM
> > To: binutils@sourceware.org
> > Cc: Beulich, Jan <JBeulich@suse.com>; H. J. Lu <hjl.tools@gmail.com>
> > Subject: [PATCH] x86/gas: Fix APX TLS IE restrictions
> >
> > Add 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 | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index
> > 3b4d9cacc2e..2382db23e19 100644
> > --- a/gas/config/tc-i386.c
> > +++ b/gas/config/tc-i386.c
> > @@ -7544,9 +7544,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
> > --
> > 2.31.1
>
I opened an assembler bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=32022
Assembler should reject instructions which won't be accepted by linker.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240726/b1b96bf0/attachment.htm>
More information about the Binutils
mailing list