diff options
Diffstat (limited to 'lib/libc/arm')
-rw-r--r-- | lib/libc/arm/SYS.h | 30 | ||||
-rw-r--r-- | lib/libc/arm/sys/vfork.S | 2 |
2 files changed, 13 insertions, 19 deletions
diff --git a/lib/libc/arm/SYS.h b/lib/libc/arm/SYS.h index a1150ed03dc6..c3bc78704a16 100644 --- a/lib/libc/arm/SYS.h +++ b/lib/libc/arm/SYS.h @@ -37,7 +37,7 @@ #include <machine/asm.h> #include <sys/syscall.h> -#define SYSTRAP(x) \ +#define _SYSCALL(x) \ mov ip, r7; \ ldr r7, =SYS_ ## x; \ swi 0; \ @@ -45,30 +45,24 @@ #define CERROR _C_LABEL(cerror) -#define _SYSCALL_NOERROR(x) \ - ENTRY(__CONCAT(__sys_, x)); \ - .weak _C_LABEL(x); \ - .set _C_LABEL(x), _C_LABEL(__CONCAT(__sys_,x)); \ - .weak _C_LABEL(__CONCAT(_,x)); \ - .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ - SYSTRAP(x) - -#define _SYSCALL(x) \ - _SYSCALL_NOERROR(x); \ +#define _SYSCALL_BODY(x) \ + _SYSCALL(x); \ it cs; \ - bcs PIC_SYM(CERROR, PLT) + bcs PIC_SYM(CERROR, PLT); \ + RET #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_, x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ - SYSTRAP(x); \ - it cs; \ - bcs PIC_SYM(CERROR, PLT); \ - RET + _SYSCALL_BODY(x) #define RSYSCALL(x) \ - _SYSCALL(x); \ - RET + ENTRY(__CONCAT(__sys_, x)); \ + .weak _C_LABEL(x); \ + .set _C_LABEL(x), _C_LABEL(__CONCAT(__sys_,x)); \ + .weak _C_LABEL(__CONCAT(_,x)); \ + .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ + _SYSCALL_BODY(x); \ .globl CERROR diff --git a/lib/libc/arm/sys/vfork.S b/lib/libc/arm/sys/vfork.S index 5cc8afc8d953..2b92f56ad4e4 100644 --- a/lib/libc/arm/sys/vfork.S +++ b/lib/libc/arm/sys/vfork.S @@ -44,7 +44,7 @@ ENTRY(vfork) mov r2, r14 - SYSTRAP(vfork) + _SYSCALL(vfork) bcs PIC_SYM(CERROR, PLT) sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */ |