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: Use RSP_LP in CURRENT_STACK_FRAME


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~


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