git: 5d21ac643bb2 - main - Revert "power*/SYS.h: implement _SYSCALL_BODY() macro"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Dec 2023 21:37:39 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5d21ac643bb2a8d265470bf69043e50f060169d9 commit 5d21ac643bb2a8d265470bf69043e50f060169d9 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-12-21 21:36:12 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-12-21 21:37:09 +0000 Revert "power*/SYS.h: implement _SYSCALL_BODY() macro" bapt reports build errors on powerpc/powerpc so this is the most likely culprit. This reverts commit e88e1272792e41cbf0a5af1f5f0a858afece0475. --- lib/libc/powerpc/SYS.h | 13 ++++++------- lib/libc/powerpc64/SYS.h | 28 ++++++++++++++++++---------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 24315f369531..8c47a65735f5 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,17 +40,14 @@ li 0,(SYS_##name); \ sc -#define _SYSCALL_BODY(name) \ - _SYSCALL(name) \ - bnslr; \ - b CNAME(HIDENAME(cerror)) - #define PSEUDO(name) \ .text; \ .align 2; \ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL_BODY(name); \ + _SYSCALL(name); \ + bnslr; \ + b CNAME(HIDENAME(cerror)); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -59,5 +56,7 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL_BODY(name); \ + _SYSCALL(name); \ + bnslr; \ + b CNAME(HIDENAME(cerror)); \ END(__sys_##name) diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index bf8bc6cc0e27..dccd08b63541 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,7 +40,11 @@ li 0,(SYS_##name); \ sc -#define _SYSCALL_BODY(name) \ +#define PSEUDO(name) \ + .text; \ + .align 2; \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ _SYSCALL(name); \ bnslr; \ mflr %r0; \ @@ -51,14 +55,7 @@ addi %r1,%r1,48; \ ld %r0,16(%r1); \ mtlr %r0; \ - blr - -#define PSEUDO(name) \ - .text; \ - .align 2; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL_BODY(name); \ + blr; \ END(__sys_##name) #define RSYSCALL(name) \ @@ -67,5 +64,16 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL_BODY(name); \ + _SYSCALL(name); \ + bnslr; \ + \ + mflr %r0; \ + std %r0,16(%r1); \ + stdu %r1,-48(%r1); \ + bl CNAME(HIDENAME(cerror)); \ + nop; \ + addi %r1,%r1,48; \ + ld %r0,16(%r1); \ + mtlr %r0; \ + blr; \ END(__sys_##name)