mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Update the syscall calling convention for ARM EABI. We store the syscall
in r7 and use ip to store the old version of r7 as it is not guaranteed to be kept when calling a subroutine. The kernel will preserve the register across system calls.
This commit is contained in:
parent
773e120f25
commit
2aebb6cefe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245650
@ -39,7 +39,15 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <machine/swi.h>
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
#define SYSTRAP(x) \
|
||||
mov ip, r7; \
|
||||
ldr r7, =SYS_ ## x; \
|
||||
swi 0; \
|
||||
mov r7, ip
|
||||
#else
|
||||
#define SYSTRAP(x) swi 0 | SYS_ ## x
|
||||
#endif
|
||||
|
||||
#define CERROR _C_LABEL(cerror)
|
||||
#define CURBRK _C_LABEL(curbrk)
|
||||
|
Loading…
Reference in New Issue
Block a user