diff --git a/libc/Android.mk b/libc/Android.mk index 225d14fb0..9881d591b 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -427,43 +427,6 @@ libc_arch_static_src_files := \ libc_arch_dynamic_src_files := else # !x86 -ifeq ($(TARGET_ARCH),sh) -libc_common_src_files += \ - arch-sh/bionic/__get_pc.S \ - arch-sh/bionic/__get_sp.S \ - arch-sh/bionic/_exit_with_stack_teardown.S \ - arch-sh/bionic/_setjmp.S \ - arch-sh/bionic/atomics_sh.c \ - arch-sh/bionic/atomic_cmpxchg.S \ - arch-sh/bionic/clone.S \ - arch-sh/bionic/pipe.S \ - arch-sh/bionic/memcpy.S \ - arch-sh/bionic/memset.S \ - arch-sh/bionic/bzero.S \ - arch-sh/bionic/setjmp.S \ - arch-sh/bionic/sigsetjmp.S \ - arch-sh/bionic/syscall.S \ - arch-sh/bionic/memmove.S \ - arch-sh/bionic/__set_tls.c \ - arch-sh/bionic/__get_tls.c \ - arch-sh/bionic/ffs.S \ - string/bcopy.c \ - string/strcmp.c \ - string/strncmp.c \ - string/memcmp.c \ - string/strlen.c \ - string/strcpy.c \ - bionic/pthread-atfork.c \ - bionic/pthread-rwlocks.c \ - bionic/pthread-timers.c \ - bionic/ptrace.c \ - unistd/socketcalls.c - -libc_static_common_src_files += \ - bionic/pthread.c \ - -endif # sh - endif # !x86 endif # !arm diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT index fc5f8082e..c346d5a8c 100644 --- a/libc/SYSCALLS.TXT +++ b/libc/SYSCALLS.TXT @@ -4,7 +4,7 @@ # # each non comment line has the following format: # -# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (#syscall_number|stub) +# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (syscall_number|"stub") # # note that: # - syscall_name correspond to the name of the syscall, which may differ from @@ -22,15 +22,15 @@ # assembler template for the syscall; it's up to the bionic implementation to provide # a relevant C stub # -# - additionally, if the syscall number is different amoung ARM, x86 and SuperH, use: -# return_type funcname[:syscall_name](parameters) arm_number,x86_number,superh_number +# - additionally, if the syscall number is different amoung ARM, and x86, use: +# return_type funcname[:syscall_name](parameters) arm_number,x86_number # # the file is processed by a python script named gensyscalls.py # # process management void _exit:exit_group (int) 248,252 -void _exit_thread:exit (int) 1 +void _exit_thread:exit (int) 1 pid_t __fork:fork (void) 2 pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7 int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284 @@ -53,7 +53,7 @@ pid_t gettid() 224 ssize_t readahead(int, off64_t, size_t) 225 int getgroups:getgroups32(int, gid_t *) 205 pid_t getpgid(pid_t) 132 -pid_t getppid() 64 +pid_t getppid() 64 pid_t setsid() 66 int setgid:setgid32(gid_t) 214 int seteuid:seteuid32(uid_t) stub @@ -114,7 +114,7 @@ int __fcntl:fcntl(int, int, void*) 55 int flock(int, int) 143 int fchmod(int, mode_t) 94 int dup(int) 41 -int pipe(int *) 42,42,-1 +int pipe(int *) 42,42 int pipe2(int *, int) 359,331 int dup2(int, int) 63 int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142 @@ -219,24 +219,21 @@ int sendmsg(int, const struct msghdr *, unsigned int) 296,-1 int recvmsg(int, struct msghdr *, unsigned int) 297,-1 # sockets for x86. These are done as an "indexed" call to socketcall syscall. -int socket:socketcall:1 (int, int, int) -1,102,-1 -int bind:socketcall:2 (int, struct sockaddr *, int) -1,102,-1 -int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,102,-1 -int listen:socketcall:4(int, int) -1,102,-1 -int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,102,-1 -int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,102,-1 -int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,102,-1 -int socketpair:socketcall:8(int, int, int, int*) -1,102,-1 -int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,102,-1 -int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,102,-1 +int socket:socketcall:1 (int, int, int) -1,102 +int bind:socketcall:2 (int, struct sockaddr *, int) -1,102 +int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,102 +int listen:socketcall:4(int, int) -1,102 +int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,102 +int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,102 +int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,102 +int socketpair:socketcall:8(int, int, int, int*) -1,102 +int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,102 +int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,102 int shutdown:socketcall:13(int, int) -1,102,-1 -int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,102,-1 -int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,102,-1 -int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102,-1 -int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,102,-1 - -# sockets for sh. -int __socketcall:socketcall(int, unsigned long*) -1,-1,102 +int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,102 +int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,102 +int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102 +int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,102 # scheduler & real-time int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156 @@ -249,11 +246,11 @@ int sched_get_priority_min(int policy) 160 int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161 int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) 241 int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) 242 -int __getcpu:getcpu(unsigned *cpu, unsigned *node, void *unused) 345,318,318 +int __getcpu:getcpu(unsigned *cpu, unsigned *node, void *unused) 345,318 # io priorities -int ioprio_set(int which, int who, int ioprio) 314,289,288 -int ioprio_get(int which, int who) 315,290,289 +int ioprio_set(int which, int who, int ioprio) 314,289 +int ioprio_get(int which, int who) 315,290 # other int uname(struct utsname *) 122 @@ -275,8 +272,8 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 251,25 int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256 int inotify_init(void) 316,291,290 -int inotify_add_watch(int, const char *, unsigned int) 317,292,291 -int inotify_rm_watch(int, unsigned int) 318,293,292 +int inotify_add_watch(int, const char *, unsigned int) 317,292 +int inotify_rm_watch(int, unsigned int) 318,293 int poll(struct pollfd *, unsigned int, long) 168 diff --git a/libc/arch-sh/bionic/__get_pc.S b/libc/arch-sh/bionic/__get_pc.S deleted file mode 100644 index 155b3875d..000000000 --- a/libc/arch-sh/bionic/__get_pc.S +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.type __get_pc, @function -.globl __get_pc -.align 4 - -__get_pc: - mova 1f, r0 - rts -1: nop - diff --git a/libc/arch-sh/bionic/__get_sp.S b/libc/arch-sh/bionic/__get_sp.S deleted file mode 100644 index 0e34a01fd..000000000 --- a/libc/arch-sh/bionic/__get_sp.S +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.type __get_sp, @function -.globl __get_sp -.align 4 - -__get_sp: - rts - mov r15, r0 - diff --git a/libc/arch-sh/bionic/__get_tls.c b/libc/arch-sh/bionic/__get_tls.c deleted file mode 100644 index 8a5e4fff1..000000000 --- a/libc/arch-sh/bionic/__get_tls.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -/* see the implementation of __set_tls and pthread.c to understand this - * code. Basically, the content of fs:[0] always is a pointer to the base - * address of the tls region - */ -void *__get_tls(void) -{ - void *tls; - asm volatile("stc gbr, %0" : "=r"(tls)); - return tls; -} diff --git a/libc/arch-sh/bionic/__set_tls.c b/libc/arch-sh/bionic/__set_tls.c deleted file mode 100644 index 7f863de28..000000000 --- a/libc/arch-sh/bionic/__set_tls.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include - -/* - * Simply set tls address into GBR. - */ -int __set_tls(void *ptr) -{ - asm volatile("ldc %0, gbr" : /* no output */ : "r" (ptr)); - return 0; -} diff --git a/libc/arch-sh/bionic/_exit_with_stack_teardown.S b/libc/arch-sh/bionic/_exit_with_stack_teardown.S deleted file mode 100644 index 6356eb697..000000000 --- a/libc/arch-sh/bionic/_exit_with_stack_teardown.S +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include - -.text -.type _exit_with_stack_teardown, @function -.globl _exit_with_stack_teardown -.align 4 - -# void _exit_with_stack_teardown(void * stackBase, int stackSize, int retCode) - -_exit_with_stack_teardown: - mov r6, r8 /* save retCode : breaks r8 value */ - mov.l 0f, r3 /* system call number */ - trapa #(2 + 0x10) /* invoke system call with num of args */ - - mov r8, r4 /* restore retCode */ - mov.l 1f, r3 /* system call number */ - trapa #(1 + 0x10) /* invoke system call with num of args */ - - /* exit() should never return, cause a crash if it does */ - mov #0, r0 - mov.l @r0, r0 - - .align 2 -0: .long __NR_munmap -1: .long __NR_exit diff --git a/libc/arch-sh/bionic/_setjmp.S b/libc/arch-sh/bionic/_setjmp.S deleted file mode 100644 index a04fcb6cf..000000000 --- a/libc/arch-sh/bionic/_setjmp.S +++ /dev/null @@ -1,125 +0,0 @@ -/* $OpenBSD: _setjmp.S,v 1.2 2007/03/02 06:11:54 miod Exp $ */ -/* $NetBSD: _setjmp.S,v 1.7 2006/01/05 02:04:41 uwe Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)_setjmp.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#include - -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v)" from the last call to - * _setjmp(a) - * by restoring registers from the stack. - * The previous signal state is NOT restored. - */ - -ENTRY(_setjmp) - xor r0, r0 -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - add #(_JBLEN * 4), r4 - sts fpscr, r1 - mov.l r1, @-r4 - lds r0, fpscr - sts.l fpul, @-r4 - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - frchg - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - lds r1, fpscr -#else - add #((_JBLEN - 10) * 4), r4 -#endif - sts.l mach, @-r4 - sts.l macl, @-r4 - mov.l r15, @-r4 - mov.l r14, @-r4 - mov.l r13, @-r4 - mov.l r12, @-r4 - mov.l r11, @-r4 - mov.l r10, @-r4 - mov.l r9, @-r4 - mov.l r8, @-r4 - sts.l pr, @-r4 - mov.l r0, @-r4 /* dummy signal mask */ - rts - mov.l r0, @-r4 /* no saved signal mask */ - SET_ENTRY_SIZE(_setjmp) - -ENTRY(_longjmp) - add #8, r4 - lds.l @r4+, pr - mov.l @r4+, r8 - mov.l @r4+, r9 - mov.l @r4+, r10 - mov.l @r4+, r11 - mov.l @r4+, r12 - mov.l @r4+, r13 - mov.l @r4+, r14 - mov.l @r4+, r15 - lds.l @r4+, macl - lds.l @r4+, mach -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - xor r0, r0 - lds r0, fpscr - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - lds.l @r4+, fpul - lds.l @r4+, fpscr -#endif - - mov r5, r0 - tst r0, r0 - bf .L0 - add #1, r0 -.L0: - rts - nop - SET_ENTRY_SIZE(_longjmp) diff --git a/libc/arch-sh/bionic/atomic_cmpxchg.S b/libc/arch-sh/bionic/atomic_cmpxchg.S deleted file mode 100644 index 4ccd6cf1b..000000000 --- a/libc/arch-sh/bionic/atomic_cmpxchg.S +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.type __atomic_cmpxchg, @function -.globl __atomic_cmpxchg -.align 4 - -__atomic_cmpxchg: - mova 1f, r0 - nop - mov r15, r1 - mov #-8, r15 /* critical region start */ -0: mov.l @r6, r2 - cmp/eq r2, r4 - bt not_yet_modified - mov #1, r0 - bra done - nop -not_yet_modified: - mov #0, r0 - mov.l r5, @r6 -done: -1: mov r1, r15 /* critical region end */ - rts - nop diff --git a/libc/arch-sh/bionic/atomics_sh.c b/libc/arch-sh/bionic/atomics_sh.c deleted file mode 100644 index c7815ff2c..000000000 --- a/libc/arch-sh/bionic/atomics_sh.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -#define SWAP_LOCK_COUNT 32U -static pthread_mutex_t _swap_locks[SWAP_LOCK_COUNT]; - -#define SWAP_LOCK(addr) \ - &_swap_locks[((unsigned)(void *)(addr) >> 3U) % SWAP_LOCK_COUNT] - -#if 0 -/* - * Only this function is moved to atomic_cmpxchg.S, and - * implemented with gUSA framework. - */ -int __atomic_cmpxchg(int old, int _new, volatile int *ptr) -{ - int result; - pthread_mutex_t *lock = SWAP_LOCK(ptr); - - pthread_mutex_lock(lock); - - if (*ptr == old) { - *ptr = _new; - result = 0; - } else { - result = 1; - } - pthread_mutex_unlock(lock); - return result; -} -#else -extern int __atomic_cmpxchg(int old, int _new, volatile int *ptr); -#endif - -int __atomic_swap(int _new, volatile int *ptr) -{ - int oldValue; - do { - oldValue = *ptr; - } while (__atomic_cmpxchg(oldValue, _new, ptr)); - return oldValue; -} - -int __atomic_dec(volatile int *ptr) -{ - int oldValue; - do { - oldValue = *ptr; - } while (__atomic_cmpxchg(oldValue, oldValue-1, ptr)); - return oldValue; -} - -int __atomic_inc(volatile int *ptr) -{ - int32_t oldValue; - do { - oldValue = *ptr; - } while (__atomic_cmpxchg(oldValue, oldValue+1, ptr)); - return oldValue; -} - -extern int futex(volatile void *, int, int, void *, void *, int); - -int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout) -{ - return futex(ftx, FUTEX_WAIT, val, (void *)timeout, NULL, 0); -} - -int __futex_wake(volatile void *ftx, int count) -{ - return futex(ftx, FUTEX_WAKE, count, NULL, NULL, 0); -} - -int __futex_syscall3(volatile void *ftx, int op, int val) -{ - return futex(ftx, op, val, NULL, NULL, 0); -} - -int __futex_syscall4(volative void *ftx, int op, int val, const struct timespec *timeout) -{ - return futex(ftx, op, val, (void *)timeout, NULL, 0); -} diff --git a/libc/arch-sh/bionic/bzero.S b/libc/arch-sh/bionic/bzero.S deleted file mode 100644 index ca8bed4ed..000000000 --- a/libc/arch-sh/bionic/bzero.S +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#define BZERO -#include "memset.S" diff --git a/libc/arch-sh/bionic/clone.S b/libc/arch-sh/bionic/clone.S deleted file mode 100644 index 9cb19eeb5..000000000 --- a/libc/arch-sh/bionic/clone.S +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include - -.text -.type __pthread_clone, @function -.globl __pthread_clone -.align 4 - -__pthread_clone: - /* insert the args onto the new stack */ - mov r5, r0 - mov.l r4, @-r0 /* func */ - mov.l r7, @-r0 /* arg */ - - /* do the system call */ - mov r6, r4 /* Set clone_flags. new sp is ready in r5. */ - mov.l 0f, r3 - trapa #(4 + 0x10) - - /* check error */ - cmp/pz r0 - bf __error - - /* check if parent or child */ - cmp/pl r0 - bt __return - - /* prepare args for __thread_entry */ - mov #8, r1 - sub r1, r15 /* -8 */ - mov.l @r15+, r5 /* +4 */ /* arg */ - mov.l @r15+, r4 /* +4 */ /* func */ - mov r15, r6 /* tls */ - - /* jump to __thread_entry */ - mov.l 1f, r0 - jmp @r0 - nop - -__error: - mov #-1, r0 -__return: - rts - nop - - .align 2 -0: .long __NR_clone -1: .long __thread_entry - -/* XXX: TODO: Add __bionic_clone here - * See bionic/bionic_clone.c and arch-arm/bionic/clone.S - * for more details... - */ \ No newline at end of file diff --git a/libc/arch-sh/bionic/crtbegin_dynamic.S b/libc/arch-sh/bionic/crtbegin_dynamic.S deleted file mode 100644 index daf6c8b5b..000000000 --- a/libc/arch-sh/bionic/crtbegin_dynamic.S +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2009-2010 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.align 4 -.type _start,#function -.globl _start - -# this is the small startup code that is first run when -# any executable that is dynamically-linked with Bionic -# runs. -# -# it's purpose is to call __libc_init with appropriate -# arguments, which are: -# -# - the address of the raw data block setup by the Linux -# kernel ELF loader -# -# - address of an "onexit" function, not used on any -# platform supported by Bionic -# -# - address of the "main" function of the program. We -# can't hard-code it in the adr pseudo instruction -# so we use a tiny trampoline that will get relocated -# by the dynamic linker before this code runs -# -# - address of the constructor list -# -_start: - mov r15, r4 - mov #0, r5 - mov.l 0f, r6 - mova 2f, r0 - mov r0, r7 - mov.l 1f, r0 - jmp @r0 - nop - - .balign 4 -0: .long main -1: .long __libc_init -2: .long __PREINIT_ARRAY__ - .long __INIT_ARRAY__ - .long __FINI_ARRAY__ - .long __CTOR_LIST__ - -# the .ctors section contains a list of pointers to "constructor" -# functions that need to be called in order during C library initialization, -# just before the program is being run. This is a C++ requirement -# -# the last entry shall be 0, and is defined in crtend.S -# - .section .preinit_array, "aw" - .globl __PREINIT_ARRAY__ -__PREINIT_ARRAY__: - .long -1 - - .section .init_array, "aw" - .globl __INIT_ARRAY__ -__INIT_ARRAY__: - .long -1 - - .section .fini_array, "aw" - .globl __FINI_ARRAY__ -__FINI_ARRAY__: - .long -1 - - .section .ctors, "aw" - .globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 - -#include "__dso_handle.S" diff --git a/libc/arch-sh/bionic/crtbegin_static.S b/libc/arch-sh/bionic/crtbegin_static.S deleted file mode 100644 index 1d3fdf839..000000000 --- a/libc/arch-sh/bionic/crtbegin_static.S +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2009-2010 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.align 4 -.type _start,#function -.globl _start - -# this is the small startup code that is first run when -# any executable that is statically-linked with Bionic -# runs. -# -# it's purpose is to call __libc_init with appropriate -# arguments, which are: -# -# - the address of the raw data block setup by the Linux -# kernel ELF loader -# -# - address of an "onexit" function, not used on any -# platform supported by Bionic -# -# - address of the "main" function of the program. We -# can't hard-code it in the adr pseudo instruction -# so we use a tiny trampoline that will get relocated -# by the dynamic linker before this code runs -# -# - address of the constructor list -# -_start: - mov r15, r4 - mov #0, r5 - mov.l 0f, r6 - mova 2f, r0 - mov r0, r7 - mov.l 1f, r0 - jmp @r0 - nop - - .balign 4 -0: .long main -1: .long __libc_init -2: .long __PREINIT_ARRAY__ - .long __INIT_ARRAY__ - .long __FINI_ARRAY__ - .long __CTOR_LIST__ - - .section .preinit_array, "aw" - .globl __PREINIT_ARRAY__ -__PREINIT_ARRAY__: - .long -1 - - .section .init_array, "aw" - .globl __INIT_ARRAY__ -__INIT_ARRAY__: - .long -1 - - .section .fini_array, "aw" - .globl __FINI_ARRAY__ -__FINI_ARRAY__: - .long -1 - - .section .ctors, "aw" - .globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 - -#include "__dso_handle.S" diff --git a/libc/arch-sh/bionic/crtend.S b/libc/arch-sh/bionic/crtend.S deleted file mode 100644 index 4ced3aa34..000000000 --- a/libc/arch-sh/bionic/crtend.S +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - .section .preinit_array, "aw" - .long 0 - - .section .init_array, "aw" - .long 0 - - .section .fini_array, "aw" - .long 0 - - .section .ctors, "aw" - .long 0 diff --git a/libc/arch-sh/bionic/ffs.S b/libc/arch-sh/bionic/ffs.S deleted file mode 100644 index 733694b6f..000000000 --- a/libc/arch-sh/bionic/ffs.S +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: ffs.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */ - -/*- - * Copyright (c) 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by ITOH Yasufumi. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#if defined(LIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: ffs.S,v 1.1 2005/12/20 19:28:50 christos Exp $") -#endif - -/* - * ffs - find first bit set - * - * This code makes use of ``test 8bit'' and ``shift 8bit'' instructions. - * The remaining 8bit is tested in every 2bit. - */ - -ENTRY(ffs) - mov r4,r0 ! using r0 specific instructions - tst #0xff,r0 - bf/s L8bit - mov #0+1,r1 ! ret = 1..8 - - tst r0,r0 ! ffs(0) is 0 - bt Lzero ! testing here to accelerate ret=1..8 cases - - shlr8 r0 - tst #0xff,r0 - bf/s L8bit - mov #8+1,r1 ! ret = 9..16 - - shlr8 r0 - tst #0xff,r0 - bf/s L8bit - mov #16+1,r1 ! ret = 17..24 - - shlr8 r0 - mov #24+1,r1 ! ret = 25..32 - -L8bit: - tst #0x0f,r0 - bt 4f - - tst #0x03,r0 - bt 2f - tst #0x01,r0 ! not bit 0 -> T - mov #0,r0 - rts - addc r1,r0 ! 0 + r1 + T -> r0 - -2: tst #0x04,r0 - mov #2,r0 - rts - addc r1,r0 - -4: tst #0x30,r0 - bt 6f - tst #0x10,r0 - mov #4,r0 - rts - addc r1,r0 - -6: tst #0x40,r0 - mov #6,r0 - rts - addc r1,r0 - -Lzero: rts - nop diff --git a/libc/arch-sh/bionic/memcpy.S b/libc/arch-sh/bionic/memcpy.S deleted file mode 100644 index 9d1b89716..000000000 --- a/libc/arch-sh/bionic/memcpy.S +++ /dev/null @@ -1,268 +0,0 @@ -/* $OpenBSD: memcpy.S,v 1.1.1.1 2006/10/10 22:07:10 miod Exp $ */ -/* $NetBSD: memcpy.S,v 1.2 2006/04/22 23:53:47 uwe Exp $ */ - -/* - * Copyright (c) 2000 SHIMIZU Ryo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#if !defined(MEMCOPY) && !defined(MEMMOVE) && !defined(BCOPY) -#define MEMCOPY -#endif - -#if defined(MEMCOPY) || defined(MEMMOVE) -#define REG_DST0 r3 -#define REG_SRC r5 -#define REG_DST r4 -#else -#define REG_SRC r4 -#define REG_DST r5 -#endif - -#define REG_LEN r6 - -#if defined(MEMCOPY) -ENTRY(memcpy) -#elif defined(MEMMOVE) -ENTRY(memmove) -#elif defined(BCOPY) -ENTRY(bcopy) -#endif -#ifdef REG_DST0 - mov REG_DST,REG_DST0 -#endif - cmp/eq REG_DST,REG_SRC /* if ( src == dst ) return; */ - bt/s bcopy_return - cmp/hi REG_DST,REG_SRC - bf/s bcopy_overlap - - mov REG_SRC,r0 - xor REG_DST,r0 - and #3,r0 - mov r0,r1 - tst r0,r0 /* (src ^ dst) & 3 */ - bf/s word_align - -longword_align: - tst REG_LEN,REG_LEN /* if ( len==0 ) return; */ - bt/s bcopy_return - - - mov REG_SRC,r0 - tst #1,r0 /* if ( src & 1 ) */ - bt 1f - mov.b @REG_SRC+,r0 /* *dst++ = *src++; */ - add #-1,REG_LEN - mov.b r0,@REG_DST - add #1,REG_DST -1: - - - mov #1,r0 - cmp/hi r0,REG_LEN /* if ( (len > 1) && */ - bf/s 1f - mov REG_SRC,r0 - tst #2,r0 /* (src & 2) { */ - bt 1f - mov.w @REG_SRC+,r0 /* *((unsigned short*)dst)++ = *((unsigned short*)src)++; */ - add #-2,REG_LEN /* len -= 2; */ - mov.w r0,@REG_DST - add #2,REG_DST /* } */ -1: - - - mov #3,r1 - cmp/hi r1,REG_LEN /* while ( len > 3 ) { */ - bf/s no_align_delay - tst REG_LEN,REG_LEN -2: - mov.l @REG_SRC+,r0 /* *((unsigned long*)dst)++ = *((unsigned long*)src)++; */ - add #-4,REG_LEN /* len -= 4; */ - mov.l r0,@REG_DST - cmp/hi r1,REG_LEN - bt/s 2b - add #4,REG_DST /* } */ - - bra no_align_delay - tst REG_LEN,REG_LEN - - -word_align: - mov r1,r0 - tst #1,r0 - bf/s no_align_delay - tst REG_LEN,REG_LEN /* if ( len == 0 ) return; */ - bt bcopy_return - - - mov REG_SRC,r0 /* if ( src & 1 ) */ - tst #1,r0 - bt 1f - mov.b @REG_SRC+,r0 /* *dst++ = *src++; */ - add #-1,REG_LEN - mov.b r0,@REG_DST - add #1,REG_DST -1: - - - mov #1,r1 - cmp/hi r1,REG_LEN /* while ( len > 1 ) { */ - bf/s no_align_delay - tst REG_LEN,REG_LEN -2: - mov.w @REG_SRC+,r0 /* *((unsigned short*)dst)++ = *((unsigned short*)src)++; */ - add #-2,REG_LEN /* len -= 2; */ - mov.w r0,@REG_DST - cmp/hi r1,REG_LEN - bt/s 2b - add #2,REG_DST /* } */ - - -no_align: - tst REG_LEN,REG_LEN /* while ( len!= ) { */ -no_align_delay: - bt bcopy_return -1: - mov.b @REG_SRC+,r0 /* *dst++ = *src++; */ - add #-1,REG_LEN /* len--; */ - mov.b r0,@REG_DST - tst REG_LEN,REG_LEN - bf/s 1b - add #1,REG_DST /* } */ -bcopy_return: - rts -#ifdef REG_DST0 - mov REG_DST0,r0 -#else - nop -#endif - - -bcopy_overlap: - add REG_LEN,REG_SRC - add REG_LEN,REG_DST - - mov REG_SRC,r0 - xor REG_DST,r0 - and #3,r0 - mov r0,r1 - tst r0,r0 /* (src ^ dst) & 3 */ - bf/s ov_word_align - -ov_longword_align: - tst REG_LEN,REG_LEN /* if ( len==0 ) return; */ - bt/s bcopy_return - - - mov REG_SRC,r0 - tst #1,r0 /* if ( src & 1 ) */ - bt 1f - add #-1,REG_SRC /* *--dst = *--src; */ - mov.b @REG_SRC,r0 - mov.b r0,@-REG_DST - add #-1,REG_LEN -1: - - - mov #1,r0 - cmp/hi r0,REG_LEN /* if ( (len > 1) && */ - bf/s 1f - mov REG_SRC,r0 - tst #2,r0 /* (src & 2) { */ - bt 1f - add #-2,REG_SRC /* *--((unsigned short*)dst) = *--((unsigned short*)src); */ - mov.w @REG_SRC,r0 - add #-2,REG_LEN /* len -= 2; */ - mov.w r0,@-REG_DST /* } */ -1: - - - mov #3,r1 - cmp/hi r1,REG_LEN /* while ( len > 3 ) { */ - bf/s ov_no_align_delay - tst REG_LEN,REG_LEN -2: - add #-4,REG_SRC - mov.l @REG_SRC,r0 /* *((unsigned long*)dst)++ = *((unsigned long*)src)++; */ - add #-4,REG_LEN /* len -= 4; */ - cmp/hi r1,REG_LEN - bt/s 2b - mov.l r0,@-REG_DST /* } */ - - bra ov_no_align_delay - tst REG_LEN,REG_LEN - - -ov_word_align: - mov r1,r0 - tst #1,r0 - bf/s ov_no_align_delay - tst REG_LEN,REG_LEN /* if ( len == 0 ) return; */ - bt bcopy_return - - - mov REG_SRC,r0 /* if ( src & 1 ) */ - tst #1,r0 - bt 1f - add #-1,REG_SRC - mov.b @REG_SRC,r0 /* *--dst = *--src; */ - add #-1,REG_LEN - mov.b r0,@-REG_DST -1: - - - mov #1,r1 - cmp/hi r1,REG_LEN /* while ( len > 1 ) { */ - bf/s ov_no_align_delay - tst REG_LEN,REG_LEN -2: - add #-2,REG_SRC - mov.w @REG_SRC,r0 /* *--((unsigned short*)dst) = *--((unsigned short*)src); */ - add #-2,REG_LEN /* len -= 2; */ - cmp/hi r1,REG_LEN - bt/s 2b - mov.w r0,@-REG_DST /* } */ - - -ov_no_align: - tst REG_LEN,REG_LEN /* while ( len!= ) { */ -ov_no_align_delay: - bt 9f -1: - add #-1,REG_SRC - mov.b @REG_SRC,r0 /* *--dst = *--src; */ - add #-1,REG_LEN /* len--; */ - tst REG_LEN,REG_LEN - bf/s 1b - mov.b r0,@-REG_DST /* } */ -9: - rts -#ifdef REG_DST0 - mov REG_DST0,r0 -#else - nop -#endif diff --git a/libc/arch-sh/bionic/memmove.S b/libc/arch-sh/bionic/memmove.S deleted file mode 100644 index 023fc1055..000000000 --- a/libc/arch-sh/bionic/memmove.S +++ /dev/null @@ -1,5 +0,0 @@ -/* $OpenBSD: memmove.S,v 1.1.1.1 2006/10/10 22:07:10 miod Exp $ */ -/* $NetBSD: memmove.S,v 1.2 2006/04/22 23:53:47 uwe Exp $ */ - -#define MEMMOVE -#include "memcpy.S" diff --git a/libc/arch-sh/bionic/memset.S b/libc/arch-sh/bionic/memset.S deleted file mode 100644 index 73b0d0669..000000000 --- a/libc/arch-sh/bionic/memset.S +++ /dev/null @@ -1,295 +0,0 @@ -/* $OpenBSD: memset.S,v 1.1.1.1 2006/10/10 22:07:10 miod Exp $ */ -/* $NetBSD: memset.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */ - -/*- - * Copyright (c) 2002 SHIMIZU Ryo. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#define REG_PTR r0 -#define REG_TMP1 r1 - -#ifdef BZERO -# define REG_C r2 -# define REG_DST r4 -# define REG_LEN r5 -#else -# define REG_DST0 r3 -# define REG_DST r4 -# define REG_C r5 -# define REG_LEN r6 -#endif - -#ifdef BZERO -ENTRY(bzero) -#else -ENTRY(memset) - mov REG_DST,REG_DST0 /* for return value */ -#endif - /* small amount to fill ? */ - mov #28,REG_TMP1 - cmp/hs REG_TMP1,REG_LEN /* if (len >= 28) goto large; */ - bt/s large - mov #12,REG_TMP1 /* if (len >= 12) goto small; */ - cmp/hs REG_TMP1,REG_LEN - bt/s small -#ifdef BZERO - mov #0,REG_C -#endif - /* very little fill (0 ~ 11 bytes) */ - tst REG_LEN,REG_LEN - add REG_DST,REG_LEN - bt/s done - add #1,REG_DST - - /* unroll 4 loops */ - cmp/eq REG_DST,REG_LEN -1: mov.b REG_C,@-REG_LEN - bt/s done - cmp/eq REG_DST,REG_LEN - mov.b REG_C,@-REG_LEN - bt/s done - cmp/eq REG_DST,REG_LEN - mov.b REG_C,@-REG_LEN - bt/s done - cmp/eq REG_DST,REG_LEN - mov.b REG_C,@-REG_LEN - bf/s 1b - cmp/eq REG_DST,REG_LEN -done: -#ifdef BZERO - rts - nop -#else - rts - mov REG_DST0,r0 -#endif - - -small: - mov REG_DST,r0 - tst #1,r0 - bt/s small_aligned - mov REG_DST,REG_TMP1 - shll REG_LEN - mova 1f,r0 /* 1f must be 4bytes aligned! */ - add #16,REG_TMP1 /* REG_TMP1 = dst+16; */ - sub REG_LEN,r0 - jmp @r0 - mov REG_C,r0 - - .align 2 - mov.b r0,@(15,REG_TMP1) - mov.b r0,@(14,REG_TMP1) - mov.b r0,@(13,REG_TMP1) - mov.b r0,@(12,REG_TMP1) - mov.b r0,@(11,REG_TMP1) - mov.b r0,@(10,REG_TMP1) - mov.b r0,@(9,REG_TMP1) - mov.b r0,@(8,REG_TMP1) - mov.b r0,@(7,REG_TMP1) - mov.b r0,@(6,REG_TMP1) - mov.b r0,@(5,REG_TMP1) - mov.b r0,@(4,REG_TMP1) - mov.b r0,@(3,REG_TMP1) - mov.b r0,@(2,REG_TMP1) - mov.b r0,@(1,REG_TMP1) - mov.b r0,@REG_TMP1 - mov.b r0,@(15,REG_DST) - mov.b r0,@(14,REG_DST) - mov.b r0,@(13,REG_DST) - mov.b r0,@(12,REG_DST) - mov.b r0,@(11,REG_DST) - mov.b r0,@(10,REG_DST) - mov.b r0,@(9,REG_DST) - mov.b r0,@(8,REG_DST) - mov.b r0,@(7,REG_DST) - mov.b r0,@(6,REG_DST) - mov.b r0,@(5,REG_DST) - mov.b r0,@(4,REG_DST) - mov.b r0,@(3,REG_DST) - mov.b r0,@(2,REG_DST) - mov.b r0,@(1,REG_DST) -#ifdef BZERO - rts -1: mov.b r0,@REG_DST -#else - mov.b r0,@REG_DST -1: rts - mov REG_DST0,r0 -#endif - - -/* 2 bytes aligned small fill */ -small_aligned: -#ifndef BZERO - extu.b REG_C,REG_TMP1 /* REG_C = ??????xx, REG_TMP1 = ????00xx */ - shll8 REG_C /* REG_C = ????xx00, REG_TMP1 = ????00xx */ - or REG_TMP1,REG_C /* REG_C = ????xxxx */ -#endif - - mov REG_LEN,r0 - tst #1,r0 /* len is aligned? */ - bt/s 1f - add #-1,r0 - mov.b REG_C,@(r0,REG_DST) /* fill last a byte */ - mov r0,REG_LEN -1: - - mova 1f,r0 /* 1f must be 4bytes aligned! */ - sub REG_LEN,r0 - jmp @r0 - mov REG_C,r0 - - .align 2 - mov.w r0,@(30,REG_DST) - mov.w r0,@(28,REG_DST) - mov.w r0,@(26,REG_DST) - mov.w r0,@(24,REG_DST) - mov.w r0,@(22,REG_DST) - mov.w r0,@(20,REG_DST) - mov.w r0,@(18,REG_DST) - mov.w r0,@(16,REG_DST) - mov.w r0,@(14,REG_DST) - mov.w r0,@(12,REG_DST) - mov.w r0,@(10,REG_DST) - mov.w r0,@(8,REG_DST) - mov.w r0,@(6,REG_DST) - mov.w r0,@(4,REG_DST) - mov.w r0,@(2,REG_DST) -#ifdef BZERO - rts -1: mov.w r0,@REG_DST -#else - mov.w r0,@REG_DST -1: rts - mov REG_DST0,r0 -#endif - - - - .align 2 -large: -#ifdef BZERO - mov #0,REG_C -#else - extu.b REG_C,REG_TMP1 /* REG_C = ??????xx, REG_TMP1 = ????00xx */ - shll8 REG_C /* REG_C = ????xx00, REG_TMP1 = ????00xx */ - or REG_C,REG_TMP1 /* REG_C = ????xx00, REG_TMP1 = ????xxxx */ - swap.w REG_TMP1,REG_C /* REG_C = xxxx????, REG_TMP1 = ????xxxx */ - xtrct REG_TMP1,REG_C /* REG_C = xxxxxxxx */ -#endif - - mov #3,REG_TMP1 - tst REG_TMP1,REG_DST - mov REG_DST,REG_PTR - bf/s unaligned_dst - add REG_LEN,REG_PTR /* REG_PTR = dst + len; */ - tst REG_TMP1,REG_LEN - bf/s unaligned_len - -aligned: - /* fill 32*n bytes */ - mov #32,REG_TMP1 - cmp/hi REG_LEN,REG_TMP1 - bt 9f - .align 2 -1: sub REG_TMP1,REG_PTR - mov.l REG_C,@REG_PTR - sub REG_TMP1,REG_LEN - mov.l REG_C,@(4,REG_PTR) - cmp/hi REG_LEN,REG_TMP1 - mov.l REG_C,@(8,REG_PTR) - mov.l REG_C,@(12,REG_PTR) - mov.l REG_C,@(16,REG_PTR) - mov.l REG_C,@(20,REG_PTR) - mov.l REG_C,@(24,REG_PTR) - bf/s 1b - mov.l REG_C,@(28,REG_PTR) -9: - - /* fill left 4*n bytes */ - cmp/eq REG_DST,REG_PTR - bt 9f - add #4,REG_DST - cmp/eq REG_DST,REG_PTR -1: mov.l REG_C,@-REG_PTR - bt/s 9f - cmp/eq REG_DST,REG_PTR - mov.l REG_C,@-REG_PTR - bt/s 9f - cmp/eq REG_DST,REG_PTR - mov.l REG_C,@-REG_PTR - bt/s 9f - cmp/eq REG_DST,REG_PTR - mov.l REG_C,@-REG_PTR - bf/s 1b - cmp/eq REG_DST,REG_PTR -9: -#ifdef BZERO - rts - nop -#else - rts - mov REG_DST0,r0 -#endif - - -unaligned_dst: - mov #1,REG_TMP1 - tst REG_TMP1,REG_DST /* if (dst & 1) { */ - add #1,REG_TMP1 - bt/s 2f - tst REG_TMP1,REG_DST - mov.b REG_C,@REG_DST /* *dst++ = c; */ - add #1,REG_DST - tst REG_TMP1,REG_DST -2: /* } */ - /* if (dst & 2) { */ - bt 4f - mov.w REG_C,@REG_DST /* *(u_int16_t*)dst++ = c; */ - add #2,REG_DST -4: /* } */ - - - tst #3,REG_PTR /* if (ptr & 3) { */ - bt/s 4f /* */ -unaligned_len: - tst #1,REG_PTR /* if (ptr & 1) { */ - bt/s 2f - tst #2,REG_PTR - mov.b REG_C,@-REG_PTR /* --ptr = c; */ -2: /* } */ - /* if (ptr & 2) { */ - bt 4f - mov.w REG_C,@-REG_PTR /* *--(u_int16_t*)ptr = c; */ -4: /* } */ - /* } */ - - mov REG_PTR,REG_LEN - bra aligned - sub REG_DST,REG_LEN - diff --git a/libc/arch-sh/bionic/pipe.S b/libc/arch-sh/bionic/pipe.S deleted file mode 100644 index 936da2d35..000000000 --- a/libc/arch-sh/bionic/pipe.S +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include - -.text -.type pipe, @function -.globl pipe -.align 4 - -pipe: - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(0 + 0x10) - - - /* check return value */ - cmp/pz r0 - bt setfds - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - bra end - nop -setfds: - mov.l r0, @r4 - add #4, r4 - mov.l r1, @r4 -end: - rts - nop - - .align 2 -0: .long __NR_pipe -1: .long __set_syscall_errno diff --git a/libc/arch-sh/bionic/setjmp.S b/libc/arch-sh/bionic/setjmp.S deleted file mode 100644 index 67f339744..000000000 --- a/libc/arch-sh/bionic/setjmp.S +++ /dev/null @@ -1,167 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.2 2007/03/02 06:11:54 miod Exp $ */ -/* $NetBSD: setjmp.S,v 1.10 2006/01/05 19:21:37 uwe Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#include - -/* - * C library -- setjmp, longjmp - * - * longjmp(a,v) - * will generate a "return(v)" from the last call to - * setjmp(a) - * by restoring registers from the stack. - * The previous signal state is restored. - */ - -ENTRY(setjmp) - PIC_PROLOGUE(.L_got_1) - sts.l pr, @-sp - mov.l r4, @-sp - - mov.l .L_sigprocmask_1, r0 - mov r4, r6 - mov #1, r4 /* how = SIG_BLOCK */ - mov #0, r5 /* new = NULL */ -1: CALL r0 - add #4, r6 /* old = &sigmask */ - - mov.l @sp+, r4 - lds.l @sp+, pr - PIC_EPILOGUE - - /* identical to _setjmp except that the first word is non-zero */ -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - add #(_JBLEN * 4), r4 - sts fpscr, r1 - xor r0, r0 - mov.l r1, @-r4 - lds r0, fpscr - sts.l fpul, @-r4 - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - frchg - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - lds r1, fpscr -#else - add #((_JBLEN - 10) * 4), r4 -#endif - sts.l mach, @-r4 - sts.l macl, @-r4 - mov.l r15, @-r4 - mov.l r14, @-r4 - mov.l r13, @-r4 - mov.l r12, @-r4 - mov.l r11, @-r4 - mov.l r10, @-r4 - mov.l r9, @-r4 - mov.l r8, @-r4 - sts.l pr, @-r4 - add #-4, r4 /* skip signal mask */ - mov #1, r0 - mov.l r0, @-r4 /* has signal mask */ - rts - xor r0, r0 - - .align 2 -.L_got_1: PIC_GOT_DATUM -.L_sigprocmask_1: CALL_DATUM(_C_LABEL(sigprocmask), 1b) - SET_ENTRY_SIZE(setjmp) - -ENTRY(longjmp) - /* we won't return here, so we don't need to save pr and r12 */ - PIC_PROLOGUE_NOSAVE(.L_got_2) - mov.l r5, @-sp - mov.l r4, @-sp - - mov.l .L_sigprocmask_2, r0 - mov r4, r5 - mov #3, r4 /* how = SIG_SETMASK */ - add #4, r5 /* new = &sigmask */ -1: CALL r0 - mov #0, r6 /* old = NULL */ - - mov.l @sp+, r4 - mov.l @sp+, r5 - - /* identical to _longjmp */ - add #8, r4 - lds.l @r4+, pr - mov.l @r4+, r8 - mov.l @r4+, r9 - mov.l @r4+, r10 - mov.l @r4+, r11 - mov.l @r4+, r12 - mov.l @r4+, r13 - mov.l @r4+, r14 - mov.l @r4+, r15 - lds.l @r4+, macl - lds.l @r4+, mach -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - xor r0, r0 - lds r0, fpscr - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - lds.l @r4+, fpul - lds.l @r4+, fpscr -#endif - - mov r5, r0 - tst r0, r0 /* make sure return value is non-zero */ - bf .L0 - add #1, r0 -.L0: - rts - nop - - .align 2 -.L_got_2: PIC_GOT_DATUM -.L_sigprocmask_2: CALL_DATUM(_C_LABEL(sigprocmask), 1b) - SET_ENTRY_SIZE(longjmp) diff --git a/libc/arch-sh/bionic/sigsetjmp.S b/libc/arch-sh/bionic/sigsetjmp.S deleted file mode 100644 index f88913a73..000000000 --- a/libc/arch-sh/bionic/sigsetjmp.S +++ /dev/null @@ -1,166 +0,0 @@ -/* $OpenBSD: sigsetjmp.S,v 1.2 2007/03/02 06:11:54 miod Exp $ */ -/* $NetBSD: sigsetjmp.S,v 1.9 2006/01/05 19:21:37 uwe Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#include - -ENTRY(sigsetjmp) - tst r5, r5 /* if (savemask == 0) */ - bt 2f - - /* identical to setjmp */ - PIC_PROLOGUE(.L_got_1) - sts.l pr, @-sp - mov.l r4, @-sp - mov.l r5, @-sp - - mov.l .L_sigprocmask_1, r0 - mov r4, r6 - mov #1, r4 /* how = SIG_BLOCK */ - mov #0, r5 /* new = NULL */ -1: CALL r0 - add #4, r6 /* old = &sigmask */ - - mov.l @sp+, r5 - mov.l @sp+, r4 - lds.l @sp+, pr - PIC_EPILOGUE - -2: /* identical to _setjmp except that first word is in r5 */ -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - add #(_JBLEN * 4), r4 - sts fpscr, r1 - xor r0, r0 - mov.l r1, @-r4 - lds r0, fpscr - sts.l fpul, @-r4 - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - frchg - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - lds r1, fpscr -#else - add #((_JBLEN - 10) * 4), r4 -#endif - sts.l mach, @-r4 - sts.l macl, @-r4 - mov.l r15, @-r4 - mov.l r14, @-r4 - mov.l r13, @-r4 - mov.l r12, @-r4 - mov.l r11, @-r4 - mov.l r10, @-r4 - mov.l r9, @-r4 - mov.l r8, @-r4 - sts.l pr, @-r4 - add #-4, r4 /* skip signal mask */ - mov.l r5, @-r4 /* has signal mask? */ - rts - xor r0, r0 - - .align 2 -.L_got_1: PIC_GOT_DATUM -.L_sigprocmask_1: CALL_DATUM(_C_LABEL(sigprocmask), 1b) - SET_ENTRY_SIZE(sigsetjmp) - -ENTRY(siglongjmp) - mov.l @r4+, r0 - tst r0, r0 - bt 2f /* if no mask */ - - /* identical to longjmp */ - /* we won't return here, so we don't need to save pr and r12 */ - PIC_PROLOGUE_NOSAVE(.L_got_2) - mov.l r5, @-sp - mov.l r4, @-sp - - mov.l .L_sigprocmask_2, r0 - mov r4, r5 /* new = &sigmask */ - mov #3, r4 /* how = SIG_SETMASK */ -1: CALL r0 - mov #0, r6 /* old = NULL */ - - mov.l @sp+, r4 - mov.l @sp+, r5 - -2: /* identical to _longjmp */ - add #4, r4 - lds.l @r4+, pr - mov.l @r4+, r8 - mov.l @r4+, r9 - mov.l @r4+, r10 - mov.l @r4+, r11 - mov.l @r4+, r12 - mov.l @r4+, r13 - mov.l @r4+, r14 - mov.l @r4+, r15 - lds.l @r4+, macl - lds.l @r4+, mach -#if defined(__SH4__) && !defined(__SH4_NOFPU__) - xor r0, r0 - lds r0, fpscr - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - frchg - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - lds.l @r4+, fpul - lds.l @r4+, fpscr -#endif - - mov r5, r0 - tst r0, r0 /* make sure return value is non-zero */ - bf .L0 - add #1, r0 -.L0: - rts - nop - - .align 2 -.L_got_2: PIC_GOT_DATUM -.L_sigprocmask_2: CALL_DATUM(_C_LABEL(sigprocmask), 1b) - SET_ENTRY_SIZE(siglongjmp) diff --git a/libc/arch-sh/bionic/syscall.S b/libc/arch-sh/bionic/syscall.S deleted file mode 100644 index 7e9f3070a..000000000 --- a/libc/arch-sh/bionic/syscall.S +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include - -.text -.type syscall, @function -.globl syscall -.align 4 - -/* - * Current implementation assumes that the all syscall - * has maximum 7 arguments. - */ -syscall: - /* get args */ - mov r4, r3 /* system call number */ - mov r5, r4 - mov r6, r5 - mov r7, r6 - mov.l @r15, r7 - mov.l @(4, r15), r0 - mov.l @(8, r15), r1 - mov.l @(12, r15), r2 - - /* invoke trap */ - trapa #(7 + 0x10) /* assuming 7 arguments */ - - /* check return value */ - cmp/pz r0 - bt end - - /* keep error number */ - mov.l r0, @-r15 - mov.l 0f, r1 - jsr @r1 - mov r0, r4 - mov.l @r15+, r0 - -end: - rts - nop - - .align 2 -0: .long __set_errno diff --git a/libc/arch-sh/bionic/unwind.c b/libc/arch-sh/bionic/unwind.c deleted file mode 100644 index 33ec58c6b..000000000 --- a/libc/arch-sh/bionic/unwind.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -typedef long unsigned int *_Unwind_Ptr; - diff --git a/libc/arch-sh/include/endian.h b/libc/arch-sh/include/endian.h deleted file mode 100644 index ad10164f4..000000000 --- a/libc/arch-sh/include/endian.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $OpenBSD: endian.h,v 1.1.1.1 2006/10/06 21:02:55 miod Exp $ */ -/* $NetBSD: endian.h,v 1.4 2000/03/17 00:09:25 mycroft Exp $ */ - -/* Written by Manuel Bouyer. Public domain */ - -#ifndef _SH_ENDIAN_H_ -#define _SH_ENDIAN_H_ - -#ifdef __GNUC__ - -#define __swap64md __swap64gen - -#define __swap16md(x) ({ \ - uint16_t rval; \ - \ - __asm volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); \ - \ - rval; \ -}) - -#define __swap32md(x) ({ \ - uint32_t rval; \ - \ - __asm volatile ("swap.b %1,%0; swap.w %0,%0; swap.b %0,%0" \ - : "=r"(rval) : "r"(x)); \ - \ - rval; \ -}) - -#define MD_SWAP - -#endif /* __GNUC_ */ - -#define _BYTE_ORDER _LITTLE_ENDIAN -#include - -#define __STRICT_ALIGNMENT - -#endif /* !_SH_ENDIAN_H_ */ diff --git a/libc/arch-sh/include/machine/_types.h b/libc/arch-sh/include/machine/_types.h deleted file mode 100644 index 6f59e211b..000000000 --- a/libc/arch-sh/include/machine/_types.h +++ /dev/null @@ -1,126 +0,0 @@ -/* $OpenBSD: _types.h,v 1.6 2008/07/21 20:50:55 martynas Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)types.h 8.3 (Berkeley) 1/5/94 - * @(#)ansi.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _SH__TYPES_H_ -#define _SH__TYPES_H_ - -#if defined(_KERNEL) -typedef struct label_t { - int val[9]; -} label_t; -#endif - -/* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -/* LONGLONG */ -typedef long long __int64_t; -/* LONGLONG */ -typedef unsigned long long __uint64_t; - -/* 7.18.1.2 Minimum-width integer types */ -typedef __int8_t __int_least8_t; -typedef __uint8_t __uint_least8_t; -typedef __int16_t __int_least16_t; -typedef __uint16_t __uint_least16_t; -typedef __int32_t __int_least32_t; -typedef __uint32_t __uint_least32_t; -typedef __int64_t __int_least64_t; -typedef __uint64_t __uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types */ -typedef __int32_t __int_fast8_t; -typedef __uint32_t __uint_fast8_t; -typedef __int32_t __int_fast16_t; -typedef __uint32_t __uint_fast16_t; -typedef __int32_t __int_fast32_t; -typedef __uint32_t __uint_fast32_t; -typedef __int64_t __int_fast64_t; -typedef __uint64_t __uint_fast64_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -typedef long __intptr_t; -typedef unsigned long __uintptr_t; - -/* 7.18.1.5 Greatest-width integer types */ -typedef __int64_t __intmax_t; -typedef __uint64_t __uintmax_t; - -/* Register size */ -typedef __uint32_t __register_t; - -/* VM system types */ -typedef unsigned long __vaddr_t; -typedef unsigned long __paddr_t; -typedef unsigned long __vsize_t; -typedef unsigned long __psize_t; - -/* Standard system types */ -typedef int __clock_t; -typedef int __clockid_t; -typedef double __double_t; -typedef float __float_t; -typedef long long __off_t; -typedef long __ptrdiff_t; -#if 0 -/* cut it off for Android-SH */ -typedef unsigned long __size_t; -#endif -typedef long __ssize_t; -typedef int __time_t; -typedef int __timer_t; -#if defined(__GNUC__) && __GNUC__ >= 3 -typedef __builtin_va_list __va_list; -#else -struct __va_list_tag; -typedef struct __va_list_tag * __va_list; -#endif - -/* Wide character support types */ -#ifndef __cplusplus -typedef int __wchar_t; -#endif -typedef int __wint_t; -typedef int __rune_t; -typedef void * __wctrans_t; -typedef void * __wctype_t; - -/* Feature test macros */ -#define __HAVE_GENERIC_SOFT_INTERRUPTS - -#endif /* _SH__TYPES_H_ */ diff --git a/libc/arch-sh/include/machine/asm.h b/libc/arch-sh/include/machine/asm.h deleted file mode 100644 index c659a9d59..000000000 --- a/libc/arch-sh/include/machine/asm.h +++ /dev/null @@ -1,217 +0,0 @@ -/* $OpenBSD: asm.h,v 1.1.1.1 2006/10/06 21:02:55 miod Exp $ */ -/* $NetBSD: asm.h,v 1.25 2006/01/20 22:02:40 christos Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)asm.h 5.5 (Berkeley) 5/7/91 - */ - -#ifndef _SH_ASM_H_ -#define _SH_ASM_H_ - -#ifdef __ELF__ -# define _C_LABEL(x) x -#else -#ifdef __STDC__ -# define _C_LABEL(x) _ ## x -#else -# define _C_LABEL(x) _/**/x -#endif -#endif -#define _ASM_LABEL(x) x - -#ifdef __STDC__ -# define __CONCAT(x,y) x ## y -# define __STRING(x) #x -#else -# define __CONCAT(x,y) x/**/y -# define __STRING(x) "x" -#endif - -/* let kernels and others override entrypoint alignment */ -#ifndef _ALIGN_TEXT -# define _ALIGN_TEXT .align 2 -#endif - -#ifdef __ELF__ -#define _ENTRY(x) \ - .text ;\ - _ALIGN_TEXT ;\ - .globl x ;\ - .type x,@function ;\ - x: -#else /* !__ELF__ */ -#define _ENTRY(x) \ - .text ;\ - _ALIGN_TEXT ;\ - .globl x ;\ - x: -#endif /* !__ELF__ */ - -#ifdef GPROF -#define _PROF_PROLOGUE \ - mov.l 1f,r1 ; \ - mova 2f,r0 ; \ - jmp @r1 ; \ - nop ; \ - .align 2 ; \ -1: .long __mcount ; \ -2: -#else /* !GPROF */ -#define _PROF_PROLOGUE -#endif /* !GPROF */ - -#define ENTRY(y) _ENTRY(_C_LABEL(y)) _PROF_PROLOGUE -#define NENTRY(y) _ENTRY(_C_LABEL(y)) -#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)) _PROF_PROLOGUE - -#define SET_ENTRY_SIZE(y) \ - .size _C_LABEL(y), . - _C_LABEL(y) - -#define SET_ASENTRY_SIZE(y) \ - .size _ASM_LABEL(y), . - _ASM_LABEL(y) - -#ifdef __ELF__ -#define ALTENTRY(name) \ - .globl _C_LABEL(name) ;\ - .type _C_LABEL(name),@function ;\ - _C_LABEL(name): -#else -#define ALTENTRY(name) \ - .globl _C_LABEL(name) ;\ - _C_LABEL(name): -#endif - - -/* - * Hide the gory details of PIC calls vs. normal calls. Use as in the - * following example: - * - * sts.l pr, @-sp - * PIC_PROLOGUE(.L_got, r0) ! saves old r12 on stack - * ... - * mov.l .L_function_1, r0 - * 1: CALL r0 ! each call site needs a label - * nop - * ... - * mov.l .L_function_2, r0 - * 2: CALL r0 - * nop - * ... - * PIC_EPILOGUE ! restores r12 from stack - * lds.l @sp+, pr ! so call in right order - * rts - * nop - * - * .align 2 - * .L_got: - * PIC_GOT_DATUM - * .L_function_1: ! if you call the same function twice - * CALL_DATUM(function, 1b) ! provide call datum for each call - * .L_function_2: - * CALL_DATUM(function, 2b) - */ - -#ifdef PIC - -#define PIC_PLT(x) x@PLT -#define PIC_GOT(x) x@GOT -#define PIC_GOTOFF(x) x@GOTOFF - -#define PIC_PROLOGUE(got) \ - mov.l r12, @-sp; \ - PIC_PROLOGUE_NOSAVE(got) - -/* - * Functions that do non local jumps don't need to preserve r12, - * so we can shave off two instructions to save/restore it. - */ -#define PIC_PROLOGUE_NOSAVE(got) \ - mov.l got, r12; \ - mova got, r0; \ - add r0, r12 - -#define PIC_EPILOGUE \ - mov.l @sp+, r12 - -#define PIC_EPILOGUE_SLOT \ - PIC_EPILOGUE - -#define PIC_GOT_DATUM \ - .long _GLOBAL_OFFSET_TABLE_ - -#define CALL bsrf -#define JUMP braf - -#define CALL_DATUM(function, lpcs) \ - .long PIC_PLT(function) - ((lpcs) + 4 - (.)) - -/* - * This will result in text relocations in the shared library, - * unless the function is local or has hidden or protected visibility. - * Does not require PIC prologue. - */ -#define CALL_DATUM_LOCAL(function, lpcs) \ - .long function - ((lpcs) + 4) - -#else /* !PIC */ - -#define PIC_PROLOGUE(label) -#define PIC_PROLOGUE_NOSAVE(label) -#define PIC_EPILOGUE -#define PIC_EPILOGUE_SLOT nop -#define PIC_GOT_DATUM - -#define CALL jsr @ -#define JUMP jmp @ - -#define CALL_DATUM(function, lpcs) \ - .long function - -#define CALL_DATUM_LOCAL(function, lpcs) \ - .long function - -#endif /* !PIC */ - - -#define ASMSTR .asciz - -#ifdef __ELF__ -#define WEAK_ALIAS(alias,sym) \ - .weak _C_LABEL(alias); \ - _C_LABEL(alias) = _C_LABEL(sym) -#endif - -#define WARN_REFERENCES(_sym,_msg) \ - .section .gnu.warning._sym; .ascii _msg; .previous - -#endif /* !_SH_ASM_H_ */ diff --git a/libc/arch-sh/include/machine/exec.h b/libc/arch-sh/include/machine/exec.h deleted file mode 100644 index 48a968037..000000000 --- a/libc/arch-sh/include/machine/exec.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $OpenBSD: exec.h,v 1.2 2006/11/10 20:34:06 drahn Exp $ */ -/* $NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $ */ - -#define __LDPGSZ 4096 - -#define NATIVE_EXEC_ELF - -#define ARCH_ELFSIZE 32 /* MD native binary size */ -#define ELF_TARG_CLASS ELFCLASS32 -#ifdef __LITTLE_ENDIAN__ -#define ELF_TARG_DATA ELFDATA2LSB -#else -#define ELF_TARG_DATA ELFDATA2MSB -#endif -#define ELF_TARG_MACH EM_SH - -#define _KERN_DO_ELF -#define _NLIST_DO_ELF - -/* - * SuperH ELF header flags. - */ -#define EF_SH_MACH_MASK 0x1f - -#define EF_SH_UNKNOWN 0x00 -#define EF_SH_SH1 0x01 -#define EF_SH_SH2 0x02 -#define EF_SH_SH3 0x03 -#define EF_SH_DSP 0x04 -#define EF_SH_SH3_DSP 0x05 -#define EF_SH_SH3E 0x08 -#define EF_SH_SH4 0x09 - -#define EF_SH_HAS_DSP(x) ((x) & EF_SH_DSP) -#define EF_SH_HAS_FP(x) ((x) & EF_SH_SH3E) diff --git a/libc/arch-sh/include/machine/ieee.h b/libc/arch-sh/include/machine/ieee.h deleted file mode 100644 index 7646f85ed..000000000 --- a/libc/arch-sh/include/machine/ieee.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $OpenBSD: ieee.h,v 1.2 2006/11/10 20:29:36 otto Exp $ */ - -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Lawrence Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ieee.h 8.1 (Berkeley) 6/11/93 - */ - -/* - * ieee.h defines the machine-dependent layout of the machine's IEEE - * floating point. It does *not* define (yet?) any of the rounding - * mode bits, exceptions, and so forth. - */ - -/* - * Define the number of bits in each fraction and exponent. - * - * k k+1 - * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented - * - * (-exp_bias+1) - * as fractions that look like 0.fffff x 2 . This means that - * - * -126 - * the number 0.10000 x 2 , for instance, is the same as the normalized - * - * -127 -128 - * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero - * - * -129 - * in the fraction; to represent 2 , we need two, and so on. This - * - * (-exp_bias-fracbits+1) - * implies that the smallest denormalized number is 2 - * - * for whichever format we are talking about: for single precision, for - * - * -126 -149 - * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and - * - * -149 == -127 - 23 + 1. - */ -#define SNG_EXPBITS 8 -#define SNG_FRACBITS 23 - -#define DBL_EXPBITS 11 -#define DBL_FRACBITS 52 - -#define EXT_EXPBITS 15 -#define EXT_FRACBITS 112 - -struct ieee_single { - u_int sng_frac:23; - u_int sng_exp:8; - u_int sng_sign:1; -}; - -struct ieee_double { - u_int dbl_fracl; - u_int dbl_frach:20; - u_int dbl_exp:11; - u_int dbl_sign:1; -}; - -struct ieee_ext { - u_int ext_sign:1; - u_int ext_exp:15; - u_int ext_frach:16; - u_int ext_frachm; - u_int ext_fraclm; - u_int ext_fracl; -}; - -/* - * Floats whose exponent is in [1..INFNAN) (of whatever type) are - * `normal'. Floats whose exponent is INFNAN are either Inf or NaN. - * Floats whose exponent is zero are either zero (iff all fraction - * bits are zero) or subnormal values. - * - * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its - * high fraction; if the bit is set, it is a `quiet NaN'. - */ -#define SNG_EXP_INFNAN 255 -#define DBL_EXP_INFNAN 2047 -#define EXT_EXP_INFNAN 32767 - -#if 0 -#define SNG_QUIETNAN (1 << 22) -#define DBL_QUIETNAN (1 << 19) -#define EXT_QUIETNAN (1 << 15) -#endif - -/* - * Exponent biases. - */ -#define SNG_EXP_BIAS 127 -#define DBL_EXP_BIAS 1023 -#define EXT_EXP_BIAS 16383 diff --git a/libc/arch-sh/include/machine/internal_types.h b/libc/arch-sh/include/machine/internal_types.h deleted file mode 100644 index ea9b7c415..000000000 --- a/libc/arch-sh/include/machine/internal_types.h +++ /dev/null @@ -1,6 +0,0 @@ -/* $OpenBSD: internal_types.h,v 1.1.1.1 2006/10/06 21:02:55 miod Exp $ */ -/* Public domain */ -#ifndef _SH_INTERNAL_TYPES_H_ -#define _SH_INTERNAL_TYPES_H_ - -#endif diff --git a/libc/arch-sh/include/machine/kernel.h b/libc/arch-sh/include/machine/kernel.h deleted file mode 100644 index 948021a0f..000000000 --- a/libc/arch-sh/include/machine/kernel.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#ifndef _ARCH_SH_KERNEL_H -#define _ARCH_SH_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef unsigned long __kernel_blkcnt_t; -typedef unsigned long __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef unsigned long __kernel_fsblkcnt_t; -typedef unsigned long __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_SH_KERNEL_H */ diff --git a/libc/arch-sh/include/machine/limits.h b/libc/arch-sh/include/machine/limits.h deleted file mode 100644 index d6021384e..000000000 --- a/libc/arch-sh/include/machine/limits.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $OpenBSD: limits.h,v 1.1.1.1 2006/10/06 21:02:55 miod Exp $ */ -/* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ - -/*- - * Copyright (C) 1995, 1996 Wolfgang Solfrank. - * Copyright (C) 1995, 1996 TooLs GmbH. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SH_LIMITS_H_ -#define _SH_LIMITS_H_ - -#include - -#define MB_LEN_MAX 1 /* no multibyte characters */ - -#ifndef SIZE_MAX -#define SIZE_MAX UINT_MAX /* max value for a size_t */ -#endif -#define SSIZE_MAX INT_MAX /* max value for a ssize_t */ - -#if __BSD_VISIBLE -#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */ - -#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */ -#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */ -#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */ -#endif /* __BSD_VISIBLE */ - -#define LONGLONG_BIT 64 -#define LONGLONG_MIN (-9223372036854775807LL-1) -#define LONGLONG_MAX 9223372036854775807LL -#define ULONGLONG_MAX 18446744073709551615ULL - -#endif /* _SH_LIMITS_H_ */ diff --git a/libc/arch-sh/include/machine/setjmp.h b/libc/arch-sh/include/machine/setjmp.h deleted file mode 100644 index 014ad3e3c..000000000 --- a/libc/arch-sh/include/machine/setjmp.h +++ /dev/null @@ -1,7 +0,0 @@ -/* $OpenBSD: setjmp.h,v 1.2 2007/03/02 06:11:54 miod Exp $ */ -/* $NetBSD: setjmp.h,v 1.3 2006/01/05 00:50:23 uwe Exp $ */ - -/* - * machine/setjmp.h: machine dependent setjmp-related information. - */ - diff --git a/libc/arch-sh/syscalls.mk b/libc/arch-sh/syscalls.mk deleted file mode 100644 index 03ce7fd1d..000000000 --- a/libc/arch-sh/syscalls.mk +++ /dev/null @@ -1,182 +0,0 @@ -# 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/__sys_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/readahead.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/sigaltstack.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/pipe2.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/ftruncate64.S -syscall_src += arch-sh/syscalls/getdents.S -syscall_src += arch-sh/syscalls/fsync.S -syscall_src += arch-sh/syscalls/fdatasync.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/__fstatfs64.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/fsetxattr.S -syscall_src += arch-sh/syscalls/fgetxattr.S -syscall_src += arch-sh/syscalls/flistxattr.S -syscall_src += arch-sh/syscalls/fremovexattr.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/setxattr.S -syscall_src += arch-sh/syscalls/lsetxattr.S -syscall_src += arch-sh/syscalls/getxattr.S -syscall_src += arch-sh/syscalls/lgetxattr.S -syscall_src += arch-sh/syscalls/listxattr.S -syscall_src += arch-sh/syscalls/llistxattr.S -syscall_src += arch-sh/syscalls/removexattr.S -syscall_src += arch-sh/syscalls/lremovexattr.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/utimensat.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/sched_setaffinity.S -syscall_src += arch-sh/syscalls/__sched_getaffinity.S -syscall_src += arch-sh/syscalls/__getcpu.S -syscall_src += arch-sh/syscalls/ioprio_set.S -syscall_src += arch-sh/syscalls/ioprio_get.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/sysinfo.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 -syscall_src += arch-sh/syscalls/eventfd.S diff --git a/libc/arch-sh/syscalls/__brk.S b/libc/arch-sh/syscalls/__brk.S deleted file mode 100644 index 465389da0..000000000 --- a/libc/arch-sh/syscalls/__brk.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__fcntl.S b/libc/arch-sh/syscalls/__fcntl.S deleted file mode 100644 index 654ee8456..000000000 --- a/libc/arch-sh/syscalls/__fcntl.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 8a2f73fc6..000000000 --- a/libc/arch-sh/syscalls/__fcntl64.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 5a00daf67..000000000 --- a/libc/arch-sh/syscalls/__fork.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__fstatfs64.S b/libc/arch-sh/syscalls/__fstatfs64.S deleted file mode 100644 index dcf1d8023..000000000 --- a/libc/arch-sh/syscalls/__fstatfs64.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type __fstatfs64, @function - .globl __fstatfs64 - .align 4 - -__fstatfs64: - - /* 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/__getcpu.S b/libc/arch-sh/syscalls/__getcpu.S deleted file mode 100644 index 125387baf..000000000 --- a/libc/arch-sh/syscalls/__getcpu.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type __getcpu, @function - .globl __getcpu - .align 4 - -__getcpu: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_getcpu_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_getcpu_end: - rts - nop - - .align 2 -0: .long __NR_getcpu -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/__getcwd.S b/libc/arch-sh/syscalls/__getcwd.S deleted file mode 100644 index 9ce1f1471..000000000 --- a/libc/arch-sh/syscalls/__getcwd.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index aa9f4f363..000000000 --- a/libc/arch-sh/syscalls/__getpriority.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index ec447cfe0..000000000 --- a/libc/arch-sh/syscalls/__ioctl.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index e43b3eda4..000000000 --- a/libc/arch-sh/syscalls/__llseek.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 6f70d467f..000000000 --- a/libc/arch-sh/syscalls/__mmap2.S +++ /dev/null @@ -1,36 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index f57b5b931..000000000 --- a/libc/arch-sh/syscalls/__open.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 08cf0969c..000000000 --- a/libc/arch-sh/syscalls/__openat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__ptrace.S b/libc/arch-sh/syscalls/__ptrace.S deleted file mode 100644 index 89bbc9803..000000000 --- a/libc/arch-sh/syscalls/__ptrace.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__reboot.S b/libc/arch-sh/syscalls/__reboot.S deleted file mode 100644 index 07cff3684..000000000 --- a/libc/arch-sh/syscalls/__reboot.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 693cb769f..000000000 --- a/libc/arch-sh/syscalls/__rt_sigaction.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7822d4f0c..000000000 --- a/libc/arch-sh/syscalls/__rt_sigprocmask.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 28041694c..000000000 --- a/libc/arch-sh/syscalls/__rt_sigtimedwait.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__sched_getaffinity.S b/libc/arch-sh/syscalls/__sched_getaffinity.S deleted file mode 100644 index 7e8be6a61..000000000 --- a/libc/arch-sh/syscalls/__sched_getaffinity.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type __sched_getaffinity, @function - .globl __sched_getaffinity - .align 4 - -__sched_getaffinity: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_sched_getaffinity_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_sched_getaffinity_end: - rts - nop - - .align 2 -0: .long __NR_sched_getaffinity -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 deleted file mode 100644 index 7d5aea611..000000000 --- a/libc/arch-sh/syscalls/__set_thread_area.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__setresuid.S b/libc/arch-sh/syscalls/__setresuid.S deleted file mode 100644 index 424100e51..000000000 --- a/libc/arch-sh/syscalls/__setresuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 69907482d..000000000 --- a/libc/arch-sh/syscalls/__setreuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__setuid.S b/libc/arch-sh/syscalls/__setuid.S deleted file mode 100644 index f563de75d..000000000 --- a/libc/arch-sh/syscalls/__setuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__sigsuspend.S b/libc/arch-sh/syscalls/__sigsuspend.S deleted file mode 100644 index 9643940c7..000000000 --- a/libc/arch-sh/syscalls/__sigsuspend.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7c705bbbc..000000000 --- a/libc/arch-sh/syscalls/__socketcall.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index ccd137b97..000000000 --- a/libc/arch-sh/syscalls/__statfs64.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__sys_clone.S b/libc/arch-sh/syscalls/__sys_clone.S deleted file mode 100644 index c2e7dd20b..000000000 --- a/libc/arch-sh/syscalls/__sys_clone.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type __sys_clone, @function - .globl __sys_clone - .align 4 - -__sys_clone: - - /* 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_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/__syslog.S b/libc/arch-sh/syscalls/__syslog.S deleted file mode 100644 index ea1ac385c..000000000 --- a/libc/arch-sh/syscalls/__syslog.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index f2e2e5c3a..000000000 --- a/libc/arch-sh/syscalls/__timer_create.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index d655d3d78..000000000 --- a/libc/arch-sh/syscalls/__timer_delete.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 64fa92f11..000000000 --- a/libc/arch-sh/syscalls/__timer_getoverrun.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index f1c63eda9..000000000 --- a/libc/arch-sh/syscalls/__timer_gettime.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index ea438a60a..000000000 --- a/libc/arch-sh/syscalls/__timer_settime.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a145e342f..000000000 --- a/libc/arch-sh/syscalls/__wait4.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/__waitid.S b/libc/arch-sh/syscalls/__waitid.S deleted file mode 100644 index 1f58de08f..000000000 --- a/libc/arch-sh/syscalls/__waitid.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/_exit.S b/libc/arch-sh/syscalls/_exit.S deleted file mode 100644 index 377a98a2a..000000000 --- a/libc/arch-sh/syscalls/_exit.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 536d000eb..000000000 --- a/libc/arch-sh/syscalls/_exit_thread.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index db2cf61d4..000000000 --- a/libc/arch-sh/syscalls/_waitpid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index dea8dfbd7..000000000 --- a/libc/arch-sh/syscalls/access.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 22d939e75..000000000 --- a/libc/arch-sh/syscalls/acct.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 77f6c546d..000000000 --- a/libc/arch-sh/syscalls/capget.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index c35b48e7d..000000000 --- a/libc/arch-sh/syscalls/capset.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 32b4a92a4..000000000 --- a/libc/arch-sh/syscalls/chdir.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index f145e4ba9..000000000 --- a/libc/arch-sh/syscalls/chmod.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 4938a2adb..000000000 --- a/libc/arch-sh/syscalls/chown.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a60b59d82..000000000 --- a/libc/arch-sh/syscalls/chroot.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0b38f2215..000000000 --- a/libc/arch-sh/syscalls/clock_getres.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 67952a699..000000000 --- a/libc/arch-sh/syscalls/clock_gettime.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7ef8d5ebf..000000000 --- a/libc/arch-sh/syscalls/clock_nanosleep.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index fd48ac612..000000000 --- a/libc/arch-sh/syscalls/clock_settime.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index b59002da1..000000000 --- a/libc/arch-sh/syscalls/close.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 73410a9a4..000000000 --- a/libc/arch-sh/syscalls/delete_module.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 1c87dd7c4..000000000 --- a/libc/arch-sh/syscalls/dup.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index da2b7bd90..000000000 --- a/libc/arch-sh/syscalls/dup2.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 64ca8a082..000000000 --- a/libc/arch-sh/syscalls/epoll_create.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0293e7326..000000000 --- a/libc/arch-sh/syscalls/epoll_ctl.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index acea8b594..000000000 --- a/libc/arch-sh/syscalls/epoll_wait.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/eventfd.S b/libc/arch-sh/syscalls/eventfd.S deleted file mode 100644 index c73bf234e..000000000 --- a/libc/arch-sh/syscalls/eventfd.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type eventfd, @function - .globl eventfd - .align 4 - -eventfd: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_eventfd2_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_eventfd2_end: - rts - nop - - .align 2 -0: .long __NR_eventfd2 -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/execve.S b/libc/arch-sh/syscalls/execve.S deleted file mode 100644 index e4c451a47..000000000 --- a/libc/arch-sh/syscalls/execve.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 974393526..000000000 --- a/libc/arch-sh/syscalls/fchdir.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 07b815696..000000000 --- a/libc/arch-sh/syscalls/fchmod.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2532d122e..000000000 --- a/libc/arch-sh/syscalls/fchmodat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a49f7d7fe..000000000 --- a/libc/arch-sh/syscalls/fchown.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 3e8263778..000000000 --- a/libc/arch-sh/syscalls/fchownat.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/fdatasync.S b/libc/arch-sh/syscalls/fdatasync.S deleted file mode 100644 index d81c33a4c..000000000 --- a/libc/arch-sh/syscalls/fdatasync.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type fdatasync, @function - .globl fdatasync - .align 4 - -fdatasync: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(1 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_fdatasync_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_fdatasync_end: - rts - nop - - .align 2 -0: .long __NR_fdatasync -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fgetxattr.S b/libc/arch-sh/syscalls/fgetxattr.S deleted file mode 100644 index 49b43deee..000000000 --- a/libc/arch-sh/syscalls/fgetxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type fgetxattr, @function - .globl fgetxattr - .align 4 - -fgetxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(4 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_fgetxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_fgetxattr_end: - rts - nop - - .align 2 -0: .long __NR_fgetxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/flistxattr.S b/libc/arch-sh/syscalls/flistxattr.S deleted file mode 100644 index 9b914241c..000000000 --- a/libc/arch-sh/syscalls/flistxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type flistxattr, @function - .globl flistxattr - .align 4 - -flistxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_flistxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_flistxattr_end: - rts - nop - - .align 2 -0: .long __NR_flistxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/flock.S b/libc/arch-sh/syscalls/flock.S deleted file mode 100644 index d4274ea92..000000000 --- a/libc/arch-sh/syscalls/flock.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/fremovexattr.S b/libc/arch-sh/syscalls/fremovexattr.S deleted file mode 100644 index b6ebc8ec7..000000000 --- a/libc/arch-sh/syscalls/fremovexattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type fremovexattr, @function - .globl fremovexattr - .align 4 - -fremovexattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_fremovexattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_fremovexattr_end: - rts - nop - - .align 2 -0: .long __NR_fremovexattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fsetxattr.S b/libc/arch-sh/syscalls/fsetxattr.S deleted file mode 100644 index 7e0681af2..000000000 --- a/libc/arch-sh/syscalls/fsetxattr.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type fsetxattr, @function - .globl fsetxattr - .align 4 - -fsetxattr: - - /* 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_fsetxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_fsetxattr_end: - rts - nop - - .align 2 -0: .long __NR_fsetxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/fstat.S b/libc/arch-sh/syscalls/fstat.S deleted file mode 100644 index bdb49526c..000000000 --- a/libc/arch-sh/syscalls/fstat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a5b18d185..000000000 --- a/libc/arch-sh/syscalls/fstatat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/fsync.S b/libc/arch-sh/syscalls/fsync.S deleted file mode 100644 index 7904f5320..000000000 --- a/libc/arch-sh/syscalls/fsync.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 8c3433346..000000000 --- a/libc/arch-sh/syscalls/ftruncate.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/ftruncate64.S b/libc/arch-sh/syscalls/ftruncate64.S deleted file mode 100644 index f4c7c1e13..000000000 --- a/libc/arch-sh/syscalls/ftruncate64.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type ftruncate64, @function - .globl ftruncate64 - .align 4 - -ftruncate64: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_ftruncate64_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_ftruncate64_end: - rts - nop - - .align 2 -0: .long __NR_ftruncate64 -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/futex.S b/libc/arch-sh/syscalls/futex.S deleted file mode 100644 index 2aabd9280..000000000 --- a/libc/arch-sh/syscalls/futex.S +++ /dev/null @@ -1,36 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 66aedf315..000000000 --- a/libc/arch-sh/syscalls/getdents.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index b3b91caa6..000000000 --- a/libc/arch-sh/syscalls/getegid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 50f3549c7..000000000 --- a/libc/arch-sh/syscalls/geteuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 54480b7ae..000000000 --- a/libc/arch-sh/syscalls/getgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 854477ebd..000000000 --- a/libc/arch-sh/syscalls/getgroups.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index aa444a6f5..000000000 --- a/libc/arch-sh/syscalls/getitimer.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0ff101db2..000000000 --- a/libc/arch-sh/syscalls/getpgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 560669419..000000000 --- a/libc/arch-sh/syscalls/getpid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index bf1237246..000000000 --- a/libc/arch-sh/syscalls/getppid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 36772119e..000000000 --- a/libc/arch-sh/syscalls/getresgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 857495e5b..000000000 --- a/libc/arch-sh/syscalls/getresuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 78135d40c..000000000 --- a/libc/arch-sh/syscalls/getrlimit.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index ccd90945b..000000000 --- a/libc/arch-sh/syscalls/getrusage.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index bc2540546..000000000 --- a/libc/arch-sh/syscalls/gettid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 50aba80f3..000000000 --- a/libc/arch-sh/syscalls/gettimeofday.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 9f9740d0b..000000000 --- a/libc/arch-sh/syscalls/getuid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/getxattr.S b/libc/arch-sh/syscalls/getxattr.S deleted file mode 100644 index 7d16c2143..000000000 --- a/libc/arch-sh/syscalls/getxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type getxattr, @function - .globl getxattr - .align 4 - -getxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(4 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_getxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_getxattr_end: - rts - nop - - .align 2 -0: .long __NR_getxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/init_module.S b/libc/arch-sh/syscalls/init_module.S deleted file mode 100644 index bd3be1473..000000000 --- a/libc/arch-sh/syscalls/init_module.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 84d373e2f..000000000 --- a/libc/arch-sh/syscalls/inotify_add_watch.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 4030f6954..000000000 --- a/libc/arch-sh/syscalls/inotify_init.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7a0344702..000000000 --- a/libc/arch-sh/syscalls/inotify_rm_watch.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/ioprio_get.S b/libc/arch-sh/syscalls/ioprio_get.S deleted file mode 100644 index 802eb91f9..000000000 --- a/libc/arch-sh/syscalls/ioprio_get.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type ioprio_get, @function - .globl ioprio_get - .align 4 - -ioprio_get: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_ioprio_get_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_ioprio_get_end: - rts - nop - - .align 2 -0: .long __NR_ioprio_get -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/ioprio_set.S b/libc/arch-sh/syscalls/ioprio_set.S deleted file mode 100644 index 209d756a3..000000000 --- a/libc/arch-sh/syscalls/ioprio_set.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type ioprio_set, @function - .globl ioprio_set - .align 4 - -ioprio_set: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_ioprio_set_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_ioprio_set_end: - rts - nop - - .align 2 -0: .long __NR_ioprio_set -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/kill.S b/libc/arch-sh/syscalls/kill.S deleted file mode 100644 index d331cde73..000000000 --- a/libc/arch-sh/syscalls/kill.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 925875f85..000000000 --- a/libc/arch-sh/syscalls/klogctl.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0d94631fb..000000000 --- a/libc/arch-sh/syscalls/lchown.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/lgetxattr.S b/libc/arch-sh/syscalls/lgetxattr.S deleted file mode 100644 index d0c5014ed..000000000 --- a/libc/arch-sh/syscalls/lgetxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type lgetxattr, @function - .globl lgetxattr - .align 4 - -lgetxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(4 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_lgetxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_lgetxattr_end: - rts - nop - - .align 2 -0: .long __NR_lgetxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/link.S b/libc/arch-sh/syscalls/link.S deleted file mode 100644 index f1716a7a2..000000000 --- a/libc/arch-sh/syscalls/link.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/listxattr.S b/libc/arch-sh/syscalls/listxattr.S deleted file mode 100644 index f2817a5bb..000000000 --- a/libc/arch-sh/syscalls/listxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type listxattr, @function - .globl listxattr - .align 4 - -listxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_listxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_listxattr_end: - rts - nop - - .align 2 -0: .long __NR_listxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/llistxattr.S b/libc/arch-sh/syscalls/llistxattr.S deleted file mode 100644 index 877c15e86..000000000 --- a/libc/arch-sh/syscalls/llistxattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type llistxattr, @function - .globl llistxattr - .align 4 - -llistxattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_llistxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_llistxattr_end: - rts - nop - - .align 2 -0: .long __NR_llistxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lremovexattr.S b/libc/arch-sh/syscalls/lremovexattr.S deleted file mode 100644 index d7aa8b970..000000000 --- a/libc/arch-sh/syscalls/lremovexattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type lremovexattr, @function - .globl lremovexattr - .align 4 - -lremovexattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_lremovexattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_lremovexattr_end: - rts - nop - - .align 2 -0: .long __NR_lremovexattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lseek.S b/libc/arch-sh/syscalls/lseek.S deleted file mode 100644 index df476ff7d..000000000 --- a/libc/arch-sh/syscalls/lseek.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/lsetxattr.S b/libc/arch-sh/syscalls/lsetxattr.S deleted file mode 100644 index 0cc4c9df8..000000000 --- a/libc/arch-sh/syscalls/lsetxattr.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type lsetxattr, @function - .globl lsetxattr - .align 4 - -lsetxattr: - - /* 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_lsetxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_lsetxattr_end: - rts - nop - - .align 2 -0: .long __NR_lsetxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/lstat.S b/libc/arch-sh/syscalls/lstat.S deleted file mode 100644 index 249c92eaa..000000000 --- a/libc/arch-sh/syscalls/lstat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index e47eb3d29..000000000 --- a/libc/arch-sh/syscalls/madvise.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 3803358a5..000000000 --- a/libc/arch-sh/syscalls/mincore.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index f40068aff..000000000 --- a/libc/arch-sh/syscalls/mkdir.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index e3506f877..000000000 --- a/libc/arch-sh/syscalls/mkdirat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a2ab1ed20..000000000 --- a/libc/arch-sh/syscalls/mknod.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2965d754b..000000000 --- a/libc/arch-sh/syscalls/mlock.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index d8c7c4b2c..000000000 --- a/libc/arch-sh/syscalls/mount.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index d8fc96d26..000000000 --- a/libc/arch-sh/syscalls/mprotect.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index d68fffb26..000000000 --- a/libc/arch-sh/syscalls/mremap.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2b84bdbed..000000000 --- a/libc/arch-sh/syscalls/msync.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index c84c130de..000000000 --- a/libc/arch-sh/syscalls/munlock.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index e338540cb..000000000 --- a/libc/arch-sh/syscalls/munmap.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 5aec58208..000000000 --- a/libc/arch-sh/syscalls/nanosleep.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 23952d566..000000000 --- a/libc/arch-sh/syscalls/pause.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/pipe2.S b/libc/arch-sh/syscalls/pipe2.S deleted file mode 100644 index f6d9964ec..000000000 --- a/libc/arch-sh/syscalls/pipe2.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type pipe2, @function - .globl pipe2 - .align 4 - -pipe2: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_pipe2_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_pipe2_end: - rts - nop - - .align 2 -0: .long __NR_pipe2 -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/poll.S b/libc/arch-sh/syscalls/poll.S deleted file mode 100644 index 7080298d4..000000000 --- a/libc/arch-sh/syscalls/poll.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 8c244d4c4..000000000 --- a/libc/arch-sh/syscalls/prctl.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/pread64.S b/libc/arch-sh/syscalls/pread64.S deleted file mode 100644 index 702a40227..000000000 --- a/libc/arch-sh/syscalls/pread64.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/pwrite64.S b/libc/arch-sh/syscalls/pwrite64.S deleted file mode 100644 index 3f6c1929e..000000000 --- a/libc/arch-sh/syscalls/pwrite64.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/read.S b/libc/arch-sh/syscalls/read.S deleted file mode 100644 index ac9faa1d6..000000000 --- a/libc/arch-sh/syscalls/read.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/readahead.S b/libc/arch-sh/syscalls/readahead.S deleted file mode 100644 index df64b5f15..000000000 --- a/libc/arch-sh/syscalls/readahead.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type readahead, @function - .globl readahead - .align 4 - -readahead: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(4 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_readahead_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_readahead_end: - rts - nop - - .align 2 -0: .long __NR_readahead -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/readlink.S b/libc/arch-sh/syscalls/readlink.S deleted file mode 100644 index e27cec7a8..000000000 --- a/libc/arch-sh/syscalls/readlink.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2a95ea12d..000000000 --- a/libc/arch-sh/syscalls/readv.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/removexattr.S b/libc/arch-sh/syscalls/removexattr.S deleted file mode 100644 index ea7174354..000000000 --- a/libc/arch-sh/syscalls/removexattr.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type removexattr, @function - .globl removexattr - .align 4 - -removexattr: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_removexattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_removexattr_end: - rts - nop - - .align 2 -0: .long __NR_removexattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/rename.S b/libc/arch-sh/syscalls/rename.S deleted file mode 100644 index 692f40e33..000000000 --- a/libc/arch-sh/syscalls/rename.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0c9360f68..000000000 --- a/libc/arch-sh/syscalls/renameat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 124892ee4..000000000 --- a/libc/arch-sh/syscalls/rmdir.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index dd642bf3b..000000000 --- a/libc/arch-sh/syscalls/sched_get_priority_max.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 069b1165d..000000000 --- a/libc/arch-sh/syscalls/sched_get_priority_min.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index c8417b20a..000000000 --- a/libc/arch-sh/syscalls/sched_getparam.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index ecd9a6afd..000000000 --- a/libc/arch-sh/syscalls/sched_getscheduler.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 64d5f699d..000000000 --- a/libc/arch-sh/syscalls/sched_rr_get_interval.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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_setaffinity.S b/libc/arch-sh/syscalls/sched_setaffinity.S deleted file mode 100644 index 9dda3b48b..000000000 --- a/libc/arch-sh/syscalls/sched_setaffinity.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type sched_setaffinity, @function - .globl sched_setaffinity - .align 4 - -sched_setaffinity: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(3 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_sched_setaffinity_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_sched_setaffinity_end: - rts - nop - - .align 2 -0: .long __NR_sched_setaffinity -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sched_setparam.S b/libc/arch-sh/syscalls/sched_setparam.S deleted file mode 100644 index f1687ee9d..000000000 --- a/libc/arch-sh/syscalls/sched_setparam.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7a6becf8d..000000000 --- a/libc/arch-sh/syscalls/sched_setscheduler.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 538f48726..000000000 --- a/libc/arch-sh/syscalls/sched_yield.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index b68f46a1c..000000000 --- a/libc/arch-sh/syscalls/select.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 015e43395..000000000 --- a/libc/arch-sh/syscalls/sendfile.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2941fc145..000000000 --- a/libc/arch-sh/syscalls/setgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 723535dd6..000000000 --- a/libc/arch-sh/syscalls/setgroups.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 84f059047..000000000 --- a/libc/arch-sh/syscalls/setitimer.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 1dd8b332e..000000000 --- a/libc/arch-sh/syscalls/setpgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 4f5091fc2..000000000 --- a/libc/arch-sh/syscalls/setpriority.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 695f23111..000000000 --- a/libc/arch-sh/syscalls/setregid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 867cbc117..000000000 --- a/libc/arch-sh/syscalls/setresgid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/setrlimit.S b/libc/arch-sh/syscalls/setrlimit.S deleted file mode 100644 index 73fe89ff2..000000000 --- a/libc/arch-sh/syscalls/setrlimit.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index fa7fc667b..000000000 --- a/libc/arch-sh/syscalls/setsid.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 0a38b60ef..000000000 --- a/libc/arch-sh/syscalls/settimeofday.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/setxattr.S b/libc/arch-sh/syscalls/setxattr.S deleted file mode 100644 index abef6b6cc..000000000 --- a/libc/arch-sh/syscalls/setxattr.S +++ /dev/null @@ -1,35 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type setxattr, @function - .globl setxattr - .align 4 - -setxattr: - - /* 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_setxattr_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_setxattr_end: - rts - nop - - .align 2 -0: .long __NR_setxattr -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sigaction.S b/libc/arch-sh/syscalls/sigaction.S deleted file mode 100644 index f1dd824d6..000000000 --- a/libc/arch-sh/syscalls/sigaction.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/sigaltstack.S b/libc/arch-sh/syscalls/sigaltstack.S deleted file mode 100644 index 8b03e2753..000000000 --- a/libc/arch-sh/syscalls/sigaltstack.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type sigaltstack, @function - .globl sigaltstack - .align 4 - -sigaltstack: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(2 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_sigaltstack_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_sigaltstack_end: - rts - nop - - .align 2 -0: .long __NR_sigaltstack -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/sigpending.S b/libc/arch-sh/syscalls/sigpending.S deleted file mode 100644 index 75e479c09..000000000 --- a/libc/arch-sh/syscalls/sigpending.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index efa40ea10..000000000 --- a/libc/arch-sh/syscalls/sigprocmask.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index aedd57dc6..000000000 --- a/libc/arch-sh/syscalls/stat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index d5ccc463c..000000000 --- a/libc/arch-sh/syscalls/symlink.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index a8c0646c7..000000000 --- a/libc/arch-sh/syscalls/sync.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/sysinfo.S b/libc/arch-sh/syscalls/sysinfo.S deleted file mode 100644 index ae042ab6b..000000000 --- a/libc/arch-sh/syscalls/sysinfo.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type sysinfo, @function - .globl sysinfo - .align 4 - -sysinfo: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(1 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_sysinfo_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_sysinfo_end: - rts - nop - - .align 2 -0: .long __NR_sysinfo -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/times.S b/libc/arch-sh/syscalls/times.S deleted file mode 100644 index 079e0981f..000000000 --- a/libc/arch-sh/syscalls/times.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index b6fe2a39c..000000000 --- a/libc/arch-sh/syscalls/tkill.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index dc08fcc17..000000000 --- a/libc/arch-sh/syscalls/truncate.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7575a1c29..000000000 --- a/libc/arch-sh/syscalls/umask.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 06a11da46..000000000 --- a/libc/arch-sh/syscalls/umount2.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 755c9de36..000000000 --- a/libc/arch-sh/syscalls/uname.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 453d58ab5..000000000 --- a/libc/arch-sh/syscalls/unlink.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 7a448a32e..000000000 --- a/libc/arch-sh/syscalls/unlinkat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/utimensat.S b/libc/arch-sh/syscalls/utimensat.S deleted file mode 100644 index 28e7ec643..000000000 --- a/libc/arch-sh/syscalls/utimensat.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .text - .type utimensat, @function - .globl utimensat - .align 4 - -utimensat: - - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(4 + 0x10) - - /* check return value */ - cmp/pz r0 - bt __NR_utimensat_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -__NR_utimensat_end: - rts - nop - - .align 2 -0: .long __NR_utimensat -1: .long __set_syscall_errno diff --git a/libc/arch-sh/syscalls/utimes.S b/libc/arch-sh/syscalls/utimes.S deleted file mode 100644 index fecaa66c2..000000000 --- a/libc/arch-sh/syscalls/utimes.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 2a2c78bcc..000000000 --- a/libc/arch-sh/syscalls/vfork.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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/write.S b/libc/arch-sh/syscalls/write.S deleted file mode 100644 index 71c6ea805..000000000 --- a/libc/arch-sh/syscalls/write.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 deleted file mode 100644 index 518ae28ba..000000000 --- a/libc/arch-sh/syscalls/writev.S +++ /dev/null @@ -1,32 +0,0 @@ -/* autogenerated by gensyscalls.py */ -#include - - .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 54f86f850..49fdf99bc 100644 --- a/libc/include/sys/linux-syscalls.h +++ b/libc/include/sys/linux-syscalls.h @@ -249,66 +249,6 @@ #define __NR_eventfd2 (__NR_SYSCALL_BASE + 328) #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_pipe2 (__NR_SYSCALL_BASE + 331) -#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_utimensat (__NR_SYSCALL_BASE + 320) -#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_getcpu (__NR_SYSCALL_BASE + 318) -#define __NR_ioprio_set (__NR_SYSCALL_BASE + 288) -#define __NR_ioprio_get (__NR_SYSCALL_BASE + 289) -#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) -#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328) -#endif - #endif #endif /* _BIONIC_LINUX_SYSCALLS_H_ */ diff --git a/libc/kernel/arch-sh/asm/adc.h b/libc/kernel/arch-sh/asm/adc.h deleted file mode 100644 index 10de9ca50..000000000 --- a/libc/kernel/arch-sh/asm/adc.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_ADC_H -#define __ASM_ADC_H -#endif diff --git a/libc/kernel/arch-sh/asm/addrspace.h b/libc/kernel/arch-sh/asm/addrspace.h deleted file mode 100644 index d7d592de2..000000000 --- a/libc/kernel/arch-sh/asm/addrspace.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ADDRSPACE_H -#define __ASM_SH_ADDRSPACE_H - -#endif diff --git a/libc/kernel/arch-sh/asm/atomic-grb.h b/libc/kernel/arch-sh/asm/atomic-grb.h deleted file mode 100644 index 6c24b1dce..000000000 --- a/libc/kernel/arch-sh/asm/atomic-grb.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ATOMIC_GRB_H -#define __ASM_SH_ATOMIC_GRB_H - -#endif diff --git a/libc/kernel/arch-sh/asm/atomic-irq.h b/libc/kernel/arch-sh/asm/atomic-irq.h deleted file mode 100644 index b8f5eaf58..000000000 --- a/libc/kernel/arch-sh/asm/atomic-irq.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ATOMIC_IRQ_H -#define __ASM_SH_ATOMIC_IRQ_H - -#endif diff --git a/libc/kernel/arch-sh/asm/atomic-llsc.h b/libc/kernel/arch-sh/asm/atomic-llsc.h deleted file mode 100644 index 22e63e720..000000000 --- a/libc/kernel/arch-sh/asm/atomic-llsc.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ATOMIC_LLSC_H -#define __ASM_SH_ATOMIC_LLSC_H - -#endif diff --git a/libc/kernel/arch-sh/asm/atomic.h b/libc/kernel/arch-sh/asm/atomic.h deleted file mode 100644 index e8f332dd4..000000000 --- a/libc/kernel/arch-sh/asm/atomic.h +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ATOMIC_H -#define __ASM_SH_ATOMIC_H - -typedef struct { volatile int counter; } atomic_t; - -#define ATOMIC_INIT(i) ( (atomic_t) { (i) } ) - -#define atomic_read(v) ((v)->counter) -#define atomic_set(v,i) ((v)->counter = (i)) - -#include -#include - -#include - -#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) - -#define atomic_dec_return(v) atomic_sub_return(1,(v)) -#define atomic_inc_return(v) atomic_add_return(1,(v)) - -#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) - -#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) -#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) - -#define atomic_inc(v) atomic_add(1,(v)) -#define atomic_dec(v) atomic_sub(1,(v)) - -#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) -#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) -#define smp_mb__before_atomic_dec() barrier() -#define smp_mb__after_atomic_dec() barrier() -#define smp_mb__before_atomic_inc() barrier() -#define smp_mb__after_atomic_inc() barrier() -#include -#endif diff --git a/libc/kernel/arch-sh/asm/auxvec.h b/libc/kernel/arch-sh/asm/auxvec.h deleted file mode 100644 index 98317bc74..000000000 --- a/libc/kernel/arch-sh/asm/auxvec.h +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_AUXVEC_H -#define __ASM_SH_AUXVEC_H - -#define AT_FPUCW 18 - -#define AT_SYSINFO_EHDR 33 - -#define AT_L1I_CACHESHAPE 34 -#define AT_L1D_CACHESHAPE 35 -#define AT_L2_CACHESHAPE 36 - -#endif diff --git a/libc/kernel/arch-sh/asm/bitops-grb.h b/libc/kernel/arch-sh/asm/bitops-grb.h deleted file mode 100644 index d881058cd..000000000 --- a/libc/kernel/arch-sh/asm/bitops-grb.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BITOPS_GRB_H -#define __ASM_SH_BITOPS_GRB_H - -#endif diff --git a/libc/kernel/arch-sh/asm/bitops-irq.h b/libc/kernel/arch-sh/asm/bitops-irq.h deleted file mode 100644 index a20d3ecb6..000000000 --- a/libc/kernel/arch-sh/asm/bitops-irq.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BITOPS_IRQ_H -#define __ASM_SH_BITOPS_IRQ_H - -#endif diff --git a/libc/kernel/arch-sh/asm/bitops.h b/libc/kernel/arch-sh/asm/bitops.h deleted file mode 100644 index 4c1f6d632..000000000 --- a/libc/kernel/arch-sh/asm/bitops.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BITOPS_H -#define __ASM_SH_BITOPS_H - -#endif diff --git a/libc/kernel/arch-sh/asm/bug.h b/libc/kernel/arch-sh/asm/bug.h deleted file mode 100644 index dd02cb942..000000000 --- a/libc/kernel/arch-sh/asm/bug.h +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BUG_H -#define __ASM_SH_BUG_H - -#define TRAPA_BUG_OPCODE 0xc33e - -#define HAVE_ARCH_BUG -#define HAVE_ARCH_WARN_ON - -#define _EMIT_BUG_ENTRY "\t.pushsection __bug_table,\"a\"\n" "2:\t.long 1b\n" "\t.short %O3\n" "\t.org 2b+%O4\n" "\t.popsection\n" - -#define BUG() do { __asm__ __volatile__ ( "1:\t.short %O0\n" _EMIT_BUG_ENTRY : : "n" (TRAPA_BUG_OPCODE), "i" (__FILE__), "i" (__LINE__), "i" (0), "i" (sizeof(struct bug_entry))); } while (0) - -#define __WARN() do { __asm__ __volatile__ ( "1:\t.short %O0\n" _EMIT_BUG_ENTRY : : "n" (TRAPA_BUG_OPCODE), "i" (__FILE__), "i" (__LINE__), "i" (BUGFLAG_WARNING), "i" (sizeof(struct bug_entry))); } while (0) - -#define WARN_ON(x) ({ int __ret_warn_on = !!(x); if (__builtin_constant_p(__ret_warn_on)) { if (__ret_warn_on) __WARN(); } else { if (unlikely(__ret_warn_on)) __WARN(); } unlikely(__ret_warn_on); }) - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/bugs.h b/libc/kernel/arch-sh/asm/bugs.h deleted file mode 100644 index 3b27870f9..000000000 --- a/libc/kernel/arch-sh/asm/bugs.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BUGS_H -#define __ASM_SH_BUGS_H - -#include - -#ifndef __LITTLE_ENDIAN__ -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/byteorder.h b/libc/kernel/arch-sh/asm/byteorder.h deleted file mode 100644 index 04ef22434..000000000 --- a/libc/kernel/arch-sh/asm/byteorder.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BYTEORDER_H -#define __ASM_SH_BYTEORDER_H - -#include -#include - -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) -{ - __asm__( -#ifdef __SH5__ - "byterev %0, %0\n\t" - "shari %0, 32, %0" -#else - "swap.b %0, %0\n\t" - "swap.w %0, %0\n\t" - "swap.b %0, %0" -#endif - : "=r" (x) - : "0" (x)); - - return x; -} - -static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) -{ - __asm__( -#ifdef __SH5__ - "byterev %0, %0\n\t" - "shari %0, 32, %0" -#else - "swap.b %0, %0" -#endif - : "=r" (x) - : "0" (x)); - - return x; -} - -static inline __u64 ___arch__swab64(__u64 val) -{ - union { - struct { __u32 a,b; } s; - __u64 u; - } v, w; - v.u = val; - w.s.b = ___arch__swab32(v.s.a); - w.s.a = ___arch__swab32(v.s.b); - return w.u; -} - -#define __arch__swab64(x) ___arch__swab64(x) -#define __arch__swab32(x) ___arch__swab32(x) -#define __arch__swab16(x) ___arch__swab16(x) - -#ifndef __STRICT_ANSI__ -#define __BYTEORDER_HAS_U64__ -#define __SWAB_64_THRU_32__ -#endif - -#ifdef __LITTLE_ENDIAN__ -#include -#else -#include -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/cache.h b/libc/kernel/arch-sh/asm/cache.h deleted file mode 100644 index 0bc339ea7..000000000 --- a/libc/kernel/arch-sh/asm/cache.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CACHE_H -#define __ASM_SH_CACHE_H -#endif diff --git a/libc/kernel/arch-sh/asm/cacheflush.h b/libc/kernel/arch-sh/asm/cacheflush.h deleted file mode 100644 index 5c95ad152..000000000 --- a/libc/kernel/arch-sh/asm/cacheflush.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CACHEFLUSH_H -#define __ASM_SH_CACHEFLUSH_H - -#endif diff --git a/libc/kernel/arch-sh/asm/checksum.h b/libc/kernel/arch-sh/asm/checksum.h deleted file mode 100644 index c9193c596..000000000 --- a/libc/kernel/arch-sh/asm/checksum.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include "checksum_32.h" diff --git a/libc/kernel/arch-sh/asm/checksum_32.h b/libc/kernel/arch-sh/asm/checksum_32.h deleted file mode 100644 index 7a84e1970..000000000 --- a/libc/kernel/arch-sh/asm/checksum_32.h +++ /dev/null @@ -1,22 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CHECKSUM_H -#define __ASM_SH_CHECKSUM_H - -#include - -#ifdef __LITTLE_ENDIAN__ -#else -#endif -#define _HAVE_ARCH_IPV6_CSUM -#define HAVE_CSUM_COPY_USER -#endif diff --git a/libc/kernel/arch-sh/asm/checksum_64.h b/libc/kernel/arch-sh/asm/checksum_64.h deleted file mode 100644 index 203e11d01..000000000 --- a/libc/kernel/arch-sh/asm/checksum_64.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CHECKSUM_64_H -#define __ASM_SH_CHECKSUM_64_H - -#endif diff --git a/libc/kernel/arch-sh/asm/clock.h b/libc/kernel/arch-sh/asm/clock.h deleted file mode 100644 index 9f127c3d3..000000000 --- a/libc/kernel/arch-sh/asm/clock.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CLOCK_H -#define __ASM_SH_CLOCK_H - -#include -#include -#include -#include -#include - -struct clk; - -struct clk_ops { - void (*init)(struct clk *clk); - void (*enable)(struct clk *clk); - void (*disable)(struct clk *clk); - void (*recalc)(struct clk *clk); - int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); - long (*round_rate)(struct clk *clk, unsigned long rate); -}; - -struct clk { - struct list_head node; - const char *name; - int id; - struct module *owner; - - struct clk *parent; - struct clk_ops *ops; - - struct kref kref; - - unsigned long rate; - unsigned long flags; - unsigned long arch_flags; -}; - -#define CLK_ALWAYS_ENABLED (1 << 0) -#define CLK_RATE_PROPAGATES (1 << 1) - -enum clk_sh_algo_id { - NO_CHANGE = 0, - - IUS_N1_N1, - IUS_322, - IUS_522, - IUS_N11, - - SB_N1, - - SB3_N1, - SB3_32, - SB3_43, - SB3_54, - - BP_N1, - - IP_N1, -}; -#endif diff --git a/libc/kernel/arch-sh/asm/cmpxchg-grb.h b/libc/kernel/arch-sh/asm/cmpxchg-grb.h deleted file mode 100644 index 7d3559557..000000000 --- a/libc/kernel/arch-sh/asm/cmpxchg-grb.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CMPXCHG_GRB_H -#define __ASM_SH_CMPXCHG_GRB_H - -#endif diff --git a/libc/kernel/arch-sh/asm/cmpxchg-irq.h b/libc/kernel/arch-sh/asm/cmpxchg-irq.h deleted file mode 100644 index 5558b1fdd..000000000 --- a/libc/kernel/arch-sh/asm/cmpxchg-irq.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CMPXCHG_IRQ_H -#define __ASM_SH_CMPXCHG_IRQ_H - -#endif diff --git a/libc/kernel/arch-sh/asm/cpu-features.h b/libc/kernel/arch-sh/asm/cpu-features.h deleted file mode 100644 index 326d2d9ff..000000000 --- a/libc/kernel/arch-sh/asm/cpu-features.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CPU_FEATURES_H -#define __ASM_SH_CPU_FEATURES_H - -#define CPU_HAS_FPU 0x0001 -#define CPU_HAS_P2_FLUSH_BUG 0x0002 -#define CPU_HAS_MMU_PAGE_ASSOC 0x0004 -#define CPU_HAS_DSP 0x0008 -#define CPU_HAS_PERF_COUNTER 0x0010 -#define CPU_HAS_PTEA 0x0020 -#define CPU_HAS_LLSC 0x0040 -#define CPU_HAS_L2_CACHE 0x0080 -#define CPU_HAS_OP32 0x0100 - -#endif diff --git a/libc/kernel/arch-sh/asm/cputime.h b/libc/kernel/arch-sh/asm/cputime.h deleted file mode 100644 index 8a85d3035..000000000 --- a/libc/kernel/arch-sh/asm/cputime.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __SH_CPUTIME_H -#define __SH_CPUTIME_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/current.h b/libc/kernel/arch-sh/asm/current.h deleted file mode 100644 index e2ce1224e..000000000 --- a/libc/kernel/arch-sh/asm/current.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_CURRENT_H -#define __ASM_SH_CURRENT_H - -#include - -struct task_struct; - -#define current get_current() -#endif diff --git a/libc/kernel/arch-sh/asm/delay.h b/libc/kernel/arch-sh/asm/delay.h deleted file mode 100644 index 15a1aa4e0..000000000 --- a/libc/kernel/arch-sh/asm/delay.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_DELAY_H -#define __ASM_SH_DELAY_H - -#define udelay(n) (__builtin_constant_p(n) ? ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : __udelay(n)) - -#define ndelay(n) (__builtin_constant_p(n) ? ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : __ndelay(n)) - -#endif diff --git a/libc/kernel/arch-sh/asm/device.h b/libc/kernel/arch-sh/asm/device.h deleted file mode 100644 index a46d06fb4..000000000 --- a/libc/kernel/arch-sh/asm/device.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include - -struct platform_device; - diff --git a/libc/kernel/arch-sh/asm/div64.h b/libc/kernel/arch-sh/asm/div64.h deleted file mode 100644 index 53a10fc9d..000000000 --- a/libc/kernel/arch-sh/asm/div64.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/dma-mapping.h b/libc/kernel/arch-sh/asm/dma-mapping.h deleted file mode 100644 index 3bbdf185b..000000000 --- a/libc/kernel/arch-sh/asm/dma-mapping.h +++ /dev/null @@ -1,31 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_DMA_MAPPING_H -#define __ASM_SH_DMA_MAPPING_H - -#include -#include -#include -#include -#include - -#define dma_supported(dev, mask) (1) - -#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) -#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) -#define dma_is_consistent(d, h) (1) - -#define dma_unmap_single(dev, addr, size, dir) do { } while (0) -#define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) -#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY - -#endif diff --git a/libc/kernel/arch-sh/asm/dma.h b/libc/kernel/arch-sh/asm/dma.h deleted file mode 100644 index 40fe1d62c..000000000 --- a/libc/kernel/arch-sh/asm/dma.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_DMA_H -#define __ASM_SH_DMA_H -#endif diff --git a/libc/kernel/arch-sh/asm/dmabrg.h b/libc/kernel/arch-sh/asm/dmabrg.h deleted file mode 100644 index eadfcac13..000000000 --- a/libc/kernel/arch-sh/asm/dmabrg.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _DMABRG_H_ -#define _DMABRG_H_ - -#define DMABRGIRQ_USBDMA 0 -#define DMABRGIRQ_USBDMAERR 1 -#define DMABRGIRQ_A0TXF 2 -#define DMABRGIRQ_A0TXH 3 -#define DMABRGIRQ_A0RXF 4 -#define DMABRGIRQ_A0RXH 5 -#define DMABRGIRQ_A1TXF 6 -#define DMABRGIRQ_A1TXH 7 -#define DMABRGIRQ_A1RXF 8 -#define DMABRGIRQ_A1RXH 9 - -#endif diff --git a/libc/kernel/arch-sh/asm/edosk7705.h b/libc/kernel/arch-sh/asm/edosk7705.h deleted file mode 100644 index 146675daa..000000000 --- a/libc/kernel/arch-sh/asm/edosk7705.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_EDOSK7705_IO_H -#define __ASM_SH_EDOSK7705_IO_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/elf.h b/libc/kernel/arch-sh/asm/elf.h deleted file mode 100644 index 4f283c296..000000000 --- a/libc/kernel/arch-sh/asm/elf.h +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ELF_H -#define __ASM_SH_ELF_H - -#include -#include -#include -#include - -#define EF_SH_PIC 0x100 -#define EF_SH_FDPIC 0x8000 - -#define R_SH_NONE 0 -#define R_SH_DIR32 1 -#define R_SH_REL32 2 -#define R_SH_DIR8WPN 3 -#define R_SH_IND12W 4 -#define R_SH_DIR8WPL 5 -#define R_SH_DIR8WPZ 6 -#define R_SH_DIR8BP 7 -#define R_SH_DIR8W 8 -#define R_SH_DIR8L 9 -#define R_SH_SWITCH16 25 -#define R_SH_SWITCH32 26 -#define R_SH_USES 27 -#define R_SH_COUNT 28 -#define R_SH_ALIGN 29 -#define R_SH_CODE 30 -#define R_SH_DATA 31 -#define R_SH_LABEL 32 -#define R_SH_SWITCH8 33 -#define R_SH_GNU_VTINHERIT 34 -#define R_SH_GNU_VTENTRY 35 -#define R_SH_TLS_GD_32 144 -#define R_SH_TLS_LD_32 145 -#define R_SH_TLS_LDO_32 146 -#define R_SH_TLS_IE_32 147 -#define R_SH_TLS_LE_32 148 -#define R_SH_TLS_DTPMOD32 149 -#define R_SH_TLS_DTPOFF32 150 -#define R_SH_TLS_TPOFF32 151 -#define R_SH_GOT32 160 -#define R_SH_PLT32 161 -#define R_SH_COPY 162 -#define R_SH_GLOB_DAT 163 -#define R_SH_JMP_SLOT 164 -#define R_SH_RELATIVE 165 -#define R_SH_GOTOFF 166 -#define R_SH_GOTPC 167 - -#define R_SH_GOT20 70 -#define R_SH_GOTOFF20 71 -#define R_SH_GOTFUNCDESC 72 -#define R_SH_GOTFUNCDESC20 73 -#define R_SH_GOTOFFFUNCDESC 74 -#define R_SH_GOTOFFFUNCDESC20 75 -#define R_SH_FUNCDESC 76 -#define R_SH_FUNCDESC_VALUE 77 - -#define R_SH_IMM_LOW16 246 -#define R_SH_IMM_LOW16_PCREL 247 -#define R_SH_IMM_MEDLOW16 248 -#define R_SH_IMM_MEDLOW16_PCREL 249 - -#define R_SH_NUM 256 - -typedef unsigned long elf_greg_t; - -#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; - -typedef struct user_fpu_struct elf_fpregset_t; - -#define ELF_CLASS ELFCLASS32 -#ifdef __LITTLE_ENDIAN__ -#define ELF_DATA ELFDATA2LSB -#else -#define ELF_DATA ELFDATA2MSB -#endif -#define ELF_ARCH EM_SH - -#endif diff --git a/libc/kernel/arch-sh/asm/emergency-restart.h b/libc/kernel/arch-sh/asm/emergency-restart.h deleted file mode 100644 index 1c1964f87..000000000 --- a/libc/kernel/arch-sh/asm/emergency-restart.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_EMERGENCY_RESTART_H -#define _ASM_EMERGENCY_RESTART_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/errno.h b/libc/kernel/arch-sh/asm/errno.h deleted file mode 100644 index f35743b69..000000000 --- a/libc/kernel/arch-sh/asm/errno.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ERRNO_H -#define __ASM_SH_ERRNO_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/fb.h b/libc/kernel/arch-sh/asm/fb.h deleted file mode 100644 index f25951ed1..000000000 --- a/libc/kernel/arch-sh/asm/fb.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ - -#include -#include -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/fcntl.h b/libc/kernel/arch-sh/asm/fcntl.h deleted file mode 100644 index 00630ade4..000000000 --- a/libc/kernel/arch-sh/asm/fcntl.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/fixmap.h b/libc/kernel/arch-sh/asm/fixmap.h deleted file mode 100644 index 3f7b94813..000000000 --- a/libc/kernel/arch-sh/asm/fixmap.h +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_FIXMAP_H -#define _ASM_FIXMAP_H - -#include -#include - -enum fixed_addresses { -#define FIX_N_COLOURS 16 - FIX_CMAP_BEGIN, - FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, - FIX_UNCACHED, - __end_of_fixed_addresses -}; - -#define set_fixmap(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL) - -#define set_fixmap_nocache(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) - -#define FIXADDR_TOP (P4SEG - PAGE_SIZE) -#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) -#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) - -#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) -#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) - -#endif diff --git a/libc/kernel/arch-sh/asm/flat.h b/libc/kernel/arch-sh/asm/flat.h deleted file mode 100644 index 6686199cb..000000000 --- a/libc/kernel/arch-sh/asm/flat.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_FLAT_H -#define __ASM_SH_FLAT_H - -#define flat_stack_align(sp) -#define flat_argvp_envp_on_stack() 0 -#define flat_old_ram_flag(flags) (flags) -#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) -#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) -#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) -#define flat_get_relocate_addr(rel) (rel) -#define flat_set_persistent(relval, p) ({ (void)p; 0; }) - -#define FLAT_PLAT_INIT(_r) do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; _r->sr = SR_FD; } while (0) - -#endif diff --git a/libc/kernel/arch-sh/asm/fpu.h b/libc/kernel/arch-sh/asm/fpu.h deleted file mode 100644 index 9671d7593..000000000 --- a/libc/kernel/arch-sh/asm/fpu.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_FPU_H -#define __ASM_SH_FPU_H - -#ifndef __ASSEMBLY__ -#include -#include - -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/freq.h b/libc/kernel/arch-sh/asm/freq.h deleted file mode 100644 index ad93c1906..000000000 --- a/libc/kernel/arch-sh/asm/freq.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_FREQ_H -#define __ASM_SH_FREQ_H -#endif diff --git a/libc/kernel/arch-sh/asm/futex-irq.h b/libc/kernel/arch-sh/asm/futex-irq.h deleted file mode 100644 index 20ca26119..000000000 --- a/libc/kernel/arch-sh/asm/futex-irq.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_FUTEX_IRQ_H -#define __ASM_SH_FUTEX_IRQ_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/futex.h b/libc/kernel/arch-sh/asm/futex.h deleted file mode 100644 index cad68a91e..000000000 --- a/libc/kernel/arch-sh/asm/futex.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_FUTEX_H -#define __ASM_SH_FUTEX_H - -#endif diff --git a/libc/kernel/arch-sh/asm/gpio.h b/libc/kernel/arch-sh/asm/gpio.h deleted file mode 100644 index 8e26b012b..000000000 --- a/libc/kernel/arch-sh/asm/gpio.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_GPIO_H -#define __ASM_SH_GPIO_H - -#endif diff --git a/libc/kernel/arch-sh/asm/hardirq.h b/libc/kernel/arch-sh/asm/hardirq.h deleted file mode 100644 index 6d80d022f..000000000 --- a/libc/kernel/arch-sh/asm/hardirq.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_HARDIRQ_H -#define __ASM_SH_HARDIRQ_H - -#include -#include - -typedef struct { - unsigned int __softirq_pending; -} ____cacheline_aligned irq_cpustat_t; - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/hd64461.h b/libc/kernel/arch-sh/asm/hd64461.h deleted file mode 100644 index af1659670..000000000 --- a/libc/kernel/arch-sh/asm/hd64461.h +++ /dev/null @@ -1,216 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_HD64461 -#define __ASM_SH_HD64461 - -#define HD64461_PCC_WINDOW 0x01000000 - -#define HD64461_PCC0_BASE (CONFIG_HD64461_IOBASE + 0x8000000) -#define HD64461_PCC0_ATTR (HD64461_PCC0_BASE) -#define HD64461_PCC0_COMM (HD64461_PCC0_BASE+HD64461_PCC_WINDOW) -#define HD64461_PCC0_IO (HD64461_PCC0_BASE+2*HD64461_PCC_WINDOW) - -#define HD64461_PCC1_BASE (CONFIG_HD64461_IOBASE + 0x4000000) -#define HD64461_PCC1_ATTR (HD64461_PCC1_BASE) -#define HD64461_PCC1_COMM (HD64461_PCC1_BASE+HD64461_PCC_WINDOW) - -#define HD64461_STBCR CONFIG_HD64461_IOBASE -#define HD64461_STBCR_CKIO_STBY 0x2000 -#define HD64461_STBCR_SAFECKE_IST 0x1000 -#define HD64461_STBCR_SLCKE_IST 0x0800 -#define HD64461_STBCR_SAFECKE_OST 0x0400 -#define HD64461_STBCR_SLCKE_OST 0x0200 -#define HD64461_STBCR_SMIAST 0x0100 -#define HD64461_STBCR_SLCDST 0x0080 -#define HD64461_STBCR_SPC0ST 0x0040 -#define HD64461_STBCR_SPC1ST 0x0020 -#define HD64461_STBCR_SAFEST 0x0010 -#define HD64461_STBCR_STM0ST 0x0008 -#define HD64461_STBCR_STM1ST 0x0004 -#define HD64461_STBCR_SIRST 0x0002 -#define HD64461_STBCR_SURTST 0x0001 - -#define HD64461_SYSCR (CONFIG_HD64461_IOBASE + 0x02) - -#define HD64461_SCPUCR (CONFIG_HD64461_IOBASE + 0x04) - -#define HD64461_LCDCBAR (CONFIG_HD64461_IOBASE + 0x1000) - -#define HD64461_LCDCLOR (CONFIG_HD64461_IOBASE + 0x1002) - -#define HD64461_LCDCCR (CONFIG_HD64461_IOBASE + 0x1004) - -#define HD64461_LCDCCR_STBACK 0x0400 -#define HD64461_LCDCCR_STREQ 0x0100 -#define HD64461_LCDCCR_MOFF 0x0080 -#define HD64461_LCDCCR_REFSEL 0x0040 -#define HD64461_LCDCCR_EPON 0x0020 -#define HD64461_LCDCCR_SPON 0x0010 - -#define HD64461_LDR1 (CONFIG_HD64461_IOBASE + 0x1010) -#define HD64461_LDR1_DON 0x01 -#define HD64461_LDR1_DINV 0x80 - -#define HD64461_LDR2 (CONFIG_HD64461_IOBASE + 0x1012) -#define HD64461_LDHNCR (CONFIG_HD64461_IOBASE + 0x1014) -#define HD64461_LDHNSR (CONFIG_HD64461_IOBASE + 0x1016) -#define HD64461_LDVNTR (CONFIG_HD64461_IOBASE + 0x1018) -#define HD64461_LDVNDR (CONFIG_HD64461_IOBASE + 0x101a) -#define HD64461_LDVSPR (CONFIG_HD64461_IOBASE + 0x101c) - -#define HD64461_LDR3 (CONFIG_HD64461_IOBASE + 0x101e) - -#define HD64461_CPTWAR (CONFIG_HD64461_IOBASE + 0x1030) -#define HD64461_CPTWDR (CONFIG_HD64461_IOBASE + 0x1032) -#define HD64461_CPTRAR (CONFIG_HD64461_IOBASE + 0x1034) -#define HD64461_CPTRDR (CONFIG_HD64461_IOBASE + 0x1036) - -#define HD64461_GRDOR (CONFIG_HD64461_IOBASE + 0x1040) -#define HD64461_GRSCR (CONFIG_HD64461_IOBASE + 0x1042) -#define HD64461_GRCFGR (CONFIG_HD64461_IOBASE + 0x1044) - -#define HD64461_GRCFGR_ACCSTATUS 0x10 -#define HD64461_GRCFGR_ACCRESET 0x08 -#define HD64461_GRCFGR_ACCSTART_BITBLT 0x06 -#define HD64461_GRCFGR_ACCSTART_LINE 0x04 -#define HD64461_GRCFGR_COLORDEPTH16 0x01 -#define HD64461_GRCFGR_COLORDEPTH8 0x01 - -#define HD64461_LNSARH (CONFIG_HD64461_IOBASE + 0x1046) -#define HD64461_LNSARL (CONFIG_HD64461_IOBASE + 0x1048) -#define HD64461_LNAXLR (CONFIG_HD64461_IOBASE + 0x104a) -#define HD64461_LNDGR (CONFIG_HD64461_IOBASE + 0x104c) -#define HD64461_LNAXR (CONFIG_HD64461_IOBASE + 0x104e) -#define HD64461_LNERTR (CONFIG_HD64461_IOBASE + 0x1050) -#define HD64461_LNMDR (CONFIG_HD64461_IOBASE + 0x1052) - -#define HD64461_BBTSSARH (CONFIG_HD64461_IOBASE + 0x1054) -#define HD64461_BBTSSARL (CONFIG_HD64461_IOBASE + 0x1056) -#define HD64461_BBTDSARH (CONFIG_HD64461_IOBASE + 0x1058) -#define HD64461_BBTDSARL (CONFIG_HD64461_IOBASE + 0x105a) -#define HD64461_BBTDWR (CONFIG_HD64461_IOBASE + 0x105c) -#define HD64461_BBTDHR (CONFIG_HD64461_IOBASE + 0x105e) -#define HD64461_BBTPARH (CONFIG_HD64461_IOBASE + 0x1060) -#define HD64461_BBTPARL (CONFIG_HD64461_IOBASE + 0x1062) -#define HD64461_BBTMARH (CONFIG_HD64461_IOBASE + 0x1064) -#define HD64461_BBTMARL (CONFIG_HD64461_IOBASE + 0x1066) -#define HD64461_BBTROPR (CONFIG_HD64461_IOBASE + 0x1068) -#define HD64461_BBTMDR (CONFIG_HD64461_IOBASE + 0x106a) - -#define HD64461_PCC0ISR (CONFIG_HD64461_IOBASE + 0x2000) -#define HD64461_PCC0GCR (CONFIG_HD64461_IOBASE + 0x2002) -#define HD64461_PCC0CSCR (CONFIG_HD64461_IOBASE + 0x2004) -#define HD64461_PCC0CSCIER (CONFIG_HD64461_IOBASE + 0x2006) -#define HD64461_PCC0SCR (CONFIG_HD64461_IOBASE + 0x2008) - -#define HD64461_PCC1ISR (CONFIG_HD64461_IOBASE + 0x2010) -#define HD64461_PCC1GCR (CONFIG_HD64461_IOBASE + 0x2012) -#define HD64461_PCC1CSCR (CONFIG_HD64461_IOBASE + 0x2014) -#define HD64461_PCC1CSCIER (CONFIG_HD64461_IOBASE + 0x2016) -#define HD64461_PCC1SCR (CONFIG_HD64461_IOBASE + 0x2018) - -#define HD64461_PCCISR_READY 0x80 -#define HD64461_PCCISR_MWP 0x40 -#define HD64461_PCCISR_VS2 0x20 -#define HD64461_PCCISR_VS1 0x10 -#define HD64461_PCCISR_CD2 0x08 -#define HD64461_PCCISR_CD1 0x04 -#define HD64461_PCCISR_BVD2 0x02 -#define HD64461_PCCISR_BVD1 0x01 - -#define HD64461_PCCISR_PCD_MASK 0x0c -#define HD64461_PCCISR_BVD_MASK 0x03 -#define HD64461_PCCISR_BVD_BATGOOD 0x03 -#define HD64461_PCCISR_BVD_BATWARN 0x01 -#define HD64461_PCCISR_BVD_BATDEAD1 0x02 -#define HD64461_PCCISR_BVD_BATDEAD2 0x00 - -#define HD64461_PCCGCR_DRVE 0x80 -#define HD64461_PCCGCR_PCCR 0x40 -#define HD64461_PCCGCR_PCCT 0x20 -#define HD64461_PCCGCR_VCC0 0x10 -#define HD64461_PCCGCR_PMMOD 0x08 -#define HD64461_PCCGCR_PA25 0x04 -#define HD64461_PCCGCR_PA24 0x02 -#define HD64461_PCCGCR_REG 0x01 - -#define HD64461_PCCCSCR_SCDI 0x80 -#define HD64461_PCCCSCR_SRV1 0x40 -#define HD64461_PCCCSCR_IREQ 0x20 -#define HD64461_PCCCSCR_SC 0x10 -#define HD64461_PCCCSCR_CDC 0x08 -#define HD64461_PCCCSCR_RC 0x04 -#define HD64461_PCCCSCR_BW 0x02 -#define HD64461_PCCCSCR_BD 0x01 - -#define HD64461_PCCCSCIER_CRE 0x80 -#define HD64461_PCCCSCIER_IREQE_MASK 0x60 -#define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 -#define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 -#define HD64461_PCCCSCIER_IREQE_FALLING 0x40 -#define HD64461_PCCCSCIER_IREQE_RISING 0x60 - -#define HD64461_PCCCSCIER_SCE 0x10 -#define HD64461_PCCCSCIER_CDE 0x08 -#define HD64461_PCCCSCIER_RE 0x04 -#define HD64461_PCCCSCIER_BWE 0x02 -#define HD64461_PCCCSCIER_BDE 0x01 - -#define HD64461_PCCSCR_VCC1 0x02 -#define HD64461_PCCSCR_SWP 0x01 - -#define HD64461_P0OCR (CONFIG_HD64461_IOBASE + 0x202a) - -#define HD64461_P1OCR (CONFIG_HD64461_IOBASE + 0x202c) - -#define HD64461_PGCR (CONFIG_HD64461_IOBASE + 0x202e) - -#define HD64461_GPACR (CONFIG_HD64461_IOBASE + 0x4000) -#define HD64461_GPBCR (CONFIG_HD64461_IOBASE + 0x4002) -#define HD64461_GPCCR (CONFIG_HD64461_IOBASE + 0x4004) -#define HD64461_GPDCR (CONFIG_HD64461_IOBASE + 0x4006) - -#define HD64461_GPADR (CONFIG_HD64461_IOBASE + 0x4010) -#define HD64461_GPBDR (CONFIG_HD64461_IOBASE + 0x4012) -#define HD64461_GPCDR (CONFIG_HD64461_IOBASE + 0x4014) -#define HD64461_GPDDR (CONFIG_HD64461_IOBASE + 0x4016) - -#define HD64461_GPAICR (CONFIG_HD64461_IOBASE + 0x4020) -#define HD64461_GPBICR (CONFIG_HD64461_IOBASE + 0x4022) -#define HD64461_GPCICR (CONFIG_HD64461_IOBASE + 0x4024) -#define HD64461_GPDICR (CONFIG_HD64461_IOBASE + 0x4026) - -#define HD64461_GPAISR (CONFIG_HD64461_IOBASE + 0x4040) -#define HD64461_GPBISR (CONFIG_HD64461_IOBASE + 0x4042) -#define HD64461_GPCISR (CONFIG_HD64461_IOBASE + 0x4044) -#define HD64461_GPDISR (CONFIG_HD64461_IOBASE + 0x4046) - -#define HD64461_NIRR (CONFIG_HD64461_IOBASE + 0x5000) -#define HD64461_NIMR (CONFIG_HD64461_IOBASE + 0x5002) - -#define HD64461_IRQBASE OFFCHIP_IRQ_BASE -#define OFFCHIP_IRQ_BASE 64 -#define HD64461_IRQ_NUM 16 - -#define HD64461_IRQ_UART (HD64461_IRQBASE+5) -#define HD64461_IRQ_IRDA (HD64461_IRQBASE+6) -#define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9) -#define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10) -#define HD64461_IRQ_GPIO (HD64461_IRQBASE+11) -#define HD64461_IRQ_AFE (HD64461_IRQBASE+12) -#define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13) -#define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14) - -#define __IO_PREFIX hd64461 -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/hd64465/gpio.h b/libc/kernel/arch-sh/asm/hd64465/gpio.h deleted file mode 100644 index 159c7c4af..000000000 --- a/libc/kernel/arch-sh/asm/hd64465/gpio.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_HD64465_GPIO_ -#define _ASM_SH_HD64465_GPIO_ 1 - -#include - -#define HD64465_GPIO_PORTPIN(port,pin) (((port)-'A')<<3|(pin)) - -#define HD64465_GPIO_FUNCTION2 0 -#define HD64465_GPIO_OUT 1 -#define HD64465_GPIO_IN_PULLUP 2 -#define HD64465_GPIO_IN 3 - -#define HD64465_GPIO_FALLING 0 -#define HD64465_GPIO_RISING 1 - -#endif diff --git a/libc/kernel/arch-sh/asm/hd64465/hd64465.h b/libc/kernel/arch-sh/asm/hd64465/hd64465.h deleted file mode 100644 index 108289b25..000000000 --- a/libc/kernel/arch-sh/asm/hd64465/hd64465.h +++ /dev/null @@ -1,210 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_HD64465_ -#define _ASM_SH_HD64465_ 1 - -#include -#include - -#define HD64465_REG_SRR 0x1000c -#define HD64465_REG_SDID 0x10010 -#define HD64465_SDID 0x8122 - -#define HD64465_REG_SMSCR 0x10000 -#define HD64465_SMSCR_PS2ST 0x4000 -#define HD64465_SMSCR_ADCST 0x1000 -#define HD64465_SMSCR_UARTST 0x0800 -#define HD64465_SMSCR_SCDIST 0x0200 -#define HD64465_SMSCR_PPST 0x0100 -#define HD64465_SMSCR_PC0ST 0x0040 -#define HD64465_SMSCR_PC1ST 0x0020 -#define HD64465_SMSCR_AFEST 0x0010 -#define HD64465_SMSCR_TM0ST 0x0008 -#define HD64465_SMSCR_TM1ST 0x0004 -#define HD64465_SMSCR_IRDAST 0x0002 -#define HD64465_SMSCR_KBCST 0x0001 - -#define HD64465_REG_NIRR 0x15000 -#define HD64465_REG_NIMR 0x15002 -#define HD64465_REG_NITR 0x15004 - -#define HD64465_REG_TCVR1 0x16000 -#define HD64465_REG_TCVR0 0x16002 -#define HD64465_REG_TRVR1 0x16004 -#define HD64465_REG_TRVR0 0x16006 -#define HD64465_REG_TCR1 0x16008 -#define HD64465_REG_TCR0 0x1600A -#define HD64465_TCR_EADT 0x10 -#define HD64465_TCR_ETMO 0x08 -#define HD64465_TCR_PST_MASK 0x06 -#define HD64465_TCR_PST_1 0x06 -#define HD64465_TCR_PST_4 0x04 -#define HD64465_TCR_PST_8 0x02 -#define HD64465_TCR_PST_16 0x00 -#define HD64465_TCR_TSTP 0x01 -#define HD64465_REG_TIRR 0x1600C -#define HD64465_REG_TIDR 0x1600E -#define HD64465_REG_PWM1CS 0x16010 -#define HD64465_REG_PWM1LPC 0x16012 -#define HD64465_REG_PWM1HPC 0x16014 -#define HD64465_REG_PWM0CS 0x16018 -#define HD64465_REG_PWM0LPC 0x1601A -#define HD64465_REG_PWM0HPC 0x1601C - -#define HD64465_REG_ADDRA 0x1E000 -#define HD64465_REG_ADDRB 0x1E002 -#define HD64465_REG_ADDRC 0x1E004 -#define HD64465_REG_ADDRD 0x1E006 -#define HD64465_REG_ADCSR 0x1E008 -#define HD64465_ADCSR_ADF 0x80 -#define HD64465_ADCSR_ADST 0x40 -#define HD64465_ADCSR_ADIS 0x20 -#define HD64465_ADCSR_TRGE 0x10 -#define HD64465_ADCSR_ADIE 0x08 -#define HD64465_ADCSR_SCAN 0x04 -#define HD64465_ADCSR_CH_MASK 0x03 -#define HD64465_REG_ADCALCR 0x1E00A -#define HD64465_REG_ADCAL 0x1E00C - -#define HD64465_REG_GPACR 0x14000 -#define HD64465_REG_GPBCR 0x14002 -#define HD64465_REG_GPCCR 0x14004 -#define HD64465_REG_GPDCR 0x14006 -#define HD64465_REG_GPECR 0x14008 -#define HD64465_REG_GPADR 0x14010 -#define HD64465_REG_GPBDR 0x14012 -#define HD64465_REG_GPCDR 0x14014 -#define HD64465_REG_GPDDR 0x14016 -#define HD64465_REG_GPEDR 0x14018 -#define HD64465_REG_GPAICR 0x14020 -#define HD64465_REG_GPBICR 0x14022 -#define HD64465_REG_GPCICR 0x14024 -#define HD64465_REG_GPDICR 0x14026 -#define HD64465_REG_GPEICR 0x14028 -#define HD64465_REG_GPAISR 0x14040 -#define HD64465_REG_GPBISR 0x14042 -#define HD64465_REG_GPCISR 0x14044 -#define HD64465_REG_GPDISR 0x14046 -#define HD64465_REG_GPEISR 0x14048 - -#define HD64465_REG_PCC0ISR 0x12000 -#define HD64465_PCCISR_PREADY 0x80 -#define HD64465_PCCISR_PIREQ 0x80 -#define HD64465_PCCISR_PMWP 0x40 -#define HD64465_PCCISR_PVS2 0x20 -#define HD64465_PCCISR_PVS1 0x10 -#define HD64465_PCCISR_PCD_MASK 0x0c -#define HD64465_PCCISR_PBVD_MASK 0x03 -#define HD64465_PCCISR_PBVD_BATGOOD 0x03 -#define HD64465_PCCISR_PBVD_BATWARN 0x01 -#define HD64465_PCCISR_PBVD_BATDEAD1 0x02 -#define HD64465_PCCISR_PBVD_BATDEAD2 0x00 -#define HD64465_REG_PCC0GCR 0x12002 -#define HD64465_PCCGCR_PDRV 0x80 -#define HD64465_PCCGCR_PCCR 0x40 -#define HD64465_PCCGCR_PCCT 0x20 -#define HD64465_PCCGCR_PVCC0 0x10 -#define HD64465_PCCGCR_PMMOD 0x08 -#define HD64465_PCCGCR_PPA25 0x04 -#define HD64465_PCCGCR_PPA24 0x02 -#define HD64465_PCCGCR_PREG 0x01 -#define HD64465_REG_PCC0CSCR 0x12004 -#define HD64465_PCCCSCR_PSCDI 0x80 -#define HD64465_PCCCSCR_PSWSEL 0x40 -#define HD64465_PCCCSCR_PIREQ 0x20 -#define HD64465_PCCCSCR_PSC 0x10 -#define HD64465_PCCCSCR_PCDC 0x08 -#define HD64465_PCCCSCR_PRC 0x04 -#define HD64465_PCCCSCR_PBW 0x02 -#define HD64465_PCCCSCR_PBD 0x01 -#define HD64465_REG_PCC0CSCIER 0x12006 -#define HD64465_PCCCSCIER_PCRE 0x80 -#define HD64465_PCCCSCIER_PIREQE_MASK 0x60 -#define HD64465_PCCCSCIER_PIREQE_DISABLED 0x00 -#define HD64465_PCCCSCIER_PIREQE_LEVEL 0x20 -#define HD64465_PCCCSCIER_PIREQE_FALLING 0x40 -#define HD64465_PCCCSCIER_PIREQE_RISING 0x60 -#define HD64465_PCCCSCIER_PSCE 0x10 -#define HD64465_PCCCSCIER_PCDE 0x08 -#define HD64465_PCCCSCIER_PRE 0x04 -#define HD64465_PCCCSCIER_PBWE 0x02 -#define HD64465_PCCCSCIER_PBDE 0x01 -#define HD64465_REG_PCC0SCR 0x12008 -#define HD64465_PCCSCR_SHDN 0x10 -#define HD64465_PCCSCR_SWP 0x01 -#define HD64465_REG_PCCPSR 0x1200A -#define HD64465_REG_PCC1ISR 0x12010 -#define HD64465_REG_PCC1GCR 0x12012 -#define HD64465_REG_PCC1CSCR 0x12014 -#define HD64465_REG_PCC1CSCIER 0x12016 -#define HD64465_REG_PCC1SCR 0x12018 - -#define HD64465_REG_KBCSR 0x1dc00 -#define HD64465_KBCSR_KBCIE 0x8000 -#define HD64465_KBCSR_KBCOE 0x4000 -#define HD64465_KBCSR_KBDOE 0x2000 -#define HD64465_KBCSR_KBCD 0x1000 -#define HD64465_KBCSR_KBDD 0x0800 -#define HD64465_KBCSR_KBCS 0x0400 -#define HD64465_KBCSR_KBDS 0x0200 -#define HD64465_KBCSR_KBDP 0x0100 -#define HD64465_KBCSR_KBD_MASK 0x00ff -#define HD64465_REG_KBISR 0x1dc04 -#define HD64465_KBISR_KBRDF 0x0001 -#define HD64465_REG_MSCSR 0x1dc10 -#define HD64465_REG_MSISR 0x1dc14 - -#define CONFIG_HD64465_IOBASE 0xb0000000 - -#define CONFIG_HD64465_IRQ 5 - -#define _HD64465_IO_MASK 0xf8000000 -#define is_hd64465_addr(addr) ((addr & _HD64465_IO_MASK) == (CONFIG_HD64465_IOBASE & _HD64465_IO_MASK)) - -#define HD64465_IRQ_BASE OFFCHIP_IRQ_BASE -#define HD64465_IRQ_NUM 16 -#define HD64465_IRQ_ADC (HD64465_IRQ_BASE+0) -#define HD64465_IRQ_USB (HD64465_IRQ_BASE+1) -#define HD64465_IRQ_SCDI (HD64465_IRQ_BASE+2) -#define HD64465_IRQ_PARALLEL (HD64465_IRQ_BASE+3) - -#define HD64465_IRQ_UART (HD64465_IRQ_BASE+5) -#define HD64465_IRQ_IRDA (HD64465_IRQ_BASE+6) -#define HD64465_IRQ_PS2MOUSE (HD64465_IRQ_BASE+7) -#define HD64465_IRQ_KBC (HD64465_IRQ_BASE+8) -#define HD64465_IRQ_TIMER1 (HD64465_IRQ_BASE+9) -#define HD64465_IRQ_TIMER0 (HD64465_IRQ_BASE+10) -#define HD64465_IRQ_GPIO (HD64465_IRQ_BASE+11) -#define HD64465_IRQ_AFE (HD64465_IRQ_BASE+12) -#define HD64465_IRQ_PCMCIA1 (HD64465_IRQ_BASE+13) -#define HD64465_IRQ_PCMCIA0 (HD64465_IRQ_BASE+14) -#define HD64465_IRQ_PS2KBD (HD64465_IRQ_BASE+15) - -#define HD64465_PCC_WINDOW 0x01000000 - -#define HD64465_PCC0_BASE 0xb8000000 -#define HD64465_PCC0_ATTR (HD64465_PCC0_BASE) -#define HD64465_PCC0_COMM (HD64465_PCC0_BASE+HD64465_PCC_WINDOW) -#define HD64465_PCC0_IO (HD64465_PCC0_BASE+2*HD64465_PCC_WINDOW) - -#define HD64465_PCC1_BASE 0xb4000000 -#define HD64465_PCC1_ATTR (HD64465_PCC1_BASE) -#define HD64465_PCC1_COMM (HD64465_PCC1_BASE+HD64465_PCC_WINDOW) -#define HD64465_PCC1_IO (HD64465_PCC1_BASE+2*HD64465_PCC_WINDOW) - -#define HD64465_USB_BASE (CONFIG_HD64465_IOBASE+0xb000) -#define HD64465_USB_LEN 0x1000 - -#define HD64465_SRAM_BASE (CONFIG_HD64465_IOBASE+0x9000) -#define HD64465_SRAM_LEN 0x1000 - -#endif diff --git a/libc/kernel/arch-sh/asm/hd64465/io.h b/libc/kernel/arch-sh/asm/hd64465/io.h deleted file mode 100644 index 9de2885c1..000000000 --- a/libc/kernel/arch-sh/asm/hd64465/io.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_IO_HD64465_H -#define _ASM_SH_IO_HD64465_H - -#endif diff --git a/libc/kernel/arch-sh/asm/heartbeat.h b/libc/kernel/arch-sh/asm/heartbeat.h deleted file mode 100644 index cbcfef164..000000000 --- a/libc/kernel/arch-sh/asm/heartbeat.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_HEARTBEAT_H -#define __ASM_SH_HEARTBEAT_H - -#include - -#define HEARTBEAT_INVERTED (1 << 0) - -struct heartbeat_data { - void __iomem *base; - unsigned char *bit_pos; - unsigned int nr_bits; - struct timer_list timer; - unsigned int regsize; - unsigned long flags; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/hp6xx.h b/libc/kernel/arch-sh/asm/hp6xx.h deleted file mode 100644 index 023ae2e50..000000000 --- a/libc/kernel/arch-sh/asm/hp6xx.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_HP6XX_H -#define __ASM_SH_HP6XX_H - -#define HP680_BTN_IRQ 32 -#define HP680_TS_IRQ 35 -#define HP680_HD64461_IRQ 36 - -#define DAC_LCD_BRIGHTNESS 0 -#define DAC_SPEAKER_VOLUME 1 - -#define PGDR_OPENED 0x01 -#define PGDR_MAIN_BATTERY_OUT 0x04 -#define PGDR_PLAY_BUTTON 0x08 -#define PGDR_REWIND_BUTTON 0x10 -#define PGDR_RECORD_BUTTON 0x20 - -#define PHDR_TS_PEN_DOWN 0x08 - -#define PJDR_LED_BLINK 0x02 - -#define PKDR_LED_GREEN 0x10 - -#define SCPDR_TS_SCAN_ENABLE 0x20 -#define SCPDR_TS_SCAN_Y 0x02 -#define SCPDR_TS_SCAN_X 0x01 - -#define SCPCR_TS_ENABLE 0x405 -#define SCPCR_TS_MASK 0xc0f - -#define ADC_CHANNEL_TS_Y 1 -#define ADC_CHANNEL_TS_X 2 -#define ADC_CHANNEL_BATTERY 3 -#define ADC_CHANNEL_BACKUP 4 -#define ADC_CHANNEL_CHARGE 5 - -#define HD64461_GPADR_SPEAKER 0x01 -#define HD64461_GPADR_PCMCIA0 (0x02|0x08) - -#define HD64461_GPBDR_LCDOFF 0x01 -#define HD64461_GPBDR_LCD_CONTRAST_MASK 0x78 -#define HD64461_GPBDR_LED_RED 0x80 - -#include -#include - -#define PJDR 0xa4000130 -#define PKDR 0xa4000132 - -#endif diff --git a/libc/kernel/arch-sh/asm/hugetlb.h b/libc/kernel/arch-sh/asm/hugetlb.h deleted file mode 100644 index ab3aa5a9b..000000000 --- a/libc/kernel/arch-sh/asm/hugetlb.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_HUGETLB_H -#define _ASM_SH_HUGETLB_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/hw_irq.h b/libc/kernel/arch-sh/asm/hw_irq.h deleted file mode 100644 index 24e727845..000000000 --- a/libc/kernel/arch-sh/asm/hw_irq.h +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_HW_IRQ_H -#define __ASM_SH_HW_IRQ_H - -#include -#include - -struct ipr_data { - unsigned char irq; - unsigned char ipr_idx; - unsigned char shift; - unsigned char priority; -}; - -struct ipr_desc { - unsigned long *ipr_offsets; - unsigned int nr_offsets; - struct ipr_data *ipr_data; - unsigned int nr_irqs; - struct irq_chip chip; -}; - -typedef unsigned char intc_enum; - -struct intc_vect { - intc_enum enum_id; - unsigned short vect; -}; - -#define INTC_VECT(enum_id, vect) { enum_id, vect } -#define INTC_IRQ(enum_id, irq) INTC_VECT(enum_id, irq2evt(irq)) - -struct intc_group { - intc_enum enum_id; - intc_enum enum_ids[32]; -}; - -#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } } - -struct intc_mask_reg { - unsigned long set_reg, clr_reg, reg_width; - intc_enum enum_ids[32]; -}; - -struct intc_prio_reg { - unsigned long set_reg, clr_reg, reg_width, field_width; - intc_enum enum_ids[16]; -}; - -struct intc_sense_reg { - unsigned long reg, reg_width, field_width; - intc_enum enum_ids[16]; -}; - -#define INTC_SMP(stride, nr) - -struct intc_desc { - struct intc_vect *vectors; - unsigned int nr_vectors; - struct intc_group *groups; - unsigned int nr_groups; - struct intc_mask_reg *mask_regs; - unsigned int nr_mask_regs; - struct intc_prio_reg *prio_regs; - unsigned int nr_prio_regs; - struct intc_sense_reg *sense_regs; - unsigned int nr_sense_regs; - char *name; - struct intc_mask_reg *ack_regs; - unsigned int nr_ack_regs; -}; - -#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) -#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, mask_regs, prio_regs, sense_regs) struct intc_desc symbol __initdata = { _INTC_ARRAY(vectors), _INTC_ARRAY(groups), _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), _INTC_ARRAY(sense_regs), chipname, } - -#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, mask_regs, prio_regs, sense_regs, ack_regs) struct intc_desc symbol __initdata = { _INTC_ARRAY(vectors), _INTC_ARRAY(groups), _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), _INTC_ARRAY(sense_regs), chipname, _INTC_ARRAY(ack_regs), } - -enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, - IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, - IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 }; - -#endif diff --git a/libc/kernel/arch-sh/asm/i2c-sh7760.h b/libc/kernel/arch-sh/asm/i2c-sh7760.h deleted file mode 100644 index f510223c3..000000000 --- a/libc/kernel/arch-sh/asm/i2c-sh7760.h +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _I2C_SH7760_H_ -#define _I2C_SH7760_H_ - -#define SH7760_I2C_DEVNAME "sh7760-i2c" - -#define SH7760_I2C0_MMIO 0xFE140000 -#define SH7760_I2C0_MMIOEND 0xFE14003B -#define SH7760_I2C0_IRQ 62 - -#define SH7760_I2C1_MMIO 0xFE150000 -#define SH7760_I2C1_MMIOEND 0xFE15003B -#define SH7760_I2C1_IRQ 63 - -struct sh7760_i2c_platdata { - unsigned int speed_khz; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/ilsel.h b/libc/kernel/arch-sh/asm/ilsel.h deleted file mode 100644 index da3587855..000000000 --- a/libc/kernel/arch-sh/asm/ilsel.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ILSEL_H -#define __ASM_SH_ILSEL_H - -typedef enum { - ILSEL_NONE, - ILSEL_LAN, - ILSEL_USBH_I, - ILSEL_USBH_S, - ILSEL_USBH_V, - ILSEL_RTC, - ILSEL_USBP_I, - ILSEL_USBP_S, - ILSEL_USBP_V, - ILSEL_KEY, - - ILSEL_FPGA0, - ILSEL_FPGA1, - ILSEL_EX1, - ILSEL_EX2, - ILSEL_EX3, - ILSEL_EX4, - - ILSEL_FPGA2 = ILSEL_FPGA0, - ILSEL_FPGA3 = ILSEL_FPGA1, - ILSEL_EX5 = ILSEL_EX1, - ILSEL_EX6 = ILSEL_EX2, - ILSEL_EX7 = ILSEL_EX3, - ILSEL_EX8 = ILSEL_EX4, -} ilsel_source_t; - -#endif diff --git a/libc/kernel/arch-sh/asm/io.h b/libc/kernel/arch-sh/asm/io.h deleted file mode 100644 index 7730c15f5..000000000 --- a/libc/kernel/arch-sh/asm/io.h +++ /dev/null @@ -1,22 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IO_H -#define __ASM_SH_IO_H - -#include -#include -#include -#include -#include -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/io_generic.h b/libc/kernel/arch-sh/asm/io_generic.h deleted file mode 100644 index f12234292..000000000 --- a/libc/kernel/arch-sh/asm/io_generic.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#define IO_CONCAT(a,b) _IO_CONCAT(a,b) -#define _IO_CONCAT(a,b) a ## _ ## b - -#ifndef __IO_PREFIX -#error "Don't include this header without a valid system prefix" -#endif - -#undef __IO_PREFIX diff --git a/libc/kernel/arch-sh/asm/io_trapped.h b/libc/kernel/arch-sh/asm/io_trapped.h deleted file mode 100644 index 9702a8e6c..000000000 --- a/libc/kernel/arch-sh/asm/io_trapped.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IO_TRAPPED_H -#define __ASM_SH_IO_TRAPPED_H - -#include -#include -#include - -#define IO_TRAPPED_MAGIC 0xfeedbeef - -struct trapped_io { - unsigned int magic; - struct resource *resource; - unsigned int num_resources; - unsigned int minimum_bus_width; - struct list_head list; - void __iomem *virt_base; -} __aligned(PAGE_SIZE); - -#define register_trapped_io(tiop) (-1) -#define handle_trapped_io(tiop, address) 0 -#define __ioremap_trapped(offset, size) NULL -#define __ioport_map_trapped(offset, size) NULL - -#endif diff --git a/libc/kernel/arch-sh/asm/ioctl.h b/libc/kernel/arch-sh/asm/ioctl.h deleted file mode 100644 index 6e446b6f6..000000000 --- a/libc/kernel/arch-sh/asm/ioctl.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/ioctls.h b/libc/kernel/arch-sh/asm/ioctls.h deleted file mode 100644 index 94ca854fb..000000000 --- a/libc/kernel/arch-sh/asm/ioctls.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IOCTLS_H -#define __ASM_SH_IOCTLS_H - -#include - -#define FIOCLEX _IO('f', 1) -#define FIONCLEX _IO('f', 2) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD -#define FIOQSIZE _IOR('f', 128, loff_t) - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 - -#define TCGETA 0x80127417 -#define TCSETA 0x40127418 -#define TCSETAW 0x40127419 -#define TCSETAF 0x4012741C - -#define TCSBRK _IO('t', 29) -#define TCXONC _IO('t', 30) -#define TCFLSH _IO('t', 31) - -#define TIOCSWINSZ 0x40087467 -#define TIOCGWINSZ 0x80087468 -#define TIOCSTART _IO('t', 110) -#define TIOCSTOP _IO('t', 111) -#define TIOCOUTQ _IOR('t', 115, int) - -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) - -#define TIOCEXCL _IO('T', 12) -#define TIOCNXCL _IO('T', 13) -#define TIOCSCTTY _IO('T', 14) - -#define TIOCSTI _IOW('T', 18, char) -#define TIOCMGET _IOR('T', 21, unsigned int) -#define TIOCMBIS _IOW('T', 22, unsigned int) -#define TIOCMBIC _IOW('T', 23, unsigned int) -#define TIOCMSET _IOW('T', 24, unsigned int) -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -#define TIOCGSOFTCAR _IOR('T', 25, unsigned int) -#define TIOCSSOFTCAR _IOW('T', 26, unsigned int) -#define TIOCLINUX _IOW('T', 28, char) -#define TIOCCONS _IO('T', 29) -#define TIOCGSERIAL 0x803C541E -#define TIOCSSERIAL 0x403C541F -#define TIOCPKT _IOW('T', 32, int) -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCNOTTY _IO('T', 34) -#define TIOCSETD _IOW('T', 35, int) -#define TIOCGETD _IOR('T', 36, int) -#define TCSBRKP _IOW('T', 37, int) -#define TIOCSBRK _IO('T', 39) -#define TIOCCBRK _IO('T', 40) -#define TIOCGSID _IOR('T', 41, pid_t) -#define TCGETS2 _IOR('T', 42, struct termios2) -#define TCSETS2 _IOW('T', 43, struct termios2) -#define TCSETSW2 _IOW('T', 44, struct termios2) -#define TCSETSF2 _IOW('T', 45, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int) -#define TIOCSPTLCK _IOW('T',0x31, int) - -#define TIOCSERCONFIG _IO('T', 83) -#define TIOCSERGWILD _IOR('T', 84, int) -#define TIOCSERSWILD _IOW('T', 85, int) -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x80d85458 -#define TIOCSERGETLSR _IOR('T', 89, unsigned int) - -#define TIOCSER_TEMT 0x01 -#define TIOCSERGETMULTI 0x80A8545A -#define TIOCSERSETMULTI 0x40A8545B - -#define TIOCMIWAIT _IO('T', 92) -#define TIOCGICOUNT 0x545D - -#endif diff --git a/libc/kernel/arch-sh/asm/ipcbuf.h b/libc/kernel/arch-sh/asm/ipcbuf.h deleted file mode 100644 index 7ebc070e3..000000000 --- a/libc/kernel/arch-sh/asm/ipcbuf.h +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IPCBUF_H__ -#define __ASM_SH_IPCBUF_H__ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/irq.h b/libc/kernel/arch-sh/asm/irq.h deleted file mode 100644 index 128135abb..000000000 --- a/libc/kernel/arch-sh/asm/irq.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IRQ_H -#define __ASM_SH_IRQ_H - -#include - -#define NR_IRQS 256 - -#define evt2irq(evt) (((evt) >> 5) - 16) -#define irq2evt(irq) (((irq) + 16) << 5) - -#define irq_canonicalize(irq) (irq) -#define irq_demux(irq) sh_mv.mv_irq_demux(irq) -#define irq_ctx_init(cpu) do { } while (0) -#define irq_ctx_exit(cpu) do { } while (0) -#endif diff --git a/libc/kernel/arch-sh/asm/irq_regs.h b/libc/kernel/arch-sh/asm/irq_regs.h deleted file mode 100644 index 1e8a2b641..000000000 --- a/libc/kernel/arch-sh/asm/irq_regs.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/irqflags.h b/libc/kernel/arch-sh/asm/irqflags.h deleted file mode 100644 index fe442e47e..000000000 --- a/libc/kernel/arch-sh/asm/irqflags.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IRQFLAGS_H -#define __ASM_SH_IRQFLAGS_H - -#include "irqflags_32.h" - -#define raw_local_save_flags(flags) do { (flags) = __raw_local_save_flags(); } while (0) - -#define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0) -#endif diff --git a/libc/kernel/arch-sh/asm/irqflags_32.h b/libc/kernel/arch-sh/asm/irqflags_32.h deleted file mode 100644 index 711b0d6b4..000000000 --- a/libc/kernel/arch-sh/asm/irqflags_32.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IRQFLAGS_32_H -#define __ASM_SH_IRQFLAGS_32_H - -#endif diff --git a/libc/kernel/arch-sh/asm/irqflags_64.h b/libc/kernel/arch-sh/asm/irqflags_64.h deleted file mode 100644 index dbbdce785..000000000 --- a/libc/kernel/arch-sh/asm/irqflags_64.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_IRQFLAGS_64_H -#define __ASM_SH_IRQFLAGS_64_H - -#include - -#define SR_MASK_LL 0x00000000000000f0LL -#define SR_BL_LL 0x0000000010000000LL - -#endif diff --git a/libc/kernel/arch-sh/asm/kdebug.h b/libc/kernel/arch-sh/asm/kdebug.h deleted file mode 100644 index fb8dbc06f..000000000 --- a/libc/kernel/arch-sh/asm/kdebug.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_KDEBUG_H -#define __ASM_SH_KDEBUG_H - -enum die_val { - DIE_TRAP, -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/kexec.h b/libc/kernel/arch-sh/asm/kexec.h deleted file mode 100644 index f5a865bb2..000000000 --- a/libc/kernel/arch-sh/asm/kexec.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_KEXEC_H -#define __ASM_SH_KEXEC_H - -#include -#include - -#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) - -#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) - -#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE - -#define KEXEC_CONTROL_PAGE_SIZE 4096 - -#define KEXEC_ARCH KEXEC_ARCH_SH - -#endif diff --git a/libc/kernel/arch-sh/asm/kgdb.h b/libc/kernel/arch-sh/asm/kgdb.h deleted file mode 100644 index 386b3802e..000000000 --- a/libc/kernel/arch-sh/asm/kgdb.h +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __KGDB_H -#define __KGDB_H - -#include - -struct kgdb_regs { - unsigned long regs[16]; - unsigned long pc; - unsigned long pr; - unsigned long sr; - unsigned long gbr; - unsigned long mach; - unsigned long macl; - unsigned long vbr; -}; - -typedef void (kgdb_debug_hook_t)(struct pt_regs *regs); -typedef void (kgdb_bus_error_hook_t)(void); - -struct console; - -#define _JBLEN 9 -typedef int jmp_buf[_JBLEN]; - -#define breakpoint() __asm__ __volatile__("trapa #0x3c") - -#endif diff --git a/libc/kernel/arch-sh/asm/kmap_types.h b/libc/kernel/arch-sh/asm/kmap_types.h deleted file mode 100644 index ea3076651..000000000 --- a/libc/kernel/arch-sh/asm/kmap_types.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __SH_KMAP_TYPES_H -#define __SH_KMAP_TYPES_H - -#define D(n) - -enum km_type { -D(0) KM_BOUNCE_READ, -D(1) KM_SKB_SUNRPC_DATA, -D(2) KM_SKB_DATA_SOFTIRQ, -D(3) KM_USER0, -D(4) KM_USER1, -D(5) KM_BIO_SRC_IRQ, -D(6) KM_BIO_DST_IRQ, -D(7) KM_PTE0, -D(8) KM_PTE1, -D(9) KM_IRQ0, -D(10) KM_IRQ1, -D(11) KM_SOFTIRQ0, -D(12) KM_SOFTIRQ1, -D(13) KM_TYPE_NR -}; - -#undef D - -#endif diff --git a/libc/kernel/arch-sh/asm/lboxre2.h b/libc/kernel/arch-sh/asm/lboxre2.h deleted file mode 100644 index 179136169..000000000 --- a/libc/kernel/arch-sh/asm/lboxre2.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_LBOXRE2_H -#define __ASM_SH_LBOXRE2_H - -#define IRQ_CF1 9 -#define IRQ_CF0 10 -#define IRQ_INTD 11 -#define IRQ_ETH1 12 -#define IRQ_ETH0 13 -#define IRQ_INTA 14 - -#define __IO_PREFIX lboxre2 -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/linkage.h b/libc/kernel/arch-sh/asm/linkage.h deleted file mode 100644 index 1921dd3a0..000000000 --- a/libc/kernel/arch-sh/asm/linkage.h +++ /dev/null @@ -1,18 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_LINKAGE_H -#define __ASM_LINKAGE_H - -#define __ALIGN .balign 4 -#define __ALIGN_STR ".balign 4" - -#endif diff --git a/libc/kernel/arch-sh/asm/local.h b/libc/kernel/arch-sh/asm/local.h deleted file mode 100644 index 4a39637c8..000000000 --- a/libc/kernel/arch-sh/asm/local.h +++ /dev/null @@ -1,18 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_LOCAL_H -#define __ASM_SH_LOCAL_H - -#include - -#endif - diff --git a/libc/kernel/arch-sh/asm/machvec.h b/libc/kernel/arch-sh/asm/machvec.h deleted file mode 100644 index 5b489188a..000000000 --- a/libc/kernel/arch-sh/asm/machvec.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_MACHVEC_H -#define _ASM_SH_MACHVEC_H - -#include -#include -#include - -struct device; - -struct sh_machine_vector { - void (*mv_setup)(char **cmdline_p); - const char *mv_name; - int mv_nr_irqs; - - u8 (*mv_inb)(unsigned long); - u16 (*mv_inw)(unsigned long); - u32 (*mv_inl)(unsigned long); - void (*mv_outb)(u8, unsigned long); - void (*mv_outw)(u16, unsigned long); - void (*mv_outl)(u32, unsigned long); - - u8 (*mv_inb_p)(unsigned long); - u16 (*mv_inw_p)(unsigned long); - u32 (*mv_inl_p)(unsigned long); - void (*mv_outb_p)(u8, unsigned long); - void (*mv_outw_p)(u16, unsigned long); - void (*mv_outl_p)(u32, unsigned long); - - void (*mv_insb)(unsigned long, void *dst, unsigned long count); - void (*mv_insw)(unsigned long, void *dst, unsigned long count); - void (*mv_insl)(unsigned long, void *dst, unsigned long count); - void (*mv_outsb)(unsigned long, const void *src, unsigned long count); - void (*mv_outsw)(unsigned long, const void *src, unsigned long count); - void (*mv_outsl)(unsigned long, const void *src, unsigned long count); - - u8 (*mv_readb)(void __iomem *); - u16 (*mv_readw)(void __iomem *); - u32 (*mv_readl)(void __iomem *); - void (*mv_writeb)(u8, void __iomem *); - void (*mv_writew)(u16, void __iomem *); - void (*mv_writel)(u32, void __iomem *); - - int (*mv_irq_demux)(int irq); - - void (*mv_init_irq)(void); - void (*mv_init_pci)(void); - - void (*mv_heartbeat)(void); - - void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); - void (*mv_ioport_unmap)(void __iomem *); -}; - -#define get_system_type() sh_mv.mv_name - -#define __initmv __used __section(.machvec.init) - -#endif diff --git a/libc/kernel/arch-sh/asm/magicpanelr2.h b/libc/kernel/arch-sh/asm/magicpanelr2.h deleted file mode 100644 index e0fd4a2ab..000000000 --- a/libc/kernel/arch-sh/asm/magicpanelr2.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MAGICPANELR2_H -#define __ASM_SH_MAGICPANELR2_H - -#include - -#define __IO_PREFIX mpr2 -#include - -#define SETBITS_OUTB(mask, reg) ctrl_outb(ctrl_inb(reg) | mask, reg) -#define SETBITS_OUTW(mask, reg) ctrl_outw(ctrl_inw(reg) | mask, reg) -#define SETBITS_OUTL(mask, reg) ctrl_outl(ctrl_inl(reg) | mask, reg) -#define CLRBITS_OUTB(mask, reg) ctrl_outb(ctrl_inb(reg) & ~mask, reg) -#define CLRBITS_OUTW(mask, reg) ctrl_outw(ctrl_inw(reg) & ~mask, reg) -#define CLRBITS_OUTL(mask, reg) ctrl_outl(ctrl_inl(reg) & ~mask, reg) - -#define PA_LED PORT_PADR - -#define CMNCR 0xA4FD0000UL -#define CS0BCR 0xA4FD0004UL -#define CS2BCR 0xA4FD0008UL -#define CS3BCR 0xA4FD000CUL -#define CS4BCR 0xA4FD0010UL -#define CS5ABCR 0xA4FD0014UL -#define CS5BBCR 0xA4FD0018UL -#define CS6ABCR 0xA4FD001CUL -#define CS6BBCR 0xA4FD0020UL -#define CS0WCR 0xA4FD0024UL -#define CS2WCR 0xA4FD0028UL -#define CS3WCR 0xA4FD002CUL -#define CS4WCR 0xA4FD0030UL -#define CS5AWCR 0xA4FD0034UL -#define CS5BWCR 0xA4FD0038UL -#define CS6AWCR 0xA4FD003CUL -#define CS6BWCR 0xA4FD0040UL - -#define PORT_UTRCTL 0xA405012CUL -#define PORT_UCLKCR_W 0xA40A0008UL - -#define INTC_ICR0 0xA414FEE0UL -#define INTC_ICR1 0xA4140010UL -#define INTC_ICR2 0xA4140012UL - -#define MPR2_MTD_BOOTLOADER_SIZE 0x00060000UL -#define MPR2_MTD_KERNEL_SIZE 0x00200000UL - -#endif diff --git a/libc/kernel/arch-sh/asm/mc146818rtc.h b/libc/kernel/arch-sh/asm/mc146818rtc.h deleted file mode 100644 index fe5300a91..000000000 --- a/libc/kernel/arch-sh/asm/mc146818rtc.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_MC146818RTC_H -#define _ASM_MC146818RTC_H - -#endif diff --git a/libc/kernel/arch-sh/asm/microdev.h b/libc/kernel/arch-sh/asm/microdev.h deleted file mode 100644 index cff5a063b..000000000 --- a/libc/kernel/arch-sh/asm/microdev.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MICRODEV_H -#define __ASM_SH_MICRODEV_H - -#define MICRODEV_FPGA_INTC_BASE 0xa6110000ul -#define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) -#define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) -#define MICRODEV_FPGA_INTC_MASK(n) (1ul<<(n)) -#define MICRODEV_FPGA_INTPRI_REG(n) (MICRODEV_FPGA_INTC_BASE+0x10+((n)/8)*8) -#define MICRODEV_FPGA_INTPRI_LEVEL(n,x) ((x)<<(((n)%8)*4)) -#define MICRODEV_FPGA_INTPRI_MASK(n) (MICRODEV_FPGA_INTPRI_LEVEL((n),0xful)) -#define MICRODEV_FPGA_INTSRC_REG (MICRODEV_FPGA_INTC_BASE+0x30ul) -#define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) - -#define MICRODEV_LINUX_IRQ_KEYBOARD 1 -#define MICRODEV_LINUX_IRQ_SERIAL1 2 -#define MICRODEV_LINUX_IRQ_ETHERNET 3 -#define MICRODEV_LINUX_IRQ_SERIAL2 4 -#define MICRODEV_LINUX_IRQ_USB_HC 7 -#define MICRODEV_LINUX_IRQ_MOUSE 12 -#define MICRODEV_LINUX_IRQ_IDE2 13 -#define MICRODEV_LINUX_IRQ_IDE1 14 - -#define MICRODEV_FPGA_IRQ_KEYBOARD 1 -#define MICRODEV_FPGA_IRQ_SERIAL1 3 -#define MICRODEV_FPGA_IRQ_SERIAL2 4 -#define MICRODEV_FPGA_IRQ_MOUSE 12 -#define MICRODEV_FPGA_IRQ_IDE1 14 -#define MICRODEV_FPGA_IRQ_IDE2 15 -#define MICRODEV_FPGA_IRQ_USB_HC 16 -#define MICRODEV_FPGA_IRQ_ETHERNET 18 - -#define MICRODEV_IRQ_PCI_INTA 8 -#define MICRODEV_IRQ_PCI_INTB 9 -#define MICRODEV_IRQ_PCI_INTC 10 -#define MICRODEV_IRQ_PCI_INTD 11 - -#define __IO_PREFIX microdev -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/migor.h b/libc/kernel/arch-sh/asm/migor.h deleted file mode 100644 index be8ffb3b0..000000000 --- a/libc/kernel/arch-sh/asm/migor.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MIGOR_H -#define __ASM_SH_MIGOR_H - -#include - -#define PORT_PACR 0xa4050100 -#define PORT_PDCR 0xa4050106 -#define PORT_PECR 0xa4050108 -#define PORT_PHCR 0xa405010e -#define PORT_PJCR 0xa4050110 -#define PORT_PKCR 0xa4050112 -#define PORT_PLCR 0xa4050114 -#define PORT_PMCR 0xa4050116 -#define PORT_PRCR 0xa405011c -#define PORT_PTCR 0xa4050140 -#define PORT_PUCR 0xa4050142 -#define PORT_PVCR 0xa4050144 -#define PORT_PWCR 0xa4050146 -#define PORT_PXCR 0xa4050148 -#define PORT_PYCR 0xa405014a -#define PORT_PZCR 0xa405014c -#define PORT_PADR 0xa4050120 -#define PORT_PHDR 0xa405012e -#define PORT_PTDR 0xa4050160 -#define PORT_PWDR 0xa4050166 - -#define PORT_HIZCRA 0xa4050158 -#define PORT_HIZCRC 0xa405015c - -#define PORT_MSELCRB 0xa4050182 - -#define PORT_PSELA 0xa405014e -#define PORT_PSELB 0xa4050150 -#define PORT_PSELC 0xa4050152 -#define PORT_PSELD 0xa4050154 -#define PORT_PSELE 0xa4050156 - -#define PORT_HIZCRA 0xa4050158 -#define PORT_HIZCRB 0xa405015a -#define PORT_HIZCRC 0xa405015c - -#define BSC_CS6ABCR 0xfec1001c - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/mman.h b/libc/kernel/arch-sh/asm/mman.h deleted file mode 100644 index bf96efc0c..000000000 --- a/libc/kernel/arch-sh/asm/mman.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MMAN_H -#define __ASM_SH_MMAN_H - -#include - -#define MAP_GROWSDOWN 0x0100 -#define MAP_DENYWRITE 0x0800 -#define MAP_EXECUTABLE 0x1000 -#define MAP_LOCKED 0x2000 -#define MAP_NORESERVE 0x4000 -#define MAP_POPULATE 0x8000 -#define MAP_NONBLOCK 0x10000 - -#define MCL_CURRENT 1 -#define MCL_FUTURE 2 - -#endif diff --git a/libc/kernel/arch-sh/asm/mmu.h b/libc/kernel/arch-sh/asm/mmu.h deleted file mode 100644 index cf54cb874..000000000 --- a/libc/kernel/arch-sh/asm/mmu.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __MMU_H -#define __MMU_H - -typedef unsigned long mm_context_id_t[NR_CPUS]; - -typedef struct { - mm_context_id_t id; - void *vdso; -} mm_context_t; - -#define PMB_PASCR 0xff000070 -#define PMB_IRMCR 0xff000078 - -#define PMB_ADDR 0xf6100000 -#define PMB_DATA 0xf7100000 -#define PMB_ENTRY_MAX 16 -#define PMB_E_MASK 0x0000000f -#define PMB_E_SHIFT 8 - -#define PMB_SZ_16M 0x00000000 -#define PMB_SZ_64M 0x00000010 -#define PMB_SZ_128M 0x00000080 -#define PMB_SZ_512M 0x00000090 -#define PMB_SZ_MASK PMB_SZ_512M -#define PMB_C 0x00000008 -#define PMB_WT 0x00000001 -#define PMB_UB 0x00000200 -#define PMB_V 0x00000100 - -#define PMB_NO_ENTRY (-1) - -struct pmb_entry; - -struct pmb_entry { - unsigned long vpn; - unsigned long ppn; - unsigned long flags; - - int entry; - - struct pmb_entry *next; - - struct pmb_entry *link; -}; - -struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn, - unsigned long flags); - -#endif - diff --git a/libc/kernel/arch-sh/asm/mmu_context.h b/libc/kernel/arch-sh/asm/mmu_context.h deleted file mode 100644 index cbf07ef64..000000000 --- a/libc/kernel/arch-sh/asm/mmu_context.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MMU_CONTEXT_H -#define __ASM_SH_MMU_CONTEXT_H - -#endif diff --git a/libc/kernel/arch-sh/asm/mmu_context_32.h b/libc/kernel/arch-sh/asm/mmu_context_32.h deleted file mode 100644 index dca7e6b4a..000000000 --- a/libc/kernel/arch-sh/asm/mmu_context_32.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MMU_CONTEXT_32_H -#define __ASM_SH_MMU_CONTEXT_32_H - -#endif diff --git a/libc/kernel/arch-sh/asm/mmu_context_64.h b/libc/kernel/arch-sh/asm/mmu_context_64.h deleted file mode 100644 index d7744beed..000000000 --- a/libc/kernel/arch-sh/asm/mmu_context_64.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MMU_CONTEXT_64_H -#define __ASM_SH_MMU_CONTEXT_64_H - -#include -#include - -#define SR_ASID_MASK 0xffffffffff00ffffULL -#define SR_ASID_SHIFT 16 - -#define set_TTB(pgd) (mmu_pdtp_cache = (pgd)) -#define get_TTB() (mmu_pdtp_cache) - -#endif diff --git a/libc/kernel/arch-sh/asm/mmzone.h b/libc/kernel/arch-sh/asm/mmzone.h deleted file mode 100644 index 9bddda431..000000000 --- a/libc/kernel/arch-sh/asm/mmzone.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MMZONE_H -#define __ASM_SH_MMZONE_H - -#endif diff --git a/libc/kernel/arch-sh/asm/module.h b/libc/kernel/arch-sh/asm/module.h deleted file mode 100644 index 76bb90afd..000000000 --- a/libc/kernel/arch-sh/asm/module.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_MODULE_H -#define _ASM_SH_MODULE_H - -struct mod_arch_specific { - -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr - -#define MODULE_PROC_FAMILY "SH4LE " - -#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY - -#endif diff --git a/libc/kernel/arch-sh/asm/msgbuf.h b/libc/kernel/arch-sh/asm/msgbuf.h deleted file mode 100644 index ec64905f3..000000000 --- a/libc/kernel/arch-sh/asm/msgbuf.h +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MSGBUF_H -#define __ASM_SH_MSGBUF_H - -struct msqid64_ds { - struct ipc64_perm msg_perm; - __kernel_time_t msg_stime; - unsigned long __unused1; - __kernel_time_t msg_rtime; - unsigned long __unused2; - __kernel_time_t msg_ctime; - unsigned long __unused3; - unsigned long msg_cbytes; - unsigned long msg_qnum; - unsigned long msg_qbytes; - __kernel_pid_t msg_lspid; - __kernel_pid_t msg_lrpid; - unsigned long __unused4; - unsigned long __unused5; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/mutex.h b/libc/kernel/arch-sh/asm/mutex.h deleted file mode 100644 index 79054b2d8..000000000 --- a/libc/kernel/arch-sh/asm/mutex.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/page.h b/libc/kernel/arch-sh/asm/page.h deleted file mode 100644 index f187dd73d..000000000 --- a/libc/kernel/arch-sh/asm/page.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PAGE_H -#define __ASM_SH_PAGE_H - -#include - -#define PAGE_SHIFT 12 - -#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) -#define PTE_MASK PAGE_MASK - -#ifndef __ASSEMBLY__ - -struct page; -struct vm_area_struct; - -#define __HAVE_ARCH_COPY_USER_HIGHPAGE - -typedef struct { unsigned long pte_low; } pte_t; -typedef struct { unsigned long pgprot; } pgprot_t; -typedef struct { unsigned long pgd; } pgd_t; -#define pte_val(x) ((x).pte_low) -#define __pte(x) ((pte_t) { (x) } ) - -#define pgd_val(x) ((x).pgd) -#define pgprot_val(x) ((x).pgprot) - -#define __pgd(x) ((pgd_t) { (x) } ) -#define __pgprot(x) ((pgprot_t) { (x) } ) - -typedef struct page *pgtable_t; - -#endif - -#define __MEMORY_START CONFIG_MEMORY_START -#define __MEMORY_SIZE CONFIG_MEMORY_SIZE - -#define PAGE_OFFSET CONFIG_PAGE_OFFSET - -#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) -#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) - -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) -#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) - -#define PFN_START (__MEMORY_START >> PAGE_SHIFT) -#define ARCH_PFN_OFFSET (PFN_START) -#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) -#define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) -#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) - -#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) - -#include - -#define __HAVE_ARCH_GATE_AREA - -#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES - -#endif diff --git a/libc/kernel/arch-sh/asm/param.h b/libc/kernel/arch-sh/asm/param.h deleted file mode 100644 index 4a59cd8ad..000000000 --- a/libc/kernel/arch-sh/asm/param.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PARAM_H -#define __ASM_SH_PARAM_H - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - - -#endif diff --git a/libc/kernel/arch-sh/asm/parport.h b/libc/kernel/arch-sh/asm/parport.h deleted file mode 100644 index 8375b515d..000000000 --- a/libc/kernel/arch-sh/asm/parport.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PARPORT_H -#define __ASM_SH_PARPORT_H - -#endif diff --git a/libc/kernel/arch-sh/asm/pci.h b/libc/kernel/arch-sh/asm/pci.h deleted file mode 100644 index 1fafad9a3..000000000 --- a/libc/kernel/arch-sh/asm/pci.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PCI_H -#define __ASM_SH_PCI_H - -#include - -#include - -#endif - diff --git a/libc/kernel/arch-sh/asm/percpu.h b/libc/kernel/arch-sh/asm/percpu.h deleted file mode 100644 index 1b3a8cb72..000000000 --- a/libc/kernel/arch-sh/asm/percpu.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ARCH_SH_PERCPU -#define __ARCH_SH_PERCPU - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/pgalloc.h b/libc/kernel/arch-sh/asm/pgalloc.h deleted file mode 100644 index 6c15ea589..000000000 --- a/libc/kernel/arch-sh/asm/pgalloc.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PGALLOC_H -#define __ASM_SH_PGALLOC_H - -#include -#include - -#define QUICK_PGD 0 -#define QUICK_PT 1 - -#define pmd_pgtable(pmd) pmd_page(pmd) -#define __pte_free_tlb(tlb,pte) do { pgtable_page_dtor(pte); tlb_remove_page((tlb), (pte)); } while (0) -#define pmd_free(mm, x) do { } while (0) -#define __pmd_free_tlb(tlb,x) do { } while (0) -#endif diff --git a/libc/kernel/arch-sh/asm/pgtable.h b/libc/kernel/arch-sh/asm/pgtable.h deleted file mode 100644 index 3c8ece1e2..000000000 --- a/libc/kernel/arch-sh/asm/pgtable.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PGTABLE_H -#define __ASM_SH_PGTABLE_H - -#include -#include - -#ifndef __ASSEMBLY__ -#include -#include - -#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) - -#endif - -#define NEFF 32 -#define NEFF_SIGN (1LL << (NEFF - 1)) -#define NEFF_MASK (-1LL << NEFF) - -#define NPHYS 29 - -#define NPHYS_SIGN (1LL << (NPHYS - 1)) -#define NPHYS_MASK (-1LL << NPHYS) - -#define PTE_MAGNITUDE 2 -#define PTE_SHIFT PAGE_SHIFT -#define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE) - -#define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) -#define PGDIR_SIZE (1UL << PGDIR_SHIFT) -#define PGDIR_MASK (~(PGDIR_SIZE-1)) - -#define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) -#define PTRS_PER_PGD (PAGE_SIZE / sizeof(pgd_t)) - -#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) -#define FIRST_USER_ADDRESS 0 - -#define PHYS_ADDR_MASK 0x1fffffff - -#define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) - -#define VMALLOC_START (P3SEG) -#define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) - -#include - -#define __P000 PAGE_NONE -#define __P001 PAGE_READONLY -#define __P010 PAGE_COPY -#define __P011 PAGE_COPY -#define __P100 PAGE_EXECREAD -#define __P101 PAGE_EXECREAD -#define __P110 PAGE_COPY -#define __P111 PAGE_COPY - -#define __S000 PAGE_NONE -#define __S001 PAGE_READONLY -#define __S010 PAGE_WRITEONLY -#define __S011 PAGE_SHARED -#define __S100 PAGE_EXECREAD -#define __S101 PAGE_EXECREAD -#define __S110 PAGE_RWX -#define __S111 PAGE_RWX - -typedef pte_t *pte_addr_t; - -#define kern_addr_valid(addr) (1) - -#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) remap_pfn_range(vma, vaddr, pfn, size, prot) - -#define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT))) - -#define pgtable_cache_init() do { } while (0) - -struct mm_struct; -#define __HAVE_ARCH_PTEP_GET_AND_CLEAR - -struct vm_area_struct; - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/pgtable_32.h b/libc/kernel/arch-sh/asm/pgtable_32.h deleted file mode 100644 index 6ef21f191..000000000 --- a/libc/kernel/arch-sh/asm/pgtable_32.h +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PGTABLE_32_H -#define __ASM_SH_PGTABLE_32_H - -#define _PAGE_WT 0x001 -#define _PAGE_HW_SHARED 0x002 -#define _PAGE_DIRTY 0x004 -#define _PAGE_CACHABLE 0x008 -#define _PAGE_SZ0 0x010 -#define _PAGE_RW 0x020 -#define _PAGE_USER 0x040 -#define _PAGE_SZ1 0x080 -#define _PAGE_PRESENT 0x100 -#define _PAGE_PROTNONE 0x200 -#define _PAGE_ACCESSED 0x400 -#define _PAGE_FILE _PAGE_WT - -#define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) -#define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER) - -#define _PAGE_EXT_ESZ0 0x0010 -#define _PAGE_EXT_ESZ1 0x0020 -#define _PAGE_EXT_ESZ2 0x0040 -#define _PAGE_EXT_ESZ3 0x0080 - -#define _PAGE_EXT_USER_EXEC 0x0100 -#define _PAGE_EXT_USER_WRITE 0x0200 -#define _PAGE_EXT_USER_READ 0x0400 - -#define _PAGE_EXT_KERN_EXEC 0x0800 -#define _PAGE_EXT_KERN_WRITE 0x1000 -#define _PAGE_EXT_KERN_READ 0x2000 - -#define _PAGE_EXT(x) ((unsigned long long)(x) << 32) - -#define _PAGE_PCC_AREA5 0x00000000 -#define _PAGE_PCC_AREA6 0x80000000 - -#define _PAGE_PCC_IODYN 0x00000001 -#define _PAGE_PCC_IO8 0x20000000 -#define _PAGE_PCC_IO16 0x20000001 -#define _PAGE_PCC_COM8 0x40000000 -#define _PAGE_PCC_COM16 0x40000001 -#define _PAGE_PCC_ATR8 0x60000000 -#define _PAGE_PCC_ATR16 0x60000001 - -#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | _PAGE_FILE) - -#define _PAGE_FLAGS_HARDWARE_MASK (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS)) - -#define _PAGE_FLAGS_HARD _PAGE_SZ0 - -#ifndef _PAGE_SZHUGE -#define _PAGE_SZHUGE (_PAGE_FLAGS_HARD) -#endif - -#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | _PAGE_DIRTY) - -#ifndef __ASSEMBLY__ - -#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD) - -#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD) - -#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD) - -#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD) - -#define PAGE_EXECREAD PAGE_READONLY -#define PAGE_RWX PAGE_SHARED -#define PAGE_WRITEONLY PAGE_SHARED - -#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD) - -#define PAGE_KERNEL_NOCACHE __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD) - -#define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD) - -#define PAGE_KERNEL_PCC(slot, type) __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_FLAGS_HARD | (slot ? _PAGE_PCC_AREA5 : _PAGE_PCC_AREA6) | (type)) - -#endif - -#ifndef __ASSEMBLY__ - -#define set_pte(pteptr, pteval) (*(pteptr) = pteval) - -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) - -#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) - -#define pfn_pte(pfn, prot) __pte(((unsigned long long)(pfn) << PAGE_SHIFT) | pgprot_val(prot)) -#define pfn_pmd(pfn, prot) __pmd(((unsigned long long)(pfn) << PAGE_SHIFT) | pgprot_val(prot)) - -#define pte_none(x) (!pte_val(x)) -#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) - -#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) - -#define pmd_none(x) (!pmd_val(x)) -#define pmd_present(x) (pmd_val(x)) -#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) -#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) - -#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) -#define pte_page(x) pfn_to_page(pte_pfn(x)) - -#define pte_not_present(pte) (!((pte).pte_low & _PAGE_PRESENT)) -#define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) -#define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) -#define pte_file(pte) ((pte).pte_low & _PAGE_FILE) -#define pte_special(pte) (0) - -#define pte_write(pte) ((pte).pte_low & _PAGE_RW) - -#define PTE_BIT_FUNC(h,fn,op) static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; } - -#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~_PAGE_CACHABLE) -#define pgprot_noncached pgprot_writecombine -#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) -#define pmd_page_vaddr(pmd) ((unsigned long)pmd_val(pmd)) -#define pmd_page(pmd) (virt_to_page(pmd_val(pmd))) -#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) -#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) -#define pgd_offset_k(address) pgd_offset(&init_mm, address) -#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) -#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address)) -#define pte_offset_map(dir, address) pte_offset_kernel(dir, address) -#define pte_offset_map_nested(dir, address) pte_offset_kernel(dir, address) -#define pte_unmap(pte) do { } while (0) -#define pte_unmap_nested(pte) do { } while (0) -#define pte_ERROR(e) printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) -#define pgd_ERROR(e) printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) -#define __swp_type(x) ((x).val & 0xff) -#define __swp_offset(x) ((x).val >> 10) -#define __swp_entry(type, offset) ((swp_entry_t){(type) | (offset) <<10}) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val << 1 }) -#define PTE_FILE_MAX_BITS 29 -#define pte_to_pgoff(pte) (pte_val(pte) >> 1) -#define pgoff_to_pte(off) ((pte_t) { ((off) << 1) | _PAGE_FILE }) -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/pgtable_64.h b/libc/kernel/arch-sh/asm/pgtable_64.h deleted file mode 100644 index b5d60bb3d..000000000 --- a/libc/kernel/arch-sh/asm/pgtable_64.h +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PGTABLE_64_H -#define __ASM_SH_PGTABLE_64_H - -#include -#include -#include - -#define pte_ERROR(e) printk("%s:%d: bad pte %016Lx.\n", __FILE__, __LINE__, pte_val(e)) -#define pgd_ERROR(e) printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) - -#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) - -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) -#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) -#define __pgd_offset(address) pgd_index(address) -#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) -#define pgd_offset_k(address) pgd_offset(&init_mm, address) -#define _PMD_EMPTY 0x0 -#define pmd_present(pmd_entry) (pmd_val(pmd_entry) & _PAGE_PRESENT) -#define pmd_clear(pmd_entry_p) (set_pmd((pmd_entry_p), __pmd(_PMD_EMPTY))) -#define pmd_none(pmd_entry) (pmd_val((pmd_entry)) == _PMD_EMPTY) -#define pmd_bad(pmd_entry) ((pmd_val(pmd_entry) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) -#define pmd_page_vaddr(pmd_entry) ((unsigned long) __va(pmd_val(pmd_entry) & PAGE_MASK)) -#define pmd_page(pmd) (virt_to_page(pmd_val(pmd))) -#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) -#define pte_offset_kernel(dir, addr) ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) -#define pte_offset_map(dir,addr) pte_offset_kernel(dir, addr) -#define pte_offset_map_nested(dir,addr) pte_offset_kernel(dir, addr) -#define pte_unmap(pte) do { } while (0) -#define pte_unmap_nested(pte) do { } while (0) -#ifndef __ASSEMBLY__ -#define IOBASE_VADDR 0xff000000 -#define IOBASE_END 0xffffffff -#define _PAGE_WT 0x001 -#define _PAGE_DEVICE 0x001 -#define _PAGE_CACHABLE 0x002 -#define _PAGE_PRESENT 0x004 -#define _PAGE_FILE 0x004 -#define _PAGE_SIZE0 0x008 -#define _PAGE_SIZE1 0x010 -#define _PAGE_SHARED 0x020 -#define _PAGE_READ 0x040 -#define _PAGE_EXECUTE 0x080 -#define _PAGE_WRITE 0x100 -#define _PAGE_USER 0x200 -#define _PAGE_DIRTY 0x400 -#define _PAGE_ACCESSED 0x800 -#define _PAGE_FLAGS_HARDWARE_MASK 0xfffffffffffff3dbLL -#ifndef _PAGE_SZHUGE -#define _PAGE_SZHUGE (0) -#endif -#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | _PAGE_EXECUTE | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SHARED) -#define _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER) -#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) -#define _PAGE_COMMON (_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED) -#define PAGE_NONE __pgprot(_PAGE_CACHABLE | _PAGE_ACCESSED) -#define PAGE_SHARED __pgprot(_PAGE_COMMON | _PAGE_READ | _PAGE_WRITE | _PAGE_SHARED) -#define PAGE_EXECREAD __pgprot(_PAGE_COMMON | _PAGE_READ | _PAGE_EXECUTE) -#define PAGE_COPY PAGE_EXECREAD -#define PAGE_READONLY __pgprot(_PAGE_COMMON | _PAGE_READ) -#define PAGE_WRITEONLY __pgprot(_PAGE_COMMON | _PAGE_WRITE) -#define PAGE_RWX __pgprot(_PAGE_COMMON | _PAGE_READ | _PAGE_WRITE | _PAGE_EXECUTE) -#define PAGE_KERNEL __pgprot(_KERNPG_TABLE) -#define PAGE_KERNEL_NOCACHE __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | _PAGE_EXECUTE | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SHARED) -#define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) -#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~_PAGE_CACHABLE) - -#define __handle_bad_pmd(x) __handle_bad_pmd_kernel(x) - -#define _PTE_EMPTY 0x0 -#define pte_present(x) (pte_val(x) & _PAGE_PRESENT) -#define pte_clear(mm,addr,xp) (set_pte_at(mm, addr, xp, __pte(_PTE_EMPTY))) -#define pte_none(x) (pte_val(x) == _PTE_EMPTY) - -#define pte_pagenr(x) (((unsigned long) (pte_val(x)) - __MEMORY_START) >> PAGE_SHIFT) - -#define pte_page(x) (mem_map + pte_pagenr(x)) - -#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) - -#define mk_pte(page,pgprot) ({ pte_t __pte; set_pte(&__pte, __pte((((page)-mem_map) << PAGE_SHIFT) | __MEMORY_START | pgprot_val((pgprot)))); __pte; }) -#define mk_pte_phys(physpage, pgprot) ({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; }) -#define __swp_type(x) (((x).val & 3) + (((x).val >> 1) & 0x3c)) -#define __swp_offset(x) ((x).val >> 8) -#define __swp_entry(type, offset) ((swp_entry_t) { ((offset << 8) + ((type & 0x3c) << 1) + (type & 3)) }) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) -#define PTE_FILE_MAX_BITS 29 -#define pte_to_pgoff(pte) (pte_val(pte)) -#define pgoff_to_pte(off) ((pte_t) { (off) | _PAGE_FILE }) -#endif -#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) -#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) -#endif diff --git a/libc/kernel/arch-sh/asm/pm.h b/libc/kernel/arch-sh/asm/pm.h deleted file mode 100644 index ba4caa773..000000000 --- a/libc/kernel/arch-sh/asm/pm.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PM_H -#define __ASM_SH_PM_H - -#endif diff --git a/libc/kernel/arch-sh/asm/poll.h b/libc/kernel/arch-sh/asm/poll.h deleted file mode 100644 index 5b16673b5..000000000 --- a/libc/kernel/arch-sh/asm/poll.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/arch-sh/asm/posix_types.h b/libc/kernel/arch-sh/asm/posix_types.h deleted file mode 100644 index 7d13b5da6..000000000 --- a/libc/kernel/arch-sh/asm/posix_types.h +++ /dev/null @@ -1,16 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifdef __SH5__ -#include "posix_types_64.h" -#else -#include "posix_types_32.h" -#endif diff --git a/libc/kernel/arch-sh/asm/posix_types_32.h b/libc/kernel/arch-sh/asm/posix_types_32.h deleted file mode 100644 index 7cca40b7c..000000000 --- a/libc/kernel/arch-sh/asm/posix_types_32.h +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_POSIX_TYPES_H -#define __ASM_SH_POSIX_TYPES_H - -typedef unsigned long __kernel_ino_t; -typedef unsigned short __kernel_mode_t; -typedef unsigned short __kernel_nlink_t; -typedef long __kernel_off_t; -typedef int __kernel_pid_t; -typedef unsigned short __kernel_ipc_pid_t; -typedef unsigned short __kernel_uid_t; -typedef unsigned short __kernel_gid_t; -typedef unsigned int __kernel_size_t; -typedef int __kernel_ssize_t; -typedef int __kernel_ptrdiff_t; -typedef long __kernel_time_t; -typedef long __kernel_suseconds_t; -typedef long __kernel_clock_t; -typedef int __kernel_timer_t; -typedef int __kernel_clockid_t; -typedef int __kernel_daddr_t; -typedef char * __kernel_caddr_t; -typedef unsigned short __kernel_uid16_t; -typedef unsigned short __kernel_gid16_t; -typedef unsigned int __kernel_uid32_t; -typedef unsigned int __kernel_gid32_t; - -typedef unsigned short __kernel_old_uid_t; -typedef unsigned short __kernel_old_gid_t; -typedef unsigned short __kernel_old_dev_t; - -#ifdef __GNUC__ -typedef long long __kernel_loff_t; -#endif - -typedef struct { -#ifdef __USE_ALL - int val[2]; -#else - int __val[2]; -#endif -} __kernel_fsid_t; - -#if !defined(__GLIBC__) || __GLIBC__ < 2 - -#undef __FD_SET -static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - __fdsetp->fds_bits[__tmp] |= (1UL<<__rem); -} - -#undef __FD_CLR -static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem); -} - -#undef __FD_ISSET -static __inline__ int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0; -} - -#undef __FD_ZERO -static __inline__ void __FD_ZERO(__kernel_fd_set *__p) -{ - unsigned long *__tmp = __p->fds_bits; - int __i; - - if (__builtin_constant_p(__FDSET_LONGS)) { - switch (__FDSET_LONGS) { - case 16: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - __tmp[ 4] = 0; __tmp[ 5] = 0; - __tmp[ 6] = 0; __tmp[ 7] = 0; - __tmp[ 8] = 0; __tmp[ 9] = 0; - __tmp[10] = 0; __tmp[11] = 0; - __tmp[12] = 0; __tmp[13] = 0; - __tmp[14] = 0; __tmp[15] = 0; - return; - - case 8: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - __tmp[ 4] = 0; __tmp[ 5] = 0; - __tmp[ 6] = 0; __tmp[ 7] = 0; - return; - - case 4: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - return; - } - } - __i = __FDSET_LONGS; - while (__i) { - __i--; - *__tmp = 0; - __tmp++; - } -} - -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/posix_types_64.h b/libc/kernel/arch-sh/asm/posix_types_64.h deleted file mode 100644 index babc366be..000000000 --- a/libc/kernel/arch-sh/asm/posix_types_64.h +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH64_POSIX_TYPES_H -#define __ASM_SH64_POSIX_TYPES_H - -typedef unsigned long __kernel_ino_t; -typedef unsigned short __kernel_mode_t; -typedef unsigned short __kernel_nlink_t; -typedef long __kernel_off_t; -typedef int __kernel_pid_t; -typedef unsigned short __kernel_ipc_pid_t; -typedef unsigned short __kernel_uid_t; -typedef unsigned short __kernel_gid_t; -typedef long unsigned int __kernel_size_t; -typedef int __kernel_ssize_t; -typedef int __kernel_ptrdiff_t; -typedef long __kernel_time_t; -typedef long __kernel_suseconds_t; -typedef long __kernel_clock_t; -typedef int __kernel_timer_t; -typedef int __kernel_clockid_t; -typedef int __kernel_daddr_t; -typedef char * __kernel_caddr_t; -typedef unsigned short __kernel_uid16_t; -typedef unsigned short __kernel_gid16_t; -typedef unsigned int __kernel_uid32_t; -typedef unsigned int __kernel_gid32_t; - -typedef unsigned short __kernel_old_uid_t; -typedef unsigned short __kernel_old_gid_t; -typedef unsigned short __kernel_old_dev_t; - -#ifdef __GNUC__ -typedef long long __kernel_loff_t; -#endif - -typedef struct { -#ifdef __USE_ALL - int val[2]; -#else - int __val[2]; -#endif -} __kernel_fsid_t; - -#if !defined(__GLIBC__) || __GLIBC__ < 2 - -#undef __FD_SET -static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - __fdsetp->fds_bits[__tmp] |= (1UL<<__rem); -} - -#undef __FD_CLR -static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem); -} - -#undef __FD_ISSET -static __inline__ int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p) -{ - unsigned long __tmp = __fd / __NFDBITS; - unsigned long __rem = __fd % __NFDBITS; - return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0; -} - -#undef __FD_ZERO -static __inline__ void __FD_ZERO(__kernel_fd_set *__p) -{ - unsigned long *__tmp = __p->fds_bits; - int __i; - - if (__builtin_constant_p(__FDSET_LONGS)) { - switch (__FDSET_LONGS) { - case 16: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - __tmp[ 4] = 0; __tmp[ 5] = 0; - __tmp[ 6] = 0; __tmp[ 7] = 0; - __tmp[ 8] = 0; __tmp[ 9] = 0; - __tmp[10] = 0; __tmp[11] = 0; - __tmp[12] = 0; __tmp[13] = 0; - __tmp[14] = 0; __tmp[15] = 0; - return; - - case 8: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - __tmp[ 4] = 0; __tmp[ 5] = 0; - __tmp[ 6] = 0; __tmp[ 7] = 0; - return; - - case 4: - __tmp[ 0] = 0; __tmp[ 1] = 0; - __tmp[ 2] = 0; __tmp[ 3] = 0; - return; - } - } - __i = __FDSET_LONGS; - while (__i) { - __i--; - *__tmp = 0; - __tmp++; - } -} - -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/processor.h b/libc/kernel/arch-sh/asm/processor.h deleted file mode 100644 index e808ed6b4..000000000 --- a/libc/kernel/arch-sh/asm/processor.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PROCESSOR_H -#define __ASM_SH_PROCESSOR_H - -#include -#include - -#ifndef __ASSEMBLY__ - -enum cpu_type { - - CPU_SH7619, - - CPU_SH7203, CPU_SH7206, CPU_SH7263, CPU_MXG, - - CPU_SH7705, CPU_SH7706, CPU_SH7707, - CPU_SH7708, CPU_SH7708S, CPU_SH7708R, - CPU_SH7709, CPU_SH7709A, CPU_SH7710, CPU_SH7712, - CPU_SH7720, CPU_SH7721, CPU_SH7729, - - CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, - CPU_SH7760, CPU_SH4_202, CPU_SH4_501, - - CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, - CPU_SH7723, CPU_SHX3, - - CPU_SH7343, CPU_SH7722, CPU_SH7366, - - CPU_SH5_101, CPU_SH5_103, - - CPU_SH_NONE -}; - -struct sh_cpuinfo; - -#endif - -#include "processor_32.h" - -#endif diff --git a/libc/kernel/arch-sh/asm/processor_32.h b/libc/kernel/arch-sh/asm/processor_32.h deleted file mode 100644 index d60b2f8e6..000000000 --- a/libc/kernel/arch-sh/asm/processor_32.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PROCESSOR_32_H -#define __ASM_SH_PROCESSOR_32_H -#endif diff --git a/libc/kernel/arch-sh/asm/processor_64.h b/libc/kernel/arch-sh/asm/processor_64.h deleted file mode 100644 index 035a52676..000000000 --- a/libc/kernel/arch-sh/asm/processor_64.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PROCESSOR_64_H -#define __ASM_SH_PROCESSOR_64_H - -#ifndef __ASSEMBLY__ - -#include -#include -#include -#include -#include -#include - -#define current_text_addr() ({ void *pc; unsigned long long __dummy = 0; __asm__("gettr tr0, %1\n\t" "pta 4, tr0\n\t" "gettr tr0, %0\n\t" "ptabs %1, tr0\n\t" :"=r" (pc), "=r" (__dummy) : "1" (__dummy)); pc; }) - -struct tlb_info { - unsigned long long next; - unsigned long long first; - unsigned long long last; - - unsigned int entries; - unsigned int step; - - unsigned long flags; -}; - -struct sh_cpuinfo { - enum cpu_type type; - unsigned long loops_per_jiffy; - unsigned long asid_cache; - - unsigned int cpu_clock, master_clock, bus_clock, module_clock; - - struct cache_info icache; - struct cache_info dcache; - struct cache_info scache; - - struct tlb_info itlb; - struct tlb_info dtlb; - - unsigned long flags; -}; - -#define boot_cpu_data cpu_data[0] -#define current_cpu_data cpu_data[smp_processor_id()] -#define raw_current_cpu_data cpu_data[raw_smp_processor_id()] - -#endif - -#define TASK_SIZE 0x7ffff000UL - -#define STACK_TOP TASK_SIZE -#define STACK_TOP_MAX STACK_TOP - -#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) - -#define SR_MMU 0x80000000 - -#define SR_IMASK 0x000000f0 -#define SR_FD 0x00008000 -#define SR_SSTEP 0x08000000 - -#ifndef __ASSEMBLY__ - -struct sh_fpu_hard_struct { - unsigned long fp_regs[64]; - unsigned int fpscr; - -}; - -union sh_fpu_union { - struct sh_fpu_hard_struct hard; - - unsigned long long alignment_dummy; -}; - -struct thread_struct { - unsigned long sp; - unsigned long pc; - - struct pt_regs *kregs; - - struct pt_regs *uregs; - - unsigned long trap_no, error_code; - unsigned long address; - - union sh_fpu_union fpu; -}; - -#define INIT_MMAP { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } - -#define INIT_THREAD { .sp = sizeof(init_stack) + (long) &init_stack, .pc = 0, .kregs = &fake_swapper_regs, .uregs = NULL, .trap_no = 0, .error_code = 0, .address = 0, .fpu = { { { 0, } }, } } - -#define SR_USER (SR_MMU | SR_FD) - -#define start_thread(regs, new_pc, new_sp) set_fs(USER_DS); regs->sr = SR_USER; regs->pc = new_pc - 4; regs->pc |= 1; regs->regs[18] = 0; regs->regs[15] = new_sp - -struct task_struct; -struct mm_struct; - -#define copy_segments(p, mm) do { } while (0) -#define release_segments(mm) do { } while (0) -#define forget_segments() do { } while (0) -#define prepare_to_copy(tsk) do { } while (0) - -#define FPSCR_INIT 0x00000000 - -#define thread_saved_pc(tsk) (tsk->thread.pc) - -#define KSTK_EIP(tsk) ((tsk)->thread.pc) -#define KSTK_ESP(tsk) ((tsk)->thread.sp) - -#define cpu_relax() barrier() - -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/ptrace.h b/libc/kernel/arch-sh/asm/ptrace.h deleted file mode 100644 index 452af8134..000000000 --- a/libc/kernel/arch-sh/asm/ptrace.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PTRACE_H -#define __ASM_SH_PTRACE_H - -#ifdef __SH5__ -struct pt_regs { - unsigned long long pc; - unsigned long long sr; - unsigned long long syscall_nr; - unsigned long long regs[63]; - unsigned long long tregs[8]; - unsigned long long pad[2]; -}; -#else - -#define REG_REG0 0 -#define REG_REG15 15 - -#define REG_PC 16 - -#define REG_PR 17 -#define REG_SR 18 -#define REG_GBR 19 -#define REG_MACH 20 -#define REG_MACL 21 - -#define REG_SYSCALL 22 - -#define REG_FPREG0 23 -#define REG_FPREG15 38 -#define REG_XFREG0 39 -#define REG_XFREG15 54 - -#define REG_FPSCR 55 -#define REG_FPUL 56 - -struct pt_regs { - unsigned long regs[16]; - unsigned long pc; - unsigned long pr; - unsigned long sr; - unsigned long gbr; - unsigned long mach; - unsigned long macl; - long tra; -}; - -struct pt_dspregs { - unsigned long a1; - unsigned long a0g; - unsigned long a1g; - unsigned long m0; - unsigned long m1; - unsigned long a0; - unsigned long x0; - unsigned long x1; - unsigned long y0; - unsigned long y1; - unsigned long dsr; - unsigned long rs; - unsigned long re; - unsigned long mod; -}; - -#define PTRACE_GETFDPIC 31 - -#define PTRACE_GETFDPIC_EXEC 0 -#define PTRACE_GETFDPIC_INTERP 1 - -#define PTRACE_GETDSPREGS 55 -#define PTRACE_SETDSPREGS 56 -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/push-switch.h b/libc/kernel/arch-sh/asm/push-switch.h deleted file mode 100644 index e07bf6718..000000000 --- a/libc/kernel/arch-sh/asm/push-switch.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_PUSH_SWITCH_H -#define __ASM_SH_PUSH_SWITCH_H - -#include -#include -#include -#include - -struct push_switch { - - unsigned int state:1; - - struct timer_list debounce; - - struct work_struct work; - - struct platform_device *pdev; -}; - -struct push_switch_platform_info { - - irqreturn_t (*irq_handler)(int irq, void *data); - - unsigned int irq_flags; - - unsigned int bit; - - const char *name; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/r7780rp.h b/libc/kernel/arch-sh/asm/r7780rp.h deleted file mode 100644 index 50e0df818..000000000 --- a/libc/kernel/arch-sh/asm/r7780rp.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_RENESAS_R7780RP_H -#define __ASM_SH_RENESAS_R7780RP_H - -#define HL_FPGA_IRQ_BASE 200 -#define HL_NR_IRL 15 - -#define IRQ_AX88796 (HL_FPGA_IRQ_BASE + 0) -#define IRQ_CF (HL_FPGA_IRQ_BASE + 1) -#define IRQ_PSW (HL_FPGA_IRQ_BASE + 2) -#define IRQ_EXT0 (HL_FPGA_IRQ_BASE + 3) -#define IRQ_EXT1 (HL_FPGA_IRQ_BASE + 4) -#define IRQ_EXT2 (HL_FPGA_IRQ_BASE + 5) -#define IRQ_EXT3 (HL_FPGA_IRQ_BASE + 6) -#define IRQ_EXT4 (HL_FPGA_IRQ_BASE + 7) -#define IRQ_EXT5 (HL_FPGA_IRQ_BASE + 8) -#define IRQ_EXT6 (HL_FPGA_IRQ_BASE + 9) -#define IRQ_EXT7 (HL_FPGA_IRQ_BASE + 10) -#define IRQ_SMBUS (HL_FPGA_IRQ_BASE + 11) -#define IRQ_TP (HL_FPGA_IRQ_BASE + 12) -#define IRQ_RTC (HL_FPGA_IRQ_BASE + 13) -#define IRQ_TH_ALERT (HL_FPGA_IRQ_BASE + 14) -#define IRQ_SCIF0 (HL_FPGA_IRQ_BASE + 15) -#define IRQ_SCIF1 (HL_FPGA_IRQ_BASE + 16) - -#endif diff --git a/libc/kernel/arch-sh/asm/resource.h b/libc/kernel/arch-sh/asm/resource.h deleted file mode 100644 index da606ccca..000000000 --- a/libc/kernel/arch-sh/asm/resource.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_RESOURCE_H -#define __ASM_SH_RESOURCE_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/rtc.h b/libc/kernel/arch-sh/asm/rtc.h deleted file mode 100644 index ecc6f37e8..000000000 --- a/libc/kernel/arch-sh/asm/rtc.h +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_RTC_H -#define _ASM_RTC_H - -#define RTC_CAP_4_DIGIT_YEAR (1 << 0) - -struct sh_rtc_platform_info { - unsigned long capabilities; -}; - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/rts7751r2d.h b/libc/kernel/arch-sh/asm/rts7751r2d.h deleted file mode 100644 index 775f25bce..000000000 --- a/libc/kernel/arch-sh/asm/rts7751r2d.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_RENESAS_RTS7751R2D_H -#define __ASM_SH_RENESAS_RTS7751R2D_H - -#define PA_BCR 0xa4000000 -#define PA_IRLMON 0xa4000002 -#define PA_CFCTL 0xa4000004 -#define PA_CFPOW 0xa4000006 -#define PA_DISPCTL 0xa4000008 -#define PA_SDMPOW 0xa400000a -#define PA_RTCCE 0xa400000c -#define PA_PCICD 0xa400000e -#define PA_VOYAGERRTS 0xa4000020 - -#define PA_R2D1_AXRST 0xa4000022 -#define PA_R2D1_CFRST 0xa4000024 -#define PA_R2D1_ADMRTS 0xa4000026 -#define PA_R2D1_EXTRST 0xa4000028 -#define PA_R2D1_CFCDINTCLR 0xa400002a - -#define PA_R2DPLUS_CFRST 0xa4000022 -#define PA_R2DPLUS_ADMRTS 0xa4000024 -#define PA_R2DPLUS_EXTRST 0xa4000026 -#define PA_R2DPLUS_CFCDINTCLR 0xa4000028 -#define PA_R2DPLUS_KEYCTLCLR 0xa400002a - -#define PA_POWOFF 0xa4000030 -#define PA_VERREG 0xa4000032 -#define PA_INPORT 0xa4000034 -#define PA_OUTPORT 0xa4000036 -#define PA_BVERREG 0xa4000038 - -#define PA_AX88796L 0xaa000400 -#define PA_VOYAGER 0xab000000 -#define PA_IDE_OFFSET 0x1f0 -#define AX88796L_IO_BASE 0x1000 - -#define IRLCNTR1 (PA_BCR + 0) - -#define R2D_FPGA_IRQ_BASE 100 - -#define IRQ_VOYAGER (R2D_FPGA_IRQ_BASE + 0) -#define IRQ_EXT (R2D_FPGA_IRQ_BASE + 1) -#define IRQ_TP (R2D_FPGA_IRQ_BASE + 2) -#define IRQ_RTC_T (R2D_FPGA_IRQ_BASE + 3) -#define IRQ_RTC_A (R2D_FPGA_IRQ_BASE + 4) -#define IRQ_SDCARD (R2D_FPGA_IRQ_BASE + 5) -#define IRQ_CF_CD (R2D_FPGA_IRQ_BASE + 6) -#define IRQ_CF_IDE (R2D_FPGA_IRQ_BASE + 7) -#define IRQ_AX88796 (R2D_FPGA_IRQ_BASE + 8) -#define IRQ_KEY (R2D_FPGA_IRQ_BASE + 9) -#define IRQ_PCI_INTA (R2D_FPGA_IRQ_BASE + 10) -#define IRQ_PCI_INTB (R2D_FPGA_IRQ_BASE + 11) -#define IRQ_PCI_INTC (R2D_FPGA_IRQ_BASE + 12) -#define IRQ_PCI_INTD (R2D_FPGA_IRQ_BASE + 13) - -#endif diff --git a/libc/kernel/arch-sh/asm/rwsem.h b/libc/kernel/arch-sh/asm/rwsem.h deleted file mode 100644 index 4b5552e1c..000000000 --- a/libc/kernel/arch-sh/asm/rwsem.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_RWSEM_H -#define _ASM_SH_RWSEM_H - -#ifndef _LINUX_RWSEM_H -#error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/scatterlist.h b/libc/kernel/arch-sh/asm/scatterlist.h deleted file mode 100644 index 1c5c81838..000000000 --- a/libc/kernel/arch-sh/asm/scatterlist.h +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SCATTERLIST_H -#define __ASM_SH_SCATTERLIST_H - -#include - -struct scatterlist { - unsigned long page_link; - unsigned int offset; - dma_addr_t dma_address; - unsigned int length; -}; - -#define ISA_DMA_THRESHOLD PHYS_ADDR_MASK - -#define sg_dma_address(sg) ((sg)->dma_address) -#define sg_dma_len(sg) ((sg)->length) - -#endif diff --git a/libc/kernel/arch-sh/asm/sdk7780.h b/libc/kernel/arch-sh/asm/sdk7780.h deleted file mode 100644 index e5659d9f2..000000000 --- a/libc/kernel/arch-sh/asm/sdk7780.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_RENESAS_SDK7780_H -#define __ASM_SH_RENESAS_SDK7780_H - -#include - -#define SE_AREA0_WIDTH 4 -#define PA_ROM 0xa0000000 -#define PA_ROM_SIZE 0x00400000 -#define PA_FROM 0xa0800000 -#define PA_FROM_SIZE 0x00400000 -#define PA_EXT1 0xa4000000 -#define PA_EXT1_SIZE 0x04000000 -#define PA_SDRAM 0xa8000000 -#define PA_SDRAM_SIZE 0x08000000 - -#define PA_EXT4 0xb0000000 -#define PA_EXT4_SIZE 0x04000000 -#define PA_EXT_USER PA_EXT4 - -#define PA_PERIPHERAL PA_AREA5_IO - -#define PA_RESERVED (PA_PERIPHERAL + 0) - -#define PA_FPGA (PA_PERIPHERAL + 0x01000000) - -#define PA_LAN (PA_PERIPHERAL + 0x01800000) - -#define FPGA_SRSTR (PA_FPGA + 0x000) -#define FPGA_IRQ0SR (PA_FPGA + 0x010) -#define FPGA_IRQ0MR (PA_FPGA + 0x020) -#define FPGA_BDMR (PA_FPGA + 0x030) -#define FPGA_INTT0PRTR (PA_FPGA + 0x040) -#define FPGA_INTT0SELR (PA_FPGA + 0x050) -#define FPGA_INTT1POLR (PA_FPGA + 0x060) -#define FPGA_NMIR (PA_FPGA + 0x070) -#define FPGA_NMIMR (PA_FPGA + 0x080) -#define FPGA_IRQR (PA_FPGA + 0x090) -#define FPGA_IRQMR (PA_FPGA + 0x0A0) -#define FPGA_SLEDR (PA_FPGA + 0x0B0) -#define PA_LED FPGA_SLEDR -#define FPGA_MAPSWR (PA_FPGA + 0x0C0) -#define FPGA_FPVERR (PA_FPGA + 0x0D0) -#define FPGA_FPDATER (PA_FPGA + 0x0E0) -#define FPGA_RSE (PA_FPGA + 0x100) -#define FPGA_EASR (PA_FPGA + 0x110) -#define FPGA_SPER (PA_FPGA + 0x120) -#define FPGA_IMSR (PA_FPGA + 0x130) -#define FPGA_PCIMR (PA_FPGA + 0x140) -#define FPGA_DIPSWMR (PA_FPGA + 0x150) -#define FPGA_FPODR (PA_FPGA + 0x160) -#define FPGA_ATAESR (PA_FPGA + 0x170) -#define FPGA_IRQPOLR (PA_FPGA + 0x180) - -#define SDK7780_NR_IRL 15 - -#define IRQ_CFCARD 14 - -#define IRQ_ETHERNET 6 - -#define __IO_PREFIX sdk7780 -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/seccomp.h b/libc/kernel/arch-sh/asm/seccomp.h deleted file mode 100644 index ab9cab3c4..000000000 --- a/libc/kernel/arch-sh/asm/seccomp.h +++ /dev/null @@ -1,21 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SECCOMP_H - -#include - -#define __NR_seccomp_read __NR_read -#define __NR_seccomp_write __NR_write -#define __NR_seccomp_exit __NR_exit -#define __NR_seccomp_sigreturn __NR_rt_sigreturn - -#endif diff --git a/libc/kernel/arch-sh/asm/sections.h b/libc/kernel/arch-sh/asm/sections.h deleted file mode 100644 index 71c66a64d..000000000 --- a/libc/kernel/arch-sh/asm/sections.h +++ /dev/null @@ -1,18 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SECTIONS_H -#define __ASM_SH_SECTIONS_H - -#include - -#endif - diff --git a/libc/kernel/arch-sh/asm/segment.h b/libc/kernel/arch-sh/asm/segment.h deleted file mode 100644 index 3525a35c4..000000000 --- a/libc/kernel/arch-sh/asm/segment.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SEGMENT_H -#define __ASM_SH_SEGMENT_H - -#ifndef __ASSEMBLY__ - -typedef struct { - unsigned long seg; -} mm_segment_t; - -#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) - -#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL) -#define USER_DS MAKE_MM_SEG(PAGE_OFFSET) - -#define segment_eq(a,b) ((a).seg == (b).seg) - -#define get_ds() (KERNEL_DS) - -#define get_fs() (current_thread_info()->addr_limit) -#define set_fs(x) (current_thread_info()->addr_limit = (x)) - -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/sembuf.h b/libc/kernel/arch-sh/asm/sembuf.h deleted file mode 100644 index 7c0bdf9f4..000000000 --- a/libc/kernel/arch-sh/asm/sembuf.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SEMBUF_H -#define __ASM_SH_SEMBUF_H - -struct semid64_ds { - struct ipc64_perm sem_perm; - __kernel_time_t sem_otime; - unsigned long __unused1; - __kernel_time_t sem_ctime; - unsigned long __unused2; - unsigned long sem_nsems; - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/serial.h b/libc/kernel/arch-sh/asm/serial.h deleted file mode 100644 index ae5941109..000000000 --- a/libc/kernel/arch-sh/asm/serial.h +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SERIAL_H -#define _ASM_SERIAL_H - -#include - -#define BASE_BAUD ( 1843200 / 16 ) - -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) - -#define SERIAL_PORT_DFNS - -#endif diff --git a/libc/kernel/arch-sh/asm/setup.h b/libc/kernel/arch-sh/asm/setup.h deleted file mode 100644 index f97e133da..000000000 --- a/libc/kernel/arch-sh/asm/setup.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _SH_SETUP_H -#define _SH_SETUP_H - -#define COMMAND_LINE_SIZE 256 - -#endif diff --git a/libc/kernel/arch-sh/asm/sfp-machine.h b/libc/kernel/arch-sh/asm/sfp-machine.h deleted file mode 100644 index f5e9844f8..000000000 --- a/libc/kernel/arch-sh/asm/sfp-machine.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _SFP_MACHINE_H -#define _SFP_MACHINE_H - -#define _FP_W_TYPE_SIZE 32 -#define _FP_W_TYPE unsigned long -#define _FP_WS_TYPE signed long -#define _FP_I_TYPE long - -#define _FP_MUL_MEAT_S(R,X,Y) _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -#define _FP_MUL_MEAT_D(R,X,Y) _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -#define _FP_MUL_MEAT_Q(R,X,Y) _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) - -#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv(S,R,X,Y) -#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) -#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) - -#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 -#define _FP_NANSIGN_S 0 -#define _FP_NANSIGN_D 0 -#define _FP_NANSIGN_Q 0 - -#define _FP_KEEPNANFRACP 1 - -#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) do { if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) { R##_s = Y##_s; _FP_FRAC_COPY_##wc(R,Y); } else { R##_s = X##_s; _FP_FRAC_COPY_##wc(R,X); } R##_c = FP_CLS_NAN; } while (0) - -#define FP_DENORM_ZERO 1 - -#define FP_EX_INVALID (1<<4) -#define FP_EX_DIVZERO (1<<3) -#define FP_EX_OVERFLOW (1<<2) -#define FP_EX_UNDERFLOW (1<<1) -#define FP_EX_INEXACT (1<<0) - -#endif - diff --git a/libc/kernel/arch-sh/asm/sh7760fb.h b/libc/kernel/arch-sh/asm/sh7760fb.h deleted file mode 100644 index 1082668a9..000000000 --- a/libc/kernel/arch-sh/asm/sh7760fb.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_SH7760FB_H -#define _ASM_SH_SH7760FB_H - -#define SH7760FB_PALETTE_MASK 0x00f8fcf8 - -#define SH7760FB_DMA_MASK 0x0C000000 - -#define LDPR(x) (((x) << 2)) - -#define LDICKR 0x400 -#define LDMTR 0x402 - -#define LDDFR 0x404 -#define LDDFR_PABD (1 << 8) -#define LDDFR_COLOR_MASK 0x7F -#define LDSMR 0x406 -#define LDSMR_ROT (1 << 13) -#define LDSARU 0x408 -#define LDSARL 0x40c -#define LDLAOR 0x410 -#define LDPALCR 0x412 -#define LDPALCR_PALS (1 << 4) -#define LDPALCR_PALEN (1 << 0) -#define LDHCNR 0x414 -#define LDHSYNR 0x416 -#define LDVDLNR 0x418 -#define LDVTLNR 0x41a -#define LDVSYNR 0x41c -#define LDACLNR 0x41e -#define LDINTR 0x420 -#define LDPMMR 0x424 -#define LDPSPR 0x426 -#define LDCNTR 0x428 -#define LDCNTR_DON (1 << 0) -#define LDCNTR_DON2 (1 << 4) - -#define LDINTR_VINTSEL (1 << 12) -#define LDINTR_VINTE (1 << 8) -#define LDINTR_VINTS (1 << 0) -#define VINT_START (LDINTR_VINTSEL) -#define VINT_CHECK (LDINTR_VINTS) - -#define LDMTR_FLMPOL (1 << 15) - -#define LDMTR_CL1POL (1 << 14) - -#define LDMTR_DISPEN_LOWACT (1 << 13) - -#define LDMTR_DPOL_LOWACT (1 << 12) - -#define LDMTR_MCNT (1 << 10) - -#define LDMTR_CL1CNT (1 << 9) - -#define LDMTR_CL2CNT (1 << 8) - -#define LDMTR_STN_MONO_4 0x00 -#define LDMTR_STN_MONO_8 0x01 -#define LDMTR_STN_COLOR_4 0x08 -#define LDMTR_STN_COLOR_8 0x09 -#define LDMTR_STN_COLOR_12 0x0A -#define LDMTR_STN_COLOR_16 0x0B -#define LDMTR_DSTN_MONO_8 0x11 -#define LDMTR_DSTN_MONO_16 0x13 -#define LDMTR_DSTN_COLOR_8 0x19 -#define LDMTR_DSTN_COLOR_12 0x1A -#define LDMTR_DSTN_COLOR_16 0x1B -#define LDMTR_TFT_COLOR_16 0x2B - -#define LDDFR_1BPP_MONO 0x00 -#define LDDFR_2BPP_MONO 0x01 -#define LDDFR_4BPP_MONO 0x02 -#define LDDFR_6BPP_MONO 0x04 -#define LDDFR_4BPP 0x0A -#define LDDFR_8BPP 0x0C -#define LDDFR_16BPP_RGB555 0x1D -#define LDDFR_16BPP_RGB565 0x2D - -#define LCDC_CLKSRC_BUSCLOCK 0 -#define LCDC_CLKSRC_PERIPHERAL 1 -#define LCDC_CLKSRC_EXTERNAL 2 - -#define LDICKR_CLKSRC(x) (((x) & 3) << 12) - -#define LDICKR_CLKDIV(x) ((x) & 0x1f) - -struct sh7760fb_platdata { - - struct fb_videomode *def_mode; - - u16 ldmtr; - - u16 lddfr; - - u16 ldpmmr; - u16 ldpspr; - - u16 ldaclnr; - - u16 ldickr; - - int rotate; - - int novsync; - - void (*blank) (int); -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/sh7763rdp.h b/libc/kernel/arch-sh/asm/sh7763rdp.h deleted file mode 100644 index 7c1aa1982..000000000 --- a/libc/kernel/arch-sh/asm/sh7763rdp.h +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SH7763RDP_H -#define __ASM_SH_SH7763RDP_H - -#include - -#define MSTPCR1 0xFFC80038 - -#define PORT_PSEL0 0xFFEF0070 -#define PORT_PSEL1 0xFFEF0072 -#define PORT_PSEL2 0xFFEF0074 -#define PORT_PSEL3 0xFFEF0076 -#define PORT_PSEL4 0xFFEF0078 - -#define PORT_PACR 0xFFEF0000 -#define PORT_PCCR 0xFFEF0004 -#define PORT_PFCR 0xFFEF000A -#define PORT_PGCR 0xFFEF000C -#define PORT_PHCR 0xFFEF000E -#define PORT_PICR 0xFFEF0010 -#define PORT_PJCR 0xFFEF0012 -#define PORT_PKCR 0xFFEF0014 -#define PORT_PLCR 0xFFEF0016 -#define PORT_PMCR 0xFFEF0018 -#define PORT_PNCR 0xFFEF001A - -#define CPLD_BOARD_ID_ERV_REG 0xB1000000 -#define CPLD_CPLD_CMD_REG 0xB1000006 - -#define USB_USBHSC 0xFFEC80f0 - -#define __IO_PREFIX sh7763rdp -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/sh7785lcr.h b/libc/kernel/arch-sh/asm/sh7785lcr.h deleted file mode 100644 index 0729f5312..000000000 --- a/libc/kernel/arch-sh/asm/sh7785lcr.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_RENESAS_SH7785LCR_H -#define __ASM_SH_RENESAS_SH7785LCR_H - -#define NOR_FLASH_ADDR 0x00000000 -#define NOR_FLASH_SIZE 0x04000000 - -#define PLD_BASE_ADDR 0x04000000 -#define PLD_PCICR (PLD_BASE_ADDR + 0x00) -#define PLD_LCD_BK_CONTR (PLD_BASE_ADDR + 0x02) -#define PLD_LOCALCR (PLD_BASE_ADDR + 0x04) -#define PLD_POFCR (PLD_BASE_ADDR + 0x06) -#define PLD_LEDCR (PLD_BASE_ADDR + 0x08) -#define PLD_SWSR (PLD_BASE_ADDR + 0x0a) -#define PLD_VERSR (PLD_BASE_ADDR + 0x0c) -#define PLD_MMSR (PLD_BASE_ADDR + 0x0e) - -#define SM107_MEM_ADDR 0x10000000 -#define SM107_MEM_SIZE 0x00e00000 -#define SM107_REG_ADDR 0x13e00000 -#define SM107_REG_SIZE 0x00200000 - -#define R8A66597_ADDR 0x08000000 -#define CG200_ADDR 0x0c000000 -#define PCA9564_ADDR 0x14000000 - -#define R8A66597_SIZE 0x00000100 -#define CG200_SIZE 0x00010000 -#define PCA9564_SIZE 0x00000100 - -#endif - diff --git a/libc/kernel/arch-sh/asm/sh_bios.h b/libc/kernel/arch-sh/asm/sh_bios.h deleted file mode 100644 index d78679a7b..000000000 --- a/libc/kernel/arch-sh/asm/sh_bios.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_BIOS_H -#define __ASM_SH_BIOS_H - -#endif diff --git a/libc/kernel/arch-sh/asm/sh_eth.h b/libc/kernel/arch-sh/asm/sh_eth.h deleted file mode 100644 index f9fc253d6..000000000 --- a/libc/kernel/arch-sh/asm/sh_eth.h +++ /dev/null @@ -1,22 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_ETH_H__ -#define __ASM_SH_ETH_H__ - -enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; - -struct sh_eth_plat_data { - int phy; - int edmac_endian; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/sh_keysc.h b/libc/kernel/arch-sh/asm/sh_keysc.h deleted file mode 100644 index a14b47f3b..000000000 --- a/libc/kernel/arch-sh/asm/sh_keysc.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_KEYSC_H__ -#define __ASM_KEYSC_H__ - -#define SH_KEYSC_MAXKEYS 30 - -struct sh_keysc_info { - enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode; - int scan_timing; - int delay; - int keycodes[SH_KEYSC_MAXKEYS]; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/sh_mobile_lcdc.h b/libc/kernel/arch-sh/asm/sh_mobile_lcdc.h deleted file mode 100644 index 2b3e730ca..000000000 --- a/libc/kernel/arch-sh/asm/sh_mobile_lcdc.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_MOBILE_LCDC_H__ -#define __ASM_SH_MOBILE_LCDC_H__ - -#include - -enum { RGB8, - RGB9, - RGB12A, - RGB12B, - RGB16, - RGB18, - RGB24, - SYS8A, - SYS8B, - SYS8C, - SYS8D, - SYS9, - SYS12, - SYS16A, - SYS16B, - SYS16C, - SYS18, - SYS24 }; - -enum { LCDC_CHAN_DISABLED = 0, - LCDC_CHAN_MAINLCD, - LCDC_CHAN_SUBLCD }; - -enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; - -struct sh_mobile_lcdc_sys_bus_cfg { - unsigned long ldmt2r; - unsigned long ldmt3r; -}; - -struct sh_mobile_lcdc_sys_bus_ops { - void (*write_index)(void *handle, unsigned long data); - void (*write_data)(void *handle, unsigned long data); - unsigned long (*read_data)(void *handle); -}; - -struct sh_mobile_lcdc_board_cfg { - void *board_data; - int (*setup_sys)(void *board_data, void *sys_ops_handle, - struct sh_mobile_lcdc_sys_bus_ops *sys_ops); - void (*display_on)(void *board_data); - void (*display_off)(void *board_data); -}; - -struct sh_mobile_lcdc_lcd_size_cfg { - unsigned long width; - unsigned long height; -}; - -struct sh_mobile_lcdc_chan_cfg { - int chan; - int bpp; - int interface_type; - int clock_divider; - struct fb_videomode lcd_cfg; - struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; - struct sh_mobile_lcdc_board_cfg board_cfg; - struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; -}; - -struct sh_mobile_lcdc_info { - unsigned long lddckr; - int clock_source; - struct sh_mobile_lcdc_chan_cfg ch[2]; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/shmbuf.h b/libc/kernel/arch-sh/asm/shmbuf.h deleted file mode 100644 index 7cbe0c723..000000000 --- a/libc/kernel/arch-sh/asm/shmbuf.h +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SHMBUF_H -#define __ASM_SH_SHMBUF_H - -struct shmid64_ds { - struct ipc64_perm shm_perm; - size_t shm_segsz; - __kernel_time_t shm_atime; - unsigned long __unused1; - __kernel_time_t shm_dtime; - unsigned long __unused2; - __kernel_time_t shm_ctime; - unsigned long __unused3; - __kernel_pid_t shm_cpid; - __kernel_pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __unused4; - unsigned long __unused5; -}; - -struct shminfo64 { - unsigned long shmmax; - unsigned long shmmin; - unsigned long shmmni; - unsigned long shmseg; - unsigned long shmall; - unsigned long __unused1; - unsigned long __unused2; - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/shmin.h b/libc/kernel/arch-sh/asm/shmin.h deleted file mode 100644 index 0d61b944c..000000000 --- a/libc/kernel/arch-sh/asm/shmin.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SHMIN_H -#define __ASM_SH_SHMIN_H - -#define SHMIN_IO_BASE 0xb0000000UL - -#define SHMIN_NE_IRQ IRQ2_IRQ -#define SHMIN_NE_BASE 0x300 - -#endif diff --git a/libc/kernel/arch-sh/asm/shmparam.h b/libc/kernel/arch-sh/asm/shmparam.h deleted file mode 100644 index a51628ef9..000000000 --- a/libc/kernel/arch-sh/asm/shmparam.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SHMPARAM_H -#define __ASM_SH_SHMPARAM_H - -#define SHMLBA 0x4000 - -#define __ARCH_FORCE_SHMLBA - -#endif diff --git a/libc/kernel/arch-sh/asm/sigcontext.h b/libc/kernel/arch-sh/asm/sigcontext.h deleted file mode 100644 index 3cf7cad64..000000000 --- a/libc/kernel/arch-sh/asm/sigcontext.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SIGCONTEXT_H -#define __ASM_SH_SIGCONTEXT_H - -struct sigcontext { - unsigned long oldmask; - -#ifdef __SH5__ - - unsigned long long sc_regs[63]; - unsigned long long sc_tregs[8]; - unsigned long long sc_pc; - unsigned long long sc_sr; - - unsigned long long sc_fpregs[32]; - unsigned int sc_fpscr; - unsigned int sc_fpvalid; -#else - - unsigned long sc_regs[16]; - unsigned long sc_pc; - unsigned long sc_pr; - unsigned long sc_sr; - unsigned long sc_gbr; - unsigned long sc_mach; - unsigned long sc_macl; - - unsigned long sc_fpregs[16]; - unsigned long sc_xfpregs[16]; - unsigned int sc_fpscr; - unsigned int sc_fpul; - unsigned int sc_ownedfp; -#endif -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/siginfo.h b/libc/kernel/arch-sh/asm/siginfo.h deleted file mode 100644 index 864960e4a..000000000 --- a/libc/kernel/arch-sh/asm/siginfo.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SIGINFO_H -#define __ASM_SH_SIGINFO_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/signal.h b/libc/kernel/arch-sh/asm/signal.h deleted file mode 100644 index 5edf0d250..000000000 --- a/libc/kernel/arch-sh/asm/signal.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SIGNAL_H -#define __ASM_SH_SIGNAL_H - -#include - -struct pt_regs; -struct siginfo; - -#define NSIG 32 -typedef unsigned long sigset_t; - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO - -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED 31 - -#define SIGRTMIN 32 -#define SIGRTMAX _NSIG - -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 -#define SA_SIGINFO 0x00000004 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -#define SA_RESTORER 0x04000000 - -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 - -#include - -struct sigaction { - union { - __sighandler_t _sa_handler; - void (*_sa_sigaction)(int, struct siginfo *, void *); - } _u; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -#define sa_handler _u._sa_handler -#define sa_sigaction _u._sa_sigaction - -typedef struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -} stack_t; - -#endif diff --git a/libc/kernel/arch-sh/asm/smc37c93x.h b/libc/kernel/arch-sh/asm/smc37c93x.h deleted file mode 100644 index 7d2f393fe..000000000 --- a/libc/kernel/arch-sh/asm/smc37c93x.h +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SMC37C93X_H -#define __ASM_SH_SMC37C93X_H - -#define FDC_PRIMARY_BASE 0x3f0 -#define IDE1_PRIMARY_BASE 0x1f0 -#define IDE1_SECONDARY_BASE 0x170 -#define PARPORT_PRIMARY_BASE 0x378 -#define COM1_PRIMARY_BASE 0x2f8 -#define COM2_PRIMARY_BASE 0x3f8 -#define RTC_PRIMARY_BASE 0x070 -#define KBC_PRIMARY_BASE 0x060 -#define AUXIO_PRIMARY_BASE 0x000 - -#define LDN_FDC 0 -#define LDN_IDE1 1 -#define LDN_IDE2 2 -#define LDN_PARPORT 3 -#define LDN_COM1 4 -#define LDN_COM2 5 -#define LDN_RTC 6 -#define LDN_KBC 7 -#define LDN_AUXIO 8 - -#define CONFIG_PORT 0x3f0 -#define INDEX_PORT CONFIG_PORT -#define DATA_PORT 0x3f1 -#define CONFIG_ENTER 0x55 -#define CONFIG_EXIT 0xaa - -#define CURRENT_LDN_INDEX 0x07 -#define POWER_CONTROL_INDEX 0x22 -#define ACTIVATE_INDEX 0x30 -#define IO_BASE_HI_INDEX 0x60 -#define IO_BASE_LO_INDEX 0x61 -#define IRQ_SELECT_INDEX 0x70 -#define DMA_SELECT_INDEX 0x74 - -#define GPIO46_INDEX 0xc6 -#define GPIO47_INDEX 0xc7 - -#define UART_RBR 0x0 -#define UART_THR 0x0 -#define UART_IER 0x2 -#define UART_IIR 0x4 -#define UART_FCR 0x4 -#define UART_LCR 0x6 -#define UART_MCR 0x8 -#define UART_LSR 0xa -#define UART_MSR 0xc -#define UART_SCR 0xe -#define UART_DLL 0x0 -#define UART_DLM 0x2 - -#ifndef __ASSEMBLY__ -typedef struct uart_reg { - volatile __u16 rbr; - volatile __u16 ier; - volatile __u16 iir; - volatile __u16 lcr; - volatile __u16 mcr; - volatile __u16 lsr; - volatile __u16 msr; - volatile __u16 scr; -} uart_reg; -#endif - -#define thr rbr -#define tcr iir - -#define dll rbr -#define dlm ier -#define fcr iir - -#define IER_ERDAI 0x0100 -#define IER_ETHREI 0x0200 -#define IER_ELSI 0x0400 -#define IER_EMSI 0x0800 - -#define IIR_IP 0x0100 -#define IIR_IIB0 0x0200 -#define IIR_IIB1 0x0400 -#define IIR_IIB2 0x0800 -#define IIR_FIFO 0xc000 - -#define FCR_FEN 0x0100 -#define FCR_RFRES 0x0200 -#define FCR_TFRES 0x0400 -#define FCR_DMA 0x0800 -#define FCR_RTL 0x4000 -#define FCR_RTM 0x8000 - -#define LCR_WLS0 0x0100 -#define LCR_WLS1 0x0200 -#define LCR_STB 0x0400 -#define LCR_PEN 0x0800 -#define LCR_EPS 0x1000 -#define LCR_SP 0x2000 -#define LCR_SB 0x4000 -#define LCR_DLAB 0x8000 - -#define MCR_DTR 0x0100 -#define MCR_RTS 0x0200 -#define MCR_OUT1 0x0400 -#define MCR_IRQEN 0x0800 -#define MCR_LOOP 0x1000 - -#define LSR_DR 0x0100 -#define LSR_OE 0x0200 -#define LSR_PE 0x0400 -#define LSR_FE 0x0800 -#define LSR_BI 0x1000 -#define LSR_THRE 0x2000 -#define LSR_TEMT 0x4000 -#define LSR_FIFOE 0x8000 - -#define MSR_DCTS 0x0100 -#define MSR_DDSR 0x0200 -#define MSR_TERI 0x0400 -#define MSR_DDCD 0x0800 -#define MSR_CTS 0x1000 -#define MSR_DSR 0x2000 -#define MSR_RI 0x4000 -#define MSR_DCD 0x8000 - -#define UART_CLK (1843200) -#define UART_BAUD(x) (UART_CLK / (16 * (x))) - -#define RTC_SECONDS 0 -#define RTC_SECONDS_ALARM 1 -#define RTC_MINUTES 2 -#define RTC_MINUTES_ALARM 3 -#define RTC_HOURS 4 -#define RTC_HOURS_ALARM 5 -#define RTC_DAY_OF_WEEK 6 -#define RTC_DAY_OF_MONTH 7 -#define RTC_MONTH 8 -#define RTC_YEAR 9 -#define RTC_FREQ_SELECT 10 -#define RTC_UIP 0x80 -#define RTC_DIV_CTL 0x70 - -#define RTC_OSC_ENABLE 0x20 -#define RTC_OSC_DISABLE 0x00 -#define RTC_CONTROL 11 -#define RTC_SET 0x80 -#define RTC_PIE 0x40 -#define RTC_AIE 0x20 -#define RTC_UIE 0x10 -#define RTC_SQWE 0x08 -#define RTC_DM_BINARY 0x04 -#define RTC_24H 0x02 -#define RTC_DST_EN 0x01 - -#endif diff --git a/libc/kernel/arch-sh/asm/smp.h b/libc/kernel/arch-sh/asm/smp.h deleted file mode 100644 index e377a6b54..000000000 --- a/libc/kernel/arch-sh/asm/smp.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SMP_H -#define __ASM_SH_SMP_H - -#include -#include - -#define hard_smp_processor_id() (0) - -#endif diff --git a/libc/kernel/arch-sh/asm/snapgear.h b/libc/kernel/arch-sh/asm/snapgear.h deleted file mode 100644 index e0e72e2ad..000000000 --- a/libc/kernel/arch-sh/asm/snapgear.h +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_IO_SNAPGEAR_H -#define _ASM_SH_IO_SNAPGEAR_H - -#define IRL0_IRQ 2 -#define IRL0_PRIORITY 13 - -#define IRL1_IRQ 5 -#define IRL1_PRIORITY 10 - -#define IRL2_IRQ 8 -#define IRL2_PRIORITY 7 - -#define IRL3_IRQ 11 -#define IRL3_PRIORITY 4 - -#define __IO_PREFIX snapgear -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/socket.h b/libc/kernel/arch-sh/asm/socket.h deleted file mode 100644 index ad1031deb..000000000 --- a/libc/kernel/arch-sh/asm/socket.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SOCKET_H -#define __ASM_SH_SOCKET_H - -#include - -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_RCVBUFFORCE 32 -#define SO_SNDBUFFORCE 33 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 - -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 - -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_ACCEPTCONN 30 - -#define SO_PEERSEC 31 -#define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS - -#define SO_MARK 36 - -#endif diff --git a/libc/kernel/arch-sh/asm/sockios.h b/libc/kernel/arch-sh/asm/sockios.h deleted file mode 100644 index fd88099ef..000000000 --- a/libc/kernel/arch-sh/asm/sockios.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SOCKIOS_H -#define __ASM_SH_SOCKIOS_H - -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) - -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) - -#define SIOCGSTAMP _IOR('s', 100, struct timeval) -#define SIOCGSTAMPNS _IOR('s', 101, struct timespec) -#endif diff --git a/libc/kernel/arch-sh/asm/sparsemem.h b/libc/kernel/arch-sh/asm/sparsemem.h deleted file mode 100644 index b31651483..000000000 --- a/libc/kernel/arch-sh/asm/sparsemem.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SPARSEMEM_H -#define __ASM_SH_SPARSEMEM_H - -#endif diff --git a/libc/kernel/arch-sh/asm/spi.h b/libc/kernel/arch-sh/asm/spi.h deleted file mode 100644 index e8899b21b..000000000 --- a/libc/kernel/arch-sh/asm/spi.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SPI_H__ -#define __ASM_SPI_H__ - -struct sh_spi_info; - -struct sh_spi_info { - int bus_num; - int num_chipselect; - - void (*chip_select)(struct sh_spi_info *spi, int cs, int state); -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/spinlock.h b/libc/kernel/arch-sh/asm/spinlock.h deleted file mode 100644 index 2eeb198aa..000000000 --- a/libc/kernel/arch-sh/asm/spinlock.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SPINLOCK_H -#define __ASM_SH_SPINLOCK_H - -#define __raw_spin_is_locked(x) ((x)->lock <= 0) -#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) -#define __raw_spin_unlock_wait(x) do { cpu_relax(); } while ((x)->lock) - -#define __raw_read_can_lock(x) ((x)->lock > 0) -#define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) -#define _raw_spin_relax(lock) cpu_relax() -#define _raw_read_relax(lock) cpu_relax() -#define _raw_write_relax(lock) cpu_relax() -#endif diff --git a/libc/kernel/arch-sh/asm/spinlock_types.h b/libc/kernel/arch-sh/asm/spinlock_types.h deleted file mode 100644 index e21fc1eaa..000000000 --- a/libc/kernel/arch-sh/asm/spinlock_types.h +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SPINLOCK_TYPES_H -#define __ASM_SH_SPINLOCK_TYPES_H - -#ifndef __LINUX_SPINLOCK_TYPES_H -#error "please don't include this file directly" -#endif - -typedef struct { - volatile unsigned int lock; -} raw_spinlock_t; - -#define __RAW_SPIN_LOCK_UNLOCKED { 1 } - -typedef struct { - volatile unsigned int lock; -} raw_rwlock_t; - -#define RW_LOCK_BIAS 0x01000000 -#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } - -#endif diff --git a/libc/kernel/arch-sh/asm/stat.h b/libc/kernel/arch-sh/asm/stat.h deleted file mode 100644 index 1360798ba..000000000 --- a/libc/kernel/arch-sh/asm/stat.h +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_STAT_H -#define __ASM_SH_STAT_H - -struct __old_kernel_stat { - unsigned short st_dev; - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned long st_size; - unsigned long st_atime; - unsigned long st_mtime; - unsigned long st_ctime; -}; - -#ifdef __SH5__ -struct stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; - unsigned long __unused4; - unsigned long __unused5; -}; - -struct stat64 { - unsigned short st_dev; - unsigned char __pad0[10]; - - unsigned long st_ino; - unsigned int st_mode; - unsigned int st_nlink; - - unsigned long st_uid; - unsigned long st_gid; - - unsigned short st_rdev; - unsigned char __pad3[10]; - - long long st_size; - unsigned long st_blksize; - - unsigned long st_blocks; - unsigned long __pad4; - - unsigned long st_atime; - unsigned long st_atime_nsec; - - unsigned long st_mtime; - unsigned long st_mtime_nsec; - - unsigned long st_ctime; - unsigned long st_ctime_nsec; - - unsigned long __unused1; - unsigned long __unused2; -}; -#else -struct stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned long st_rdev; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; - unsigned long __unused4; - unsigned long __unused5; -}; - -struct stat64 { - unsigned long long st_dev; - unsigned char __pad0[4]; - -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - - unsigned int st_mode; - unsigned int st_nlink; - - unsigned long st_uid; - unsigned long st_gid; - - unsigned long long st_rdev; - unsigned char __pad3[4]; - - long long st_size; - unsigned long st_blksize; - - unsigned long long st_blocks; - - unsigned long st_atime; - unsigned long st_atime_nsec; - - unsigned long st_mtime; - unsigned long st_mtime_nsec; - - unsigned long st_ctime; - unsigned long st_ctime_nsec; - - unsigned long long st_ino; -}; - -#define STAT_HAVE_NSEC 1 -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/statfs.h b/libc/kernel/arch-sh/asm/statfs.h deleted file mode 100644 index 32a335b50..000000000 --- a/libc/kernel/arch-sh/asm/statfs.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_STATFS_H -#define __ASM_SH_STATFS_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/string.h b/libc/kernel/arch-sh/asm/string.h deleted file mode 100644 index ba7b12bc3..000000000 --- a/libc/kernel/arch-sh/asm/string.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include "string_32.h" diff --git a/libc/kernel/arch-sh/asm/string_32.h b/libc/kernel/arch-sh/asm/string_32.h deleted file mode 100644 index 70f293979..000000000 --- a/libc/kernel/arch-sh/asm/string_32.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_STRING_H -#define __ASM_SH_STRING_H - -#endif diff --git a/libc/kernel/arch-sh/asm/string_64.h b/libc/kernel/arch-sh/asm/string_64.h deleted file mode 100644 index a7f5128af..000000000 --- a/libc/kernel/arch-sh/asm/string_64.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_STRING_64_H -#define __ASM_SH_STRING_64_H - -#define __HAVE_ARCH_MEMCPY - -#endif diff --git a/libc/kernel/arch-sh/asm/system.h b/libc/kernel/arch-sh/asm/system.h deleted file mode 100644 index 8b1981e71..000000000 --- a/libc/kernel/arch-sh/asm/system.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SYSTEM_H -#define __ASM_SH_SYSTEM_H - -#include -#include -#include -#include -#include - -#define AT_VECTOR_SIZE_ARCH 5 - -#define __icbi() { unsigned long __addr; __addr = 0xa8000000; __asm__ __volatile__( "icbi %0\n\t" : : "m" (__m(__addr))); } - -#define mb() __asm__ __volatile__ ("synco": : :"memory") -#define rmb() mb() -#define wmb() __asm__ __volatile__ ("synco": : :"memory") -#define ctrl_barrier() __icbi() -#define read_barrier_depends() do { } while(0) - -#define smp_mb() barrier() -#define smp_rmb() barrier() -#define smp_wmb() barrier() -#define smp_read_barrier_depends() do { } while(0) - -#define set_mb(var, value) do { (void)xchg(&var, value); } while (0) - -#include - -#define __xchg(ptr, x, size) ({ unsigned long __xchg__res; volatile void *__xchg_ptr = (ptr); switch (size) { case 4: __xchg__res = xchg_u32(__xchg_ptr, x); break; case 1: __xchg__res = xchg_u8(__xchg_ptr, x); break; default: __xchg_called_with_bad_pointer(); __xchg__res = x; break; } __xchg__res; }) - -#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((ptr),(unsigned long)(x), sizeof(*(ptr)))) - -#define __HAVE_ARCH_CMPXCHG 1 - -#define cmpxchg(ptr,o,n) ({ __typeof__(*(ptr)) _o_ = (o); __typeof__(*(ptr)) _n_ = (n); (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, (unsigned long)_n_, sizeof(*(ptr))); }) - -#define instruction_size(insn) (2) - -#define BUILD_TRAP_HANDLER(name) asmlinkage void name##_trap_handler(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs __regs) - -#define TRAP_HANDLER_DECL struct pt_regs *regs = RELOC_HIDE(&__regs, 0); unsigned int vec = regs->tra; (void)vec; - -#define arch_align_stack(x) (x) - -struct mem_access { - unsigned long (*from)(void *dst, const void *src, unsigned long cnt); - unsigned long (*to)(void *dst, const void *src, unsigned long cnt); -}; - -#include "system_32.h" - -#endif diff --git a/libc/kernel/arch-sh/asm/system_32.h b/libc/kernel/arch-sh/asm/system_32.h deleted file mode 100644 index 5151677ea..000000000 --- a/libc/kernel/arch-sh/asm/system_32.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SYSTEM_32_H -#define __ASM_SH_SYSTEM_32_H - -#include - -struct task_struct *__switch_to(struct task_struct *prev, - struct task_struct *next); - -#define switch_to(prev, next, last) do { register u32 *__ts1 __asm__ ("r1") = (u32 *)&prev->thread.sp; register u32 *__ts2 __asm__ ("r2") = (u32 *)&prev->thread.pc; register u32 *__ts4 __asm__ ("r4") = (u32 *)prev; register u32 *__ts5 __asm__ ("r5") = (u32 *)next; register u32 *__ts6 __asm__ ("r6") = (u32 *)&next->thread.sp; register u32 __ts7 __asm__ ("r7") = next->thread.pc; struct task_struct *__last; __asm__ __volatile__ ( ".balign 4\n\t" "stc.l gbr, @-r15\n\t" "sts.l pr, @-r15\n\t" "mov.l r8, @-r15\n\t" "mov.l r9, @-r15\n\t" "mov.l r10, @-r15\n\t" "mov.l r11, @-r15\n\t" "mov.l r12, @-r15\n\t" "mov.l r13, @-r15\n\t" "mov.l r14, @-r15\n\t" "mov.l r15, @r1\t! save SP\n\t" "mov.l @r6, r15\t! change to new stack\n\t" "mova 1f, %0\n\t" "mov.l %0, @r2\t! save PC\n\t" "mov.l 2f, %0\n\t" "jmp @%0\t! call __switch_to\n\t" " lds r7, pr\t! with return to new PC\n\t" ".balign 4\n" "2:\n\t" ".long __switch_to\n" "1:\n\t" "mov.l @r15+, r14\n\t" "mov.l @r15+, r13\n\t" "mov.l @r15+, r12\n\t" "mov.l @r15+, r11\n\t" "mov.l @r15+, r10\n\t" "mov.l @r15+, r9\n\t" "mov.l @r15+, r8\n\t" "lds.l @r15+, pr\n\t" "ldc.l @r15+, gbr\n\t" : "=z" (__last) : "r" (__ts1), "r" (__ts2), "r" (__ts4), "r" (__ts5), "r" (__ts6), "r" (__ts7) : "r3", "t"); last = __last; } while (0) - -#define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text"))) - -#define jump_to_uncached() do { unsigned long __dummy; __asm__ __volatile__( "mova 1f, %0\n\t" "add %1, %0\n\t" "jmp @%0\n\t" " nop\n\t" ".balign 4\n" "1:" : "=&z" (__dummy) : "r" (cached_to_uncached)); } while (0) - -#define back_to_cached() do { unsigned long __dummy; ctrl_barrier(); __asm__ __volatile__( "mov.l 1f, %0\n\t" "jmp @%0\n\t" " nop\n\t" ".balign 4\n" "1: .long 2f\n" "2:" : "=&r" (__dummy)); } while (0) - -#endif diff --git a/libc/kernel/arch-sh/asm/system_64.h b/libc/kernel/arch-sh/asm/system_64.h deleted file mode 100644 index 1bc47105a..000000000 --- a/libc/kernel/arch-sh/asm/system_64.h +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SYSTEM_64_H -#define __ASM_SH_SYSTEM_64_H - -#include - -struct task_struct *sh64_switch_to(struct task_struct *prev, - struct thread_struct *prev_thread, - struct task_struct *next, - struct thread_struct *next_thread); - -#define switch_to(prev,next,last) do { if (last_task_used_math != next) { struct pt_regs *regs = next->thread.uregs; if (regs) regs->sr |= SR_FD; } last = sh64_switch_to(prev, &prev->thread, next, &next->thread); } while (0) - -#define __uses_jump_to_uncached - -#define jump_to_uncached() do { } while (0) -#define back_to_cached() do { } while (0) - -#endif diff --git a/libc/kernel/arch-sh/asm/systemh7751.h b/libc/kernel/arch-sh/asm/systemh7751.h deleted file mode 100644 index b2dfc3527..000000000 --- a/libc/kernel/arch-sh/asm/systemh7751.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_SYSTEMH_7751SYSTEMH_H -#define __ASM_SH_SYSTEMH_7751SYSTEMH_H - -#define PA_ROM 0x00000000 -#define PA_ROM_SIZE 0x00400000 -#define PA_FROM 0x01000000 -#define PA_FROM_SIZE 0x00400000 -#define PA_EXT1 0x04000000 -#define PA_EXT1_SIZE 0x04000000 -#define PA_EXT2 0x08000000 -#define PA_EXT2_SIZE 0x04000000 -#define PA_SDRAM 0x0c000000 -#define PA_SDRAM_SIZE 0x04000000 - -#define PA_EXT4 0x12000000 -#define PA_EXT4_SIZE 0x02000000 -#define PA_EXT5 0x14000000 -#define PA_EXT5_SIZE 0x04000000 -#define PA_PCIC 0x18000000 - -#define PA_DIPSW0 0xb9000000 -#define PA_DIPSW1 0xb9000002 -#define PA_LED 0xba000000 -#define PA_BCR 0xbb000000 - -#define PA_MRSHPC 0xb83fffe0 -#define PA_MRSHPC_MW1 0xb8400000 -#define PA_MRSHPC_MW2 0xb8500000 -#define PA_MRSHPC_IO 0xb8600000 -#define MRSHPC_MODE (PA_MRSHPC + 4) -#define MRSHPC_OPTION (PA_MRSHPC + 6) -#define MRSHPC_CSR (PA_MRSHPC + 8) -#define MRSHPC_ISR (PA_MRSHPC + 10) -#define MRSHPC_ICR (PA_MRSHPC + 12) -#define MRSHPC_CPWCR (PA_MRSHPC + 14) -#define MRSHPC_MW0CR1 (PA_MRSHPC + 16) -#define MRSHPC_MW1CR1 (PA_MRSHPC + 18) -#define MRSHPC_IOWCR1 (PA_MRSHPC + 20) -#define MRSHPC_MW0CR2 (PA_MRSHPC + 22) -#define MRSHPC_MW1CR2 (PA_MRSHPC + 24) -#define MRSHPC_IOWCR2 (PA_MRSHPC + 26) -#define MRSHPC_CDCR (PA_MRSHPC + 28) -#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) - -#define BCR_ILCRA (PA_BCR + 0) -#define BCR_ILCRB (PA_BCR + 2) -#define BCR_ILCRC (PA_BCR + 4) -#define BCR_ILCRD (PA_BCR + 6) -#define BCR_ILCRE (PA_BCR + 8) -#define BCR_ILCRF (PA_BCR + 10) -#define BCR_ILCRG (PA_BCR + 12) - -#define IRQ_79C973 13 - -#define __IO_PREFIX sh7751systemh -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/termbits.h b/libc/kernel/arch-sh/asm/termbits.h deleted file mode 100644 index 97b26db78..000000000 --- a/libc/kernel/arch-sh/asm/termbits.h +++ /dev/null @@ -1,201 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TERMBITS_H -#define __ASM_SH_TERMBITS_H - -#include - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 19 -struct termios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; -}; - -struct termios2 { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t c_ispeed; - speed_t c_ospeed; -}; - -struct ktermios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t c_ispeed; - speed_t c_ospeed; -}; - -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -#define CBAUD 0010017 -#define B0 0000000 -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define BOTHER 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define CIBAUD 002003600000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 - -#define IBSHIFT 16 - -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0010000 -#define PENDIN 0040000 -#define IEXTEN 0100000 - -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#endif diff --git a/libc/kernel/arch-sh/asm/termios.h b/libc/kernel/arch-sh/asm/termios.h deleted file mode 100644 index fb31cbeb2..000000000 --- a/libc/kernel/arch-sh/asm/termios.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TERMIOS_H -#define __ASM_SH_TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; - unsigned short c_oflag; - unsigned short c_cflag; - unsigned short c_lflag; - unsigned char c_line; - unsigned char c_cc[NCC]; -}; - -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -#endif diff --git a/libc/kernel/arch-sh/asm/thread_info.h b/libc/kernel/arch-sh/asm/thread_info.h deleted file mode 100644 index 03ef26d9a..000000000 --- a/libc/kernel/arch-sh/asm/thread_info.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_THREAD_INFO_H -#define __ASM_SH_THREAD_INFO_H - -#endif diff --git a/libc/kernel/arch-sh/asm/timer.h b/libc/kernel/arch-sh/asm/timer.h deleted file mode 100644 index ff298f300..000000000 --- a/libc/kernel/arch-sh/asm/timer.h +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TIMER_H -#define __ASM_SH_TIMER_H - -#include -#include -#include - -struct sys_timer_ops { - int (*init)(void); - int (*start)(void); - int (*stop)(void); - cycle_t (*read)(void); -}; - -struct sys_timer { - const char *name; - - struct sys_device dev; - struct sys_timer_ops *ops; -}; - -#define TICK_SIZE (tick_nsec / 1000) - -struct sys_timer *get_sys_timer(void); - -#endif diff --git a/libc/kernel/arch-sh/asm/timex.h b/libc/kernel/arch-sh/asm/timex.h deleted file mode 100644 index 9003c78be..000000000 --- a/libc/kernel/arch-sh/asm/timex.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TIMEX_H -#define __ASM_SH_TIMEX_H - -#define CLOCK_TICK_RATE (CONFIG_SH_PCLK_FREQ / 4) - -typedef unsigned long long cycles_t; - -#endif diff --git a/libc/kernel/arch-sh/asm/titan.h b/libc/kernel/arch-sh/asm/titan.h deleted file mode 100644 index 71d2e8e96..000000000 --- a/libc/kernel/arch-sh/asm/titan.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_TITAN_H -#define _ASM_SH_TITAN_H - -#define __IO_PREFIX titan -#include - -#define TITAN_IRQ_WAN 2 -#define TITAN_IRQ_LAN 5 -#define TITAN_IRQ_MPCIA 8 -#define TITAN_IRQ_MPCIB 11 -#define TITAN_IRQ_USB 11 - -#endif diff --git a/libc/kernel/arch-sh/asm/tlb.h b/libc/kernel/arch-sh/asm/tlb.h deleted file mode 100644 index 602250bc6..000000000 --- a/libc/kernel/arch-sh/asm/tlb.h +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TLB_H -#define __ASM_SH_TLB_H - -#ifndef __ASSEMBLY__ - -#define tlb_start_vma(tlb, vma) flush_cache_range(vma, vma->vm_start, vma->vm_end) - -#define tlb_end_vma(tlb, vma) flush_tlb_range(vma, vma->vm_start, vma->vm_end) - -#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) - -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) - -#include -#include - -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/tlb_64.h b/libc/kernel/arch-sh/asm/tlb_64.h deleted file mode 100644 index 77c54eb47..000000000 --- a/libc/kernel/arch-sh/asm/tlb_64.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TLB_64_H -#define __ASM_SH_TLB_64_H - -#define ITLB_FIXED 0x00000000 -#define ITLB_LAST_VAR_UNRESTRICTED 0x000003F0 - -#define DTLB_FIXED 0x00800000 -#define DTLB_LAST_VAR_UNRESTRICTED 0x008003F0 - -#ifndef __ASSEMBLY__ - -#define for_each_dtlb_entry(tlb) for (tlb = cpu_data->dtlb.first; tlb <= cpu_data->dtlb.last; tlb += cpu_data->dtlb.step) - -#define for_each_itlb_entry(tlb) for (tlb = cpu_data->itlb.first; tlb <= cpu_data->itlb.last; tlb += cpu_data->itlb.step) - -#endif -#endif diff --git a/libc/kernel/arch-sh/asm/tlbflush.h b/libc/kernel/arch-sh/asm/tlbflush.h deleted file mode 100644 index 7d61293ea..000000000 --- a/libc/kernel/arch-sh/asm/tlbflush.h +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TLBFLUSH_H -#define __ASM_SH_TLBFLUSH_H - -#define flush_tlb_all() local_flush_tlb_all() -#define flush_tlb_mm(mm) local_flush_tlb_mm(mm) -#define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) -#define flush_tlb_one(asid, page) local_flush_tlb_one(asid, page) - -#define flush_tlb_range(vma, start, end) local_flush_tlb_range(vma, start, end) - -#define flush_tlb_kernel_range(start, end) local_flush_tlb_kernel_range(start, end) - -#endif diff --git a/libc/kernel/arch-sh/asm/topology.h b/libc/kernel/arch-sh/asm/topology.h deleted file mode 100644 index 1b5461bca..000000000 --- a/libc/kernel/arch-sh/asm/topology.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_TOPOLOGY_H -#define _ASM_SH_TOPOLOGY_H - -#include - -#endif diff --git a/libc/kernel/arch-sh/asm/types.h b/libc/kernel/arch-sh/asm/types.h deleted file mode 100644 index 1febd0d83..000000000 --- a/libc/kernel/arch-sh/asm/types.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_TYPES_H -#define __ASM_SH_TYPES_H - -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/uaccess.h b/libc/kernel/arch-sh/asm/uaccess.h deleted file mode 100644 index 8b2734649..000000000 --- a/libc/kernel/arch-sh/asm/uaccess.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UACCESS_H -#define __ASM_SH_UACCESS_H - -#include -#include -#include - -#define VERIFY_READ 0 -#define VERIFY_WRITE 1 - -#define __addr_ok(addr) ((unsigned long __force)(addr) < current_thread_info()->addr_limit.seg) - -#define __access_ok(addr, size) (__addr_ok((addr) + (size))) -#define access_ok(type, addr, size) (__chk_user_ptr(addr), __access_ok((unsigned long __force)(addr), (size))) - -#define put_user(x,ptr) __put_user_check((x), (ptr), sizeof(*(ptr))) -#define get_user(x,ptr) __get_user_check((x), (ptr), sizeof(*(ptr))) - -#define __put_user(x,ptr) __put_user_nocheck((x), (ptr), sizeof(*(ptr))) -#define __get_user(x,ptr) __get_user_nocheck((x), (ptr), sizeof(*(ptr))) - -struct __large_struct { unsigned long buf[100]; }; -#define __m(x) (*(struct __large_struct __user *)(x)) - -#define __get_user_nocheck(x,ptr,size) ({ long __gu_err; unsigned long __gu_val; const __typeof__(*(ptr)) __user *__gu_addr = (ptr); __chk_user_ptr(ptr); __get_user_size(__gu_val, __gu_addr, (size), __gu_err); (x) = (__typeof__(*(ptr)))__gu_val; __gu_err; }) - -#define __get_user_check(x,ptr,size) ({ long __gu_err = -EFAULT; unsigned long __gu_val = 0; const __typeof__(*(ptr)) *__gu_addr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_addr, (size)))) __get_user_size(__gu_val, __gu_addr, (size), __gu_err); (x) = (__typeof__(*(ptr)))__gu_val; __gu_err; }) - -#define __put_user_nocheck(x,ptr,size) ({ long __pu_err; __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = x; __chk_user_ptr(ptr); __put_user_size(__pu_val, __pu_addr, (size), __pu_err); __pu_err; }) - -#define __put_user_check(x,ptr,size) ({ long __pu_err = -EFAULT; __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = x; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) __put_user_size(__pu_val, __pu_addr, (size), __pu_err); __pu_err; }) - -#include "uaccess_32.h" - -#define __copy_to_user_inatomic __copy_to_user -#define __copy_from_user_inatomic __copy_from_user - -#define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; }) - -#define strncpy_from_user(dest,src,count) ({ unsigned long __sfu_src = (unsigned long)(src); int __sfu_count = (int)(count); long __sfu_res = -EFAULT; if (__access_ok(__sfu_src, __sfu_count)) __sfu_res = __strncpy_from_user((unsigned long)(dest), __sfu_src, __sfu_count); __sfu_res; }) - -#define strlen_user(str) strnlen_user(str, ~0UL >> 1) - -#endif diff --git a/libc/kernel/arch-sh/asm/uaccess_32.h b/libc/kernel/arch-sh/asm/uaccess_32.h deleted file mode 100644 index af8259190..000000000 --- a/libc/kernel/arch-sh/asm/uaccess_32.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UACCESS_32_H -#define __ASM_SH_UACCESS_32_H - -#define __get_user_size(x,ptr,size,retval) do { retval = 0; switch (size) { case 1: __get_user_asm(x, ptr, retval, "b"); break; case 2: __get_user_asm(x, ptr, retval, "w"); break; case 4: __get_user_asm(x, ptr, retval, "l"); break; default: __get_user_unknown(); break; } } while (0) - -#define __get_user_asm(x, addr, err, insn) ({ __asm__ __volatile__( "1:\n\t" "mov." insn " %2, %1\n\t" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n\t" ".balign 4\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (err), "=&r" (x) :"m" (__m(addr)), "i" (-EFAULT), "0" (err)); }) - -#define __put_user_size(x,ptr,size,retval) do { retval = 0; switch (size) { case 1: __put_user_asm(x, ptr, retval, "b"); break; case 2: __put_user_asm(x, ptr, retval, "w"); break; case 4: __put_user_asm(x, ptr, retval, "l"); break; case 8: __put_user_u64(x, ptr, retval); break; default: __put_user_unknown(); } } while (0) - -#define __put_user_asm(x, addr, err, insn) do { __asm__ __volatile__ ( "1:\n\t" "mov." insn " %1, %2\n\t" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n\t" ".balign 4\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" : "=&r" (err) : "r" (x), "m" (__m(addr)), "i" (-EFAULT), "0" (err) : "memory" ); } while (0) - -#define __put_user_u64(val,addr,retval) ({ __asm__ __volatile__( "1:\n\t" "mov.l %R1,%2\n\t" "mov.l %S1,%T2\n\t" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov.l 4f,%0\n\t" "jmp @%0\n\t" " mov %3,%0\n\t" ".balign 4\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" : "=r" (retval) : "r" (val), "m" (__m(addr)), "i" (-EFAULT), "0" (retval) : "memory"); }) - -#endif diff --git a/libc/kernel/arch-sh/asm/uaccess_64.h b/libc/kernel/arch-sh/asm/uaccess_64.h deleted file mode 100644 index b0661dc34..000000000 --- a/libc/kernel/arch-sh/asm/uaccess_64.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UACCESS_64_H -#define __ASM_SH_UACCESS_64_H - -#define __get_user_size(x,ptr,size,retval) do { retval = 0; switch (size) { case 1: retval = __get_user_asm_b(x, ptr); break; case 2: retval = __get_user_asm_w(x, ptr); break; case 4: retval = __get_user_asm_l(x, ptr); break; case 8: retval = __get_user_asm_q(x, ptr); break; default: __get_user_unknown(); break; } } while (0) - -#define __put_user_size(x,ptr,size,retval) do { retval = 0; switch (size) { case 1: retval = __put_user_asm_b(x, ptr); break; case 2: retval = __put_user_asm_w(x, ptr); break; case 4: retval = __put_user_asm_l(x, ptr); break; case 8: retval = __put_user_asm_q(x, ptr); break; default: __put_user_unknown(); } } while (0) - -#endif diff --git a/libc/kernel/arch-sh/asm/ubc.h b/libc/kernel/arch-sh/asm/ubc.h deleted file mode 100644 index cde9ede3f..000000000 --- a/libc/kernel/arch-sh/asm/ubc.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UBC_H -#define __ASM_SH_UBC_H -#endif diff --git a/libc/kernel/arch-sh/asm/ucontext.h b/libc/kernel/arch-sh/asm/ucontext.h deleted file mode 100644 index 815f79fed..000000000 --- a/libc/kernel/arch-sh/asm/ucontext.h +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UCONTEXT_H -#define __ASM_SH_UCONTEXT_H - -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; -}; - -#endif diff --git a/libc/kernel/arch-sh/asm/unaligned.h b/libc/kernel/arch-sh/asm/unaligned.h deleted file mode 100644 index 43ef01e9f..000000000 --- a/libc/kernel/arch-sh/asm/unaligned.h +++ /dev/null @@ -1,29 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _ASM_SH_UNALIGNED_H -#define _ASM_SH_UNALIGNED_H - -#ifdef __LITTLE_ENDIAN__ -#include -#include -#include -#define get_unaligned __get_unaligned_le -#define put_unaligned __put_unaligned_le -#else -#include -#include -#include -#define get_unaligned __get_unaligned_be -#define put_unaligned __put_unaligned_be -#endif - -#endif diff --git a/libc/kernel/arch-sh/asm/unistd.h b/libc/kernel/arch-sh/asm/unistd.h deleted file mode 100644 index 02969d731..000000000 --- a/libc/kernel/arch-sh/asm/unistd.h +++ /dev/null @@ -1,16 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifdef __SH5__ -#include "unistd_64.h" -#else -#include "unistd_32.h" -#endif diff --git a/libc/kernel/arch-sh/asm/unistd_32.h b/libc/kernel/arch-sh/asm/unistd_32.h deleted file mode 100644 index 0db5074b5..000000000 --- a/libc/kernel/arch-sh/asm/unistd_32.h +++ /dev/null @@ -1,350 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UNISTD_H -#define __ASM_SH_UNISTD_H - -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86old 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_streams1 188 -#define __NR_streams2 189 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_getdents64 220 -#define __NR_fcntl64 221 - -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_set_thread_area 243 -#define __NR_get_thread_area 244 -#define __NR_io_setup 245 -#define __NR_io_destroy 246 -#define __NR_io_getevents 247 -#define __NR_io_submit 248 -#define __NR_io_cancel 249 -#define __NR_fadvise64 250 - -#define __NR_exit_group 252 -#define __NR_lookup_dcookie 253 -#define __NR_epoll_create 254 -#define __NR_epoll_ctl 255 -#define __NR_epoll_wait 256 -#define __NR_remap_file_pages 257 -#define __NR_set_tid_address 258 -#define __NR_timer_create 259 -#define __NR_timer_settime (__NR_timer_create+1) -#define __NR_timer_gettime (__NR_timer_create+2) -#define __NR_timer_getoverrun (__NR_timer_create+3) -#define __NR_timer_delete (__NR_timer_create+4) -#define __NR_clock_settime (__NR_timer_create+5) -#define __NR_clock_gettime (__NR_timer_create+6) -#define __NR_clock_getres (__NR_timer_create+7) -#define __NR_clock_nanosleep (__NR_timer_create+8) -#define __NR_statfs64 268 -#define __NR_fstatfs64 269 -#define __NR_tgkill 270 -#define __NR_utimes 271 -#define __NR_fadvise64_64 272 -#define __NR_vserver 273 -#define __NR_mbind 274 -#define __NR_get_mempolicy 275 -#define __NR_set_mempolicy 276 -#define __NR_mq_open 277 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) -#define __NR_kexec_load 283 -#define __NR_waitid 284 -#define __NR_add_key 285 -#define __NR_request_key 286 -#define __NR_keyctl 287 -#define __NR_ioprio_set 288 -#define __NR_ioprio_get 289 -#define __NR_inotify_init 290 -#define __NR_inotify_add_watch 291 -#define __NR_inotify_rm_watch 292 - -#define __NR_migrate_pages 294 -#define __NR_openat 295 -#define __NR_mkdirat 296 -#define __NR_mknodat 297 -#define __NR_fchownat 298 -#define __NR_futimesat 299 -#define __NR_fstatat64 300 -#define __NR_unlinkat 301 -#define __NR_renameat 302 -#define __NR_linkat 303 -#define __NR_symlinkat 304 -#define __NR_readlinkat 305 -#define __NR_fchmodat 306 -#define __NR_faccessat 307 -#define __NR_pselect6 308 -#define __NR_ppoll 309 -#define __NR_unshare 310 -#define __NR_set_robust_list 311 -#define __NR_get_robust_list 312 -#define __NR_splice 313 -#define __NR_sync_file_range 314 -#define __NR_tee 315 -#define __NR_vmsplice 316 -#define __NR_move_pages 317 -#define __NR_getcpu 318 -#define __NR_epoll_pwait 319 -#define __NR_utimensat 320 -#define __NR_signalfd 321 -#define __NR_timerfd_create 322 -#define __NR_eventfd 323 -#define __NR_fallocate 324 -#define __NR_timerfd_settime 325 -#define __NR_timerfd_gettime 326 -#define __NR_signalfd4 327 -#define __NR_eventfd2 328 -#define __NR_epoll_create1 329 -#define __NR_dup3 330 -#define __NR_pipe2 331 -#define __NR_inotify_init1 332 - -#define NR_syscalls 333 - -#endif diff --git a/libc/kernel/arch-sh/asm/unistd_64.h b/libc/kernel/arch-sh/asm/unistd_64.h deleted file mode 100644 index 2a72b961c..000000000 --- a/libc/kernel/arch-sh/asm/unistd_64.h +++ /dev/null @@ -1,378 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_UNISTD_64_H -#define __ASM_SH_UNISTD_64_H - -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86old 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_streams1 188 -#define __NR_streams2 189 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 - -#define __NR_socket 220 -#define __NR_bind 221 -#define __NR_connect 222 -#define __NR_listen 223 -#define __NR_accept 224 -#define __NR_getsockname 225 -#define __NR_getpeername 226 -#define __NR_socketpair 227 -#define __NR_send 228 -#define __NR_sendto 229 -#define __NR_recv 230 -#define __NR_recvfrom 231 -#define __NR_shutdown 232 -#define __NR_setsockopt 233 -#define __NR_getsockopt 234 -#define __NR_sendmsg 235 -#define __NR_recvmsg 236 - -#define __NR_semop 237 -#define __NR_semget 238 -#define __NR_semctl 239 -#define __NR_msgsnd 240 -#define __NR_msgrcv 241 -#define __NR_msgget 242 -#define __NR_msgctl 243 -#define __NR_shmdt 245 -#define __NR_shmget 246 -#define __NR_shmctl 247 - -#define __NR_getdents64 248 -#define __NR_fcntl64 249 - -#define __NR_gettid 252 -#define __NR_readahead 253 -#define __NR_setxattr 254 -#define __NR_lsetxattr 255 -#define __NR_fsetxattr 256 -#define __NR_getxattr 257 -#define __NR_lgetxattr 258 -#define __NR_fgetxattr 269 -#define __NR_listxattr 260 -#define __NR_llistxattr 261 -#define __NR_flistxattr 262 -#define __NR_removexattr 263 -#define __NR_lremovexattr 264 -#define __NR_fremovexattr 265 -#define __NR_tkill 266 -#define __NR_sendfile64 267 -#define __NR_futex 268 -#define __NR_sched_setaffinity 269 -#define __NR_sched_getaffinity 270 -#define __NR_set_thread_area 271 -#define __NR_get_thread_area 272 -#define __NR_io_setup 273 -#define __NR_io_destroy 274 -#define __NR_io_getevents 275 -#define __NR_io_submit 276 -#define __NR_io_cancel 277 -#define __NR_fadvise64 278 -#define __NR_exit_group 280 - -#define __NR_lookup_dcookie 281 -#define __NR_epoll_create 282 -#define __NR_epoll_ctl 283 -#define __NR_epoll_wait 284 -#define __NR_remap_file_pages 285 -#define __NR_set_tid_address 286 -#define __NR_timer_create 287 -#define __NR_timer_settime (__NR_timer_create+1) -#define __NR_timer_gettime (__NR_timer_create+2) -#define __NR_timer_getoverrun (__NR_timer_create+3) -#define __NR_timer_delete (__NR_timer_create+4) -#define __NR_clock_settime (__NR_timer_create+5) -#define __NR_clock_gettime (__NR_timer_create+6) -#define __NR_clock_getres (__NR_timer_create+7) -#define __NR_clock_nanosleep (__NR_timer_create+8) -#define __NR_statfs64 296 -#define __NR_fstatfs64 297 -#define __NR_tgkill 298 -#define __NR_utimes 299 -#define __NR_fadvise64_64 300 -#define __NR_vserver 301 -#define __NR_mbind 302 -#define __NR_get_mempolicy 303 -#define __NR_set_mempolicy 304 -#define __NR_mq_open 305 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) -#define __NR_kexec_load 311 -#define __NR_waitid 312 -#define __NR_add_key 313 -#define __NR_request_key 314 -#define __NR_keyctl 315 -#define __NR_ioprio_set 316 -#define __NR_ioprio_get 317 -#define __NR_inotify_init 318 -#define __NR_inotify_add_watch 319 -#define __NR_inotify_rm_watch 320 - -#define __NR_migrate_pages 322 -#define __NR_openat 323 -#define __NR_mkdirat 324 -#define __NR_mknodat 325 -#define __NR_fchownat 326 -#define __NR_futimesat 327 -#define __NR_fstatat64 328 -#define __NR_unlinkat 329 -#define __NR_renameat 330 -#define __NR_linkat 331 -#define __NR_symlinkat 332 -#define __NR_readlinkat 333 -#define __NR_fchmodat 334 -#define __NR_faccessat 335 -#define __NR_pselect6 336 -#define __NR_ppoll 337 -#define __NR_unshare 338 -#define __NR_set_robust_list 339 -#define __NR_get_robust_list 340 -#define __NR_splice 341 -#define __NR_sync_file_range 342 -#define __NR_tee 343 -#define __NR_vmsplice 344 -#define __NR_move_pages 345 -#define __NR_getcpu 346 -#define __NR_epoll_pwait 347 -#define __NR_utimensat 348 -#define __NR_signalfd 349 -#define __NR_timerfd_create 350 -#define __NR_eventfd 351 -#define __NR_fallocate 352 -#define __NR_timerfd_settime 353 -#define __NR_timerfd_gettime 354 -#define __NR_signalfd4 355 -#define __NR_eventfd2 356 -#define __NR_epoll_create1 357 -#define __NR_dup3 358 -#define __NR_pipe2 359 -#define __NR_inotify_init1 360 - -#endif diff --git a/libc/kernel/arch-sh/asm/user.h b/libc/kernel/arch-sh/asm/user.h deleted file mode 100644 index 81ab4e358..000000000 --- a/libc/kernel/arch-sh/asm/user.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_USER_H -#define __ASM_SH_USER_H - -#include -#include - -#ifdef __SH5__ -struct user_fpu_struct { - unsigned long fp_regs[32]; - unsigned int fpscr; -}; -#else -struct user_fpu_struct { - unsigned long fp_regs[16]; - unsigned long xfp_regs[16]; - unsigned long fpscr; - unsigned long fpul; -}; -#endif - -struct user { - struct pt_regs regs; - struct user_fpu_struct fpu; - int u_fpvalid; - size_t u_tsize; - size_t u_dsize; - size_t u_ssize; - unsigned long start_code; - unsigned long start_data; - unsigned long start_stack; - long int signal; - unsigned long u_ar0; - struct user_fpu_struct* u_fpstate; - unsigned long magic; - char u_comm[32]; -}; - -#define NBPG PAGE_SIZE -#define UPAGES 1 -#define HOST_TEXT_START_ADDR (u.start_code) -#define HOST_DATA_START_ADDR (u.start_data) -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - -#endif diff --git a/libc/kernel/arch-sh/asm/vga.h b/libc/kernel/arch-sh/asm/vga.h deleted file mode 100644 index 9e857a912..000000000 --- a/libc/kernel/arch-sh/asm/vga.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_VGA_H -#define __ASM_SH_VGA_H - -#endif diff --git a/libc/kernel/arch-sh/asm/watchdog.h b/libc/kernel/arch-sh/asm/watchdog.h deleted file mode 100644 index 81d790569..000000000 --- a/libc/kernel/arch-sh/asm/watchdog.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef __ASM_SH_WATCHDOG_H -#define __ASM_SH_WATCHDOG_H -#endif diff --git a/libc/kernel/arch-sh/asm/xor.h b/libc/kernel/arch-sh/asm/xor.h deleted file mode 100644 index 780a4ac0a..000000000 --- a/libc/kernel/arch-sh/asm/xor.h +++ /dev/null @@ -1,12 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#include diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py index 2bee4ec43..aa68e7cde 100644 --- a/libc/kernel/tools/defaults.py +++ b/libc/kernel/tools/defaults.py @@ -7,7 +7,7 @@ from utils import * # the list of supported architectures # -kernel_archs = [ 'arm', 'x86', 'sh' ] +kernel_archs = [ 'arm', 'x86' ] # the list of include directories that belong to the kernel # tree. used when looking for sources... @@ -66,15 +66,6 @@ kernel_known_x86_statics = set( ] ) -kernel_known_sh_statics = set( - [ "___arch__swab16", # asm-sh/byteorder.h - "___arch__swab32", # asm-sh/byteorder.h - "___arch__swab64", # asm-sh/byteorder.h - "__FD_ZERO", # asm-sh/posix_types_32/64.h - "__FD_SET", # asm-sh/posix_types_32/64.h - ] - ) - kernel_known_generic_statics = set( [ "__invalid_size_argument_for_IOC", # asm-generic/ioctl.h "__cmsg_nxthdr", # linux/socket.h @@ -90,7 +81,6 @@ kernel_known_generic_statics = set( kernel_known_statics = { "arm" : kernel_known_arm_statics, "x86" : kernel_known_x86_statics, - "sh" : kernel_known_sh_statics } # this is a list of macros which we want to specifically exclude from diff --git a/libc/tools/bionic_utils.py b/libc/tools/bionic_utils.py index e7c8c2d98..0bc947b88 100644 --- a/libc/tools/bionic_utils.py +++ b/libc/tools/bionic_utils.py @@ -240,7 +240,6 @@ class SysCallsTxtParser: if number == "stub": syscall_id = -1 syscall_id2 = -1 - syscall_id3 = -1 else: try: if number[0] == '#': @@ -248,12 +247,8 @@ class SysCallsTxtParser: numbers = string.split(number,',') syscall_id = int(numbers[0]) syscall_id2 = syscall_id - syscall_id3 = syscall_id if len(numbers) > 1: syscall_id2 = int(numbers[1]) - syscall_id3 = syscall_id2 - if len(numbers) > 2: - syscall_id3 = int(numbers[2]) except: E("invalid syscall number in '%s'" % line) return @@ -261,13 +256,12 @@ class SysCallsTxtParser: global verbose if verbose >= 2: if call_id < 0: - print "%s: %d,%d,%d" % (syscall_name, syscall_id, syscall_id2, syscall_id3) + print "%s: %d,%d" % (syscall_name, syscall_id, syscall_id2) else: - print "%s(%d): %d,%d,%d" % (syscall_name, call_id, syscall_id, syscall_id2, syscall_id3) + print "%s(%d): %d,%d" % (syscall_name, call_id, syscall_id, syscall_id2) t = { "id" : syscall_id, "id2" : syscall_id2, - "id3" : syscall_id3, "cid" : call_id, "name" : syscall_name, "func" : syscall_func, diff --git a/libc/tools/checksyscalls.py b/libc/tools/checksyscalls.py index 1b922a310..2c563d75c 100755 --- a/libc/tools/checksyscalls.py +++ b/libc/tools/checksyscalls.py @@ -118,7 +118,6 @@ def process_header(header_file,dict): arm_dict = {} x86_dict = {} -superh_dict = {} # remove trailing slash from the linux_root, if any if linux_root[-1] == '/': @@ -142,15 +141,8 @@ if not x86_unistd: print "maybe using a different set of kernel headers might help." sys.exit(1) -superh_unistd = find_arch_header(linux_root, "sh", "unistd_32.h") -if not superh_unistd: - print "WEIRD: Could not locate the SuperH unistd.h kernel header file," - print "maybe using a different set of kernel headers might help." - sys.exit(1) - process_header( arm_unistd, arm_dict ) process_header( x86_unistd, x86_dict ) -process_header( superh_unistd, superh_dict ) # now perform the comparison errors = 0 @@ -174,7 +166,6 @@ def check_syscalls(archname, idname, arch_dict): errors += check_syscalls("arm", "id", arm_dict) errors += check_syscalls("x86", "id2", x86_dict) -errors += check_syscalls("superh", "id3", superh_dict) if errors == 0: print "congratulations, everything's fine !!" diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index c188e043d..bed9445e2 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -31,7 +31,7 @@ print "bionic_root is %s" % bionic_root bionic_temp = "/tmp/bionic_gensyscalls/" # all architectures, update as you see fit -all_archs = [ "arm", "x86", "sh" ] +all_archs = [ "arm", "x86" ] def make_dir( path ): if not os.path.exists(path): @@ -183,63 +183,6 @@ thumb_call_long = thumb_header + """\ .fnend """ -# SuperH assembler templates for each syscall stub -# -superh_header = """/* autogenerated by gensyscalls.py */ -#include - - .text - .type %(fname)s, @function - .globl %(fname)s - .align 4 - -%(fname)s: -""" - -superh_call_default = """ - /* invoke trap */ - mov.l 0f, r3 /* trap num */ - trapa #(%(numargs)s + 0x10) - - /* check return value */ - cmp/pz r0 - bt %(idname)s_end - - /* keep error number */ - sts.l pr, @-r15 - mov.l 1f, r1 - jsr @r1 - mov r0, r4 - lds.l @r15+, pr - -%(idname)s_end: - rts - nop - - .align 2 -0: .long %(idname)s -1: .long __set_syscall_errno -""" - -superh_5args_header = """ - /* get ready for additonal arg */ - mov.l @r15, r0 -""" - -superh_6args_header = """ - /* get ready for additonal arg */ - mov.l @r15, r0 - mov.l @(4, r15), r1 -""" - -superh_7args_header = """ - /* get ready for additonal arg */ - mov.l @r15, r0 - mov.l @(4, r15), r1 - mov.l @(8, r15), r2 -""" - - def param_uses_64bits(param): """Returns True iff a syscall parameter description corresponds to a 64-bit type.""" @@ -437,10 +380,6 @@ class State: E("cid for dispatch syscalls is only supported for x86 in " "'%s'" % syscall_name) return - if t["id3"] >= 0: - num_regs = count_generic_param_registers(syscall_params) - t["asm-sh"] = self.superh_genstub(syscall_func,num_regs,"__NR_"+syscall_name) - def gen_NR_syscall(self,fp,name,id): @@ -490,20 +429,6 @@ class State: gen_syscalls[sc_name] = True fp.write( "#endif\n" ); - # all superh-specific syscalls - fp.write( "\n#if defined(__SH3__) || defined(__SH4__) \n" ); - for sc in self.syscalls: - sc_id = sc["id"] - sc_id2 = sc["id2"] - sc_id3 = sc["id3"] - sc_name = sc["name"] - if sc_id2 != sc_id3 and sc_id3 >= 0: - self.gen_NR_syscall( fp, sc_name, sc_id3 ) - else: - if sc_id != sc_id2 and sc_id2 >= 0: - self.gen_NR_syscall( fp, sc_name, sc_id2 ) - fp.write( "#endif\n" ); - fp.write( "\n#endif\n" ) fp.write( "\n#endif /* _BIONIC_LINUX_SYSCALLS_H_ */\n" ); fp.close() @@ -537,7 +462,6 @@ class State: arch_test = { "arm": lambda x: x.has_key("asm-arm") or x.has_key("asm-thumb"), "x86": lambda x: x.has_key("asm-x86"), - "sh": lambda x: x.has_key("asm-sh") } for sc in self.syscalls: @@ -574,14 +498,6 @@ class State: fp.close() self.new_stubs.append( fname ) - if sc.has_key("asm-sh"): - fname = "arch-sh/syscalls/%s.S" % sc["func"] - D2( ">>> generating "+fname ) - fp = create_file( fname ) - fp.write(sc["asm-sh"]) - fp.close() - self.new_stubs.append( fname ) - def regenerate(self): D( "scanning for existing architecture-specific stub files" ) diff --git a/libm/Android.mk b/libm/Android.mk index 29c75a2bb..57e4d4cca 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -173,17 +173,7 @@ else libm_common_includes = $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387 else - ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-sh) - libm_common_src_files += \ - sh/fenv.c \ - src/s_scalbln.c \ - src/s_scalbn.c \ - src/s_scalbnf.c - - libm_common_includes = $(LOCAL_PATH)/sh - else - $(error "Unknown architecture") - endif + $(error "Unknown architecture") endif endif diff --git a/linker/Android.mk b/linker/Android.mk index 60f291ce0..803b6c3d4 100644 --- a/linker/Android.mk +++ b/linker/Android.mk @@ -49,12 +49,6 @@ LOCAL_CFLAGS += -DANDROID_ARM_LINKER else ifeq ($(TARGET_ARCH),x86) LOCAL_CFLAGS += -DANDROID_X86_LINKER - else - ifeq ($(TARGET_ARCH),sh) - LOCAL_CFLAGS += -DANDROID_SH_LINKER - else - $(error Unsupported TARGET_ARCH $(TARGET_ARCH)) - endif endif endif diff --git a/linker/arch/sh/begin.S b/linker/arch/sh/begin.S deleted file mode 100644 index 6f495578c..000000000 --- a/linker/arch/sh/begin.S +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS - * OF USE, DATA, OR PROFITS ; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -.text -.align 4 -.type _start,#function -.globl _start - -_start: - mov r15, r4 - - mov.l 0f, r0 - jsr @r0 - nop - - /* linker init returns the _entry address in the main image */ - jmp @r0 - nop - - .balign 4 -0: .long __linker_init - - .section .ctors, "wa" - .globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 diff --git a/linker/dlfcn.c b/linker/dlfcn.c index 716145516..bdacbd355 100644 --- a/linker/dlfcn.c +++ b/linker/dlfcn.c @@ -175,13 +175,6 @@ int dlclose(void *handle) #define ANDROID_LIBDL_STRTAB \ "dlopen\0dlclose\0dlsym\0dlerror\0dladdr\0dl_iterate_phdr\0" -#elif defined(ANDROID_SH_LINKER) -// 0000000 00011111 111112 22222222 2333333 3333444444444455 -// 0123456 78901234 567890 12345678 9012345 6789012345678901 -#define ANDROID_LIBDL_STRTAB \ - "dlopen\0dlclose\0dlsym\0dlerror\0dladdr\0dl_iterate_phdr\0" - -#else /* !defined(ANDROID_ARM_LINKER) && !defined(ANDROID_X86_LINKER) */ #error Unsupported architecture. Only ARM and x86 are presently supported. #endif @@ -230,12 +223,6 @@ static Elf32_Sym libdl_symtab[] = { st_info: STB_GLOBAL << 4, st_shndx: 1, }, -#elif defined(ANDROID_SH_LINKER) - { st_name: 36, - st_value: (Elf32_Addr) &dl_iterate_phdr, - st_info: STB_GLOBAL << 4, - st_shndx: 1, - }, #endif }; diff --git a/linker/linker.c b/linker/linker.c index cc3bd21e4..bcfa8dc76 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -365,7 +365,7 @@ _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int *pcount) *pcount = 0; return NULL; } -#elif defined(ANDROID_X86_LINKER) || defined(ANDROID_SH_LINKER) +#elif defined(ANDROID_X86_LINKER) /* Here, we only have to provide a callback to iterate across all the * loaded libraries. gcc_eh does the rest. */ int @@ -1462,101 +1462,6 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count) return 0; } -#if defined(ANDROID_SH_LINKER) -static int reloc_library_a(soinfo *si, Elf32_Rela *rela, unsigned count) -{ - Elf32_Sym *symtab = si->symtab; - const char *strtab = si->strtab; - Elf32_Sym *s; - unsigned base; - Elf32_Rela *start = rela; - unsigned idx; - - for (idx = 0; idx < count; ++idx) { - unsigned type = ELF32_R_TYPE(rela->r_info); - unsigned sym = ELF32_R_SYM(rela->r_info); - unsigned reloc = (unsigned)(rela->r_offset + si->base); - unsigned sym_addr = 0; - char *sym_name = NULL; - - DEBUG("%5d Processing '%s' relocation at index %d\n", pid, - si->name, idx); - if(sym != 0) { - sym_name = (char *)(strtab + symtab[sym].st_name); - s = _do_lookup(si, sym_name, &base); - if(s == 0) { - DL_ERR("%5d cannot locate '%s'...", pid, sym_name); - return -1; - } -#if 0 - if((base == 0) && (si->base != 0)){ - /* linking from libraries to main image is bad */ - DL_ERR("%5d cannot locate '%s'...", - pid, strtab + symtab[sym].st_name); - return -1; - } -#endif - if ((s->st_shndx == SHN_UNDEF) && (s->st_value != 0)) { - DL_ERR("%5d In '%s', shndx=%d && value=0x%08x. We do not " - "handle this yet", pid, si->name, s->st_shndx, - s->st_value); - return -1; - } - sym_addr = (unsigned)(s->st_value + base); - COUNT_RELOC(RELOC_SYMBOL); - } else { - s = 0; - } - -/* TODO: This is ugly. Split up the relocations by arch into - * different files. - */ - switch(type){ - case R_SH_JUMP_SLOT: - COUNT_RELOC(RELOC_ABSOLUTE); - MARK(rela->r_offset); - TRACE_TYPE(RELO, "%5d RELO JMP_SLOT %08x <- %08x %s\n", pid, - reloc, sym_addr, sym_name); - *((unsigned*)reloc) = sym_addr; - break; - case R_SH_GLOB_DAT: - COUNT_RELOC(RELOC_ABSOLUTE); - MARK(rela->r_offset); - TRACE_TYPE(RELO, "%5d RELO GLOB_DAT %08x <- %08x %s\n", pid, - reloc, sym_addr, sym_name); - *((unsigned*)reloc) = sym_addr; - break; - case R_SH_DIR32: - COUNT_RELOC(RELOC_ABSOLUTE); - MARK(rela->r_offset); - TRACE_TYPE(RELO, "%5d RELO DIR32 %08x <- %08x %s\n", pid, - reloc, sym_addr, sym_name); - *((unsigned*)reloc) += sym_addr; - break; - case R_SH_RELATIVE: - COUNT_RELOC(RELOC_RELATIVE); - MARK(rela->r_offset); - if(sym){ - DL_ERR("%5d odd RELATIVE form...", pid); - return -1; - } - TRACE_TYPE(RELO, "%5d RELO RELATIVE %08x <- +%08x\n", pid, - reloc, si->base); - *((unsigned*)reloc) += si->base; - break; - - default: - DL_ERR("%5d unknown reloc type %d @ %p (%d)", - pid, type, rela, (int) (rela - start)); - return -1; - } - rela++; - } - return 0; -} -#endif /* ANDROID_SH_LINKER */ - - /* Please read the "Initialization and Termination functions" functions. * of the linker design note in bionic/linker/README.TXT to understand * what the following code is doing. @@ -1808,40 +1713,24 @@ static int link_image(soinfo *si, unsigned wr_offset) case DT_SYMTAB: si->symtab = (Elf32_Sym *) (si->base + *d); break; -#if !defined(ANDROID_SH_LINKER) case DT_PLTREL: if(*d != DT_REL) { DL_ERR("DT_RELA not supported"); goto fail; } break; -#endif -#ifdef ANDROID_SH_LINKER - case DT_JMPREL: - si->plt_rela = (Elf32_Rela*) (si->base + *d); - break; - case DT_PLTRELSZ: - si->plt_rela_count = *d / sizeof(Elf32_Rela); - break; -#else case DT_JMPREL: si->plt_rel = (Elf32_Rel*) (si->base + *d); break; case DT_PLTRELSZ: si->plt_rel_count = *d / 8; break; -#endif case DT_REL: si->rel = (Elf32_Rel*) (si->base + *d); break; case DT_RELSZ: si->rel_count = *d / 8; break; -#ifdef ANDROID_SH_LINKER - case DT_RELASZ: - si->rela_count = *d / sizeof(Elf32_Rela); - break; -#endif case DT_PLTGOT: /* Save this in case we decide to do lazy binding. We don't yet. */ si->plt_got = (unsigned *)(si->base + *d); @@ -1850,15 +1739,9 @@ static int link_image(soinfo *si, unsigned wr_offset) // Set the DT_DEBUG entry to the addres of _r_debug for GDB *d = (int) &_r_debug; break; -#ifdef ANDROID_SH_LINKER - case DT_RELA: - si->rela = (Elf32_Rela *) (si->base + *d); - break; -#else case DT_RELA: DL_ERR("%5d DT_RELA not supported", pid); goto fail; -#endif case DT_INIT: si->init_func = (void (*)(void))(si->base + *d); DEBUG("%5d %s constructors (init func) found at %p\n", @@ -1963,19 +1846,6 @@ static int link_image(soinfo *si, unsigned wr_offset) goto fail; } -#ifdef ANDROID_SH_LINKER - if(si->plt_rela) { - DEBUG("[ %5d relocating %s plt ]\n", pid, si->name ); - if(reloc_library_a(si, si->plt_rela, si->plt_rela_count)) - goto fail; - } - if(si->rela) { - DEBUG("[ %5d relocating %s ]\n", pid, si->name ); - if(reloc_library_a(si, si->rela, si->rela_count)) - goto fail; - } -#endif /* ANDROID_SH_LINKER */ - si->flags |= FLAG_LINKED; DEBUG("[ %5d finished linking %s ]\n", pid, si->name); diff --git a/linker/linker.h b/linker/linker.h index 7b1ba51eb..d29484c48 100644 --- a/linker/linker.h +++ b/linker/linker.h @@ -121,14 +121,6 @@ struct soinfo Elf32_Rel *rel; unsigned rel_count; -#ifdef ANDROID_SH_LINKER - Elf32_Rela *plt_rela; - unsigned plt_rela_count; - - Elf32_Rela *rela; - unsigned rela_count; -#endif /* ANDROID_SH_LINKER */ - unsigned *preinit_array; unsigned preinit_array_count; @@ -175,15 +167,7 @@ extern soinfo libdl_info; #define R_386_JUMP_SLOT 7 #define R_386_RELATIVE 8 -#elif defined(ANDROID_SH_LINKER) - -#define R_SH_DIR32 1 -#define R_SH_GLOB_DAT 163 -#define R_SH_JUMP_SLOT 164 -#define R_SH_RELATIVE 165 - -#endif /* ANDROID_*_LINKER */ - +#endif #ifndef DT_INIT_ARRAY #define DT_INIT_ARRAY 25 @@ -220,7 +204,7 @@ const char *linker_get_error(void); #ifdef ANDROID_ARM_LINKER typedef long unsigned int *_Unwind_Ptr; _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int *pcount); -#elif defined(ANDROID_X86_LINKER) || defined(ANDROID_SH_LINKER) +#elif defined(ANDROID_X86_LINKER) int dl_iterate_phdr(int (*cb)(struct dl_phdr_info *, size_t, void *), void *); #endif