[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/17641] New: [x86-64] Convert load to lea
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/17641] New: [x86-64] Convert load to lea |
Date: |
Mon, 24 Nov 2014 16:01:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17641
Bug ID: 17641
Summary: [x86-64] Convert load to lea
Product: binutils
Version: 2.26 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at google dot com
Reporter: hjl.tools at gmail dot com
CC: ian at airs dot com
For x86-64, gold should convert
mov address@hidden(%rip), %reg
to
lea foo(%rip), %reg
if foo is a local symbol, like ld:
address@hidden lea-4]$ cat lea2.s
.text
.type foo, @function
foo:
ret
.size foo, .-foo
.text
.globl bar
.type bar, @function
bar:
movq address@hidden(%rip), %rax
.size bar, .-bar
address@hidden lea-4]$ gcc -c lea2.s
address@hidden lea-4]$ ld -shared lea2.o
address@hidden lea-4]$ objdump -dw a.out
a.out: file format elf64-x86-64
Disassembly of section .text:
00000000000001c5 <foo>:
1c5: c3 retq
00000000000001c6 <bar>:
1c6: 48 8d 05 f8 ff ff ff lea -0x8(%rip),%rax # 1c5 <foo>
address@hidden lea-4]$
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gold/17641] New: [x86-64] Convert load to lea,
hjl.tools at gmail dot com <=