]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86-64: Zero-extend lower 32 bits displacement to 64 bits
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jul 2020 16:57:52 +0000 (09:57 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 15 Jul 2020 14:18:45 +0000 (07:18 -0700)
commitb3239a5e9ee881c390ef688ba7948f652dd8ae71
treefb1cce8c24aa90d59d8736d8c82eb40e01ebeda5
parented0e8aece0dc81f54e2593abac7eba3379705a8e
x86-64: Zero-extend lower 32 bits displacement to 64 bits

Since the addr32 (0x67) prefix zero-extends the lower 32 bits address to
64 bits, change disassembler to zero-extend the lower 32 bits displacement
to 64 bits when there is no base nor index registers.

gas/

PR gas/26237
* testsuite/gas/i386/addr32.s: Add tests for 32-bit wrapped around
address.
* testsuite/gas/i386/x86-64-addr32.s: Likewise.
* testsuite/gas/i386/addr32.d: Updated.
* testsuite/gas/i386/x86-64-addr32-intel.d: Likewise.
* testsuite/gas/i386/x86-64-addr32.d: Likewise.
* testsuite/gas/i386/ilp32/x86-64-addr32-intel.d: Likewise.
* testsuite/gas/i386/ilp32/x86-64-addr32.d: Likewise.

opcodes/

PR gas/26237
* i386-dis.c (OP_E_memory): Without base nor index registers,
32-bit displacement to 64 bits.

(cherry picked from commit 8e58ef803cf752cbde547a5064540f05470ea714)
gas/ChangeLog
gas/testsuite/gas/i386/addr32.d
gas/testsuite/gas/i386/addr32.s
gas/testsuite/gas/i386/ilp32/x86-64-addr32-intel.d
gas/testsuite/gas/i386/ilp32/x86-64-addr32.d
gas/testsuite/gas/i386/x86-64-addr32-intel.d
gas/testsuite/gas/i386/x86-64-addr32.d
gas/testsuite/gas/i386/x86-64-addr32.s
opcodes/ChangeLog
opcodes/i386-dis.c