This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Use RSP_LP in CURRENT_STACK_FRAME
- From: Richard Henderson <rth at twiddle dot net>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 19 Mar 2012 15:10:41 -0700
- Subject: Re: PATCH: Use RSP_LP in CURRENT_STACK_FRAME
- References: <20120319213450.GA472@intel.com>
On 03/19/12 14:34, H.J. Lu wrote:
> #define CURRENT_STACK_FRAME \
> - ({ char *frame; asm ("movq %%rsp, %0" : "=r" (frame)); frame; })
> + ({ char *frame; asm ("mov %%" RSP_LP ", %0" : "=r" (frame)); frame; })
I'm pretty sure
({ register void *esp __asm__("esp"); esp; })
will work without the unneeded copy.
r~