From d0efa0ccde10398f851489ffc5b1581162a67cbb Mon Sep 17 00:00:00 2001 From: Pawel Sikora Date: Wed, 10 Nov 2004 21:36:11 -0800 Subject: [PATCH] x86: optimize stack pointer access (reduce register usage) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/thread_info.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include') 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 -- cgit v1.2.3