Use __asm__("rsp") to get CURRENT_STACK_FRAME

This commit is contained in:
H.J. Lu 2012-03-19 16:21:21 -07:00
parent 490df6c441
commit 24d8f4b7dc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
register char * __asm__("rsp") to get stack frame.
2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use

View File

@ -41,7 +41,7 @@
/* Location of current stack frame. The frame pointer is not usable. */
#define CURRENT_STACK_FRAME \
({ char *frame; asm ("movq %%rsp, %0" : "=r" (frame)); frame; })
({ register char *frame __asm__("rsp"); frame; })
/* XXX Until we have a better place keep the definitions here. */