tools/nolibc/powerpc: mark ctr and xer as clobbered by system call

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: 0cb0675ec3 ("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>
This commit is contained in:
Thomas Weißschuh 2026-07-27 17:02:48 +02:00 committed by Thomas Weißschuh
parent 01d8fa031a
commit b9fc5a1742

View 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) \
({ \