diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2024-01-11 18:27:20 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2024-01-11 18:27:20 +0000 |
commit | 6597ea4481bb29b6ac72b9c55038b1e98634bf92 (patch) | |
tree | 9132e60f28c806949278563009c7a5586413057e | |
parent | b068bb09a1a82d9fef0e939ad6135443a959e290 (diff) | |
download | src-6597ea4481bb29b6ac72b9c55038b1e98634bf92.tar.gz src-6597ea4481bb29b6ac72b9c55038b1e98634bf92.zip |
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
-rw-r--r-- | lib/libc/powerpc/SYS.h | 13 |
1 files 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) |