Browse Source
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.
binutils-2_37-branch
16 changed files with 576 additions and 10 deletions
@ -1,3 +1,4 @@ |
|||
.*: Assembler messages: |
|||
.*:3: Warning: .* `lea' .* |
|||
.*:4: Warning: .* `lea' .* |
|||
.*:19: Warning: .* `lea' .* |
|||
|
|||
@ -1,4 +1,54 @@ |
|||
.text |
|||
start: |
|||
lea %ss:(%eax), %eax |
|||
ss lea (%eax), %eax |
|||
lea %ss:(%eax,%ecx), %eax |
|||
ss lea (%eax,%ecx), %eax |
|||
|
|||
.allow_index_reg |
|||
lea 1(%eax), %ecx |
|||
lea sym(%eax), %ecx |
|||
lea sym(,%eiz), %ecx |
|||
|
|||
lea (%eax,%eax), %eax |
|||
lea (,%eax,2), %eax |
|||
lea (,%eiz), %eax |
|||
lea (%bx,%si), %eax |
|||
|
|||
lea (%eax), %eax |
|||
lea (%eax), %ecx |
|||
lea 1-1(%eax), %ecx |
|||
lea %gs:(%eax), %ecx |
|||
|
|||
lea (%si), %eax |
|||
lea (%si), %esi |
|||
leal (%si), %eax |
|||
|
|||
lea (%eax), %ax |
|||
lea (%eax), %cx |
|||
leaw (%eax), %cx |
|||
|
|||
lea (%si), %ax |
|||
lea (%si), %si |
|||
|
|||
lea (,%ecx,1), %ecx |
|||
lea (,%ecx,1), %eax |
|||
|
|||
lea 1, %eax |
|||
lea 2, %ax |
|||
|
|||
lea -1, %eax |
|||
lea -2, %ax |
|||
|
|||
addr16 lea 1, %eax |
|||
addr16 lea 2, %ax |
|||
|
|||
addr16 lea -1, %eax |
|||
addr16 lea -2, %ax |
|||
|
|||
lea sym, %eax |
|||
lea sym, %ax |
|||
|
|||
addr16 lea sym, %eax |
|||
addr16 lea sym, %ax |
|||
|
|||
lea (,1), %eax |
|||
lea (,1), %ax |
|||
|
|||
@ -0,0 +1,48 @@ |
|||
#as: -O -q -I${srcdir}/$subdir |
|||
#objdump: -dw -Mi8086 |
|||
#name: i386 16-bit LEA optimizations |
|||
#source: lea16.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <start>: |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 08[ ]+lea[ ]+\(%eax,%ecx(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 08[ ]+lea[ ]+\(%eax,%ecx(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 48 01[ ]+lea[ ]+0x1\(%eax\),%ecx |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%eax\),%ecx |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 0c 25 00 00 00 00[ ]+addr32 lea[ ]+0x0,%ecx |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 00[ ]+lea[ ]+\(%eax,%eax(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 45 00 00 00 00[ ]+lea[ ]+0x0\(,%eax,2\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 00 00 00 00[ ]+addr32 lea[ ]+0x0,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 00[ ]+lea[ ]+\(%bx,%si\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8b c0[ ]+mov[ ]+%eax,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8b c8[ ]+mov[ ]+%eax,%ecx |
|||
[ ]*[0-9a-f]+:[ ]+66 8b c8[ ]+mov[ ]+%eax,%ecx |
|||
[ ]*[0-9a-f]+:[ ]+66 8b c8[ ]+mov[ ]+%eax,%ecx |
|||
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 00 00[ ]+mov[ ]+\$0x0,%ax |
|||
[ ]*[0-9a-f]+:[ ]+66 b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 05 00 00 00 00[ ]+addr32 lea[ ]+0x0,%ax |
|||
[ ]*[0-9a-f]+:[ ]+66 b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax |
|||
[ ]*[0-9a-f]+:[ ]+b8 00 00[ ]+mov[ ]+\$0x0,%ax |
|||
#pass |
|||
@ -0,0 +1,7 @@ |
|||
.code16 |
|||
|
|||
.macro addr16 mnem:req opnds:vararg |
|||
addr32 \mnem \opnds |
|||
.endm |
|||
|
|||
.include "lea.s" |
|||
@ -0,0 +1,71 @@ |
|||
#as: -O -q |
|||
#objdump: -drw |
|||
#name: x86-64 LEA optimizations |
|||
#source: lea64.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <start>: |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 08[ ]+lea[ ]+\(%rax,%rcx(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 08[ ]+lea[ ]+\(%rax,%rcx(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+8d 48 01[ ]+lea[ ]+0x1\(%rax\),%ecx |
|||
[ ]*[0-9a-f]+:[ ]+8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%rax\),%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+8d 0c 25 00 00 00 00[ ]+lea[ ]+0x0,%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 00[ ]+lea[ ]+\(%rax,%rax(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 45 00 00 00 00[ ]+lea[ ]+0x0\(,%rax,2\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+8d 05 00 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 ]*[0-9a-f]+:[ ]+66 b8 03 00[ ]+mov[ ]+\$0x3,%ax |
|||
[ ]*[0-9a-f]+:[ ]+b8 ff ff ff ff[ ]+mov[ ]+\$0xffffffff,%eax |
|||
[ ]*[0-9a-f]+:[ ]+b8 fe ff ff ff[ ]+mov[ ]+\$0xfffffffe,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 b8 fd ff[ ]+mov[ ]+\$0xfffd,%ax |
|||
[ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+mov[ ]+\$0x0,%rax[ ]+[0-9a-f]+: R_X86_64_32S[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+mov[ ]+\$0x0,%rax |
|||
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 b8 00 00[ ]+mov[ ]+\$0x0,%ax |
|||
#pass |
|||
@ -0,0 +1,70 @@ |
|||
#objdump: -drw |
|||
#name: x86-64 LEA |
|||
#warning_output: lea64.e |
|||
|
|||
.*: +file format .* |
|||
|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 00 00 00[ ]+lea[ ]+0x0\(,%rcx(,1)?\),%ax |
|||
[ ]*[0-9a-f]+:[ ]+67 48 8d 0c 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%rcx |
|||
[ ]*[0-9a-f]+:[ ]+67 48 8d 04 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%rax |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 0c 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%ecx |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 04 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 0c 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%cx |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 0d 00 00 00 00[ ]+lea[ ]+0x0\(,%ecx(,1)?\),%ax |
|||
[ ]*[0-9a-f]+:[ ]+48 8d 04 25 01 00 00 00[ ]+lea[ ]+0x1,%rax |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 25 02 00 00 00[ ]+lea[ ]+0x2,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 03 00 00 00[ ]+lea[ ]+0x3,%ax |
|||
[ ]*[0-9a-f]+:[ ]+48 8d 04 25 ff ff ff ff[ ]+lea[ ]+0xffffffffffffffff,%rax |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 25 fe ff ff ff[ ]+lea[ ]+0xfffffffffffffffe,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 fd ff ff ff[ ]+lea[ ]+0xfffffffffffffffd,%ax |
|||
[ ]*[0-9a-f]+:[ ]+67 48 8d 04 25 01 00 00 00[ ]+lea[ ]+0x1\(,%eiz,1\),%rax |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 04 25 02 00 00 00[ ]+lea[ ]+0x2\(,%eiz,1\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 03 00 00 00[ ]+lea[ ]+0x3\(,%eiz,1\),%ax |
|||
[ ]*[0-9a-f]+:[ ]+67 48 8d 04 25 ff ff ff ff[ ]+lea[ ]+0xffffffff\(,%eiz,1\),%rax |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 04 25 fe ff ff ff[ ]+lea[ ]+0xfffffffe\(,%eiz,1\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 fd ff ff ff[ ]+lea[ ]+0xfffffffd\(,%eiz,1\),%ax |
|||
[ ]*[0-9a-f]+:[ ]+48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%rax[ ]+[0-9a-f]+: R_X86_64_32S[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+67 48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%rax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+67 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym |
|||
[ ]*[0-9a-f]+:[ ]+48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%rax |
|||
[ ]*[0-9a-f]+:[ ]+8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%eax |
|||
[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax |
|||
#pass |
|||
@ -0,0 +1,4 @@ |
|||
.*: Assembler messages: |
|||
.*:3: Warning: .* `lea' .* |
|||
.*:4: Warning: .* `lea' .* |
|||
.*:19: Warning: .* `lea' .* |
|||
@ -0,0 +1,84 @@ |
|||
.text |
|||
start: |
|||
lea %fs:(%rax,%rcx), %eax |
|||
gs lea (%rax,%rcx), %eax |
|||
|
|||
.allow_index_reg |
|||
lea 1(%rax), %ecx |
|||
lea sym(%rax), %ecx |
|||
lea sym(,%riz), %ecx |
|||
|
|||
lea (%rax,%rax), %eax |
|||
lea (,%rax,2), %eax |
|||
lea (%rip), %eax |
|||
lea (,%riz), %eax |
|||
|
|||
lea (%rax), %rax |
|||
lea (%rax), %rcx |
|||
lea 1-1(%rax), %rcx |
|||
lea %gs:(%rax), %rcx |
|||
|
|||
lea (%rsi), %eax |
|||
lea (%rsi), %esi |
|||
leal (%rsi), %eax |
|||
|
|||
lea (%rsi), %ax |
|||
lea (%rsi), %si |
|||
leaw (%rsi), %ax |
|||
|
|||
lea (%eax), %rax |
|||
lea (%eax), %rcx |
|||
leaq (%eax), %rcx |
|||
|
|||
lea (%eax), %eax |
|||
lea (%eax), %ecx |
|||
|
|||
lea (%esi), %ax |
|||
lea (%esi), %si |
|||
leaw (%esi), %ax |
|||
|
|||
lea (,%rcx,1), %rcx |
|||
lea (,%rcx,1), %rax |
|||
|
|||
lea (,%rcx,1), %ecx |
|||
lea (,%rcx,1), %eax |
|||
|
|||
lea (,%rcx,1), %cx |
|||
lea (,%rcx,1), %ax |
|||
|
|||
lea (,%ecx,1), %rcx |
|||
lea (,%ecx,1), %rax |
|||
|
|||
lea (,%ecx,1), %ecx |
|||
lea (,%ecx,1), %eax |
|||
|
|||
lea (,%ecx,1), %cx |
|||
lea (,%ecx,1), %ax |
|||
|
|||
lea 1, %rax |
|||
lea 2, %eax |
|||
lea 3, %ax |
|||
|
|||
lea -1, %rax |
|||
lea -2, %eax |
|||
lea -3, %ax |
|||
|
|||
addr32 lea 1, %rax |
|||
addr32 lea 2, %eax |
|||
addr32 lea 3, %ax |
|||
|
|||
addr32 lea -1, %rax |
|||
addr32 lea -2, %eax |
|||
addr32 lea -3, %ax |
|||
|
|||
lea sym, %rax |
|||
lea sym, %eax |
|||
lea sym, %ax |
|||
|
|||
addr32 lea sym, %rax |
|||
addr32 lea sym, %eax |
|||
addr32 lea sym, %ax |
|||
|
|||
lea (,1), %rax |
|||
lea (,1), %eax |
|||
lea (,1), %ax |
|||
Loading…
Reference in new issue