1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #if __alpha__ 4 register unsigned long sp asm("$30"); 5 #elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv 6 register unsigned long sp asm("sp"); 7 #elif __i386__ 8 register unsigned long sp asm("esp"); 9 #elif __loongarch64 10 register unsigned long sp asm("$sp"); 11 #elif __powerpc__ 12 register unsigned long sp asm("r1"); 13 #elif __s390x__ 14 register unsigned long sp asm("%15"); 15 #elif __sh__ 16 register unsigned long sp asm("r15"); 17 #elif __x86_64__ 18 register unsigned long sp asm("rsp"); 19 #elif __XTENSA__ 20 register unsigned long sp asm("a1"); 21 #else 22 #error "implement current_stack_pointer equivalent" 23 #endif 24
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.