[PATCH 1/3] x86: extend LEA's segment override warning

Jan Beulich jbeulich@suse.com
Thu Feb 13 14:48:00 GMT 2020


On 13.02.2020 15:11, H.J. Lu wrote:
> On Thu, Feb 13, 2020 at 6:05 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> For one both possible forms should be warned about. And then there are
>> a couple of MPX insns behaving LEA-like, which should be warned about in
>> the same way. Finally, to guard against future surprises, qualify the
>> original opcode check by excluding VEX/EVEX-like templates.
>>
>> 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.
>>
> 
> Why should it be warning, not error?

Because the code isn't wrong, just inefficient. I also don't think
converting from warning to error should be done in the same patch
as extending the coverage of what gets a diagnostic emitted.

Jan



More information about the Binutils mailing list