Commit 3337a10e authored by Behan Webster's avatar Behan Webster Committed by Will Deacon

arm64: LLVMLinux: Add current_stack_pointer() for arm64

Define a global named register for current_stack_pointer. The use of this new
variable guarantees that both gcc and clang can access this register in C code.
Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
Reviewed-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
Reviewed-by: default avatarMark Charlebois <charlebm@gmail.com>
Reviewed-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 11d91a77
...@@ -68,6 +68,11 @@ struct thread_info { ...@@ -68,6 +68,11 @@ struct thread_info {
#define init_thread_info (init_thread_union.thread_info) #define init_thread_info (init_thread_union.thread_info)
#define init_stack (init_thread_union.stack) #define init_stack (init_thread_union.stack)
/*
* how to get the current stack pointer from C
*/
register unsigned long current_stack_pointer asm ("sp");
/* /*
* how to get the thread information struct from C * how to get the thread information struct from C
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment