mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 06:40:09 +00:00
2b778ceb40
I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
70 lines
1.7 KiB
ArmAsm
70 lines
1.7 KiB
ArmAsm
/* System call interface. C-SKY ABIV2 version.
|
|
Copyright (C) 2018-2021 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library. If not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
#include <sysdep.h>
|
|
|
|
/* long syscall(long sysnum, long a, long b, long c, long d, long e, long f) */
|
|
|
|
ENTRY (syscall)
|
|
subi sp, 8
|
|
stw r4, (sp, 0)
|
|
stw r5, (sp, 4)
|
|
mov t0, r7
|
|
|
|
/* Put system call number in r7, adjust shift for arguments
|
|
and load extra arguments from stack. */
|
|
mov r7, a0
|
|
mov a0, a1
|
|
mov a1, a2
|
|
mov a2, a3
|
|
ldw a3, (sp, 8)
|
|
ldw r4, (sp, 12)
|
|
ldw r5, (sp, 16)
|
|
trap 0
|
|
|
|
/* Restore temp registers. */
|
|
mov r7, t0
|
|
ldw r4, (sp, 0)
|
|
ldw r5, (sp, 4)
|
|
addi sp, 8
|
|
|
|
/* Check return value. */
|
|
lrw t0, 0xfffff000
|
|
cmphs a0, t0
|
|
bf 1f
|
|
#ifdef __PIC__
|
|
subi sp, 8
|
|
stw gb, (sp, 0)
|
|
stw lr, (sp, 4)
|
|
grs gb, .Lgetpc
|
|
.Lgetpc:
|
|
lrw t0, .Lgetpc@GOTPC
|
|
addu gb, gb, t0
|
|
lrw t0, __syscall_error@PLT
|
|
ldr.w t0, (gb, t0 << 0)
|
|
jsr t0
|
|
ldw gb, (sp, 0)
|
|
ldw lr, (sp, 4)
|
|
addi sp, 8
|
|
#else
|
|
jmpi __syscall_error
|
|
#endif /* __PIC__ */
|
|
1:
|
|
rts
|
|
PSEUDO_END (syscall)
|