This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] x86-64/Intel: issue diagnostic for out of range displacement
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Beulich <JBeulich at suse dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 10 Nov 2017 04:57:40 -0800
- Subject: Re: [PATCH] x86-64/Intel: issue diagnostic for out of range displacement
- Authentication-results: sourceware.org; auth=none
- References: <5A05A038020000780018DE85@prv-mh.provo.novell.com>
On Fri, Nov 10, 2017 at 3:48 AM, Jan Beulich <JBeulich@suse.com> wrote:
> ... rather than silently dropping it altogether.
> i386_finalize_displacement() expects baseindex to already be set, so
> the respective statement needs to be moved up. This then also allows a
> subsequent conditional to be simplified.
>
> For this to not regress on 32-bit addressing, break out address size
> guessing from i386_index_check(), invoking the new function earlier so
> that i386_finalize_displacement() has i.prefix[ADDR_PREFIX] available.
> i386_addressing_mode () in turn needs i.base_reg / i.index_reg set
> earlier.
>
> gas/
> 2017-11-10 Jan Beulich <jbeulich@suse.com>
>
> * config/tc-i386.c (i386_index_check): Break out ...
> (i386_addressing_mode): ... this new function.
> * config/tc-i386-intel.c (i386_intel_operand): Do base/index
> swapping and the setting of .baseindex earlier. Call
> i386_addressing_mode.
> * testsuite/gas/i386/x86-64-inval.s: Add out of range
> displacement case.
> * testsuite/gas/i386/x86-64-inval.l: Adjust expectations.
>
OK.
Thanks.
--
H.J.