aboutsummaryrefslogtreecommitdiff
path: root/gas/ChangeLog
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-04-26 10:37:30 +0200
committerJan Beulich <jbeulich@suse.com>2021-04-26 10:37:30 +0200
commitfe134c656991cda74ab7bad80947930f666f8907 (patch)
treeeca41b24b1d7416e13375c9dc9685b1ebf5b5a4e /gas/ChangeLog
parentb818855549013ba43e730e07f790e5cbfd16a757 (diff)
downloadgdb-fe134c656991cda74ab7bad80947930f666f8907.zip
gdb-fe134c656991cda74ab7bad80947930f666f8907.tar.gz
gdb-fe134c656991cda74ab7bad80947930f666f8907.tar.bz2
x86: optimize LEA
Over the years I've seen a number of instances where people used lea (%reg1), %reg2 or lea symbol, %reg despite the same thing being expressable via MOV. Since additionally LEA often has restrictions towards the ports it can be issued to, while MOV typically gets dealt with simply by register renaming, transform to MOV when possible (without growing opcode size and without altering involved relocation types). Note that for Mach-O the new 64-bit testcases would fail (for BFD_RELOC_X86_64_32S not having a representation), and hence get skipped there.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r--gas/ChangeLog13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 585c98b..1e056f7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,18 @@
2021-04-26 Jan Beulich <jbeulich@suse.com>
+ * config/tc-i386.c (want_disp32): Also check for SIZE32.
+ (optimize_encoding): Handle LEA.
+ * testsuite/gas/i386/lea.s, testsuite/gas/i386/lea.d,
+ testsuite/gas/i386/lea.e, testsuite/gas/i386/lea-optimize.d:
+ Add many more forms.
+ * testsuite/gas/i386/lea16.s, testsuite/gas/i386/lea16-optimize.d,
+ testsuite/gas/i386/lea64.s, testsuite/gas/i386/lea64.d,
+ testsuite/gas/i386/lea64.e, testsuite/gas/i386/lea64-optimize.d:
+ New.
+ * testsuite/gas/i386/i386.exp: Run new tests.
+
+2021-04-26 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386.c (md_apply_fix): Mark BFD_RELOC_X86_64_32S as
signed.
* testsuite/gas/i386/x86-64-addr32-bad.s,