xref: /kernel/linux/linux-6.6/tools/testing/selftests/sigaltstack/current_stack_pointer.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/testing/selftests/sigaltstack/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci#if __alpha__
462306a36Sopenharmony_ciregister unsigned long sp asm("$30");
562306a36Sopenharmony_ci#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv
662306a36Sopenharmony_ciregister unsigned long sp asm("sp");
762306a36Sopenharmony_ci#elif __i386__
862306a36Sopenharmony_ciregister unsigned long sp asm("esp");
962306a36Sopenharmony_ci#elif __loongarch64
1062306a36Sopenharmony_ciregister unsigned long sp asm("$sp");
1162306a36Sopenharmony_ci#elif __ppc__
1262306a36Sopenharmony_ciregister unsigned long sp asm("r1");
1362306a36Sopenharmony_ci#elif __s390x__
1462306a36Sopenharmony_ciregister unsigned long sp asm("%15");
1562306a36Sopenharmony_ci#elif __sh__
1662306a36Sopenharmony_ciregister unsigned long sp asm("r15");
1762306a36Sopenharmony_ci#elif __x86_64__
1862306a36Sopenharmony_ciregister unsigned long sp asm("rsp");
1962306a36Sopenharmony_ci#elif __XTENSA__
2062306a36Sopenharmony_ciregister unsigned long sp asm("a1");
2162306a36Sopenharmony_ci#else
2262306a36Sopenharmony_ci#error "implement current_stack_pointer equivalent"
2362306a36Sopenharmony_ci#endif
24

Indexes created Thu Nov 07 10:32:03 CST 2024