From 24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 19 Mar 2012 16:21:21 -0700 Subject: [PATCH] Use __asm__("rsp") to get CURRENT_STACK_FRAME --- nptl/ChangeLog | 5 +++++ nptl/sysdeps/x86_64/pthreaddef.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ad4725f..ad345f9 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,10 @@ 2012-03-19 H.J. Lu + * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use + register char * __asm__("rsp") to get stack frame. + +2012-03-19 H.J. Lu + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use __NR_futex directly. diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h index 7e45be4..50587b8 100644 --- a/nptl/sysdeps/x86_64/pthreaddef.h +++ b/nptl/sysdeps/x86_64/pthreaddef.h @@ -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. */ -- 2.7.4