[PATCH] x86/gas: Fix APX TLS IE restrictions
Kong, Lingling
lingling.kong@intel.com
Fri Jul 5 03:11:44 GMT 2024
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
More information about the Binutils
mailing list