1*05107edcSNick Desaulniers /* SPDX-License-Identifier: GPL-2.0 */
2*05107edcSNick Desaulniers 
3*05107edcSNick Desaulniers #if __alpha__
4*05107edcSNick Desaulniers register unsigned long sp asm("$30");
5*05107edcSNick Desaulniers #elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv
6*05107edcSNick Desaulniers register unsigned long sp asm("sp");
7*05107edcSNick Desaulniers #elif __i386__
8*05107edcSNick Desaulniers register unsigned long sp asm("esp");
9*05107edcSNick Desaulniers #elif __loongarch64
10*05107edcSNick Desaulniers register unsigned long sp asm("$sp");
11*05107edcSNick Desaulniers #elif __ppc__
12*05107edcSNick Desaulniers register unsigned long sp asm("r1");
13*05107edcSNick Desaulniers #elif __s390x__
14*05107edcSNick Desaulniers register unsigned long sp asm("%15");
15*05107edcSNick Desaulniers #elif __sh__
16*05107edcSNick Desaulniers register unsigned long sp asm("r15");
17*05107edcSNick Desaulniers #elif __x86_64__
18*05107edcSNick Desaulniers register unsigned long sp asm("rsp");
19*05107edcSNick Desaulniers #elif __XTENSA__
20*05107edcSNick Desaulniers register unsigned long sp asm("a1");
21*05107edcSNick Desaulniers #else
22*05107edcSNick Desaulniers #error "implement current_stack_pointer equivalent"
23*05107edcSNick Desaulniers #endif
24