x86: suppress LEA optimization in a specific 16-bit case
authorJan Beulich <jbeulich@suse.com>
Thu, 10 Jun 2021 10:39:08 +0000 (12:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Jun 2021 10:39:08 +0000 (12:39 +0200)
commit7772f16880afc636b43184f443d173ec93302242
treedf018a13c360d06797e72505d1acbb995b55c1dc
parent4bdd1a062098b6ba5f59ce1fcd15ef654df648b2
x86: suppress LEA optimization in a specific 16-bit case

In 16-bit mode a 16-bit address size LEA with a 16-bit displacement and
a 32-bit destination is shorter to encode than the corresponding MOV.
Commit fe134c656991 ("x86: optimize LEA")'s promise was to only do the
transformation when the encoding size wouldn't grow, i.e. it did go a
little too far. Restrict this specific case of the transformation to
-O2.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/lea16-optimize.d
gas/testsuite/gas/i386/lea16-optimize2.d [new file with mode: 0644]
This page took 0.025682 seconds and 4 git commands to generate.