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:
parent
0d4f7723bc
commit
f217772244
@ -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); \
|
||||
|
@ -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); \
|
||||
|
@ -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)); \
|
||||
|
@ -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); \
|
||||
|
@ -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; \
|
||||
|
@ -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; \
|
||||
|
@ -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); \
|
||||
|
Loading…
Reference in New Issue
Block a user