summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPawel Sikora <pluto@pld-linux.org>2004-11-10 21:36:11 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-10 21:36:11 -0800
commitd0efa0ccde10398f851489ffc5b1581162a67cbb (patch)
tree9de393eeb55d853a94d642599c28ce1aa3e9cc86 /include
parent81dc6cfd730838baace55ece1788577ad7c7ee6b (diff)
[PATCH] x86: optimize stack pointer access (reduce register usage)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/thread_info.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
index 9eba8cbd0d4a..9afee94ac026 100644
--- a/include/asm-i386/thread_info.h
+++ b/include/asm-i386/thread_info.h
@@ -92,12 +92,7 @@ static inline struct thread_info *current_thread_info(void)
}
/* how to get the current stack pointer from C */
-static inline unsigned long current_stack_pointer(void)
-{
- unsigned long ti;
- __asm__("movl %%esp,%0; ":"=r" (ti) : );
- return ti;
-}
+register unsigned long current_stack_pointer asm("esp");
/* thread information allocation */
#ifdef CONFIG_DEBUG_STACK_USAGE