]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-i386.c
x86-64/Intel: issue diagnostic for out of range displacement
authorJan Beulich <jbeulich@novell.com>
Mon, 13 Nov 2017 11:19:34 +0000 (12:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Nov 2017 11:19:34 +0000 (12:19 +0100)
commit2abc2bec4d8c241c1cd3972b64162407128b4daf
tree55c7f0738e44fe290e1f5d44d8a8d34fbeb2a037
parented1794ee7a2bd8adc22e5bb8e7343b72758d5692
x86-64/Intel: issue diagnostic for out of range displacement

... 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/ChangeLog
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-inval.l
gas/testsuite/gas/i386/x86-64-inval.s