From faa0fdb1194172f578f973097d61e580bce528dc Mon Sep 17 00:00:00 2001 From: Matthieu Castet Date: Wed, 16 Jan 2013 14:02:50 +0100 Subject: [PATCH] arm syscall : for eabi call_default don't use stack In the default case, we don't need to use the stack, we can save r7 with ip register (that what does eglibc). This allow to fix vfork data corruption (see 3884bfe9661955543ce203c60f9225bbdf33f6bb), because vfork now don't use the stack. --- libc/arch-arm/syscalls/__brk.S | 5 ++--- libc/arch-arm/syscalls/__fcntl.S | 5 ++--- libc/arch-arm/syscalls/__fcntl64.S | 5 ++--- libc/arch-arm/syscalls/__fork.S | 5 ++--- libc/arch-arm/syscalls/__fstatfs64.S | 5 ++--- libc/arch-arm/syscalls/__getcpu.S | 5 ++--- libc/arch-arm/syscalls/__getcwd.S | 5 ++--- libc/arch-arm/syscalls/__getpriority.S | 5 ++--- libc/arch-arm/syscalls/__ioctl.S | 5 ++--- libc/arch-arm/syscalls/__open.S | 5 ++--- libc/arch-arm/syscalls/__openat.S | 5 ++--- libc/arch-arm/syscalls/__ptrace.S | 5 ++--- libc/arch-arm/syscalls/__reboot.S | 5 ++--- libc/arch-arm/syscalls/__rt_sigaction.S | 5 ++--- libc/arch-arm/syscalls/__rt_sigprocmask.S | 5 ++--- libc/arch-arm/syscalls/__rt_sigtimedwait.S | 5 ++--- libc/arch-arm/syscalls/__sched_getaffinity.S | 5 ++--- libc/arch-arm/syscalls/__set_tls.S | 5 ++--- libc/arch-arm/syscalls/__setresuid.S | 5 ++--- libc/arch-arm/syscalls/__setreuid.S | 5 ++--- libc/arch-arm/syscalls/__setuid.S | 5 ++--- libc/arch-arm/syscalls/__sigsuspend.S | 5 ++--- libc/arch-arm/syscalls/__statfs64.S | 5 ++--- libc/arch-arm/syscalls/__syslog.S | 5 ++--- libc/arch-arm/syscalls/__timer_create.S | 5 ++--- libc/arch-arm/syscalls/__timer_delete.S | 5 ++--- libc/arch-arm/syscalls/__timer_getoverrun.S | 5 ++--- libc/arch-arm/syscalls/__timer_gettime.S | 5 ++--- libc/arch-arm/syscalls/__timer_settime.S | 5 ++--- libc/arch-arm/syscalls/__wait4.S | 5 ++--- libc/arch-arm/syscalls/_exit.S | 5 ++--- libc/arch-arm/syscalls/_exit_thread.S | 5 ++--- libc/arch-arm/syscalls/accept.S | 5 ++--- libc/arch-arm/syscalls/access.S | 5 ++--- libc/arch-arm/syscalls/acct.S | 5 ++--- libc/arch-arm/syscalls/bind.S | 5 ++--- libc/arch-arm/syscalls/cacheflush.S | 5 ++--- libc/arch-arm/syscalls/capget.S | 5 ++--- libc/arch-arm/syscalls/capset.S | 5 ++--- libc/arch-arm/syscalls/chdir.S | 5 ++--- libc/arch-arm/syscalls/chmod.S | 5 ++--- libc/arch-arm/syscalls/chown.S | 5 ++--- libc/arch-arm/syscalls/chroot.S | 5 ++--- libc/arch-arm/syscalls/clock_getres.S | 5 ++--- libc/arch-arm/syscalls/clock_gettime.S | 5 ++--- libc/arch-arm/syscalls/clock_nanosleep.S | 5 ++--- libc/arch-arm/syscalls/clock_settime.S | 5 ++--- libc/arch-arm/syscalls/close.S | 5 ++--- libc/arch-arm/syscalls/connect.S | 5 ++--- libc/arch-arm/syscalls/delete_module.S | 5 ++--- libc/arch-arm/syscalls/dup.S | 5 ++--- libc/arch-arm/syscalls/dup2.S | 5 ++--- libc/arch-arm/syscalls/epoll_create.S | 5 ++--- libc/arch-arm/syscalls/epoll_ctl.S | 5 ++--- libc/arch-arm/syscalls/epoll_wait.S | 5 ++--- libc/arch-arm/syscalls/eventfd.S | 5 ++--- libc/arch-arm/syscalls/execve.S | 5 ++--- libc/arch-arm/syscalls/faccessat.S | 5 ++--- libc/arch-arm/syscalls/fchdir.S | 5 ++--- libc/arch-arm/syscalls/fchmod.S | 5 ++--- libc/arch-arm/syscalls/fchmodat.S | 5 ++--- libc/arch-arm/syscalls/fchown.S | 5 ++--- libc/arch-arm/syscalls/fdatasync.S | 5 ++--- libc/arch-arm/syscalls/fgetxattr.S | 5 ++--- libc/arch-arm/syscalls/flistxattr.S | 5 ++--- libc/arch-arm/syscalls/flock.S | 5 ++--- libc/arch-arm/syscalls/fremovexattr.S | 5 ++--- libc/arch-arm/syscalls/fstat.S | 5 ++--- libc/arch-arm/syscalls/fstatat.S | 5 ++--- libc/arch-arm/syscalls/fsync.S | 5 ++--- libc/arch-arm/syscalls/ftruncate.S | 5 ++--- libc/arch-arm/syscalls/ftruncate64.S | 5 ++--- libc/arch-arm/syscalls/getdents.S | 5 ++--- libc/arch-arm/syscalls/getegid.S | 5 ++--- libc/arch-arm/syscalls/geteuid.S | 5 ++--- libc/arch-arm/syscalls/getgid.S | 5 ++--- libc/arch-arm/syscalls/getgroups.S | 5 ++--- libc/arch-arm/syscalls/getitimer.S | 5 ++--- libc/arch-arm/syscalls/getpeername.S | 5 ++--- libc/arch-arm/syscalls/getpgid.S | 5 ++--- libc/arch-arm/syscalls/getpid.S | 5 ++--- libc/arch-arm/syscalls/getppid.S | 5 ++--- libc/arch-arm/syscalls/getresgid.S | 5 ++--- libc/arch-arm/syscalls/getresuid.S | 5 ++--- libc/arch-arm/syscalls/getrlimit.S | 5 ++--- libc/arch-arm/syscalls/getrusage.S | 5 ++--- libc/arch-arm/syscalls/getsid.S | 5 ++--- libc/arch-arm/syscalls/getsockname.S | 5 ++--- libc/arch-arm/syscalls/gettid.S | 5 ++--- libc/arch-arm/syscalls/gettimeofday.S | 5 ++--- libc/arch-arm/syscalls/getuid.S | 5 ++--- libc/arch-arm/syscalls/getxattr.S | 5 ++--- libc/arch-arm/syscalls/init_module.S | 5 ++--- libc/arch-arm/syscalls/inotify_add_watch.S | 5 ++--- libc/arch-arm/syscalls/inotify_init.S | 5 ++--- libc/arch-arm/syscalls/inotify_rm_watch.S | 5 ++--- libc/arch-arm/syscalls/ioprio_get.S | 5 ++--- libc/arch-arm/syscalls/ioprio_set.S | 5 ++--- libc/arch-arm/syscalls/klogctl.S | 5 ++--- libc/arch-arm/syscalls/lchown.S | 5 ++--- libc/arch-arm/syscalls/lgetxattr.S | 5 ++--- libc/arch-arm/syscalls/link.S | 5 ++--- libc/arch-arm/syscalls/listen.S | 5 ++--- libc/arch-arm/syscalls/listxattr.S | 5 ++--- libc/arch-arm/syscalls/llistxattr.S | 5 ++--- libc/arch-arm/syscalls/lremovexattr.S | 5 ++--- libc/arch-arm/syscalls/lseek.S | 5 ++--- libc/arch-arm/syscalls/lstat.S | 5 ++--- libc/arch-arm/syscalls/madvise.S | 5 ++--- libc/arch-arm/syscalls/mincore.S | 5 ++--- libc/arch-arm/syscalls/mkdir.S | 5 ++--- libc/arch-arm/syscalls/mkdirat.S | 5 ++--- libc/arch-arm/syscalls/mknod.S | 5 ++--- libc/arch-arm/syscalls/mlock.S | 5 ++--- libc/arch-arm/syscalls/mlockall.S | 5 ++--- libc/arch-arm/syscalls/mprotect.S | 5 ++--- libc/arch-arm/syscalls/mremap.S | 5 ++--- libc/arch-arm/syscalls/msync.S | 5 ++--- libc/arch-arm/syscalls/munlock.S | 5 ++--- libc/arch-arm/syscalls/munlockall.S | 5 ++--- libc/arch-arm/syscalls/munmap.S | 5 ++--- libc/arch-arm/syscalls/nanosleep.S | 5 ++--- libc/arch-arm/syscalls/pause.S | 5 ++--- libc/arch-arm/syscalls/personality.S | 5 ++--- libc/arch-arm/syscalls/pipe.S | 5 ++--- libc/arch-arm/syscalls/pipe2.S | 5 ++--- libc/arch-arm/syscalls/poll.S | 5 ++--- libc/arch-arm/syscalls/read.S | 5 ++--- libc/arch-arm/syscalls/readlink.S | 5 ++--- libc/arch-arm/syscalls/readv.S | 5 ++--- libc/arch-arm/syscalls/recvmsg.S | 5 ++--- libc/arch-arm/syscalls/removexattr.S | 5 ++--- libc/arch-arm/syscalls/rename.S | 5 ++--- libc/arch-arm/syscalls/renameat.S | 5 ++--- libc/arch-arm/syscalls/rmdir.S | 5 ++--- libc/arch-arm/syscalls/sched_get_priority_max.S | 5 ++--- libc/arch-arm/syscalls/sched_get_priority_min.S | 5 ++--- libc/arch-arm/syscalls/sched_getparam.S | 5 ++--- libc/arch-arm/syscalls/sched_getscheduler.S | 5 ++--- libc/arch-arm/syscalls/sched_rr_get_interval.S | 5 ++--- libc/arch-arm/syscalls/sched_setaffinity.S | 5 ++--- libc/arch-arm/syscalls/sched_setparam.S | 5 ++--- libc/arch-arm/syscalls/sched_setscheduler.S | 5 ++--- libc/arch-arm/syscalls/sched_yield.S | 5 ++--- libc/arch-arm/syscalls/sendfile.S | 5 ++--- libc/arch-arm/syscalls/sendmsg.S | 5 ++--- libc/arch-arm/syscalls/setgid.S | 5 ++--- libc/arch-arm/syscalls/setgroups.S | 5 ++--- libc/arch-arm/syscalls/setitimer.S | 5 ++--- libc/arch-arm/syscalls/setpgid.S | 5 ++--- libc/arch-arm/syscalls/setpriority.S | 5 ++--- libc/arch-arm/syscalls/setregid.S | 5 ++--- libc/arch-arm/syscalls/setresgid.S | 5 ++--- libc/arch-arm/syscalls/setrlimit.S | 5 ++--- libc/arch-arm/syscalls/setsid.S | 5 ++--- libc/arch-arm/syscalls/settimeofday.S | 5 ++--- libc/arch-arm/syscalls/shutdown.S | 5 ++--- libc/arch-arm/syscalls/sigaction.S | 5 ++--- libc/arch-arm/syscalls/sigaltstack.S | 5 ++--- libc/arch-arm/syscalls/signalfd4.S | 5 ++--- libc/arch-arm/syscalls/sigpending.S | 5 ++--- libc/arch-arm/syscalls/sigprocmask.S | 5 ++--- libc/arch-arm/syscalls/socket.S | 5 ++--- libc/arch-arm/syscalls/socketpair.S | 5 ++--- libc/arch-arm/syscalls/stat.S | 5 ++--- libc/arch-arm/syscalls/symlink.S | 5 ++--- libc/arch-arm/syscalls/sync.S | 5 ++--- libc/arch-arm/syscalls/sysinfo.S | 5 ++--- libc/arch-arm/syscalls/times.S | 5 ++--- libc/arch-arm/syscalls/truncate.S | 5 ++--- libc/arch-arm/syscalls/umask.S | 5 ++--- libc/arch-arm/syscalls/umount2.S | 5 ++--- libc/arch-arm/syscalls/uname.S | 5 ++--- libc/arch-arm/syscalls/unlink.S | 5 ++--- libc/arch-arm/syscalls/unlinkat.S | 5 ++--- libc/arch-arm/syscalls/unshare.S | 5 ++--- libc/arch-arm/syscalls/utimensat.S | 5 ++--- libc/arch-arm/syscalls/utimes.S | 5 ++--- libc/arch-arm/syscalls/vfork.S | 5 ++--- libc/arch-arm/syscalls/write.S | 5 ++--- libc/arch-arm/syscalls/writev.S | 5 ++--- libc/tools/gensyscalls.py | 5 ++--- 182 files changed, 364 insertions(+), 546 deletions(-) diff --git a/libc/arch-arm/syscalls/__brk.S b/libc/arch-arm/syscalls/__brk.S index a0854a062..e4fcab057 100644 --- a/libc/arch-arm/syscalls/__brk.S +++ b/libc/arch-arm/syscalls/__brk.S @@ -3,11 +3,10 @@ #include ENTRY(__brk) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_brk swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__fcntl.S b/libc/arch-arm/syscalls/__fcntl.S index 067ee9aab..ee82ef1bd 100644 --- a/libc/arch-arm/syscalls/__fcntl.S +++ b/libc/arch-arm/syscalls/__fcntl.S @@ -3,11 +3,10 @@ #include ENTRY(__fcntl) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fcntl swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__fcntl64.S b/libc/arch-arm/syscalls/__fcntl64.S index 3d3956772..96cc16b4e 100644 --- a/libc/arch-arm/syscalls/__fcntl64.S +++ b/libc/arch-arm/syscalls/__fcntl64.S @@ -3,11 +3,10 @@ #include ENTRY(__fcntl64) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fcntl64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__fork.S b/libc/arch-arm/syscalls/__fork.S index 6cf08ad47..9df970286 100644 --- a/libc/arch-arm/syscalls/__fork.S +++ b/libc/arch-arm/syscalls/__fork.S @@ -3,11 +3,10 @@ #include ENTRY(__fork) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fork swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__fstatfs64.S b/libc/arch-arm/syscalls/__fstatfs64.S index e8aa2f410..6e902148c 100644 --- a/libc/arch-arm/syscalls/__fstatfs64.S +++ b/libc/arch-arm/syscalls/__fstatfs64.S @@ -3,11 +3,10 @@ #include ENTRY(__fstatfs64) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fstatfs64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__getcpu.S b/libc/arch-arm/syscalls/__getcpu.S index 78271eb17..7976b0606 100644 --- a/libc/arch-arm/syscalls/__getcpu.S +++ b/libc/arch-arm/syscalls/__getcpu.S @@ -3,11 +3,10 @@ #include ENTRY(__getcpu) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getcpu swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__getcwd.S b/libc/arch-arm/syscalls/__getcwd.S index e09a4844e..6fc2d64e3 100644 --- a/libc/arch-arm/syscalls/__getcwd.S +++ b/libc/arch-arm/syscalls/__getcwd.S @@ -3,11 +3,10 @@ #include ENTRY(__getcwd) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getcwd swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__getpriority.S b/libc/arch-arm/syscalls/__getpriority.S index 30e335c80..6fb2a4340 100644 --- a/libc/arch-arm/syscalls/__getpriority.S +++ b/libc/arch-arm/syscalls/__getpriority.S @@ -3,11 +3,10 @@ #include ENTRY(__getpriority) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getpriority swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__ioctl.S b/libc/arch-arm/syscalls/__ioctl.S index 554809f46..56fd607b5 100644 --- a/libc/arch-arm/syscalls/__ioctl.S +++ b/libc/arch-arm/syscalls/__ioctl.S @@ -3,11 +3,10 @@ #include ENTRY(__ioctl) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ioctl swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__open.S b/libc/arch-arm/syscalls/__open.S index be2f4bf63..589d5adc7 100644 --- a/libc/arch-arm/syscalls/__open.S +++ b/libc/arch-arm/syscalls/__open.S @@ -3,11 +3,10 @@ #include ENTRY(__open) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_open swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__openat.S b/libc/arch-arm/syscalls/__openat.S index 4d9178003..10c30d377 100644 --- a/libc/arch-arm/syscalls/__openat.S +++ b/libc/arch-arm/syscalls/__openat.S @@ -3,11 +3,10 @@ #include ENTRY(__openat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_openat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__ptrace.S b/libc/arch-arm/syscalls/__ptrace.S index 04e0a309a..72acd7051 100644 --- a/libc/arch-arm/syscalls/__ptrace.S +++ b/libc/arch-arm/syscalls/__ptrace.S @@ -3,11 +3,10 @@ #include ENTRY(__ptrace) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ptrace swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__reboot.S b/libc/arch-arm/syscalls/__reboot.S index e75df4529..07898a05a 100644 --- a/libc/arch-arm/syscalls/__reboot.S +++ b/libc/arch-arm/syscalls/__reboot.S @@ -3,11 +3,10 @@ #include ENTRY(__reboot) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_reboot swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__rt_sigaction.S b/libc/arch-arm/syscalls/__rt_sigaction.S index 57a31497d..31d4c1e61 100644 --- a/libc/arch-arm/syscalls/__rt_sigaction.S +++ b/libc/arch-arm/syscalls/__rt_sigaction.S @@ -3,11 +3,10 @@ #include ENTRY(__rt_sigaction) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_rt_sigaction swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__rt_sigprocmask.S b/libc/arch-arm/syscalls/__rt_sigprocmask.S index 822082575..640a7ee34 100644 --- a/libc/arch-arm/syscalls/__rt_sigprocmask.S +++ b/libc/arch-arm/syscalls/__rt_sigprocmask.S @@ -3,11 +3,10 @@ #include ENTRY(__rt_sigprocmask) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_rt_sigprocmask swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__rt_sigtimedwait.S b/libc/arch-arm/syscalls/__rt_sigtimedwait.S index bce63ed83..ad725afa6 100644 --- a/libc/arch-arm/syscalls/__rt_sigtimedwait.S +++ b/libc/arch-arm/syscalls/__rt_sigtimedwait.S @@ -3,11 +3,10 @@ #include ENTRY(__rt_sigtimedwait) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_rt_sigtimedwait swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__sched_getaffinity.S b/libc/arch-arm/syscalls/__sched_getaffinity.S index bdd451731..bee167455 100644 --- a/libc/arch-arm/syscalls/__sched_getaffinity.S +++ b/libc/arch-arm/syscalls/__sched_getaffinity.S @@ -3,11 +3,10 @@ #include ENTRY(__sched_getaffinity) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_getaffinity swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__set_tls.S b/libc/arch-arm/syscalls/__set_tls.S index cf5d6b60c..3039b3505 100644 --- a/libc/arch-arm/syscalls/__set_tls.S +++ b/libc/arch-arm/syscalls/__set_tls.S @@ -3,11 +3,10 @@ #include ENTRY(__set_tls) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ARM_set_tls swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__setresuid.S b/libc/arch-arm/syscalls/__setresuid.S index d5053bae7..1877bbfac 100644 --- a/libc/arch-arm/syscalls/__setresuid.S +++ b/libc/arch-arm/syscalls/__setresuid.S @@ -3,11 +3,10 @@ #include ENTRY(__setresuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setresuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__setreuid.S b/libc/arch-arm/syscalls/__setreuid.S index 9cd51f684..2129cb212 100644 --- a/libc/arch-arm/syscalls/__setreuid.S +++ b/libc/arch-arm/syscalls/__setreuid.S @@ -3,11 +3,10 @@ #include ENTRY(__setreuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setreuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__setuid.S b/libc/arch-arm/syscalls/__setuid.S index 88dc58e87..9df2f89c4 100644 --- a/libc/arch-arm/syscalls/__setuid.S +++ b/libc/arch-arm/syscalls/__setuid.S @@ -3,11 +3,10 @@ #include ENTRY(__setuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__sigsuspend.S b/libc/arch-arm/syscalls/__sigsuspend.S index 1ececb797..8f1ff55c6 100644 --- a/libc/arch-arm/syscalls/__sigsuspend.S +++ b/libc/arch-arm/syscalls/__sigsuspend.S @@ -3,11 +3,10 @@ #include ENTRY(__sigsuspend) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sigsuspend swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__statfs64.S b/libc/arch-arm/syscalls/__statfs64.S index 4afef71a9..f8d63a3a0 100644 --- a/libc/arch-arm/syscalls/__statfs64.S +++ b/libc/arch-arm/syscalls/__statfs64.S @@ -3,11 +3,10 @@ #include ENTRY(__statfs64) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_statfs64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__syslog.S b/libc/arch-arm/syscalls/__syslog.S index 6dbe745f8..8ad027122 100644 --- a/libc/arch-arm/syscalls/__syslog.S +++ b/libc/arch-arm/syscalls/__syslog.S @@ -3,11 +3,10 @@ #include ENTRY(__syslog) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_syslog swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__timer_create.S b/libc/arch-arm/syscalls/__timer_create.S index c547137fd..fcb4e3f2c 100644 --- a/libc/arch-arm/syscalls/__timer_create.S +++ b/libc/arch-arm/syscalls/__timer_create.S @@ -3,11 +3,10 @@ #include ENTRY(__timer_create) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_timer_create swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__timer_delete.S b/libc/arch-arm/syscalls/__timer_delete.S index ca2e0a313..de303fc33 100644 --- a/libc/arch-arm/syscalls/__timer_delete.S +++ b/libc/arch-arm/syscalls/__timer_delete.S @@ -3,11 +3,10 @@ #include ENTRY(__timer_delete) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_timer_delete swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__timer_getoverrun.S b/libc/arch-arm/syscalls/__timer_getoverrun.S index b0f18e777..a96b047aa 100644 --- a/libc/arch-arm/syscalls/__timer_getoverrun.S +++ b/libc/arch-arm/syscalls/__timer_getoverrun.S @@ -3,11 +3,10 @@ #include ENTRY(__timer_getoverrun) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_timer_getoverrun swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__timer_gettime.S b/libc/arch-arm/syscalls/__timer_gettime.S index c172602a9..6e6bbf54e 100644 --- a/libc/arch-arm/syscalls/__timer_gettime.S +++ b/libc/arch-arm/syscalls/__timer_gettime.S @@ -3,11 +3,10 @@ #include ENTRY(__timer_gettime) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_timer_gettime swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__timer_settime.S b/libc/arch-arm/syscalls/__timer_settime.S index 8220440fd..bcbe298ea 100644 --- a/libc/arch-arm/syscalls/__timer_settime.S +++ b/libc/arch-arm/syscalls/__timer_settime.S @@ -3,11 +3,10 @@ #include ENTRY(__timer_settime) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_timer_settime swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/__wait4.S b/libc/arch-arm/syscalls/__wait4.S index fa3450231..2a0e5c4db 100644 --- a/libc/arch-arm/syscalls/__wait4.S +++ b/libc/arch-arm/syscalls/__wait4.S @@ -3,11 +3,10 @@ #include ENTRY(__wait4) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_wait4 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/_exit.S b/libc/arch-arm/syscalls/_exit.S index 77487b5d9..ab444ce3e 100644 --- a/libc/arch-arm/syscalls/_exit.S +++ b/libc/arch-arm/syscalls/_exit.S @@ -3,11 +3,10 @@ #include ENTRY(_exit) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_exit_group swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/_exit_thread.S b/libc/arch-arm/syscalls/_exit_thread.S index bd16ff1e4..53a21fb93 100644 --- a/libc/arch-arm/syscalls/_exit_thread.S +++ b/libc/arch-arm/syscalls/_exit_thread.S @@ -3,11 +3,10 @@ #include ENTRY(_exit_thread) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_exit swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/accept.S b/libc/arch-arm/syscalls/accept.S index 0dcfb0c8d..b1a2d72db 100644 --- a/libc/arch-arm/syscalls/accept.S +++ b/libc/arch-arm/syscalls/accept.S @@ -3,11 +3,10 @@ #include ENTRY(accept) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_accept swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/access.S b/libc/arch-arm/syscalls/access.S index cf585a348..c0b033320 100644 --- a/libc/arch-arm/syscalls/access.S +++ b/libc/arch-arm/syscalls/access.S @@ -3,11 +3,10 @@ #include ENTRY(access) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_access swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/acct.S b/libc/arch-arm/syscalls/acct.S index 85346e45e..5485be1cb 100644 --- a/libc/arch-arm/syscalls/acct.S +++ b/libc/arch-arm/syscalls/acct.S @@ -3,11 +3,10 @@ #include ENTRY(acct) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_acct swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/bind.S b/libc/arch-arm/syscalls/bind.S index 85d047184..1bb58436b 100644 --- a/libc/arch-arm/syscalls/bind.S +++ b/libc/arch-arm/syscalls/bind.S @@ -3,11 +3,10 @@ #include ENTRY(bind) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_bind swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/cacheflush.S b/libc/arch-arm/syscalls/cacheflush.S index 05b241176..fd7f68d31 100644 --- a/libc/arch-arm/syscalls/cacheflush.S +++ b/libc/arch-arm/syscalls/cacheflush.S @@ -3,11 +3,10 @@ #include ENTRY(cacheflush) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ARM_cacheflush swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/capget.S b/libc/arch-arm/syscalls/capget.S index 0f3ba317f..1f425a026 100644 --- a/libc/arch-arm/syscalls/capget.S +++ b/libc/arch-arm/syscalls/capget.S @@ -3,11 +3,10 @@ #include ENTRY(capget) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_capget swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/capset.S b/libc/arch-arm/syscalls/capset.S index 2254db207..13ebd5a27 100644 --- a/libc/arch-arm/syscalls/capset.S +++ b/libc/arch-arm/syscalls/capset.S @@ -3,11 +3,10 @@ #include ENTRY(capset) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_capset swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/chdir.S b/libc/arch-arm/syscalls/chdir.S index 57d6b139d..4965495aa 100644 --- a/libc/arch-arm/syscalls/chdir.S +++ b/libc/arch-arm/syscalls/chdir.S @@ -3,11 +3,10 @@ #include ENTRY(chdir) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_chdir swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/chmod.S b/libc/arch-arm/syscalls/chmod.S index 8909c6f62..ed9d52fba 100644 --- a/libc/arch-arm/syscalls/chmod.S +++ b/libc/arch-arm/syscalls/chmod.S @@ -3,11 +3,10 @@ #include ENTRY(chmod) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_chmod swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/chown.S b/libc/arch-arm/syscalls/chown.S index cbbd8a846..ff1cec289 100644 --- a/libc/arch-arm/syscalls/chown.S +++ b/libc/arch-arm/syscalls/chown.S @@ -3,11 +3,10 @@ #include ENTRY(chown) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_chown32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/chroot.S b/libc/arch-arm/syscalls/chroot.S index a679172b8..bc8e3fe83 100644 --- a/libc/arch-arm/syscalls/chroot.S +++ b/libc/arch-arm/syscalls/chroot.S @@ -3,11 +3,10 @@ #include ENTRY(chroot) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_chroot swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/clock_getres.S b/libc/arch-arm/syscalls/clock_getres.S index 705f2961d..66cf9ece8 100644 --- a/libc/arch-arm/syscalls/clock_getres.S +++ b/libc/arch-arm/syscalls/clock_getres.S @@ -3,11 +3,10 @@ #include ENTRY(clock_getres) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_clock_getres swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/clock_gettime.S b/libc/arch-arm/syscalls/clock_gettime.S index a9ab41fbd..4e42c820f 100644 --- a/libc/arch-arm/syscalls/clock_gettime.S +++ b/libc/arch-arm/syscalls/clock_gettime.S @@ -3,11 +3,10 @@ #include ENTRY(clock_gettime) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_clock_gettime swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/clock_nanosleep.S b/libc/arch-arm/syscalls/clock_nanosleep.S index f8e7f73f7..6d530a21f 100644 --- a/libc/arch-arm/syscalls/clock_nanosleep.S +++ b/libc/arch-arm/syscalls/clock_nanosleep.S @@ -3,11 +3,10 @@ #include ENTRY(clock_nanosleep) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_clock_nanosleep swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/clock_settime.S b/libc/arch-arm/syscalls/clock_settime.S index a996441d5..e9374b5ee 100644 --- a/libc/arch-arm/syscalls/clock_settime.S +++ b/libc/arch-arm/syscalls/clock_settime.S @@ -3,11 +3,10 @@ #include ENTRY(clock_settime) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_clock_settime swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/close.S b/libc/arch-arm/syscalls/close.S index 36d78a486..eb4cb6286 100644 --- a/libc/arch-arm/syscalls/close.S +++ b/libc/arch-arm/syscalls/close.S @@ -3,11 +3,10 @@ #include ENTRY(close) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_close swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/connect.S b/libc/arch-arm/syscalls/connect.S index ea14c1773..b97b4fe3c 100644 --- a/libc/arch-arm/syscalls/connect.S +++ b/libc/arch-arm/syscalls/connect.S @@ -3,11 +3,10 @@ #include ENTRY(connect) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_connect swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/delete_module.S b/libc/arch-arm/syscalls/delete_module.S index df8aae09d..09949943e 100644 --- a/libc/arch-arm/syscalls/delete_module.S +++ b/libc/arch-arm/syscalls/delete_module.S @@ -3,11 +3,10 @@ #include ENTRY(delete_module) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_delete_module swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/dup.S b/libc/arch-arm/syscalls/dup.S index b0c1cdafa..88543420c 100644 --- a/libc/arch-arm/syscalls/dup.S +++ b/libc/arch-arm/syscalls/dup.S @@ -3,11 +3,10 @@ #include ENTRY(dup) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_dup swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/dup2.S b/libc/arch-arm/syscalls/dup2.S index ed346d9e3..0dcc57fc7 100644 --- a/libc/arch-arm/syscalls/dup2.S +++ b/libc/arch-arm/syscalls/dup2.S @@ -3,11 +3,10 @@ #include ENTRY(dup2) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_dup2 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/epoll_create.S b/libc/arch-arm/syscalls/epoll_create.S index 1aab6063f..92a2781f7 100644 --- a/libc/arch-arm/syscalls/epoll_create.S +++ b/libc/arch-arm/syscalls/epoll_create.S @@ -3,11 +3,10 @@ #include ENTRY(epoll_create) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_epoll_create swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/epoll_ctl.S b/libc/arch-arm/syscalls/epoll_ctl.S index c0ecf06d8..b3c630fd0 100644 --- a/libc/arch-arm/syscalls/epoll_ctl.S +++ b/libc/arch-arm/syscalls/epoll_ctl.S @@ -3,11 +3,10 @@ #include ENTRY(epoll_ctl) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_epoll_ctl swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/epoll_wait.S b/libc/arch-arm/syscalls/epoll_wait.S index 3535001f1..3ccac918c 100644 --- a/libc/arch-arm/syscalls/epoll_wait.S +++ b/libc/arch-arm/syscalls/epoll_wait.S @@ -3,11 +3,10 @@ #include ENTRY(epoll_wait) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_epoll_wait swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/eventfd.S b/libc/arch-arm/syscalls/eventfd.S index 857b6c0e1..754f019fc 100644 --- a/libc/arch-arm/syscalls/eventfd.S +++ b/libc/arch-arm/syscalls/eventfd.S @@ -3,11 +3,10 @@ #include ENTRY(eventfd) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_eventfd2 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/execve.S b/libc/arch-arm/syscalls/execve.S index 1a6616721..49e5b13f5 100644 --- a/libc/arch-arm/syscalls/execve.S +++ b/libc/arch-arm/syscalls/execve.S @@ -3,11 +3,10 @@ #include ENTRY(execve) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_execve swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/faccessat.S b/libc/arch-arm/syscalls/faccessat.S index a2f176fdc..5ade5177b 100644 --- a/libc/arch-arm/syscalls/faccessat.S +++ b/libc/arch-arm/syscalls/faccessat.S @@ -3,11 +3,10 @@ #include ENTRY(faccessat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_faccessat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fchdir.S b/libc/arch-arm/syscalls/fchdir.S index 7d80cf0d2..96a047dda 100644 --- a/libc/arch-arm/syscalls/fchdir.S +++ b/libc/arch-arm/syscalls/fchdir.S @@ -3,11 +3,10 @@ #include ENTRY(fchdir) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fchdir swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fchmod.S b/libc/arch-arm/syscalls/fchmod.S index bc8e64371..b096a8c17 100644 --- a/libc/arch-arm/syscalls/fchmod.S +++ b/libc/arch-arm/syscalls/fchmod.S @@ -3,11 +3,10 @@ #include ENTRY(fchmod) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fchmod swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fchmodat.S b/libc/arch-arm/syscalls/fchmodat.S index ac782e588..8c87598cc 100644 --- a/libc/arch-arm/syscalls/fchmodat.S +++ b/libc/arch-arm/syscalls/fchmodat.S @@ -3,11 +3,10 @@ #include ENTRY(fchmodat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fchmodat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fchown.S b/libc/arch-arm/syscalls/fchown.S index 22d7fd278..2f7e92bc0 100644 --- a/libc/arch-arm/syscalls/fchown.S +++ b/libc/arch-arm/syscalls/fchown.S @@ -3,11 +3,10 @@ #include ENTRY(fchown) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fchown32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fdatasync.S b/libc/arch-arm/syscalls/fdatasync.S index d41e8236c..31818c889 100644 --- a/libc/arch-arm/syscalls/fdatasync.S +++ b/libc/arch-arm/syscalls/fdatasync.S @@ -3,11 +3,10 @@ #include ENTRY(fdatasync) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fdatasync swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fgetxattr.S b/libc/arch-arm/syscalls/fgetxattr.S index 32b8ef852..6f3eb3dac 100644 --- a/libc/arch-arm/syscalls/fgetxattr.S +++ b/libc/arch-arm/syscalls/fgetxattr.S @@ -3,11 +3,10 @@ #include ENTRY(fgetxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fgetxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/flistxattr.S b/libc/arch-arm/syscalls/flistxattr.S index 0785e7775..38e856d0b 100644 --- a/libc/arch-arm/syscalls/flistxattr.S +++ b/libc/arch-arm/syscalls/flistxattr.S @@ -3,11 +3,10 @@ #include ENTRY(flistxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_flistxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/flock.S b/libc/arch-arm/syscalls/flock.S index c0d2844d1..3732bfe85 100644 --- a/libc/arch-arm/syscalls/flock.S +++ b/libc/arch-arm/syscalls/flock.S @@ -3,11 +3,10 @@ #include ENTRY(flock) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_flock swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fremovexattr.S b/libc/arch-arm/syscalls/fremovexattr.S index ae97d13d2..45cf803a7 100644 --- a/libc/arch-arm/syscalls/fremovexattr.S +++ b/libc/arch-arm/syscalls/fremovexattr.S @@ -3,11 +3,10 @@ #include ENTRY(fremovexattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fremovexattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fstat.S b/libc/arch-arm/syscalls/fstat.S index e75649fae..d31421339 100644 --- a/libc/arch-arm/syscalls/fstat.S +++ b/libc/arch-arm/syscalls/fstat.S @@ -3,11 +3,10 @@ #include ENTRY(fstat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fstat64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fstatat.S b/libc/arch-arm/syscalls/fstatat.S index 065ef9fde..8cf1a5718 100644 --- a/libc/arch-arm/syscalls/fstatat.S +++ b/libc/arch-arm/syscalls/fstatat.S @@ -3,11 +3,10 @@ #include ENTRY(fstatat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fstatat64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/fsync.S b/libc/arch-arm/syscalls/fsync.S index f0de9ca90..52cfa539a 100644 --- a/libc/arch-arm/syscalls/fsync.S +++ b/libc/arch-arm/syscalls/fsync.S @@ -3,11 +3,10 @@ #include ENTRY(fsync) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_fsync swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/ftruncate.S b/libc/arch-arm/syscalls/ftruncate.S index 2e4a30818..14cd87df4 100644 --- a/libc/arch-arm/syscalls/ftruncate.S +++ b/libc/arch-arm/syscalls/ftruncate.S @@ -3,11 +3,10 @@ #include ENTRY(ftruncate) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ftruncate swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/ftruncate64.S b/libc/arch-arm/syscalls/ftruncate64.S index 7c7b80b6e..0e1b42b98 100644 --- a/libc/arch-arm/syscalls/ftruncate64.S +++ b/libc/arch-arm/syscalls/ftruncate64.S @@ -3,11 +3,10 @@ #include ENTRY(ftruncate64) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ftruncate64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getdents.S b/libc/arch-arm/syscalls/getdents.S index 82b6e4cbf..e6c3028bd 100644 --- a/libc/arch-arm/syscalls/getdents.S +++ b/libc/arch-arm/syscalls/getdents.S @@ -3,11 +3,10 @@ #include ENTRY(getdents) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getdents64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getegid.S b/libc/arch-arm/syscalls/getegid.S index 27ea27244..22794d19b 100644 --- a/libc/arch-arm/syscalls/getegid.S +++ b/libc/arch-arm/syscalls/getegid.S @@ -3,11 +3,10 @@ #include ENTRY(getegid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getegid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/geteuid.S b/libc/arch-arm/syscalls/geteuid.S index d4c9cd160..cfb318f69 100644 --- a/libc/arch-arm/syscalls/geteuid.S +++ b/libc/arch-arm/syscalls/geteuid.S @@ -3,11 +3,10 @@ #include ENTRY(geteuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_geteuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getgid.S b/libc/arch-arm/syscalls/getgid.S index 9a40fe6a8..085061e0e 100644 --- a/libc/arch-arm/syscalls/getgid.S +++ b/libc/arch-arm/syscalls/getgid.S @@ -3,11 +3,10 @@ #include ENTRY(getgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getgid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getgroups.S b/libc/arch-arm/syscalls/getgroups.S index 2995cc8fd..c426d8728 100644 --- a/libc/arch-arm/syscalls/getgroups.S +++ b/libc/arch-arm/syscalls/getgroups.S @@ -3,11 +3,10 @@ #include ENTRY(getgroups) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getgroups32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getitimer.S b/libc/arch-arm/syscalls/getitimer.S index a3f14234a..5d832d99b 100644 --- a/libc/arch-arm/syscalls/getitimer.S +++ b/libc/arch-arm/syscalls/getitimer.S @@ -3,11 +3,10 @@ #include ENTRY(getitimer) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getitimer swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getpeername.S b/libc/arch-arm/syscalls/getpeername.S index f90c34495..ced69f7d5 100644 --- a/libc/arch-arm/syscalls/getpeername.S +++ b/libc/arch-arm/syscalls/getpeername.S @@ -3,11 +3,10 @@ #include ENTRY(getpeername) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getpeername swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getpgid.S b/libc/arch-arm/syscalls/getpgid.S index 0fc57a40c..d599f1e40 100644 --- a/libc/arch-arm/syscalls/getpgid.S +++ b/libc/arch-arm/syscalls/getpgid.S @@ -3,11 +3,10 @@ #include ENTRY(getpgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getpgid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getpid.S b/libc/arch-arm/syscalls/getpid.S index 440ae9bfa..ef19d2593 100644 --- a/libc/arch-arm/syscalls/getpid.S +++ b/libc/arch-arm/syscalls/getpid.S @@ -3,11 +3,10 @@ #include ENTRY(getpid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getpid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getppid.S b/libc/arch-arm/syscalls/getppid.S index 3eb1b8662..1fe30d48d 100644 --- a/libc/arch-arm/syscalls/getppid.S +++ b/libc/arch-arm/syscalls/getppid.S @@ -3,11 +3,10 @@ #include ENTRY(getppid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getppid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getresgid.S b/libc/arch-arm/syscalls/getresgid.S index a022341ad..e8d2129f5 100644 --- a/libc/arch-arm/syscalls/getresgid.S +++ b/libc/arch-arm/syscalls/getresgid.S @@ -3,11 +3,10 @@ #include ENTRY(getresgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getresgid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getresuid.S b/libc/arch-arm/syscalls/getresuid.S index 23112a6ab..cdfe0f7c7 100644 --- a/libc/arch-arm/syscalls/getresuid.S +++ b/libc/arch-arm/syscalls/getresuid.S @@ -3,11 +3,10 @@ #include ENTRY(getresuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getresuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getrlimit.S b/libc/arch-arm/syscalls/getrlimit.S index 8b1c0891f..3acbf9593 100644 --- a/libc/arch-arm/syscalls/getrlimit.S +++ b/libc/arch-arm/syscalls/getrlimit.S @@ -3,11 +3,10 @@ #include ENTRY(getrlimit) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ugetrlimit swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getrusage.S b/libc/arch-arm/syscalls/getrusage.S index 74fa20bfd..e17fc4a8b 100644 --- a/libc/arch-arm/syscalls/getrusage.S +++ b/libc/arch-arm/syscalls/getrusage.S @@ -3,11 +3,10 @@ #include ENTRY(getrusage) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getrusage swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getsid.S b/libc/arch-arm/syscalls/getsid.S index 856d41a5c..06e6d6789 100644 --- a/libc/arch-arm/syscalls/getsid.S +++ b/libc/arch-arm/syscalls/getsid.S @@ -3,11 +3,10 @@ #include ENTRY(getsid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getsid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getsockname.S b/libc/arch-arm/syscalls/getsockname.S index 99470e2a2..458814fd7 100644 --- a/libc/arch-arm/syscalls/getsockname.S +++ b/libc/arch-arm/syscalls/getsockname.S @@ -3,11 +3,10 @@ #include ENTRY(getsockname) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getsockname swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/gettid.S b/libc/arch-arm/syscalls/gettid.S index f5b15be2a..f35c7eac3 100644 --- a/libc/arch-arm/syscalls/gettid.S +++ b/libc/arch-arm/syscalls/gettid.S @@ -3,11 +3,10 @@ #include ENTRY(gettid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_gettid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/gettimeofday.S b/libc/arch-arm/syscalls/gettimeofday.S index 9b47daffc..113413e50 100644 --- a/libc/arch-arm/syscalls/gettimeofday.S +++ b/libc/arch-arm/syscalls/gettimeofday.S @@ -3,11 +3,10 @@ #include ENTRY(gettimeofday) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_gettimeofday swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getuid.S b/libc/arch-arm/syscalls/getuid.S index 053dc316b..20ed7f982 100644 --- a/libc/arch-arm/syscalls/getuid.S +++ b/libc/arch-arm/syscalls/getuid.S @@ -3,11 +3,10 @@ #include ENTRY(getuid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getuid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/getxattr.S b/libc/arch-arm/syscalls/getxattr.S index 18532ce71..0a7cbef3a 100644 --- a/libc/arch-arm/syscalls/getxattr.S +++ b/libc/arch-arm/syscalls/getxattr.S @@ -3,11 +3,10 @@ #include ENTRY(getxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_getxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/init_module.S b/libc/arch-arm/syscalls/init_module.S index 73beb467b..de41a7e44 100644 --- a/libc/arch-arm/syscalls/init_module.S +++ b/libc/arch-arm/syscalls/init_module.S @@ -3,11 +3,10 @@ #include ENTRY(init_module) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_init_module swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/inotify_add_watch.S b/libc/arch-arm/syscalls/inotify_add_watch.S index da4a29661..aa8fcb7f2 100644 --- a/libc/arch-arm/syscalls/inotify_add_watch.S +++ b/libc/arch-arm/syscalls/inotify_add_watch.S @@ -3,11 +3,10 @@ #include ENTRY(inotify_add_watch) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_inotify_add_watch swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/inotify_init.S b/libc/arch-arm/syscalls/inotify_init.S index bac124c76..56d4b9394 100644 --- a/libc/arch-arm/syscalls/inotify_init.S +++ b/libc/arch-arm/syscalls/inotify_init.S @@ -3,11 +3,10 @@ #include ENTRY(inotify_init) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_inotify_init swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/inotify_rm_watch.S b/libc/arch-arm/syscalls/inotify_rm_watch.S index f5764808b..431506108 100644 --- a/libc/arch-arm/syscalls/inotify_rm_watch.S +++ b/libc/arch-arm/syscalls/inotify_rm_watch.S @@ -3,11 +3,10 @@ #include ENTRY(inotify_rm_watch) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_inotify_rm_watch swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/ioprio_get.S b/libc/arch-arm/syscalls/ioprio_get.S index 13739dc55..d3bd7968a 100644 --- a/libc/arch-arm/syscalls/ioprio_get.S +++ b/libc/arch-arm/syscalls/ioprio_get.S @@ -3,11 +3,10 @@ #include ENTRY(ioprio_get) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ioprio_get swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/ioprio_set.S b/libc/arch-arm/syscalls/ioprio_set.S index 7e40ee520..c42d3051e 100644 --- a/libc/arch-arm/syscalls/ioprio_set.S +++ b/libc/arch-arm/syscalls/ioprio_set.S @@ -3,11 +3,10 @@ #include ENTRY(ioprio_set) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_ioprio_set swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/klogctl.S b/libc/arch-arm/syscalls/klogctl.S index 5434b3028..13568156c 100644 --- a/libc/arch-arm/syscalls/klogctl.S +++ b/libc/arch-arm/syscalls/klogctl.S @@ -3,11 +3,10 @@ #include ENTRY(klogctl) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_syslog swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/lchown.S b/libc/arch-arm/syscalls/lchown.S index 789e5af9e..56902a312 100644 --- a/libc/arch-arm/syscalls/lchown.S +++ b/libc/arch-arm/syscalls/lchown.S @@ -3,11 +3,10 @@ #include ENTRY(lchown) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_lchown32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/lgetxattr.S b/libc/arch-arm/syscalls/lgetxattr.S index 61fc09825..cc30d63e3 100644 --- a/libc/arch-arm/syscalls/lgetxattr.S +++ b/libc/arch-arm/syscalls/lgetxattr.S @@ -3,11 +3,10 @@ #include ENTRY(lgetxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_lgetxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/link.S b/libc/arch-arm/syscalls/link.S index ccf0a1d3f..dab8fa69d 100644 --- a/libc/arch-arm/syscalls/link.S +++ b/libc/arch-arm/syscalls/link.S @@ -3,11 +3,10 @@ #include ENTRY(link) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_link swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/listen.S b/libc/arch-arm/syscalls/listen.S index bb7f7a44c..fac37024c 100644 --- a/libc/arch-arm/syscalls/listen.S +++ b/libc/arch-arm/syscalls/listen.S @@ -3,11 +3,10 @@ #include ENTRY(listen) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_listen swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/listxattr.S b/libc/arch-arm/syscalls/listxattr.S index 6bbdb6ac0..8c7fc9b83 100644 --- a/libc/arch-arm/syscalls/listxattr.S +++ b/libc/arch-arm/syscalls/listxattr.S @@ -3,11 +3,10 @@ #include ENTRY(listxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_listxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/llistxattr.S b/libc/arch-arm/syscalls/llistxattr.S index 89682df63..9cade1805 100644 --- a/libc/arch-arm/syscalls/llistxattr.S +++ b/libc/arch-arm/syscalls/llistxattr.S @@ -3,11 +3,10 @@ #include ENTRY(llistxattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_llistxattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/lremovexattr.S b/libc/arch-arm/syscalls/lremovexattr.S index 62f6722dd..d4a7b8212 100644 --- a/libc/arch-arm/syscalls/lremovexattr.S +++ b/libc/arch-arm/syscalls/lremovexattr.S @@ -3,11 +3,10 @@ #include ENTRY(lremovexattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_lremovexattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/lseek.S b/libc/arch-arm/syscalls/lseek.S index 2cd08536c..a45285611 100644 --- a/libc/arch-arm/syscalls/lseek.S +++ b/libc/arch-arm/syscalls/lseek.S @@ -3,11 +3,10 @@ #include ENTRY(lseek) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_lseek swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/lstat.S b/libc/arch-arm/syscalls/lstat.S index dbecefe0d..69f21461f 100644 --- a/libc/arch-arm/syscalls/lstat.S +++ b/libc/arch-arm/syscalls/lstat.S @@ -3,11 +3,10 @@ #include ENTRY(lstat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_lstat64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/madvise.S b/libc/arch-arm/syscalls/madvise.S index 024476fbd..02944a2bd 100644 --- a/libc/arch-arm/syscalls/madvise.S +++ b/libc/arch-arm/syscalls/madvise.S @@ -3,11 +3,10 @@ #include ENTRY(madvise) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_madvise swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mincore.S b/libc/arch-arm/syscalls/mincore.S index 7a2a378ed..5ffdc1144 100644 --- a/libc/arch-arm/syscalls/mincore.S +++ b/libc/arch-arm/syscalls/mincore.S @@ -3,11 +3,10 @@ #include ENTRY(mincore) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mincore swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mkdir.S b/libc/arch-arm/syscalls/mkdir.S index e51beab20..c2aa08034 100644 --- a/libc/arch-arm/syscalls/mkdir.S +++ b/libc/arch-arm/syscalls/mkdir.S @@ -3,11 +3,10 @@ #include ENTRY(mkdir) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mkdir swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mkdirat.S b/libc/arch-arm/syscalls/mkdirat.S index 52f0be339..421c70a62 100644 --- a/libc/arch-arm/syscalls/mkdirat.S +++ b/libc/arch-arm/syscalls/mkdirat.S @@ -3,11 +3,10 @@ #include ENTRY(mkdirat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mkdirat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mknod.S b/libc/arch-arm/syscalls/mknod.S index ac6d97647..4aca2c557 100644 --- a/libc/arch-arm/syscalls/mknod.S +++ b/libc/arch-arm/syscalls/mknod.S @@ -3,11 +3,10 @@ #include ENTRY(mknod) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mknod swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mlock.S b/libc/arch-arm/syscalls/mlock.S index ad140d123..5c8e74d9e 100644 --- a/libc/arch-arm/syscalls/mlock.S +++ b/libc/arch-arm/syscalls/mlock.S @@ -3,11 +3,10 @@ #include ENTRY(mlock) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mlock swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mlockall.S b/libc/arch-arm/syscalls/mlockall.S index 45c782e33..a89545aa8 100644 --- a/libc/arch-arm/syscalls/mlockall.S +++ b/libc/arch-arm/syscalls/mlockall.S @@ -3,11 +3,10 @@ #include ENTRY(mlockall) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mlockall swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mprotect.S b/libc/arch-arm/syscalls/mprotect.S index 39ae3531e..06238bfa3 100644 --- a/libc/arch-arm/syscalls/mprotect.S +++ b/libc/arch-arm/syscalls/mprotect.S @@ -3,11 +3,10 @@ #include ENTRY(mprotect) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mprotect swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/mremap.S b/libc/arch-arm/syscalls/mremap.S index 918f3b708..29b308b3d 100644 --- a/libc/arch-arm/syscalls/mremap.S +++ b/libc/arch-arm/syscalls/mremap.S @@ -3,11 +3,10 @@ #include ENTRY(mremap) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_mremap swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/msync.S b/libc/arch-arm/syscalls/msync.S index 2a5922c67..af8fc0c6f 100644 --- a/libc/arch-arm/syscalls/msync.S +++ b/libc/arch-arm/syscalls/msync.S @@ -3,11 +3,10 @@ #include ENTRY(msync) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_msync swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/munlock.S b/libc/arch-arm/syscalls/munlock.S index 5a02aaf00..42df37e94 100644 --- a/libc/arch-arm/syscalls/munlock.S +++ b/libc/arch-arm/syscalls/munlock.S @@ -3,11 +3,10 @@ #include ENTRY(munlock) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_munlock swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/munlockall.S b/libc/arch-arm/syscalls/munlockall.S index 810696514..c0fca3312 100644 --- a/libc/arch-arm/syscalls/munlockall.S +++ b/libc/arch-arm/syscalls/munlockall.S @@ -3,11 +3,10 @@ #include ENTRY(munlockall) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_munlockall swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/munmap.S b/libc/arch-arm/syscalls/munmap.S index 6bb8dd8a8..9d7b60f38 100644 --- a/libc/arch-arm/syscalls/munmap.S +++ b/libc/arch-arm/syscalls/munmap.S @@ -3,11 +3,10 @@ #include ENTRY(munmap) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_munmap swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/nanosleep.S b/libc/arch-arm/syscalls/nanosleep.S index af36ced75..7f4cda694 100644 --- a/libc/arch-arm/syscalls/nanosleep.S +++ b/libc/arch-arm/syscalls/nanosleep.S @@ -3,11 +3,10 @@ #include ENTRY(nanosleep) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_nanosleep swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/pause.S b/libc/arch-arm/syscalls/pause.S index e64f4f337..1238f4bb7 100644 --- a/libc/arch-arm/syscalls/pause.S +++ b/libc/arch-arm/syscalls/pause.S @@ -3,11 +3,10 @@ #include ENTRY(pause) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_pause swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/personality.S b/libc/arch-arm/syscalls/personality.S index 17ac68661..f338d7156 100644 --- a/libc/arch-arm/syscalls/personality.S +++ b/libc/arch-arm/syscalls/personality.S @@ -3,11 +3,10 @@ #include ENTRY(personality) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_personality swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/pipe.S b/libc/arch-arm/syscalls/pipe.S index 396870311..ec0efb1ab 100644 --- a/libc/arch-arm/syscalls/pipe.S +++ b/libc/arch-arm/syscalls/pipe.S @@ -3,11 +3,10 @@ #include ENTRY(pipe) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_pipe swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/pipe2.S b/libc/arch-arm/syscalls/pipe2.S index da2ecba3d..f79c8f509 100644 --- a/libc/arch-arm/syscalls/pipe2.S +++ b/libc/arch-arm/syscalls/pipe2.S @@ -3,11 +3,10 @@ #include ENTRY(pipe2) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_pipe2 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/poll.S b/libc/arch-arm/syscalls/poll.S index 4d345ea27..d9831aba4 100644 --- a/libc/arch-arm/syscalls/poll.S +++ b/libc/arch-arm/syscalls/poll.S @@ -3,11 +3,10 @@ #include ENTRY(poll) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_poll swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/read.S b/libc/arch-arm/syscalls/read.S index c062388cb..ab0583a19 100644 --- a/libc/arch-arm/syscalls/read.S +++ b/libc/arch-arm/syscalls/read.S @@ -3,11 +3,10 @@ #include ENTRY(read) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_read swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/readlink.S b/libc/arch-arm/syscalls/readlink.S index 7602e6178..90b0ea680 100644 --- a/libc/arch-arm/syscalls/readlink.S +++ b/libc/arch-arm/syscalls/readlink.S @@ -3,11 +3,10 @@ #include ENTRY(readlink) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_readlink swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/readv.S b/libc/arch-arm/syscalls/readv.S index e717e6161..9f8b8db28 100644 --- a/libc/arch-arm/syscalls/readv.S +++ b/libc/arch-arm/syscalls/readv.S @@ -3,11 +3,10 @@ #include ENTRY(readv) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_readv swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/recvmsg.S b/libc/arch-arm/syscalls/recvmsg.S index 5c168dc68..00746a1f9 100644 --- a/libc/arch-arm/syscalls/recvmsg.S +++ b/libc/arch-arm/syscalls/recvmsg.S @@ -3,11 +3,10 @@ #include ENTRY(recvmsg) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_recvmsg swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/removexattr.S b/libc/arch-arm/syscalls/removexattr.S index 1a44caf24..82fb9e088 100644 --- a/libc/arch-arm/syscalls/removexattr.S +++ b/libc/arch-arm/syscalls/removexattr.S @@ -3,11 +3,10 @@ #include ENTRY(removexattr) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_removexattr swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/rename.S b/libc/arch-arm/syscalls/rename.S index 930ddb6dc..dfe0b0ef1 100644 --- a/libc/arch-arm/syscalls/rename.S +++ b/libc/arch-arm/syscalls/rename.S @@ -3,11 +3,10 @@ #include ENTRY(rename) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_rename swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/renameat.S b/libc/arch-arm/syscalls/renameat.S index a13c4ee55..aa42b7839 100644 --- a/libc/arch-arm/syscalls/renameat.S +++ b/libc/arch-arm/syscalls/renameat.S @@ -3,11 +3,10 @@ #include ENTRY(renameat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_renameat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/rmdir.S b/libc/arch-arm/syscalls/rmdir.S index 09a956f59..c2d5c5adb 100644 --- a/libc/arch-arm/syscalls/rmdir.S +++ b/libc/arch-arm/syscalls/rmdir.S @@ -3,11 +3,10 @@ #include ENTRY(rmdir) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_rmdir swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_get_priority_max.S b/libc/arch-arm/syscalls/sched_get_priority_max.S index 2dea3b790..703ddeb71 100644 --- a/libc/arch-arm/syscalls/sched_get_priority_max.S +++ b/libc/arch-arm/syscalls/sched_get_priority_max.S @@ -3,11 +3,10 @@ #include ENTRY(sched_get_priority_max) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_get_priority_max swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_get_priority_min.S b/libc/arch-arm/syscalls/sched_get_priority_min.S index de8b8788b..deea8ae01 100644 --- a/libc/arch-arm/syscalls/sched_get_priority_min.S +++ b/libc/arch-arm/syscalls/sched_get_priority_min.S @@ -3,11 +3,10 @@ #include ENTRY(sched_get_priority_min) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_get_priority_min swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_getparam.S b/libc/arch-arm/syscalls/sched_getparam.S index 6434217d7..194d4a2a3 100644 --- a/libc/arch-arm/syscalls/sched_getparam.S +++ b/libc/arch-arm/syscalls/sched_getparam.S @@ -3,11 +3,10 @@ #include ENTRY(sched_getparam) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_getparam swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_getscheduler.S b/libc/arch-arm/syscalls/sched_getscheduler.S index 8e45ce629..fd3cec588 100644 --- a/libc/arch-arm/syscalls/sched_getscheduler.S +++ b/libc/arch-arm/syscalls/sched_getscheduler.S @@ -3,11 +3,10 @@ #include ENTRY(sched_getscheduler) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_getscheduler swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_rr_get_interval.S b/libc/arch-arm/syscalls/sched_rr_get_interval.S index e88d26ee9..21a578880 100644 --- a/libc/arch-arm/syscalls/sched_rr_get_interval.S +++ b/libc/arch-arm/syscalls/sched_rr_get_interval.S @@ -3,11 +3,10 @@ #include ENTRY(sched_rr_get_interval) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_rr_get_interval swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_setaffinity.S b/libc/arch-arm/syscalls/sched_setaffinity.S index b9dd299db..c980ed05b 100644 --- a/libc/arch-arm/syscalls/sched_setaffinity.S +++ b/libc/arch-arm/syscalls/sched_setaffinity.S @@ -3,11 +3,10 @@ #include ENTRY(sched_setaffinity) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_setaffinity swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_setparam.S b/libc/arch-arm/syscalls/sched_setparam.S index 73d6ab68e..993078d91 100644 --- a/libc/arch-arm/syscalls/sched_setparam.S +++ b/libc/arch-arm/syscalls/sched_setparam.S @@ -3,11 +3,10 @@ #include ENTRY(sched_setparam) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_setparam swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_setscheduler.S b/libc/arch-arm/syscalls/sched_setscheduler.S index 33c28abf5..d0ac1dec2 100644 --- a/libc/arch-arm/syscalls/sched_setscheduler.S +++ b/libc/arch-arm/syscalls/sched_setscheduler.S @@ -3,11 +3,10 @@ #include ENTRY(sched_setscheduler) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_setscheduler swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sched_yield.S b/libc/arch-arm/syscalls/sched_yield.S index 71628b34e..00bdfbd6a 100644 --- a/libc/arch-arm/syscalls/sched_yield.S +++ b/libc/arch-arm/syscalls/sched_yield.S @@ -3,11 +3,10 @@ #include ENTRY(sched_yield) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sched_yield swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sendfile.S b/libc/arch-arm/syscalls/sendfile.S index 2790b4b87..9e4c70c89 100644 --- a/libc/arch-arm/syscalls/sendfile.S +++ b/libc/arch-arm/syscalls/sendfile.S @@ -3,11 +3,10 @@ #include ENTRY(sendfile) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sendfile swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sendmsg.S b/libc/arch-arm/syscalls/sendmsg.S index 99b547925..1b54aeebb 100644 --- a/libc/arch-arm/syscalls/sendmsg.S +++ b/libc/arch-arm/syscalls/sendmsg.S @@ -3,11 +3,10 @@ #include ENTRY(sendmsg) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sendmsg swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setgid.S b/libc/arch-arm/syscalls/setgid.S index f28687df7..09045ad34 100644 --- a/libc/arch-arm/syscalls/setgid.S +++ b/libc/arch-arm/syscalls/setgid.S @@ -3,11 +3,10 @@ #include ENTRY(setgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setgid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setgroups.S b/libc/arch-arm/syscalls/setgroups.S index d2c932f31..e4c36b5c3 100644 --- a/libc/arch-arm/syscalls/setgroups.S +++ b/libc/arch-arm/syscalls/setgroups.S @@ -3,11 +3,10 @@ #include ENTRY(setgroups) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setgroups32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setitimer.S b/libc/arch-arm/syscalls/setitimer.S index c6b506448..dfb7a467f 100644 --- a/libc/arch-arm/syscalls/setitimer.S +++ b/libc/arch-arm/syscalls/setitimer.S @@ -3,11 +3,10 @@ #include ENTRY(setitimer) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setitimer swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setpgid.S b/libc/arch-arm/syscalls/setpgid.S index 39e1e03b0..c558063d5 100644 --- a/libc/arch-arm/syscalls/setpgid.S +++ b/libc/arch-arm/syscalls/setpgid.S @@ -3,11 +3,10 @@ #include ENTRY(setpgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setpgid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setpriority.S b/libc/arch-arm/syscalls/setpriority.S index 5cb84a82d..683da340d 100644 --- a/libc/arch-arm/syscalls/setpriority.S +++ b/libc/arch-arm/syscalls/setpriority.S @@ -3,11 +3,10 @@ #include ENTRY(setpriority) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setpriority swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setregid.S b/libc/arch-arm/syscalls/setregid.S index bc79e9ed3..2062d05da 100644 --- a/libc/arch-arm/syscalls/setregid.S +++ b/libc/arch-arm/syscalls/setregid.S @@ -3,11 +3,10 @@ #include ENTRY(setregid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setregid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setresgid.S b/libc/arch-arm/syscalls/setresgid.S index 711626e72..089c7a74d 100644 --- a/libc/arch-arm/syscalls/setresgid.S +++ b/libc/arch-arm/syscalls/setresgid.S @@ -3,11 +3,10 @@ #include ENTRY(setresgid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setresgid32 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setrlimit.S b/libc/arch-arm/syscalls/setrlimit.S index 0fe246701..02b8db45c 100644 --- a/libc/arch-arm/syscalls/setrlimit.S +++ b/libc/arch-arm/syscalls/setrlimit.S @@ -3,11 +3,10 @@ #include ENTRY(setrlimit) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setrlimit swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/setsid.S b/libc/arch-arm/syscalls/setsid.S index f11b6fb9e..d82c34776 100644 --- a/libc/arch-arm/syscalls/setsid.S +++ b/libc/arch-arm/syscalls/setsid.S @@ -3,11 +3,10 @@ #include ENTRY(setsid) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_setsid swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/settimeofday.S b/libc/arch-arm/syscalls/settimeofday.S index 2741e0502..44f5e6635 100644 --- a/libc/arch-arm/syscalls/settimeofday.S +++ b/libc/arch-arm/syscalls/settimeofday.S @@ -3,11 +3,10 @@ #include ENTRY(settimeofday) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_settimeofday swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/shutdown.S b/libc/arch-arm/syscalls/shutdown.S index 080263110..cc96f5698 100644 --- a/libc/arch-arm/syscalls/shutdown.S +++ b/libc/arch-arm/syscalls/shutdown.S @@ -3,11 +3,10 @@ #include ENTRY(shutdown) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_shutdown swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sigaction.S b/libc/arch-arm/syscalls/sigaction.S index 04a8b94b9..699f55d8c 100644 --- a/libc/arch-arm/syscalls/sigaction.S +++ b/libc/arch-arm/syscalls/sigaction.S @@ -3,11 +3,10 @@ #include ENTRY(sigaction) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sigaction swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sigaltstack.S b/libc/arch-arm/syscalls/sigaltstack.S index b541a87ab..0f34eabc0 100644 --- a/libc/arch-arm/syscalls/sigaltstack.S +++ b/libc/arch-arm/syscalls/sigaltstack.S @@ -3,11 +3,10 @@ #include ENTRY(sigaltstack) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sigaltstack swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/signalfd4.S b/libc/arch-arm/syscalls/signalfd4.S index 1ec705510..6f07fbe13 100644 --- a/libc/arch-arm/syscalls/signalfd4.S +++ b/libc/arch-arm/syscalls/signalfd4.S @@ -3,11 +3,10 @@ #include ENTRY(signalfd4) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_signalfd4 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sigpending.S b/libc/arch-arm/syscalls/sigpending.S index 4c7d91990..b5412887f 100644 --- a/libc/arch-arm/syscalls/sigpending.S +++ b/libc/arch-arm/syscalls/sigpending.S @@ -3,11 +3,10 @@ #include ENTRY(sigpending) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sigpending swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sigprocmask.S b/libc/arch-arm/syscalls/sigprocmask.S index 7c59a6bba..d1694743c 100644 --- a/libc/arch-arm/syscalls/sigprocmask.S +++ b/libc/arch-arm/syscalls/sigprocmask.S @@ -3,11 +3,10 @@ #include ENTRY(sigprocmask) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sigprocmask swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/socket.S b/libc/arch-arm/syscalls/socket.S index e28d2525d..1003bd4f8 100644 --- a/libc/arch-arm/syscalls/socket.S +++ b/libc/arch-arm/syscalls/socket.S @@ -3,11 +3,10 @@ #include ENTRY(socket) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_socket swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/socketpair.S b/libc/arch-arm/syscalls/socketpair.S index e6990008f..65bef6853 100644 --- a/libc/arch-arm/syscalls/socketpair.S +++ b/libc/arch-arm/syscalls/socketpair.S @@ -3,11 +3,10 @@ #include ENTRY(socketpair) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_socketpair swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/stat.S b/libc/arch-arm/syscalls/stat.S index a4669a623..17b63ccdd 100644 --- a/libc/arch-arm/syscalls/stat.S +++ b/libc/arch-arm/syscalls/stat.S @@ -3,11 +3,10 @@ #include ENTRY(stat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_stat64 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/symlink.S b/libc/arch-arm/syscalls/symlink.S index 14a753fdb..ac569afed 100644 --- a/libc/arch-arm/syscalls/symlink.S +++ b/libc/arch-arm/syscalls/symlink.S @@ -3,11 +3,10 @@ #include ENTRY(symlink) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_symlink swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sync.S b/libc/arch-arm/syscalls/sync.S index 68c0c0fe8..ef6cb169b 100644 --- a/libc/arch-arm/syscalls/sync.S +++ b/libc/arch-arm/syscalls/sync.S @@ -3,11 +3,10 @@ #include ENTRY(sync) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sync swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/sysinfo.S b/libc/arch-arm/syscalls/sysinfo.S index 2a2fb5981..a8917354d 100644 --- a/libc/arch-arm/syscalls/sysinfo.S +++ b/libc/arch-arm/syscalls/sysinfo.S @@ -3,11 +3,10 @@ #include ENTRY(sysinfo) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_sysinfo swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/times.S b/libc/arch-arm/syscalls/times.S index aacb4caa4..051f34db4 100644 --- a/libc/arch-arm/syscalls/times.S +++ b/libc/arch-arm/syscalls/times.S @@ -3,11 +3,10 @@ #include ENTRY(times) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_times swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/truncate.S b/libc/arch-arm/syscalls/truncate.S index 8c0b24f4c..3bb68cd06 100644 --- a/libc/arch-arm/syscalls/truncate.S +++ b/libc/arch-arm/syscalls/truncate.S @@ -3,11 +3,10 @@ #include ENTRY(truncate) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_truncate swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/umask.S b/libc/arch-arm/syscalls/umask.S index a7bc20b96..78e43e0f2 100644 --- a/libc/arch-arm/syscalls/umask.S +++ b/libc/arch-arm/syscalls/umask.S @@ -3,11 +3,10 @@ #include ENTRY(umask) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_umask swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/umount2.S b/libc/arch-arm/syscalls/umount2.S index 04b28f41c..605359e8c 100644 --- a/libc/arch-arm/syscalls/umount2.S +++ b/libc/arch-arm/syscalls/umount2.S @@ -3,11 +3,10 @@ #include ENTRY(umount2) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_umount2 swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/uname.S b/libc/arch-arm/syscalls/uname.S index 4a6f0f4b3..db0860b06 100644 --- a/libc/arch-arm/syscalls/uname.S +++ b/libc/arch-arm/syscalls/uname.S @@ -3,11 +3,10 @@ #include ENTRY(uname) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_uname swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/unlink.S b/libc/arch-arm/syscalls/unlink.S index 87fa79e7e..8ef33dfd2 100644 --- a/libc/arch-arm/syscalls/unlink.S +++ b/libc/arch-arm/syscalls/unlink.S @@ -3,11 +3,10 @@ #include ENTRY(unlink) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_unlink swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/unlinkat.S b/libc/arch-arm/syscalls/unlinkat.S index 3beae6c16..eb822e49a 100644 --- a/libc/arch-arm/syscalls/unlinkat.S +++ b/libc/arch-arm/syscalls/unlinkat.S @@ -3,11 +3,10 @@ #include ENTRY(unlinkat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_unlinkat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/unshare.S b/libc/arch-arm/syscalls/unshare.S index 0a92b2105..ec77f3ad9 100644 --- a/libc/arch-arm/syscalls/unshare.S +++ b/libc/arch-arm/syscalls/unshare.S @@ -3,11 +3,10 @@ #include ENTRY(unshare) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_unshare swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/utimensat.S b/libc/arch-arm/syscalls/utimensat.S index ceae7fafd..976a667a3 100644 --- a/libc/arch-arm/syscalls/utimensat.S +++ b/libc/arch-arm/syscalls/utimensat.S @@ -3,11 +3,10 @@ #include ENTRY(utimensat) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_utimensat swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/utimes.S b/libc/arch-arm/syscalls/utimes.S index a2d58a3c1..8966626f5 100644 --- a/libc/arch-arm/syscalls/utimes.S +++ b/libc/arch-arm/syscalls/utimes.S @@ -3,11 +3,10 @@ #include ENTRY(utimes) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_utimes swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/vfork.S b/libc/arch-arm/syscalls/vfork.S index 3bd26683c..89cbda2ca 100644 --- a/libc/arch-arm/syscalls/vfork.S +++ b/libc/arch-arm/syscalls/vfork.S @@ -3,11 +3,10 @@ #include ENTRY(vfork) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_vfork swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/write.S b/libc/arch-arm/syscalls/write.S index 826e82c99..c25791585 100644 --- a/libc/arch-arm/syscalls/write.S +++ b/libc/arch-arm/syscalls/write.S @@ -3,11 +3,10 @@ #include ENTRY(write) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_write swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/arch-arm/syscalls/writev.S b/libc/arch-arm/syscalls/writev.S index 16a6df90c..521e10cda 100644 --- a/libc/arch-arm/syscalls/writev.S +++ b/libc/arch-arm/syscalls/writev.S @@ -3,11 +3,10 @@ #include ENTRY(writev) - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =__NR_writev swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index 21d2f1d1a..0226acd3c 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -111,11 +111,10 @@ arm_call_long = arm_header + """\ """ + arm_footer arm_eabi_call_default = arm_header + """\ - .save {r4, r7} - stmfd sp!, {r4, r7} + mov ip, r7 ldr r7, =%(idname)s swi #0 - ldmfd sp!, {r4, r7} + mov r7, ip movs r0, r0 bxpl lr b __set_syscall_errno