1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

SYS.h: make _SYSCALL_BODY overridable

Reviewed by:	kib, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
This commit is contained in:
Brooks Davis 2024-01-05 18:33:37 +00:00
parent 0d4f7723bc
commit f217772244
7 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,7 @@
mov x8, SYS_ ## name; \
svc 0
#ifndef _SYSCALL_BODY
/*
* Conditional jumps can only go up to one megabyte in either
* direction, and cerror can be located anywhere, so we have
@ -45,6 +46,7 @@
b.cs 1f; \
ret; \
1: b cerror
#endif
#define PSEUDO(name) \
ENTRY(__sys_##name); \

View File

@ -40,10 +40,12 @@
movq %rcx, %r10; \
syscall
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
jb HIDENAME(cerror); \
ret
#endif
#define RSYSCALL(name) ENTRY(__sys_##name); \
WEAK_REFERENCE(__sys_##name, name); \

View File

@ -45,11 +45,13 @@
#define CERROR _C_LABEL(cerror)
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(x) \
_SYSCALL(x); \
it cs; \
bcs PIC_SYM(CERROR, PLT); \
RET
#endif
#define PSEUDO(x) \
ENTRY(__CONCAT(__sys_, x)); \

View File

@ -39,10 +39,12 @@
mov $SYS_##name, %eax; \
int $0x80
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
jb HIDENAME(cerror); \
ret
#endif
#define RSYSCALL(name) ENTRY(__sys_##name); \
WEAK_REFERENCE(__sys_##name, name); \

View File

@ -40,10 +40,12 @@
li 0,(SYS_##name); \
sc
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
bnslr; \
b CNAME(HIDENAME(cerror))
#endif
#define PSEUDO(name) \
.text; \

View File

@ -40,6 +40,7 @@
li 0,(SYS_##name); \
sc
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
bnslr; \
@ -52,6 +53,7 @@
ld %r0,16(%r1); \
mtlr %r0; \
blr
#endif
#define PSEUDO(name) \
.text; \

View File

@ -40,12 +40,14 @@
li t0, SYS_ ## name; \
ecall
#ifndef _SYSCALL_BODY
#define _SYSCALL_BODY(name) \
_SYSCALL(name); \
bnez t0, 1f; \
ret; \
1: la t1, cerror; \
jr t1
#endif
#define PSEUDO(name) \
ENTRY(__sys_##name); \