]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/nolibc/powerpc: mark ctr and xer as clobbered by system call
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 27 Jul 2026 15:02:48 +0000 (17:02 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Thu, 30 Jul 2026 10:44:07 +0000 (12:44 +0200)
The system call can clobber the ctr and xer registers.

Make sure the compiler takes this into account.

The missing clobbers only seem to be an issue with newer compilers.

Fixes: 0cb0675ec37e ("tools/nolibc: add support for powerpc")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260727-nolibc-powerpc-clobber-v1-1-e0911cc99ce1@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-powerpc.h

index a1ab91d55384567bb6185ee0ae5c40948493fe0e..dbe2e5205aaafaab9af0f0b7a2834d1ee0e30adf 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #define _NOLIBC_SYSCALL_CLOBBERLIST \
-       "memory", "cr0", "r12", "r11", "r10", "r9"
+       "memory", "cr0", "ctr", "xer", "r12", "r11", "r10", "r9"
 
 #define __nolibc_syscall0(num)                                               \
 ({                                                                           \