glibc/sysdeps/unix/sysv/linux/arm/syscall.S

49 lines
1.4 KiB
ArmAsm
Raw Normal View History

/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
2005-10-10 15:29:32 +00:00
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
2012-03-09 23:56:38 +00:00
License along with the GNU C Library. If not, see
Prefer https to http for gnu.org and fsf.org URLs Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
<https://www.gnu.org/licenses/>. */
2005-10-10 15:29:32 +00:00
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump arch_minimum_kernel. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/semop.c, sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/uname.c, sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, sysdeps/unix/sysv/linux/arm/eabi/pread.c, sysdeps/unix/sysv/linux/arm/eabi/pread64.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, sysdeps/unix/sysv/linux/arm/eabi/readahead.c, sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, sysdeps/unix/sysv/linux/arm/eabi/socket.S, sysdeps/unix/sysv/linux/arm/eabi/syscall.S, sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. (SINGLE_THREAD_P): Rewritten to use only ip. * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. Don't handle EABI here. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
2005-11-16 18:08:53 +00:00
#include <sysdep.h>
/* In the EABI syscall interface, we don't need a special syscall to
implement syscall(). It won't work reliably with 64-bit arguments
(but that is true on many modern platforms). */
ENTRY (syscall)
mov ip, sp
push {r4, r5, r6, r7}
cfi_adjust_cfa_offset (16)
cfi_rel_offset (r4, 0)
cfi_rel_offset (r5, 4)
cfi_rel_offset (r6, 8)
cfi_rel_offset (r7, 12)
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump arch_minimum_kernel. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/semop.c, sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/uname.c, sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, sysdeps/unix/sysv/linux/arm/eabi/pread.c, sysdeps/unix/sysv/linux/arm/eabi/pread64.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, sysdeps/unix/sysv/linux/arm/eabi/readahead.c, sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, sysdeps/unix/sysv/linux/arm/eabi/socket.S, sysdeps/unix/sysv/linux/arm/eabi/syscall.S, sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. (SINGLE_THREAD_P): Rewritten to use only ip. * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. Don't handle EABI here. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
2005-11-16 18:08:53 +00:00
mov r7, r0
mov r0, r1
mov r1, r2
mov r2, r3
ldmfd ip, {r3, r4, r5, r6}
swi 0x0
pop {r4, r5, r6, r7}
cfi_adjust_cfa_offset (-16)
cfi_restore (r4)
cfi_restore (r5)
cfi_restore (r6)
cfi_restore (r7)
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump arch_minimum_kernel. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/semop.c, sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/uname.c, sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, sysdeps/unix/sysv/linux/arm/eabi/pread.c, sysdeps/unix/sysv/linux/arm/eabi/pread64.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, sysdeps/unix/sysv/linux/arm/eabi/readahead.c, sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, sysdeps/unix/sysv/linux/arm/eabi/socket.S, sysdeps/unix/sysv/linux/arm/eabi/syscall.S, sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. (SINGLE_THREAD_P): Rewritten to use only ip. * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. Don't handle EABI here. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
2005-11-16 18:08:53 +00:00
cmn r0, #4096
it cc
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump arch_minimum_kernel. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/semop.c, sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/uname.c, sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, sysdeps/unix/sysv/linux/arm/eabi/pread.c, sysdeps/unix/sysv/linux/arm/eabi/pread64.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, sysdeps/unix/sysv/linux/arm/eabi/readahead.c, sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, sysdeps/unix/sysv/linux/arm/eabi/socket.S, sysdeps/unix/sysv/linux/arm/eabi/syscall.S, sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. (SINGLE_THREAD_P): Rewritten to use only ip. * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. Don't handle EABI here. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
2005-11-16 18:08:53 +00:00
RETINSTR(cc, lr)
b PLTJMP(syscall_error)
PSEUDO_END (syscall)