This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] i386: Update _dl_runtime_resolve/_dl_runtime_profile


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
register.)

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]