Re: [PATCH] x86: LLVMLinux: Reimplement current_stack_pointer without register usage.

2014-02-25 Thread H. Peter Anvin
On 02/25/2014 07:00 PM, Andy Lutomirski wrote: >> >> How much does this actually affect the output? I only see three uses of >> current_stack_pointer: >> >> /* how to get the thread information struct from C */ >> static inline struct thread_info *current_thread_info(void) >> { >> return (

Re: [PATCH] x86: LLVMLinux: Reimplement current_stack_pointer without register usage.

2014-02-25 Thread Andy Lutomirski
On 02/20/2014 08:55 PM, H. Peter Anvin wrote: > This seems like really deep magic when looking at it... at the very > least, this needs to be very carefully commented, including why it works > on the various platforms. > > How much does this actually affect the output? I only see three uses of >

Re: [PATCH] x86: LLVMLinux: Reimplement current_stack_pointer without register usage.

2014-02-20 Thread H. Peter Anvin
This seems like really deep magic when looking at it... at the very least, this needs to be very carefully commented, including why it works on the various platforms. How much does this actually affect the output? I only see three uses of current_stack_pointer: /* how to get the thread info

[PATCH] x86: LLVMLinux: Reimplement current_stack_pointer without register usage.

2014-02-20 Thread behanw
From: Behan Webster Use asm to make the globally named register work again for gcc and clang. Much more efficient than copying the stack pointer to a variable and back again. Signed-off-by: Behan Webster --- arch/x86/include/asm/thread_info.h | 8 1 file changed, 4 insertions(+), 4 de