This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/2] i386: Update _dl_runtime_resolve/_dl_runtime_profile
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 17 Jun 2017 06:39:05 -0700
- Subject: Re: [PATCH 2/2] i386: Update _dl_runtime_resolve/_dl_runtime_profile
- Authentication-results: sourceware.org; auth=none
- References: <20170617130710.GB14641@gmail.com> <firstname.lastname@example.org>
On Sat, Jun 17, 2017 at 6:35 AM, Florian Weimer <email@example.com> wrote:
> On 06/17/2017 03:07 PM, H.J. Lu wrote:
>> - popl %edx # Get register content back.
>> - cfi_adjust_cfa_offset (-4)
>> - movl (%esp), %ecx
>> - movl %eax, (%esp) # Store the function address.
>> - movl 4(%esp), %eax
>> - ret $12 # Jump to function address.
>> + movl (%esp), %edx # Get register content back.
>> + movl %eax, %ecx # Store the function address.
>> + movl 4(%esp), %eax # Get register content back.
>> + addl $16, %esp # Adjust stack(PLT did 2 pushes)
>> + cfi_adjust_cfa_offset (-16)
>> + jmp *%ecx # Jump to function address.
> Did the old code break the return stack optimization? I suppose this is
> a real improvement, then. (I'm aware it depends on reserving the %ecx
Yes, this change will also improve return address predication.