diff options
author | Android Code Review <code-review@android.com> | 2009-09-20 23:39:18 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2009-09-20 23:39:18 -0700 |
commit | 4e30c09e57a0351daff70f6657794569445be21c (patch) | |
tree | 9b429261a70ccc3bddddb3d46ffbec1e36f75971 /libc | |
parent | 5632aeb83862a50e39dae9b7da2d7e2e5a8cb0d3 (diff) | |
parent | 336efb5267e465ac52d78327d37f79553b3f0584 (diff) | |
download | bionic-4e30c09e57a0351daff70f6657794569445be21c.zip bionic-4e30c09e57a0351daff70f6657794569445be21c.tar.gz bionic-4e30c09e57a0351daff70f6657794569445be21c.tar.bz2 |
Merge change 10538
* changes:
added syscalls for SuperH which automatically generate by gensyscalls.py
Diffstat (limited to 'libc')
159 files changed, 5206 insertions, 2 deletions
diff --git a/libc/arch-sh/syscalls.mk b/libc/arch-sh/syscalls.mk new file mode 100644 index 0000000..cefb2ec --- /dev/null +++ b/libc/arch-sh/syscalls.mk @@ -0,0 +1,157 @@ +# auto-generated by gensyscalls.py, do not touch +syscall_src := +syscall_src += arch-sh/syscalls/_exit.S +syscall_src += arch-sh/syscalls/_exit_thread.S +syscall_src += arch-sh/syscalls/__fork.S +syscall_src += arch-sh/syscalls/_waitpid.S +syscall_src += arch-sh/syscalls/waitid.S +syscall_src += arch-sh/syscalls/__clone.S +syscall_src += arch-sh/syscalls/execve.S +syscall_src += arch-sh/syscalls/setuid.S +syscall_src += arch-sh/syscalls/getuid.S +syscall_src += arch-sh/syscalls/getgid.S +syscall_src += arch-sh/syscalls/geteuid.S +syscall_src += arch-sh/syscalls/getegid.S +syscall_src += arch-sh/syscalls/getresuid.S +syscall_src += arch-sh/syscalls/getresgid.S +syscall_src += arch-sh/syscalls/gettid.S +syscall_src += arch-sh/syscalls/getgroups.S +syscall_src += arch-sh/syscalls/getpgid.S +syscall_src += arch-sh/syscalls/getppid.S +syscall_src += arch-sh/syscalls/setsid.S +syscall_src += arch-sh/syscalls/setgid.S +syscall_src += arch-sh/syscalls/setreuid.S +syscall_src += arch-sh/syscalls/setresuid.S +syscall_src += arch-sh/syscalls/setresgid.S +syscall_src += arch-sh/syscalls/__brk.S +syscall_src += arch-sh/syscalls/kill.S +syscall_src += arch-sh/syscalls/tkill.S +syscall_src += arch-sh/syscalls/__ptrace.S +syscall_src += arch-sh/syscalls/__set_thread_area.S +syscall_src += arch-sh/syscalls/__getpriority.S +syscall_src += arch-sh/syscalls/setpriority.S +syscall_src += arch-sh/syscalls/setrlimit.S +syscall_src += arch-sh/syscalls/getrlimit.S +syscall_src += arch-sh/syscalls/getrusage.S +syscall_src += arch-sh/syscalls/setgroups.S +syscall_src += arch-sh/syscalls/setpgid.S +syscall_src += arch-sh/syscalls/vfork.S +syscall_src += arch-sh/syscalls/setregid.S +syscall_src += arch-sh/syscalls/chroot.S +syscall_src += arch-sh/syscalls/prctl.S +syscall_src += arch-sh/syscalls/capget.S +syscall_src += arch-sh/syscalls/capset.S +syscall_src += arch-sh/syscalls/acct.S +syscall_src += arch-sh/syscalls/read.S +syscall_src += arch-sh/syscalls/write.S +syscall_src += arch-sh/syscalls/__pread64.S +syscall_src += arch-sh/syscalls/__pwrite64.S +syscall_src += arch-sh/syscalls/__open.S +syscall_src += arch-sh/syscalls/__openat.S +syscall_src += arch-sh/syscalls/close.S +syscall_src += arch-sh/syscalls/lseek.S +syscall_src += arch-sh/syscalls/__llseek.S +syscall_src += arch-sh/syscalls/getpid.S +syscall_src += arch-sh/syscalls/__mmap2.S +syscall_src += arch-sh/syscalls/munmap.S +syscall_src += arch-sh/syscalls/mremap.S +syscall_src += arch-sh/syscalls/msync.S +syscall_src += arch-sh/syscalls/mprotect.S +syscall_src += arch-sh/syscalls/madvise.S +syscall_src += arch-sh/syscalls/mlock.S +syscall_src += arch-sh/syscalls/munlock.S +syscall_src += arch-sh/syscalls/mincore.S +syscall_src += arch-sh/syscalls/__ioctl.S +syscall_src += arch-sh/syscalls/readv.S +syscall_src += arch-sh/syscalls/writev.S +syscall_src += arch-sh/syscalls/__fcntl.S +syscall_src += arch-sh/syscalls/flock.S +syscall_src += arch-sh/syscalls/fchmod.S +syscall_src += arch-sh/syscalls/dup.S +syscall_src += arch-sh/syscalls/dup2.S +syscall_src += arch-sh/syscalls/select.S +syscall_src += arch-sh/syscalls/ftruncate.S +syscall_src += arch-sh/syscalls/getdents.S +syscall_src += arch-sh/syscalls/fsync.S +syscall_src += arch-sh/syscalls/fchown.S +syscall_src += arch-sh/syscalls/sync.S +syscall_src += arch-sh/syscalls/__fcntl64.S +syscall_src += arch-sh/syscalls/fstatfs.S +syscall_src += arch-sh/syscalls/sendfile.S +syscall_src += arch-sh/syscalls/fstatat.S +syscall_src += arch-sh/syscalls/mkdirat.S +syscall_src += arch-sh/syscalls/fchownat.S +syscall_src += arch-sh/syscalls/fchmodat.S +syscall_src += arch-sh/syscalls/renameat.S +syscall_src += arch-sh/syscalls/link.S +syscall_src += arch-sh/syscalls/unlink.S +syscall_src += arch-sh/syscalls/unlinkat.S +syscall_src += arch-sh/syscalls/chdir.S +syscall_src += arch-sh/syscalls/mknod.S +syscall_src += arch-sh/syscalls/chmod.S +syscall_src += arch-sh/syscalls/chown.S +syscall_src += arch-sh/syscalls/lchown.S +syscall_src += arch-sh/syscalls/mount.S +syscall_src += arch-sh/syscalls/umount2.S +syscall_src += arch-sh/syscalls/fstat.S +syscall_src += arch-sh/syscalls/stat.S +syscall_src += arch-sh/syscalls/lstat.S +syscall_src += arch-sh/syscalls/mkdir.S +syscall_src += arch-sh/syscalls/readlink.S +syscall_src += arch-sh/syscalls/rmdir.S +syscall_src += arch-sh/syscalls/rename.S +syscall_src += arch-sh/syscalls/__getcwd.S +syscall_src += arch-sh/syscalls/access.S +syscall_src += arch-sh/syscalls/symlink.S +syscall_src += arch-sh/syscalls/fchdir.S +syscall_src += arch-sh/syscalls/truncate.S +syscall_src += arch-sh/syscalls/__statfs64.S +syscall_src += arch-sh/syscalls/pause.S +syscall_src += arch-sh/syscalls/gettimeofday.S +syscall_src += arch-sh/syscalls/settimeofday.S +syscall_src += arch-sh/syscalls/times.S +syscall_src += arch-sh/syscalls/nanosleep.S +syscall_src += arch-sh/syscalls/clock_gettime.S +syscall_src += arch-sh/syscalls/clock_settime.S +syscall_src += arch-sh/syscalls/clock_getres.S +syscall_src += arch-sh/syscalls/clock_nanosleep.S +syscall_src += arch-sh/syscalls/getitimer.S +syscall_src += arch-sh/syscalls/setitimer.S +syscall_src += arch-sh/syscalls/__timer_create.S +syscall_src += arch-sh/syscalls/__timer_settime.S +syscall_src += arch-sh/syscalls/__timer_gettime.S +syscall_src += arch-sh/syscalls/__timer_getoverrun.S +syscall_src += arch-sh/syscalls/__timer_delete.S +syscall_src += arch-sh/syscalls/utimes.S +syscall_src += arch-sh/syscalls/sigaction.S +syscall_src += arch-sh/syscalls/sigprocmask.S +syscall_src += arch-sh/syscalls/__sigsuspend.S +syscall_src += arch-sh/syscalls/__rt_sigaction.S +syscall_src += arch-sh/syscalls/__rt_sigprocmask.S +syscall_src += arch-sh/syscalls/__rt_sigtimedwait.S +syscall_src += arch-sh/syscalls/sigpending.S +syscall_src += arch-sh/syscalls/__socketcall.S +syscall_src += arch-sh/syscalls/sched_setscheduler.S +syscall_src += arch-sh/syscalls/sched_getscheduler.S +syscall_src += arch-sh/syscalls/sched_yield.S +syscall_src += arch-sh/syscalls/sched_setparam.S +syscall_src += arch-sh/syscalls/sched_getparam.S +syscall_src += arch-sh/syscalls/sched_get_priority_max.S +syscall_src += arch-sh/syscalls/sched_get_priority_min.S +syscall_src += arch-sh/syscalls/sched_rr_get_interval.S +syscall_src += arch-sh/syscalls/uname.S +syscall_src += arch-sh/syscalls/__wait4.S +syscall_src += arch-sh/syscalls/umask.S +syscall_src += arch-sh/syscalls/__reboot.S +syscall_src += arch-sh/syscalls/__syslog.S +syscall_src += arch-sh/syscalls/init_module.S +syscall_src += arch-sh/syscalls/delete_module.S +syscall_src += arch-sh/syscalls/klogctl.S +syscall_src += arch-sh/syscalls/futex.S +syscall_src += arch-sh/syscalls/epoll_create.S +syscall_src += arch-sh/syscalls/epoll_ctl.S +syscall_src += arch-sh/syscalls/epoll_wait.S +syscall_src += arch-sh/syscalls/inotify_init.S +syscall_src += arch-sh/syscalls/inotify_add_watch.S +syscall_src += arch-sh/syscalls/inotify_rm_watch.S +syscall_src += arch-sh/syscalls/poll.S diff --git a/libc/arch-sh/syscalls/__brk.S b/libc/arch-sh/syscalls/__brk.S new file mode 100644 index 0000000..465389d --- /dev/null +++ b/libc/arch-sh/syscalls/__brk.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __brk, @function + .globl __brk + .align 4 + +__brk: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_brk_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_brk_end: + rts + nop + + .align 2 +0: .long __NR_brk +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__clone.S b/libc/arch-sh/syscalls/__clone.S new file mode 100644 index 0000000..1df6ca2 --- /dev/null +++ b/libc/arch-sh/syscalls/__clone.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __clone, @function + .globl __clone + .align 4 + +__clone: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_clone_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_clone_end: + rts + nop + + .align 2 +0: .long __NR_clone +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__fcntl.S b/libc/arch-sh/syscalls/__fcntl.S new file mode 100644 index 0000000..654ee84 --- /dev/null +++ b/libc/arch-sh/syscalls/__fcntl.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __fcntl, @function + .globl __fcntl + .align 4 + +__fcntl: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fcntl_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fcntl_end: + rts + nop + + .align 2 +0: .long __NR_fcntl +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__fcntl64.S b/libc/arch-sh/syscalls/__fcntl64.S new file mode 100644 index 0000000..8a2f73f --- /dev/null +++ b/libc/arch-sh/syscalls/__fcntl64.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __fcntl64, @function + .globl __fcntl64 + .align 4 + +__fcntl64: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fcntl64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fcntl64_end: + rts + nop + + .align 2 +0: .long __NR_fcntl64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__fork.S b/libc/arch-sh/syscalls/__fork.S new file mode 100644 index 0000000..5a00daf --- /dev/null +++ b/libc/arch-sh/syscalls/__fork.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __fork, @function + .globl __fork + .align 4 + +__fork: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fork_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fork_end: + rts + nop + + .align 2 +0: .long __NR_fork +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__getcwd.S b/libc/arch-sh/syscalls/__getcwd.S new file mode 100644 index 0000000..9ce1f14 --- /dev/null +++ b/libc/arch-sh/syscalls/__getcwd.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __getcwd, @function + .globl __getcwd + .align 4 + +__getcwd: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getcwd_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getcwd_end: + rts + nop + + .align 2 +0: .long __NR_getcwd +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__getpriority.S b/libc/arch-sh/syscalls/__getpriority.S new file mode 100644 index 0000000..aa9f4f3 --- /dev/null +++ b/libc/arch-sh/syscalls/__getpriority.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __getpriority, @function + .globl __getpriority + .align 4 + +__getpriority: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getpriority_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getpriority_end: + rts + nop + + .align 2 +0: .long __NR_getpriority +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__ioctl.S b/libc/arch-sh/syscalls/__ioctl.S new file mode 100644 index 0000000..ec447cf --- /dev/null +++ b/libc/arch-sh/syscalls/__ioctl.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __ioctl, @function + .globl __ioctl + .align 4 + +__ioctl: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_ioctl_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_ioctl_end: + rts + nop + + .align 2 +0: .long __NR_ioctl +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__llseek.S b/libc/arch-sh/syscalls/__llseek.S new file mode 100644 index 0000000..e43b3ed --- /dev/null +++ b/libc/arch-sh/syscalls/__llseek.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __llseek, @function + .globl __llseek + .align 4 + +__llseek: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR__llseek_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR__llseek_end: + rts + nop + + .align 2 +0: .long __NR__llseek +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__mmap2.S b/libc/arch-sh/syscalls/__mmap2.S new file mode 100644 index 0000000..6f70d46 --- /dev/null +++ b/libc/arch-sh/syscalls/__mmap2.S @@ -0,0 +1,36 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __mmap2, @function + .globl __mmap2 + .align 4 + +__mmap2: + + /* get ready for additonal arg */ + mov.l @r15, r0 + mov.l @(4, r15), r1 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(6 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mmap2_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mmap2_end: + rts + nop + + .align 2 +0: .long __NR_mmap2 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__open.S b/libc/arch-sh/syscalls/__open.S new file mode 100644 index 0000000..f57b5b9 --- /dev/null +++ b/libc/arch-sh/syscalls/__open.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __open, @function + .globl __open + .align 4 + +__open: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_open_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_open_end: + rts + nop + + .align 2 +0: .long __NR_open +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__openat.S b/libc/arch-sh/syscalls/__openat.S new file mode 100644 index 0000000..08cf096 --- /dev/null +++ b/libc/arch-sh/syscalls/__openat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __openat, @function + .globl __openat + .align 4 + +__openat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_openat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_openat_end: + rts + nop + + .align 2 +0: .long __NR_openat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__pread64.S b/libc/arch-sh/syscalls/__pread64.S new file mode 100644 index 0000000..474add3 --- /dev/null +++ b/libc/arch-sh/syscalls/__pread64.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __pread64, @function + .globl __pread64 + .align 4 + +__pread64: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_pread64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_pread64_end: + rts + nop + + .align 2 +0: .long __NR_pread64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__ptrace.S b/libc/arch-sh/syscalls/__ptrace.S new file mode 100644 index 0000000..89bbc98 --- /dev/null +++ b/libc/arch-sh/syscalls/__ptrace.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __ptrace, @function + .globl __ptrace + .align 4 + +__ptrace: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_ptrace_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_ptrace_end: + rts + nop + + .align 2 +0: .long __NR_ptrace +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__pwrite64.S b/libc/arch-sh/syscalls/__pwrite64.S new file mode 100644 index 0000000..a722242 --- /dev/null +++ b/libc/arch-sh/syscalls/__pwrite64.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __pwrite64, @function + .globl __pwrite64 + .align 4 + +__pwrite64: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_pwrite64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_pwrite64_end: + rts + nop + + .align 2 +0: .long __NR_pwrite64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__reboot.S b/libc/arch-sh/syscalls/__reboot.S new file mode 100644 index 0000000..07cff36 --- /dev/null +++ b/libc/arch-sh/syscalls/__reboot.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __reboot, @function + .globl __reboot + .align 4 + +__reboot: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_reboot_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_reboot_end: + rts + nop + + .align 2 +0: .long __NR_reboot +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__rt_sigaction.S b/libc/arch-sh/syscalls/__rt_sigaction.S new file mode 100644 index 0000000..693cb76 --- /dev/null +++ b/libc/arch-sh/syscalls/__rt_sigaction.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __rt_sigaction, @function + .globl __rt_sigaction + .align 4 + +__rt_sigaction: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_rt_sigaction_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_rt_sigaction_end: + rts + nop + + .align 2 +0: .long __NR_rt_sigaction +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__rt_sigprocmask.S b/libc/arch-sh/syscalls/__rt_sigprocmask.S new file mode 100644 index 0000000..7822d4f --- /dev/null +++ b/libc/arch-sh/syscalls/__rt_sigprocmask.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __rt_sigprocmask, @function + .globl __rt_sigprocmask + .align 4 + +__rt_sigprocmask: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_rt_sigprocmask_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_rt_sigprocmask_end: + rts + nop + + .align 2 +0: .long __NR_rt_sigprocmask +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__rt_sigtimedwait.S b/libc/arch-sh/syscalls/__rt_sigtimedwait.S new file mode 100644 index 0000000..2804169 --- /dev/null +++ b/libc/arch-sh/syscalls/__rt_sigtimedwait.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __rt_sigtimedwait, @function + .globl __rt_sigtimedwait + .align 4 + +__rt_sigtimedwait: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_rt_sigtimedwait_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_rt_sigtimedwait_end: + rts + nop + + .align 2 +0: .long __NR_rt_sigtimedwait +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__set_thread_area.S b/libc/arch-sh/syscalls/__set_thread_area.S new file mode 100644 index 0000000..7d5aea6 --- /dev/null +++ b/libc/arch-sh/syscalls/__set_thread_area.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __set_thread_area, @function + .globl __set_thread_area + .align 4 + +__set_thread_area: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_set_thread_area_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_set_thread_area_end: + rts + nop + + .align 2 +0: .long __NR_set_thread_area +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__sigsuspend.S b/libc/arch-sh/syscalls/__sigsuspend.S new file mode 100644 index 0000000..9643940 --- /dev/null +++ b/libc/arch-sh/syscalls/__sigsuspend.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __sigsuspend, @function + .globl __sigsuspend + .align 4 + +__sigsuspend: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sigsuspend_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sigsuspend_end: + rts + nop + + .align 2 +0: .long __NR_sigsuspend +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__socketcall.S b/libc/arch-sh/syscalls/__socketcall.S new file mode 100644 index 0000000..864e9aa --- /dev/null +++ b/libc/arch-sh/syscalls/__socketcall.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __socketcall, @function + .globl __socketcall + .align 4 + +__socketcall: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR___socketcall_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR___socketcall_end: + rts + nop + + .align 2 +0: .long __NR___socketcall +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__statfs64.S b/libc/arch-sh/syscalls/__statfs64.S new file mode 100644 index 0000000..ccd137b --- /dev/null +++ b/libc/arch-sh/syscalls/__statfs64.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __statfs64, @function + .globl __statfs64 + .align 4 + +__statfs64: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_statfs64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_statfs64_end: + rts + nop + + .align 2 +0: .long __NR_statfs64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__syslog.S b/libc/arch-sh/syscalls/__syslog.S new file mode 100644 index 0000000..ea1ac38 --- /dev/null +++ b/libc/arch-sh/syscalls/__syslog.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __syslog, @function + .globl __syslog + .align 4 + +__syslog: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_syslog_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_syslog_end: + rts + nop + + .align 2 +0: .long __NR_syslog +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__timer_create.S b/libc/arch-sh/syscalls/__timer_create.S new file mode 100644 index 0000000..f2e2e5c --- /dev/null +++ b/libc/arch-sh/syscalls/__timer_create.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __timer_create, @function + .globl __timer_create + .align 4 + +__timer_create: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_timer_create_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_timer_create_end: + rts + nop + + .align 2 +0: .long __NR_timer_create +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__timer_delete.S b/libc/arch-sh/syscalls/__timer_delete.S new file mode 100644 index 0000000..d655d3d --- /dev/null +++ b/libc/arch-sh/syscalls/__timer_delete.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __timer_delete, @function + .globl __timer_delete + .align 4 + +__timer_delete: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_timer_delete_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_timer_delete_end: + rts + nop + + .align 2 +0: .long __NR_timer_delete +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__timer_getoverrun.S b/libc/arch-sh/syscalls/__timer_getoverrun.S new file mode 100644 index 0000000..64fa92f --- /dev/null +++ b/libc/arch-sh/syscalls/__timer_getoverrun.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __timer_getoverrun, @function + .globl __timer_getoverrun + .align 4 + +__timer_getoverrun: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_timer_getoverrun_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_timer_getoverrun_end: + rts + nop + + .align 2 +0: .long __NR_timer_getoverrun +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__timer_gettime.S b/libc/arch-sh/syscalls/__timer_gettime.S new file mode 100644 index 0000000..f1c63ed --- /dev/null +++ b/libc/arch-sh/syscalls/__timer_gettime.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __timer_gettime, @function + .globl __timer_gettime + .align 4 + +__timer_gettime: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_timer_gettime_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_timer_gettime_end: + rts + nop + + .align 2 +0: .long __NR_timer_gettime +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__timer_settime.S b/libc/arch-sh/syscalls/__timer_settime.S new file mode 100644 index 0000000..ea438a6 --- /dev/null +++ b/libc/arch-sh/syscalls/__timer_settime.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __timer_settime, @function + .globl __timer_settime + .align 4 + +__timer_settime: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_timer_settime_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_timer_settime_end: + rts + nop + + .align 2 +0: .long __NR_timer_settime +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__wait4.S b/libc/arch-sh/syscalls/__wait4.S new file mode 100644 index 0000000..a145e34 --- /dev/null +++ b/libc/arch-sh/syscalls/__wait4.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type __wait4, @function + .globl __wait4 + .align 4 + +__wait4: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_wait4_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_wait4_end: + rts + nop + + .align 2 +0: .long __NR_wait4 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/_exit.S b/libc/arch-sh/syscalls/_exit.S new file mode 100644 index 0000000..377a98a --- /dev/null +++ b/libc/arch-sh/syscalls/_exit.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type _exit, @function + .globl _exit + .align 4 + +_exit: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_exit_group_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_exit_group_end: + rts + nop + + .align 2 +0: .long __NR_exit_group +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/_exit_thread.S b/libc/arch-sh/syscalls/_exit_thread.S new file mode 100644 index 0000000..536d000 --- /dev/null +++ b/libc/arch-sh/syscalls/_exit_thread.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type _exit_thread, @function + .globl _exit_thread + .align 4 + +_exit_thread: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_exit_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_exit_end: + rts + nop + + .align 2 +0: .long __NR_exit +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/_waitpid.S b/libc/arch-sh/syscalls/_waitpid.S new file mode 100644 index 0000000..db2cf61 --- /dev/null +++ b/libc/arch-sh/syscalls/_waitpid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type _waitpid, @function + .globl _waitpid + .align 4 + +_waitpid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_waitpid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_waitpid_end: + rts + nop + + .align 2 +0: .long __NR_waitpid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/access.S b/libc/arch-sh/syscalls/access.S new file mode 100644 index 0000000..dea8dfb --- /dev/null +++ b/libc/arch-sh/syscalls/access.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type access, @function + .globl access + .align 4 + +access: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_access_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_access_end: + rts + nop + + .align 2 +0: .long __NR_access +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/acct.S b/libc/arch-sh/syscalls/acct.S new file mode 100644 index 0000000..22d939e --- /dev/null +++ b/libc/arch-sh/syscalls/acct.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type acct, @function + .globl acct + .align 4 + +acct: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_acct_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_acct_end: + rts + nop + + .align 2 +0: .long __NR_acct +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/capget.S b/libc/arch-sh/syscalls/capget.S new file mode 100644 index 0000000..77f6c54 --- /dev/null +++ b/libc/arch-sh/syscalls/capget.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type capget, @function + .globl capget + .align 4 + +capget: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_capget_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_capget_end: + rts + nop + + .align 2 +0: .long __NR_capget +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/capset.S b/libc/arch-sh/syscalls/capset.S new file mode 100644 index 0000000..c35b48e --- /dev/null +++ b/libc/arch-sh/syscalls/capset.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type capset, @function + .globl capset + .align 4 + +capset: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_capset_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_capset_end: + rts + nop + + .align 2 +0: .long __NR_capset +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/chdir.S b/libc/arch-sh/syscalls/chdir.S new file mode 100644 index 0000000..32b4a92 --- /dev/null +++ b/libc/arch-sh/syscalls/chdir.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type chdir, @function + .globl chdir + .align 4 + +chdir: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_chdir_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_chdir_end: + rts + nop + + .align 2 +0: .long __NR_chdir +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/chmod.S b/libc/arch-sh/syscalls/chmod.S new file mode 100644 index 0000000..f145e4b --- /dev/null +++ b/libc/arch-sh/syscalls/chmod.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type chmod, @function + .globl chmod + .align 4 + +chmod: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_chmod_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_chmod_end: + rts + nop + + .align 2 +0: .long __NR_chmod +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/chown.S b/libc/arch-sh/syscalls/chown.S new file mode 100644 index 0000000..4938a2a --- /dev/null +++ b/libc/arch-sh/syscalls/chown.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type chown, @function + .globl chown + .align 4 + +chown: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_chown32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_chown32_end: + rts + nop + + .align 2 +0: .long __NR_chown32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/chroot.S b/libc/arch-sh/syscalls/chroot.S new file mode 100644 index 0000000..a60b59d --- /dev/null +++ b/libc/arch-sh/syscalls/chroot.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type chroot, @function + .globl chroot + .align 4 + +chroot: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_chroot_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_chroot_end: + rts + nop + + .align 2 +0: .long __NR_chroot +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/clock_getres.S b/libc/arch-sh/syscalls/clock_getres.S new file mode 100644 index 0000000..0b38f22 --- /dev/null +++ b/libc/arch-sh/syscalls/clock_getres.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type clock_getres, @function + .globl clock_getres + .align 4 + +clock_getres: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_clock_getres_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_clock_getres_end: + rts + nop + + .align 2 +0: .long __NR_clock_getres +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/clock_gettime.S b/libc/arch-sh/syscalls/clock_gettime.S new file mode 100644 index 0000000..67952a6 --- /dev/null +++ b/libc/arch-sh/syscalls/clock_gettime.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type clock_gettime, @function + .globl clock_gettime + .align 4 + +clock_gettime: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_clock_gettime_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_clock_gettime_end: + rts + nop + + .align 2 +0: .long __NR_clock_gettime +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/clock_nanosleep.S b/libc/arch-sh/syscalls/clock_nanosleep.S new file mode 100644 index 0000000..7ef8d5e --- /dev/null +++ b/libc/arch-sh/syscalls/clock_nanosleep.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type clock_nanosleep, @function + .globl clock_nanosleep + .align 4 + +clock_nanosleep: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_clock_nanosleep_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_clock_nanosleep_end: + rts + nop + + .align 2 +0: .long __NR_clock_nanosleep +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/clock_settime.S b/libc/arch-sh/syscalls/clock_settime.S new file mode 100644 index 0000000..fd48ac6 --- /dev/null +++ b/libc/arch-sh/syscalls/clock_settime.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type clock_settime, @function + .globl clock_settime + .align 4 + +clock_settime: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_clock_settime_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_clock_settime_end: + rts + nop + + .align 2 +0: .long __NR_clock_settime +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/close.S b/libc/arch-sh/syscalls/close.S new file mode 100644 index 0000000..b59002d --- /dev/null +++ b/libc/arch-sh/syscalls/close.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type close, @function + .globl close + .align 4 + +close: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_close_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_close_end: + rts + nop + + .align 2 +0: .long __NR_close +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/delete_module.S b/libc/arch-sh/syscalls/delete_module.S new file mode 100644 index 0000000..73410a9 --- /dev/null +++ b/libc/arch-sh/syscalls/delete_module.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type delete_module, @function + .globl delete_module + .align 4 + +delete_module: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_delete_module_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_delete_module_end: + rts + nop + + .align 2 +0: .long __NR_delete_module +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/dup.S b/libc/arch-sh/syscalls/dup.S new file mode 100644 index 0000000..1c87dd7 --- /dev/null +++ b/libc/arch-sh/syscalls/dup.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type dup, @function + .globl dup + .align 4 + +dup: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_dup_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_dup_end: + rts + nop + + .align 2 +0: .long __NR_dup +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/dup2.S b/libc/arch-sh/syscalls/dup2.S new file mode 100644 index 0000000..da2b7bd --- /dev/null +++ b/libc/arch-sh/syscalls/dup2.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type dup2, @function + .globl dup2 + .align 4 + +dup2: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_dup2_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_dup2_end: + rts + nop + + .align 2 +0: .long __NR_dup2 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/epoll_create.S b/libc/arch-sh/syscalls/epoll_create.S new file mode 100644 index 0000000..64ca8a0 --- /dev/null +++ b/libc/arch-sh/syscalls/epoll_create.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type epoll_create, @function + .globl epoll_create + .align 4 + +epoll_create: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_epoll_create_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_epoll_create_end: + rts + nop + + .align 2 +0: .long __NR_epoll_create +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/epoll_ctl.S b/libc/arch-sh/syscalls/epoll_ctl.S new file mode 100644 index 0000000..0293e73 --- /dev/null +++ b/libc/arch-sh/syscalls/epoll_ctl.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type epoll_ctl, @function + .globl epoll_ctl + .align 4 + +epoll_ctl: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_epoll_ctl_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_epoll_ctl_end: + rts + nop + + .align 2 +0: .long __NR_epoll_ctl +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/epoll_wait.S b/libc/arch-sh/syscalls/epoll_wait.S new file mode 100644 index 0000000..acea8b5 --- /dev/null +++ b/libc/arch-sh/syscalls/epoll_wait.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type epoll_wait, @function + .globl epoll_wait + .align 4 + +epoll_wait: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_epoll_wait_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_epoll_wait_end: + rts + nop + + .align 2 +0: .long __NR_epoll_wait +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/execve.S b/libc/arch-sh/syscalls/execve.S new file mode 100644 index 0000000..e4c451a --- /dev/null +++ b/libc/arch-sh/syscalls/execve.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type execve, @function + .globl execve + .align 4 + +execve: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_execve_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_execve_end: + rts + nop + + .align 2 +0: .long __NR_execve +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fchdir.S b/libc/arch-sh/syscalls/fchdir.S new file mode 100644 index 0000000..9743935 --- /dev/null +++ b/libc/arch-sh/syscalls/fchdir.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fchdir, @function + .globl fchdir + .align 4 + +fchdir: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fchdir_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fchdir_end: + rts + nop + + .align 2 +0: .long __NR_fchdir +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fchmod.S b/libc/arch-sh/syscalls/fchmod.S new file mode 100644 index 0000000..07b8156 --- /dev/null +++ b/libc/arch-sh/syscalls/fchmod.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fchmod, @function + .globl fchmod + .align 4 + +fchmod: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fchmod_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fchmod_end: + rts + nop + + .align 2 +0: .long __NR_fchmod +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fchmodat.S b/libc/arch-sh/syscalls/fchmodat.S new file mode 100644 index 0000000..2532d12 --- /dev/null +++ b/libc/arch-sh/syscalls/fchmodat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fchmodat, @function + .globl fchmodat + .align 4 + +fchmodat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fchmodat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fchmodat_end: + rts + nop + + .align 2 +0: .long __NR_fchmodat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fchown.S b/libc/arch-sh/syscalls/fchown.S new file mode 100644 index 0000000..a49f7d7 --- /dev/null +++ b/libc/arch-sh/syscalls/fchown.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fchown, @function + .globl fchown + .align 4 + +fchown: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fchown32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fchown32_end: + rts + nop + + .align 2 +0: .long __NR_fchown32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fchownat.S b/libc/arch-sh/syscalls/fchownat.S new file mode 100644 index 0000000..3e82637 --- /dev/null +++ b/libc/arch-sh/syscalls/fchownat.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fchownat, @function + .globl fchownat + .align 4 + +fchownat: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fchownat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fchownat_end: + rts + nop + + .align 2 +0: .long __NR_fchownat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/flock.S b/libc/arch-sh/syscalls/flock.S new file mode 100644 index 0000000..d4274ea --- /dev/null +++ b/libc/arch-sh/syscalls/flock.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type flock, @function + .globl flock + .align 4 + +flock: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_flock_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_flock_end: + rts + nop + + .align 2 +0: .long __NR_flock +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fstat.S b/libc/arch-sh/syscalls/fstat.S new file mode 100644 index 0000000..bdb4952 --- /dev/null +++ b/libc/arch-sh/syscalls/fstat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fstat, @function + .globl fstat + .align 4 + +fstat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fstat64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fstat64_end: + rts + nop + + .align 2 +0: .long __NR_fstat64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fstatat.S b/libc/arch-sh/syscalls/fstatat.S new file mode 100644 index 0000000..a5b18d1 --- /dev/null +++ b/libc/arch-sh/syscalls/fstatat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fstatat, @function + .globl fstatat + .align 4 + +fstatat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fstatat64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fstatat64_end: + rts + nop + + .align 2 +0: .long __NR_fstatat64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fstatfs.S b/libc/arch-sh/syscalls/fstatfs.S new file mode 100644 index 0000000..6adb2cb --- /dev/null +++ b/libc/arch-sh/syscalls/fstatfs.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fstatfs, @function + .globl fstatfs + .align 4 + +fstatfs: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fstatfs64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fstatfs64_end: + rts + nop + + .align 2 +0: .long __NR_fstatfs64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fsync.S b/libc/arch-sh/syscalls/fsync.S new file mode 100644 index 0000000..7904f53 --- /dev/null +++ b/libc/arch-sh/syscalls/fsync.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fsync, @function + .globl fsync + .align 4 + +fsync: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_fsync_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_fsync_end: + rts + nop + + .align 2 +0: .long __NR_fsync +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/ftruncate.S b/libc/arch-sh/syscalls/ftruncate.S new file mode 100644 index 0000000..8c34333 --- /dev/null +++ b/libc/arch-sh/syscalls/ftruncate.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type ftruncate, @function + .globl ftruncate + .align 4 + +ftruncate: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_ftruncate_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_ftruncate_end: + rts + nop + + .align 2 +0: .long __NR_ftruncate +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/futex.S b/libc/arch-sh/syscalls/futex.S new file mode 100644 index 0000000..2aabd92 --- /dev/null +++ b/libc/arch-sh/syscalls/futex.S @@ -0,0 +1,36 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type futex, @function + .globl futex + .align 4 + +futex: + + /* get ready for additonal arg */ + mov.l @r15, r0 + mov.l @(4, r15), r1 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(6 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_futex_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_futex_end: + rts + nop + + .align 2 +0: .long __NR_futex +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getdents.S b/libc/arch-sh/syscalls/getdents.S new file mode 100644 index 0000000..66aedf3 --- /dev/null +++ b/libc/arch-sh/syscalls/getdents.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getdents, @function + .globl getdents + .align 4 + +getdents: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getdents64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getdents64_end: + rts + nop + + .align 2 +0: .long __NR_getdents64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getegid.S b/libc/arch-sh/syscalls/getegid.S new file mode 100644 index 0000000..b3b91ca --- /dev/null +++ b/libc/arch-sh/syscalls/getegid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getegid, @function + .globl getegid + .align 4 + +getegid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getegid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getegid32_end: + rts + nop + + .align 2 +0: .long __NR_getegid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/geteuid.S b/libc/arch-sh/syscalls/geteuid.S new file mode 100644 index 0000000..50f3549 --- /dev/null +++ b/libc/arch-sh/syscalls/geteuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type geteuid, @function + .globl geteuid + .align 4 + +geteuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_geteuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_geteuid32_end: + rts + nop + + .align 2 +0: .long __NR_geteuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getgid.S b/libc/arch-sh/syscalls/getgid.S new file mode 100644 index 0000000..54480b7 --- /dev/null +++ b/libc/arch-sh/syscalls/getgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getgid, @function + .globl getgid + .align 4 + +getgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getgid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getgid32_end: + rts + nop + + .align 2 +0: .long __NR_getgid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getgroups.S b/libc/arch-sh/syscalls/getgroups.S new file mode 100644 index 0000000..854477e --- /dev/null +++ b/libc/arch-sh/syscalls/getgroups.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getgroups, @function + .globl getgroups + .align 4 + +getgroups: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getgroups32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getgroups32_end: + rts + nop + + .align 2 +0: .long __NR_getgroups32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getitimer.S b/libc/arch-sh/syscalls/getitimer.S new file mode 100644 index 0000000..aa444a6 --- /dev/null +++ b/libc/arch-sh/syscalls/getitimer.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getitimer, @function + .globl getitimer + .align 4 + +getitimer: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getitimer_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getitimer_end: + rts + nop + + .align 2 +0: .long __NR_getitimer +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getpgid.S b/libc/arch-sh/syscalls/getpgid.S new file mode 100644 index 0000000..0ff101d --- /dev/null +++ b/libc/arch-sh/syscalls/getpgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getpgid, @function + .globl getpgid + .align 4 + +getpgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getpgid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getpgid_end: + rts + nop + + .align 2 +0: .long __NR_getpgid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getpid.S b/libc/arch-sh/syscalls/getpid.S new file mode 100644 index 0000000..5606694 --- /dev/null +++ b/libc/arch-sh/syscalls/getpid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getpid, @function + .globl getpid + .align 4 + +getpid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getpid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getpid_end: + rts + nop + + .align 2 +0: .long __NR_getpid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getppid.S b/libc/arch-sh/syscalls/getppid.S new file mode 100644 index 0000000..bf12372 --- /dev/null +++ b/libc/arch-sh/syscalls/getppid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getppid, @function + .globl getppid + .align 4 + +getppid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getppid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getppid_end: + rts + nop + + .align 2 +0: .long __NR_getppid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getresgid.S b/libc/arch-sh/syscalls/getresgid.S new file mode 100644 index 0000000..3677211 --- /dev/null +++ b/libc/arch-sh/syscalls/getresgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getresgid, @function + .globl getresgid + .align 4 + +getresgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getresgid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getresgid32_end: + rts + nop + + .align 2 +0: .long __NR_getresgid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getresuid.S b/libc/arch-sh/syscalls/getresuid.S new file mode 100644 index 0000000..857495e --- /dev/null +++ b/libc/arch-sh/syscalls/getresuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getresuid, @function + .globl getresuid + .align 4 + +getresuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getresuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getresuid32_end: + rts + nop + + .align 2 +0: .long __NR_getresuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getrlimit.S b/libc/arch-sh/syscalls/getrlimit.S new file mode 100644 index 0000000..78135d4 --- /dev/null +++ b/libc/arch-sh/syscalls/getrlimit.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getrlimit, @function + .globl getrlimit + .align 4 + +getrlimit: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_ugetrlimit_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_ugetrlimit_end: + rts + nop + + .align 2 +0: .long __NR_ugetrlimit +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getrusage.S b/libc/arch-sh/syscalls/getrusage.S new file mode 100644 index 0000000..ccd9094 --- /dev/null +++ b/libc/arch-sh/syscalls/getrusage.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getrusage, @function + .globl getrusage + .align 4 + +getrusage: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getrusage_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getrusage_end: + rts + nop + + .align 2 +0: .long __NR_getrusage +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/gettid.S b/libc/arch-sh/syscalls/gettid.S new file mode 100644 index 0000000..bc25405 --- /dev/null +++ b/libc/arch-sh/syscalls/gettid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type gettid, @function + .globl gettid + .align 4 + +gettid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_gettid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_gettid_end: + rts + nop + + .align 2 +0: .long __NR_gettid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/gettimeofday.S b/libc/arch-sh/syscalls/gettimeofday.S new file mode 100644 index 0000000..50aba80 --- /dev/null +++ b/libc/arch-sh/syscalls/gettimeofday.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type gettimeofday, @function + .globl gettimeofday + .align 4 + +gettimeofday: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_gettimeofday_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_gettimeofday_end: + rts + nop + + .align 2 +0: .long __NR_gettimeofday +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/getuid.S b/libc/arch-sh/syscalls/getuid.S new file mode 100644 index 0000000..9f9740d --- /dev/null +++ b/libc/arch-sh/syscalls/getuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getuid, @function + .globl getuid + .align 4 + +getuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_getuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_getuid32_end: + rts + nop + + .align 2 +0: .long __NR_getuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/init_module.S b/libc/arch-sh/syscalls/init_module.S new file mode 100644 index 0000000..bd3be14 --- /dev/null +++ b/libc/arch-sh/syscalls/init_module.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type init_module, @function + .globl init_module + .align 4 + +init_module: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_init_module_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_init_module_end: + rts + nop + + .align 2 +0: .long __NR_init_module +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/inotify_add_watch.S b/libc/arch-sh/syscalls/inotify_add_watch.S new file mode 100644 index 0000000..84d373e --- /dev/null +++ b/libc/arch-sh/syscalls/inotify_add_watch.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type inotify_add_watch, @function + .globl inotify_add_watch + .align 4 + +inotify_add_watch: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_inotify_add_watch_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_inotify_add_watch_end: + rts + nop + + .align 2 +0: .long __NR_inotify_add_watch +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/inotify_init.S b/libc/arch-sh/syscalls/inotify_init.S new file mode 100644 index 0000000..4030f69 --- /dev/null +++ b/libc/arch-sh/syscalls/inotify_init.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type inotify_init, @function + .globl inotify_init + .align 4 + +inotify_init: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_inotify_init_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_inotify_init_end: + rts + nop + + .align 2 +0: .long __NR_inotify_init +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/inotify_rm_watch.S b/libc/arch-sh/syscalls/inotify_rm_watch.S new file mode 100644 index 0000000..7a03447 --- /dev/null +++ b/libc/arch-sh/syscalls/inotify_rm_watch.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type inotify_rm_watch, @function + .globl inotify_rm_watch + .align 4 + +inotify_rm_watch: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_inotify_rm_watch_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_inotify_rm_watch_end: + rts + nop + + .align 2 +0: .long __NR_inotify_rm_watch +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/kill.S b/libc/arch-sh/syscalls/kill.S new file mode 100644 index 0000000..d331cde --- /dev/null +++ b/libc/arch-sh/syscalls/kill.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type kill, @function + .globl kill + .align 4 + +kill: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_kill_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_kill_end: + rts + nop + + .align 2 +0: .long __NR_kill +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/klogctl.S b/libc/arch-sh/syscalls/klogctl.S new file mode 100644 index 0000000..925875f --- /dev/null +++ b/libc/arch-sh/syscalls/klogctl.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type klogctl, @function + .globl klogctl + .align 4 + +klogctl: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_syslog_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_syslog_end: + rts + nop + + .align 2 +0: .long __NR_syslog +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lchown.S b/libc/arch-sh/syscalls/lchown.S new file mode 100644 index 0000000..0d94631 --- /dev/null +++ b/libc/arch-sh/syscalls/lchown.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lchown, @function + .globl lchown + .align 4 + +lchown: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_lchown32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_lchown32_end: + rts + nop + + .align 2 +0: .long __NR_lchown32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/link.S b/libc/arch-sh/syscalls/link.S new file mode 100644 index 0000000..f1716a7 --- /dev/null +++ b/libc/arch-sh/syscalls/link.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type link, @function + .globl link + .align 4 + +link: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_link_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_link_end: + rts + nop + + .align 2 +0: .long __NR_link +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lseek.S b/libc/arch-sh/syscalls/lseek.S new file mode 100644 index 0000000..df476ff --- /dev/null +++ b/libc/arch-sh/syscalls/lseek.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lseek, @function + .globl lseek + .align 4 + +lseek: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_lseek_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_lseek_end: + rts + nop + + .align 2 +0: .long __NR_lseek +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lstat.S b/libc/arch-sh/syscalls/lstat.S new file mode 100644 index 0000000..249c92e --- /dev/null +++ b/libc/arch-sh/syscalls/lstat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lstat, @function + .globl lstat + .align 4 + +lstat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_lstat64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_lstat64_end: + rts + nop + + .align 2 +0: .long __NR_lstat64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/madvise.S b/libc/arch-sh/syscalls/madvise.S new file mode 100644 index 0000000..e47eb3d --- /dev/null +++ b/libc/arch-sh/syscalls/madvise.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type madvise, @function + .globl madvise + .align 4 + +madvise: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_madvise_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_madvise_end: + rts + nop + + .align 2 +0: .long __NR_madvise +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mincore.S b/libc/arch-sh/syscalls/mincore.S new file mode 100644 index 0000000..3803358 --- /dev/null +++ b/libc/arch-sh/syscalls/mincore.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mincore, @function + .globl mincore + .align 4 + +mincore: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mincore_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mincore_end: + rts + nop + + .align 2 +0: .long __NR_mincore +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mkdir.S b/libc/arch-sh/syscalls/mkdir.S new file mode 100644 index 0000000..f40068a --- /dev/null +++ b/libc/arch-sh/syscalls/mkdir.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mkdir, @function + .globl mkdir + .align 4 + +mkdir: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mkdir_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mkdir_end: + rts + nop + + .align 2 +0: .long __NR_mkdir +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mkdirat.S b/libc/arch-sh/syscalls/mkdirat.S new file mode 100644 index 0000000..e3506f8 --- /dev/null +++ b/libc/arch-sh/syscalls/mkdirat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mkdirat, @function + .globl mkdirat + .align 4 + +mkdirat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mkdirat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mkdirat_end: + rts + nop + + .align 2 +0: .long __NR_mkdirat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mknod.S b/libc/arch-sh/syscalls/mknod.S new file mode 100644 index 0000000..a2ab1ed --- /dev/null +++ b/libc/arch-sh/syscalls/mknod.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mknod, @function + .globl mknod + .align 4 + +mknod: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mknod_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mknod_end: + rts + nop + + .align 2 +0: .long __NR_mknod +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mlock.S b/libc/arch-sh/syscalls/mlock.S new file mode 100644 index 0000000..2965d75 --- /dev/null +++ b/libc/arch-sh/syscalls/mlock.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mlock, @function + .globl mlock + .align 4 + +mlock: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mlock_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mlock_end: + rts + nop + + .align 2 +0: .long __NR_mlock +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mount.S b/libc/arch-sh/syscalls/mount.S new file mode 100644 index 0000000..d8c7c4b --- /dev/null +++ b/libc/arch-sh/syscalls/mount.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mount, @function + .globl mount + .align 4 + +mount: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mount_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mount_end: + rts + nop + + .align 2 +0: .long __NR_mount +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mprotect.S b/libc/arch-sh/syscalls/mprotect.S new file mode 100644 index 0000000..d8fc96d --- /dev/null +++ b/libc/arch-sh/syscalls/mprotect.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mprotect, @function + .globl mprotect + .align 4 + +mprotect: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mprotect_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mprotect_end: + rts + nop + + .align 2 +0: .long __NR_mprotect +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/mremap.S b/libc/arch-sh/syscalls/mremap.S new file mode 100644 index 0000000..d68fffb --- /dev/null +++ b/libc/arch-sh/syscalls/mremap.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type mremap, @function + .globl mremap + .align 4 + +mremap: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_mremap_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_mremap_end: + rts + nop + + .align 2 +0: .long __NR_mremap +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/msync.S b/libc/arch-sh/syscalls/msync.S new file mode 100644 index 0000000..2b84bdb --- /dev/null +++ b/libc/arch-sh/syscalls/msync.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type msync, @function + .globl msync + .align 4 + +msync: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_msync_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_msync_end: + rts + nop + + .align 2 +0: .long __NR_msync +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/munlock.S b/libc/arch-sh/syscalls/munlock.S new file mode 100644 index 0000000..c84c130 --- /dev/null +++ b/libc/arch-sh/syscalls/munlock.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type munlock, @function + .globl munlock + .align 4 + +munlock: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_munlock_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_munlock_end: + rts + nop + + .align 2 +0: .long __NR_munlock +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/munmap.S b/libc/arch-sh/syscalls/munmap.S new file mode 100644 index 0000000..e338540 --- /dev/null +++ b/libc/arch-sh/syscalls/munmap.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type munmap, @function + .globl munmap + .align 4 + +munmap: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_munmap_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_munmap_end: + rts + nop + + .align 2 +0: .long __NR_munmap +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/nanosleep.S b/libc/arch-sh/syscalls/nanosleep.S new file mode 100644 index 0000000..5aec582 --- /dev/null +++ b/libc/arch-sh/syscalls/nanosleep.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type nanosleep, @function + .globl nanosleep + .align 4 + +nanosleep: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_nanosleep_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_nanosleep_end: + rts + nop + + .align 2 +0: .long __NR_nanosleep +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/pause.S b/libc/arch-sh/syscalls/pause.S new file mode 100644 index 0000000..23952d5 --- /dev/null +++ b/libc/arch-sh/syscalls/pause.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type pause, @function + .globl pause + .align 4 + +pause: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_pause_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_pause_end: + rts + nop + + .align 2 +0: .long __NR_pause +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/poll.S b/libc/arch-sh/syscalls/poll.S new file mode 100644 index 0000000..7080298 --- /dev/null +++ b/libc/arch-sh/syscalls/poll.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type poll, @function + .globl poll + .align 4 + +poll: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_poll_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_poll_end: + rts + nop + + .align 2 +0: .long __NR_poll +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/prctl.S b/libc/arch-sh/syscalls/prctl.S new file mode 100644 index 0000000..8c244d4 --- /dev/null +++ b/libc/arch-sh/syscalls/prctl.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type prctl, @function + .globl prctl + .align 4 + +prctl: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_prctl_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_prctl_end: + rts + nop + + .align 2 +0: .long __NR_prctl +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/read.S b/libc/arch-sh/syscalls/read.S new file mode 100644 index 0000000..ac9faa1 --- /dev/null +++ b/libc/arch-sh/syscalls/read.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type read, @function + .globl read + .align 4 + +read: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_read_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_read_end: + rts + nop + + .align 2 +0: .long __NR_read +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/readlink.S b/libc/arch-sh/syscalls/readlink.S new file mode 100644 index 0000000..e27cec7 --- /dev/null +++ b/libc/arch-sh/syscalls/readlink.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type readlink, @function + .globl readlink + .align 4 + +readlink: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_readlink_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_readlink_end: + rts + nop + + .align 2 +0: .long __NR_readlink +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/readv.S b/libc/arch-sh/syscalls/readv.S new file mode 100644 index 0000000..2a95ea1 --- /dev/null +++ b/libc/arch-sh/syscalls/readv.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type readv, @function + .globl readv + .align 4 + +readv: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_readv_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_readv_end: + rts + nop + + .align 2 +0: .long __NR_readv +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/rename.S b/libc/arch-sh/syscalls/rename.S new file mode 100644 index 0000000..692f40e --- /dev/null +++ b/libc/arch-sh/syscalls/rename.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type rename, @function + .globl rename + .align 4 + +rename: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_rename_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_rename_end: + rts + nop + + .align 2 +0: .long __NR_rename +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/renameat.S b/libc/arch-sh/syscalls/renameat.S new file mode 100644 index 0000000..0c9360f --- /dev/null +++ b/libc/arch-sh/syscalls/renameat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type renameat, @function + .globl renameat + .align 4 + +renameat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_renameat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_renameat_end: + rts + nop + + .align 2 +0: .long __NR_renameat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/rmdir.S b/libc/arch-sh/syscalls/rmdir.S new file mode 100644 index 0000000..124892e --- /dev/null +++ b/libc/arch-sh/syscalls/rmdir.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type rmdir, @function + .globl rmdir + .align 4 + +rmdir: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_rmdir_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_rmdir_end: + rts + nop + + .align 2 +0: .long __NR_rmdir +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_get_priority_max.S b/libc/arch-sh/syscalls/sched_get_priority_max.S new file mode 100644 index 0000000..dd642bf --- /dev/null +++ b/libc/arch-sh/syscalls/sched_get_priority_max.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_get_priority_max, @function + .globl sched_get_priority_max + .align 4 + +sched_get_priority_max: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_get_priority_max_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_get_priority_max_end: + rts + nop + + .align 2 +0: .long __NR_sched_get_priority_max +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_get_priority_min.S b/libc/arch-sh/syscalls/sched_get_priority_min.S new file mode 100644 index 0000000..069b116 --- /dev/null +++ b/libc/arch-sh/syscalls/sched_get_priority_min.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_get_priority_min, @function + .globl sched_get_priority_min + .align 4 + +sched_get_priority_min: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_get_priority_min_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_get_priority_min_end: + rts + nop + + .align 2 +0: .long __NR_sched_get_priority_min +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_getparam.S b/libc/arch-sh/syscalls/sched_getparam.S new file mode 100644 index 0000000..c8417b2 --- /dev/null +++ b/libc/arch-sh/syscalls/sched_getparam.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_getparam, @function + .globl sched_getparam + .align 4 + +sched_getparam: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_getparam_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_getparam_end: + rts + nop + + .align 2 +0: .long __NR_sched_getparam +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_getscheduler.S b/libc/arch-sh/syscalls/sched_getscheduler.S new file mode 100644 index 0000000..ecd9a6a --- /dev/null +++ b/libc/arch-sh/syscalls/sched_getscheduler.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_getscheduler, @function + .globl sched_getscheduler + .align 4 + +sched_getscheduler: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_getscheduler_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_getscheduler_end: + rts + nop + + .align 2 +0: .long __NR_sched_getscheduler +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_rr_get_interval.S b/libc/arch-sh/syscalls/sched_rr_get_interval.S new file mode 100644 index 0000000..64d5f69 --- /dev/null +++ b/libc/arch-sh/syscalls/sched_rr_get_interval.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_rr_get_interval, @function + .globl sched_rr_get_interval + .align 4 + +sched_rr_get_interval: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_rr_get_interval_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_rr_get_interval_end: + rts + nop + + .align 2 +0: .long __NR_sched_rr_get_interval +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_setparam.S b/libc/arch-sh/syscalls/sched_setparam.S new file mode 100644 index 0000000..f1687ee --- /dev/null +++ b/libc/arch-sh/syscalls/sched_setparam.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_setparam, @function + .globl sched_setparam + .align 4 + +sched_setparam: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_setparam_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_setparam_end: + rts + nop + + .align 2 +0: .long __NR_sched_setparam +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_setscheduler.S b/libc/arch-sh/syscalls/sched_setscheduler.S new file mode 100644 index 0000000..7a6becf --- /dev/null +++ b/libc/arch-sh/syscalls/sched_setscheduler.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_setscheduler, @function + .globl sched_setscheduler + .align 4 + +sched_setscheduler: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_setscheduler_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_setscheduler_end: + rts + nop + + .align 2 +0: .long __NR_sched_setscheduler +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_yield.S b/libc/arch-sh/syscalls/sched_yield.S new file mode 100644 index 0000000..538f487 --- /dev/null +++ b/libc/arch-sh/syscalls/sched_yield.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sched_yield, @function + .globl sched_yield + .align 4 + +sched_yield: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sched_yield_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sched_yield_end: + rts + nop + + .align 2 +0: .long __NR_sched_yield +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/select.S b/libc/arch-sh/syscalls/select.S new file mode 100644 index 0000000..b68f46a --- /dev/null +++ b/libc/arch-sh/syscalls/select.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type select, @function + .globl select + .align 4 + +select: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR__newselect_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR__newselect_end: + rts + nop + + .align 2 +0: .long __NR__newselect +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sendfile.S b/libc/arch-sh/syscalls/sendfile.S new file mode 100644 index 0000000..015e433 --- /dev/null +++ b/libc/arch-sh/syscalls/sendfile.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sendfile, @function + .globl sendfile + .align 4 + +sendfile: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(4 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sendfile_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sendfile_end: + rts + nop + + .align 2 +0: .long __NR_sendfile +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setgid.S b/libc/arch-sh/syscalls/setgid.S new file mode 100644 index 0000000..2941fc1 --- /dev/null +++ b/libc/arch-sh/syscalls/setgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setgid, @function + .globl setgid + .align 4 + +setgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setgid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setgid32_end: + rts + nop + + .align 2 +0: .long __NR_setgid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setgroups.S b/libc/arch-sh/syscalls/setgroups.S new file mode 100644 index 0000000..723535d --- /dev/null +++ b/libc/arch-sh/syscalls/setgroups.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setgroups, @function + .globl setgroups + .align 4 + +setgroups: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setgroups32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setgroups32_end: + rts + nop + + .align 2 +0: .long __NR_setgroups32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setitimer.S b/libc/arch-sh/syscalls/setitimer.S new file mode 100644 index 0000000..84f0590 --- /dev/null +++ b/libc/arch-sh/syscalls/setitimer.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setitimer, @function + .globl setitimer + .align 4 + +setitimer: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setitimer_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setitimer_end: + rts + nop + + .align 2 +0: .long __NR_setitimer +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setpgid.S b/libc/arch-sh/syscalls/setpgid.S new file mode 100644 index 0000000..1dd8b33 --- /dev/null +++ b/libc/arch-sh/syscalls/setpgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setpgid, @function + .globl setpgid + .align 4 + +setpgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setpgid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setpgid_end: + rts + nop + + .align 2 +0: .long __NR_setpgid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setpriority.S b/libc/arch-sh/syscalls/setpriority.S new file mode 100644 index 0000000..4f5091f --- /dev/null +++ b/libc/arch-sh/syscalls/setpriority.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setpriority, @function + .globl setpriority + .align 4 + +setpriority: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setpriority_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setpriority_end: + rts + nop + + .align 2 +0: .long __NR_setpriority +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setregid.S b/libc/arch-sh/syscalls/setregid.S new file mode 100644 index 0000000..695f231 --- /dev/null +++ b/libc/arch-sh/syscalls/setregid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setregid, @function + .globl setregid + .align 4 + +setregid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setregid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setregid32_end: + rts + nop + + .align 2 +0: .long __NR_setregid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setresgid.S b/libc/arch-sh/syscalls/setresgid.S new file mode 100644 index 0000000..867cbc1 --- /dev/null +++ b/libc/arch-sh/syscalls/setresgid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setresgid, @function + .globl setresgid + .align 4 + +setresgid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setresgid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setresgid32_end: + rts + nop + + .align 2 +0: .long __NR_setresgid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setresuid.S b/libc/arch-sh/syscalls/setresuid.S new file mode 100644 index 0000000..41fe349 --- /dev/null +++ b/libc/arch-sh/syscalls/setresuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setresuid, @function + .globl setresuid + .align 4 + +setresuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setresuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setresuid32_end: + rts + nop + + .align 2 +0: .long __NR_setresuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setreuid.S b/libc/arch-sh/syscalls/setreuid.S new file mode 100644 index 0000000..025df27 --- /dev/null +++ b/libc/arch-sh/syscalls/setreuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setreuid, @function + .globl setreuid + .align 4 + +setreuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setreuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setreuid32_end: + rts + nop + + .align 2 +0: .long __NR_setreuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setrlimit.S b/libc/arch-sh/syscalls/setrlimit.S new file mode 100644 index 0000000..73fe89f --- /dev/null +++ b/libc/arch-sh/syscalls/setrlimit.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setrlimit, @function + .globl setrlimit + .align 4 + +setrlimit: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setrlimit_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setrlimit_end: + rts + nop + + .align 2 +0: .long __NR_setrlimit +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setsid.S b/libc/arch-sh/syscalls/setsid.S new file mode 100644 index 0000000..fa7fc66 --- /dev/null +++ b/libc/arch-sh/syscalls/setsid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setsid, @function + .globl setsid + .align 4 + +setsid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(0 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setsid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setsid_end: + rts + nop + + .align 2 +0: .long __NR_setsid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/settimeofday.S b/libc/arch-sh/syscalls/settimeofday.S new file mode 100644 index 0000000..0a38b60 --- /dev/null +++ b/libc/arch-sh/syscalls/settimeofday.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type settimeofday, @function + .globl settimeofday + .align 4 + +settimeofday: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_settimeofday_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_settimeofday_end: + rts + nop + + .align 2 +0: .long __NR_settimeofday +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/setuid.S b/libc/arch-sh/syscalls/setuid.S new file mode 100644 index 0000000..1fb3148 --- /dev/null +++ b/libc/arch-sh/syscalls/setuid.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setuid, @function + .globl setuid + .align 4 + +setuid: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_setuid32_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_setuid32_end: + rts + nop + + .align 2 +0: .long __NR_setuid32 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sigaction.S b/libc/arch-sh/syscalls/sigaction.S new file mode 100644 index 0000000..f1dd824 --- /dev/null +++ b/libc/arch-sh/syscalls/sigaction.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sigaction, @function + .globl sigaction + .align 4 + +sigaction: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sigaction_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sigaction_end: + rts + nop + + .align 2 +0: .long __NR_sigaction +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sigpending.S b/libc/arch-sh/syscalls/sigpending.S new file mode 100644 index 0000000..75e479c --- /dev/null +++ b/libc/arch-sh/syscalls/sigpending.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sigpending, @function + .globl sigpending + .align 4 + +sigpending: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sigpending_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sigpending_end: + rts + nop + + .align 2 +0: .long __NR_sigpending +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sigprocmask.S b/libc/arch-sh/syscalls/sigprocmask.S new file mode 100644 index 0000000..efa40ea --- /dev/null +++ b/libc/arch-sh/syscalls/sigprocmask.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sigprocmask, @function + .globl sigprocmask + .align 4 + +sigprocmask: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sigprocmask_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sigprocmask_end: + rts + nop + + .align 2 +0: .long __NR_sigprocmask +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/stat.S b/libc/arch-sh/syscalls/stat.S new file mode 100644 index 0000000..aedd57d --- /dev/null +++ b/libc/arch-sh/syscalls/stat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type stat, @function + .globl stat + .align 4 + +stat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_stat64_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_stat64_end: + rts + nop + + .align 2 +0: .long __NR_stat64 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/symlink.S b/libc/arch-sh/syscalls/symlink.S new file mode 100644 index 0000000..d5ccc46 --- /dev/null +++ b/libc/arch-sh/syscalls/symlink.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type symlink, @function + .globl symlink + .align 4 + +symlink: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_symlink_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_symlink_end: + rts + nop + + .align 2 +0: .long __NR_symlink +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sync.S b/libc/arch-sh/syscalls/sync.S new file mode 100644 index 0000000..a8c0646 --- /dev/null +++ b/libc/arch-sh/syscalls/sync.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type sync, @function + .globl sync + .align 4 + +sync: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_sync_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_sync_end: + rts + nop + + .align 2 +0: .long __NR_sync +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/times.S b/libc/arch-sh/syscalls/times.S new file mode 100644 index 0000000..079e098 --- /dev/null +++ b/libc/arch-sh/syscalls/times.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type times, @function + .globl times + .align 4 + +times: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_times_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_times_end: + rts + nop + + .align 2 +0: .long __NR_times +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/tkill.S b/libc/arch-sh/syscalls/tkill.S new file mode 100644 index 0000000..b6fe2a3 --- /dev/null +++ b/libc/arch-sh/syscalls/tkill.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type tkill, @function + .globl tkill + .align 4 + +tkill: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_tkill_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_tkill_end: + rts + nop + + .align 2 +0: .long __NR_tkill +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/truncate.S b/libc/arch-sh/syscalls/truncate.S new file mode 100644 index 0000000..dc08fcc --- /dev/null +++ b/libc/arch-sh/syscalls/truncate.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type truncate, @function + .globl truncate + .align 4 + +truncate: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_truncate_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_truncate_end: + rts + nop + + .align 2 +0: .long __NR_truncate +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/umask.S b/libc/arch-sh/syscalls/umask.S new file mode 100644 index 0000000..7575a1c --- /dev/null +++ b/libc/arch-sh/syscalls/umask.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type umask, @function + .globl umask + .align 4 + +umask: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_umask_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_umask_end: + rts + nop + + .align 2 +0: .long __NR_umask +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/umount2.S b/libc/arch-sh/syscalls/umount2.S new file mode 100644 index 0000000..06a11da --- /dev/null +++ b/libc/arch-sh/syscalls/umount2.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type umount2, @function + .globl umount2 + .align 4 + +umount2: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_umount2_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_umount2_end: + rts + nop + + .align 2 +0: .long __NR_umount2 +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/uname.S b/libc/arch-sh/syscalls/uname.S new file mode 100644 index 0000000..755c9de --- /dev/null +++ b/libc/arch-sh/syscalls/uname.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type uname, @function + .globl uname + .align 4 + +uname: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_uname_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_uname_end: + rts + nop + + .align 2 +0: .long __NR_uname +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/unlink.S b/libc/arch-sh/syscalls/unlink.S new file mode 100644 index 0000000..453d58a --- /dev/null +++ b/libc/arch-sh/syscalls/unlink.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type unlink, @function + .globl unlink + .align 4 + +unlink: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_unlink_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_unlink_end: + rts + nop + + .align 2 +0: .long __NR_unlink +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/unlinkat.S b/libc/arch-sh/syscalls/unlinkat.S new file mode 100644 index 0000000..7a448a3 --- /dev/null +++ b/libc/arch-sh/syscalls/unlinkat.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type unlinkat, @function + .globl unlinkat + .align 4 + +unlinkat: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_unlinkat_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_unlinkat_end: + rts + nop + + .align 2 +0: .long __NR_unlinkat +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/utimes.S b/libc/arch-sh/syscalls/utimes.S new file mode 100644 index 0000000..fecaa66 --- /dev/null +++ b/libc/arch-sh/syscalls/utimes.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type utimes, @function + .globl utimes + .align 4 + +utimes: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(2 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_utimes_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_utimes_end: + rts + nop + + .align 2 +0: .long __NR_utimes +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/vfork.S b/libc/arch-sh/syscalls/vfork.S new file mode 100644 index 0000000..2a2c78b --- /dev/null +++ b/libc/arch-sh/syscalls/vfork.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type vfork, @function + .globl vfork + .align 4 + +vfork: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(1 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_vfork_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_vfork_end: + rts + nop + + .align 2 +0: .long __NR_vfork +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/waitid.S b/libc/arch-sh/syscalls/waitid.S new file mode 100644 index 0000000..1f0432d --- /dev/null +++ b/libc/arch-sh/syscalls/waitid.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type waitid, @function + .globl waitid + .align 4 + +waitid: + + /* get ready for additonal arg */ + mov.l @r15, r0 + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(5 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_waitid_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_waitid_end: + rts + nop + + .align 2 +0: .long __NR_waitid +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/write.S b/libc/arch-sh/syscalls/write.S new file mode 100644 index 0000000..71c6ea8 --- /dev/null +++ b/libc/arch-sh/syscalls/write.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type write, @function + .globl write + .align 4 + +write: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_write_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_write_end: + rts + nop + + .align 2 +0: .long __NR_write +1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/writev.S b/libc/arch-sh/syscalls/writev.S new file mode 100644 index 0000000..518ae28 --- /dev/null +++ b/libc/arch-sh/syscalls/writev.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type writev, @function + .globl writev + .align 4 + +writev: + + /* invoke trap */ + mov.l 0f, r3 /* trap num */ + trapa #(3 + 0x10) + + /* check return value */ + cmp/pz r0 + bt __NR_writev_end + + /* keep error number */ + sts.l pr, @-r15 + mov.l 1f, r1 + jsr @r1 + mov r0, r4 + lds.l @r15+, pr + +__NR_writev_end: + rts + nop + + .align 2 +0: .long __NR_writev +1: .long __set_syscall_errno diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h index 7772f1e..5d2b55e 100644 --- a/libc/include/sys/linux-syscalls.h +++ b/libc/include/sys/linux-syscalls.h @@ -218,6 +218,60 @@ #define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293) #endif +#if defined(__SH3__) || defined(__SH4__) +#define __NR_exit_group (__NR_SYSCALL_BASE + 252) +#define __NR_waitpid (__NR_SYSCALL_BASE + 7) +#define __NR_waitid (__NR_SYSCALL_BASE + 284) +#define __NR_kill (__NR_SYSCALL_BASE + 37) +#define __NR_tkill (__NR_SYSCALL_BASE + 238) +#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243) +#define __NR_vfork (__NR_SYSCALL_BASE + 190) +#define __NR_openat (__NR_SYSCALL_BASE + 295) +#define __NR_madvise (__NR_SYSCALL_BASE + 219) +#define __NR_mincore (__NR_SYSCALL_BASE + 218) +#define __NR_getdents64 (__NR_SYSCALL_BASE + 220) +#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269) +#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300) +#define __NR_mkdirat (__NR_SYSCALL_BASE + 296) +#define __NR_fchownat (__NR_SYSCALL_BASE + 298) +#define __NR_fchmodat (__NR_SYSCALL_BASE + 306) +#define __NR_renameat (__NR_SYSCALL_BASE + 302) +#define __NR_unlinkat (__NR_SYSCALL_BASE + 301) +#define __NR_statfs64 (__NR_SYSCALL_BASE + 268) +#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265) +#define __NR_clock_settime (__NR_SYSCALL_BASE + 264) +#define __NR_clock_getres (__NR_SYSCALL_BASE + 266) +#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267) +#define __NR_timer_create (__NR_SYSCALL_BASE + 259) +#define __NR_timer_settime (__NR_SYSCALL_BASE + 260) +#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261) +#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262) +#define __NR_timer_delete (__NR_SYSCALL_BASE + 263) +#define __NR_utimes (__NR_SYSCALL_BASE + 271) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR___socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_epoll_create (__NR_SYSCALL_BASE + 254) +#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255) +#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256) +#define __NR_inotify_init (__NR_SYSCALL_BASE + 290) +#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 291) +#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 292) +#endif + #endif #endif /* _BIONIC_LINUX_SYSCALLS_H_ */ diff --git a/libc/include/sys/linux-unistd.h b/libc/include/sys/linux-unistd.h index 789271e..12f7704 100644 --- a/libc/include/sys/linux-unistd.h +++ b/libc/include/sys/linux-unistd.h @@ -171,6 +171,7 @@ int setsockopt (int, int, int, const void *, socklen_t); int getsockopt (int, int, int, void *, socklen_t *); int sendmsg (int, const struct msghdr *, unsigned int); int recvmsg (int, struct msghdr *, unsigned int); +int __socketcall (int, unsigned long*); int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); int sched_getscheduler (pid_t pid); int sched_yield (void); diff --git a/libc/unistd/socketcalls.c b/libc/unistd/socketcalls.c index d97abc2..51bdf57 100644 --- a/libc/unistd/socketcalls.c +++ b/libc/unistd/socketcalls.c @@ -232,7 +232,7 @@ int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) #endif /* !__NR_getsockopt */ #ifndef __NR_sendmsg -ssize_t sendmsg (int socket, const struct msghdr *message, unsigned int flags) +int sendmsg (int socket, const struct msghdr *message, unsigned int flags) { unsigned long t[3]; @@ -245,7 +245,7 @@ ssize_t sendmsg (int socket, const struct msghdr *message, unsigned int flags) #endif /* __NR_sendmsg */ #ifndef __NR_recvmsg -ssize_t recvmsg(int socket, struct msghdr *message, unsigned int flags) +int recvmsg(int socket, struct msghdr *message, unsigned int flags) { unsigned long t[3]; |