summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-03-03 23:57:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2007-03-03 23:57:37 +0000
commit3b7f26ed578b0550accc53658bff7f7e6b8bd35d (patch)
tree9dd78bd26b6633e2fd2ca01a2cc46049323234bb /sysdeps
parentb84dccc8e92cf6de249bcc5ae1c40af82ad233ec (diff)
2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* libpthread/sysdeps/i386/machine-sp.h (thread_stack_pointer): Optimize esp read. * libpthread/i386/cthreads.h (cthread_sp): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/machine-sp.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/i386/machine-sp.h b/sysdeps/i386/machine-sp.h
index 536f6902..945a36b8 100644
--- a/sysdeps/i386/machine-sp.h
+++ b/sysdeps/i386/machine-sp.h
@@ -23,8 +23,7 @@
/* Return the current stack pointer. */
#define __thread_stack_pointer() ({ \
- void *__sp__; \
- __asm__ ("movl %%esp, %0" : "=r" (__sp__)); \
+ register void *__sp__ asm("esp"); \
__sp__; \
})