aarch/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().

Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D43058
This commit is contained in:
Brooks Davis 2024-02-02 17:08:55 +00:00
parent 306d3fb23d
commit 0e867a4911

View file

@ -40,21 +40,21 @@
* to jump around to use more capable unconditional branch
* instruction.
*/
#define PSEUDO(name) \
ENTRY(__sys_##name); \
WEAK_REFERENCE(__sys_##name, _##name); \
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
b.cs 1f; \
ret; \
1: b cerror; \
1: b cerror
#define PSEUDO(name) \
ENTRY(__sys_##name); \
WEAK_REFERENCE(__sys_##name, _##name); \
_SYSCALL_BODY(name); \
END(__sys_##name)
#define RSYSCALL(name) \
ENTRY(__sys_##name); \
WEAK_REFERENCE(__sys_##name, name); \
WEAK_REFERENCE(__sys_##name, _##name); \
_SYSCALL(name); \
b.cs 1f; \
ret; \
1: b cerror; \
_SYSCALL_BODY(name); \
END(__sys_##name)