git: 6597ea4481bb - main - powerpc/SYS.h: implement _SYSCALL_BODY() macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Jan 2024 18:27:35 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6597ea4481bb29b6ac72b9c55038b1e98634bf92 commit 6597ea4481bb29b6ac72b9c55038b1e98634bf92 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-01-11 18:27:20 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-01-11 18:27:20 +0000 powerpc/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43323 --- lib/libc/powerpc/SYS.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 8c47a65735f5..b990793c7e3e 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,14 +40,17 @@ 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(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -56,7 +59,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name)