summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-08-12 14:03:34 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-07 23:38:59 +0200
commite9bf4a5cc0e6de29a0f27825d16748d8f4261d4d (patch)
tree177c065b8bf0845cb0c210e129729982b1b21b10
parentfa49ade26a798fe0c9f25aa09048c6aefbfb8a84 (diff)
2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/ia32/machine-sp.h (thread_stack_pointer): Optimize esp read.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/ia32/machine-sp.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f4841f8..22a03d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * sysdeps/ia32/machine-sp.h (thread_stack_pointer):
+ Optimize esp read.
+
2008-08-12 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/pt-startup.c (__pthread_startup): New file.
diff --git a/sysdeps/ia32/machine-sp.h b/sysdeps/ia32/machine-sp.h
index 39a8b69..cef6ab7 100644
--- a/sysdeps/ia32/machine-sp.h
+++ b/sysdeps/ia32/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__; \
})