This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2 4/4] x86: extend LEA's segment override warning to applicable MPX insns
On Fri, Feb 14, 2020 at 3:44 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> Besides LEA there are a couple of MPX insns behaving LEA-like, which
> should be warned about in the same way.
>
> gas/
> 2020-02-XX Jan Beulich <jbeulich@suse.com>
>
> * config/tc-i386.c (process_operands): Also check insn prefix
> for ineffectual segment override warning. Also cover BNDC* and
> BNDMK there. Don't cover possible VEX/EVEX encoded insns there.
> * testsuite/gas/i386/lea.s, testsuite/gas/i386/lea.d,
> testsuite/gas/i386/lea.e: New.
> * testsuite/gas/i386/i386.exp: Run new test.
>
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -7195,7 +7195,8 @@ duplicate:
> }
>
> if ((i.seg[0] || i.prefix[SEG_PREFIX])
> - && i.tm.base_opcode == 0x8d /* lea */
> + && (i.tm.base_opcode == 0x8d /* lea */
> + || ((i.tm.base_opcode | 0x010001) == 0xf30f1b) /* bnd{c[lnu],mk} */)
> && !is_any_vex_encoding(&i.tm))
There is no need for it. Since MPX has been deprecated, I doubt anyone
will update MPX assembly codes even if they trigger this new warning.
--
H.J.