From 86c5d2cf0ce046279baddc7faa27da71f1a89fde Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 28 Jan 2020 19:33:01 -0300 Subject: sparc: Use Linux kABI for syscall return It changes the sparc internal_syscall* macros to return a negative value instead of the 'g1' register value in the 'err' macro argument. The __SYSCALL_STRING macro is also changed to no set the 'g1' value, since 'o1' already holds all the required information to check if syscall has failed. The macro INTERNAL_SYSCALL_DECL is no longer required, and the INTERNAL_SYSCALL_ERROR_P macro follows the other Linux kABIs. The redefinition of INTERNAL_VSYSCALL_CALL is also no longer required. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. It fixes the sporadic issues on sparc32 where clock_nanosleep does not act as cancellation entrypoint. --- sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32') diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h index 8461261674..2c3754770b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h @@ -110,9 +110,8 @@ ENTRY(name); \ #define __SYSCALL_STRING \ "ta 0x10;" \ "bcc 1f;" \ - " mov 0, %%g1;" \ + " nop;" \ "sub %%g0, %%o0, %%o0;" \ - "mov 1, %%g1;" \ "1:" #define __SYSCALL_CLOBBERS \ -- cgit 1.4.1