diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-04-23 09:18:06 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-04-23 09:18:06 +0200 |
commit | a9aabc23efcc810e4b1999a735ea82d409cafbe7 (patch) | |
tree | 9aa375261f8a1d8360ea4b3ebef0fd5106e4849d /gas/ChangeLog | |
parent | cce08655c696b771538e325065166ae8fdb7ff46 (diff) | |
download | gdb-a9aabc23efcc810e4b1999a735ea82d409cafbe7.zip gdb-a9aabc23efcc810e4b1999a735ea82d409cafbe7.tar.gz gdb-a9aabc23efcc810e4b1999a735ea82d409cafbe7.tar.bz2 |
x86-64: special case LEA when determining signedness of displacement
LEA behavior without a 64-bit destination is independent of address size
- in particular LEA with 32-bit addressing and 64-bit destination is the
same as LEA with 64-bit addressing and 32-bit destination. IOW checking
merely i.prefix[ADDR_PREFIX] is insufficient. This also means wrong
relocation types (R_X86_64_32S when R_X86_64_32 is needed) were used so
far in such cases.
Note that in one case in build_modrm_byte() the 64-bit check came too
early altogether, and hence gets dropped in favor of the one included in
the new helper. This is benign to non-64-bit code from all I can tell,
but the failure to clear disp16 could have been a latent problem.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r-- | gas/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index aeacaa6..7fe0777 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,12 @@ 2021-04-23 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (want_disp32): New. + (md_assemble): Use it. + (optimize_disp): Likewise. + (build_modrm_byte): Likewise. + +2021-04-23 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (i386_finalize_displacement): Move Disp32S check ... (md_assemble): ... here. |