diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/syscalls.list | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/sysdep.h | 27 |
3 files changed, 31 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index c347cc03f5..b658d12451 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-12-26 Philip Blundell <philb@gnu.org> + + * sysdeps/unix/sysv/linux/arm/syscalls.list: Remove vm86. Set + argument count for `syscall' to 7. + * sysdeps/unix/sysv/linux/arm/sysdep.h: Add support for syscalls + with more than five arguments. + (DOARGS_5, UNDOARGS_5): Don't corrupt the calling stack frame. + 1999-12-26 Ulrich Drepper <drepper@cygnus.com> * locale/programs/ld-collate.c (collate_output): Don't start with empty diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 08839db952..60303d3df7 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -11,5 +11,4 @@ s_setresgid setresgid setresgid 3 __syscall_setresgid s_setresuid setresuid setresuid 3 __syscall_setresuid s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid -syscall - syscall 5 syscall -vm86 - vm86 1 __vm86 vm86 +syscall - syscall 7 syscall diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 7812e99075..cd83389f37 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997. @@ -69,6 +69,8 @@ arg 3 r2 arg 4 r3 arg 5 r4 (this is different from the APCS convention) + arg 6 r5 + arg 7 r6 The compiler is going to form a call by coming here, through PSEUDO, with arguments @@ -78,9 +80,12 @@ arg 3 r2 arg 4 r3 arg 5 [sp] + arg 6 [sp+4] + arg 7 [sp+8] - We need to shuffle values between R4 and the stack so that the caller's - R4 is not corrupted, and the kernel sees the right argument there. + We need to shuffle values between R4..R6 and the stack so that the + caller's v1..v3 and stack frame are not corrupted, and the kernel + sees the right arguments. */ @@ -95,14 +100,18 @@ #define DOARGS_2 /* nothing */ #define DOARGS_3 /* nothing */ #define DOARGS_4 /* nothing */ -#define DOARGS_5 ldr ip, [sp]; str r4, [sp]; mov r4, ip; +#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4]; +#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5}; +#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6}; #define UNDOARGS_0 /* nothing */ #define UNDOARGS_1 /* nothing */ #define UNDOARGS_2 /* nothing */ #define UNDOARGS_3 /* nothing */ #define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 ldr r4, [sp]; +#define UNDOARGS_5 ldr r4, [sp, $4]!; +#define UNDOARGS_6 ldmfd sp!, {r4, r5}; +#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6}; #else /* not __ASSEMBLER__ */ @@ -149,6 +158,14 @@ register int _v1 asm ("v1") = (int) (a5); \ LOAD_ARGS_4 (a1, a2, a3, a4) #define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1) +#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ + register int _v2 asm ("v2") = (int) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2) +#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \ + register int _v3 asm ("v3") = (int) (a7); \ + LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) +#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) #endif /* __ASSEMBLER__ */ |