Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@ struct thread_info {
#define init_thread_info	(init_thread_union.thread_info)
#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
 */