forked from dentproject/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub…
…/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "One single fix for sigaltstack test -Wuninitialized warning found when building with clang" * tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: sigaltstack: fix -Wuninitialized
- Loading branch information
Showing
2 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
tools/testing/selftests/sigaltstack/current_stack_pointer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
#if __alpha__ | ||
register unsigned long sp asm("$30"); | ||
#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv | ||
register unsigned long sp asm("sp"); | ||
#elif __i386__ | ||
register unsigned long sp asm("esp"); | ||
#elif __loongarch64 | ||
register unsigned long sp asm("$sp"); | ||
#elif __ppc__ | ||
register unsigned long sp asm("r1"); | ||
#elif __s390x__ | ||
register unsigned long sp asm("%15"); | ||
#elif __sh__ | ||
register unsigned long sp asm("r15"); | ||
#elif __x86_64__ | ||
register unsigned long sp asm("rsp"); | ||
#elif __XTENSA__ | ||
register unsigned long sp asm("a1"); | ||
#else | ||
#error "implement current_stack_pointer equivalent" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters