aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-03-19 16:21:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-03-19 16:21:21 -0700
commit24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c (patch)
treede889115270ccf956afc6d4ca16b114cf903fe94 /nptl
parent490df6c44152fb9f4ade4963c60dfd82025ff2eb (diff)
downloadglibc-24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c.tar
glibc-24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c.tar.gz
glibc-24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c.tar.bz2
glibc-24d8f4b7dc85b8f4c8907527ec92c9d2e5fdce7c.zip
Use __asm__("rsp") to get CURRENT_STACK_FRAME
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/x86_64/pthreaddef.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ad4725f422..ad345f9505 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,10 @@
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
__NR_futex directly.
diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h
index 7e45be47ab..50587b8692 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. */