Index: lib/libc/sparc64/sys/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libc/sparc64/sys/Makefile.inc,v retrieving revision 1.8 diff -u -r1.8 Makefile.inc --- lib/libc/sparc64/sys/Makefile.inc 3 Sep 2002 14:55:29 -0000 1.8 +++ lib/libc/sparc64/sys/Makefile.inc 28 Oct 2002 03:44:00 -0000 @@ -12,12 +12,14 @@ CFLAGS+= -I${.CURDIR}/sparc64/fpu -MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S +MDASM+= brk.S cerror.S exect.S ftruncate.S lseek.S mmap.S pipe.S pread.S \ + ptrace.S pwrite.S sbrk.S setlogin.S sigaction.S truncate.S syscall.S # Don't generate default code for these syscalls: NOASM= break.o exit.o ftruncate.o getdomainname.o getlogin.o \ - lseek.o mlockall.o mmap.o munlockall.o openbsd_poll.o pread.o \ - pwrite.o setdomainname.o sstk.o truncate.o uname.o yield.o + lseek.o mlockall.o mmap.o munlockall.o openbsd_poll.o syscall.o \ + __syscall.o pread.o pwrite.o setdomainname.o sstk.o truncate.o \ + uname.o yield.o \ PSEUDO= _getlogin.o _exit.o Index: lib/libc/sparc64/sys/ftruncate.S =================================================================== RCS file: lib/libc/sparc64/sys/ftruncate.S diff -N lib/libc/sparc64/sys/ftruncate.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/ftruncate.S 28 Oct 2002 03:47:27 -0000 @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(ftruncate) + mov %o1, %o2 + clr %o1 + _SYSCALL(ftruncate) + retl + nop +_SYSEND(ftruncate) Index: lib/libc/sparc64/sys/lseek.S =================================================================== RCS file: lib/libc/sparc64/sys/lseek.S diff -N lib/libc/sparc64/sys/lseek.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/lseek.S 28 Oct 2002 03:49:20 -0000 @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(lseek) + mov %o2, %o3 + mov %o1, %o2 + clr %o1 + _SYSCALL(lseek) + retl + nop +_SYSEND(lseek) Index: lib/libc/sparc64/sys/mmap.S =================================================================== RCS file: lib/libc/sparc64/sys/mmap.S diff -N lib/libc/sparc64/sys/mmap.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/mmap.S 28 Oct 2002 04:17:19 -0000 @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(mmap) + add %sp, -(CCFSZ + (2 * 8)), %sp + stx %o5, [%sp + SPOFF + 176 + (0 * 8)] + clr %o5 + _SYSCALL(mmap) + retl + sub %sp, -(CCFSZ + (2 * 8)), %sp +_SYSEND(mmap) Index: lib/libc/sparc64/sys/pread.S =================================================================== RCS file: lib/libc/sparc64/sys/pread.S diff -N lib/libc/sparc64/sys/pread.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/pread.S 28 Oct 2002 03:50:57 -0000 @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(pread) + mov %o3, %o4 + clr %o3 + _SYSCALL(pread) + retl + nop +_SYSEND(pread) Index: lib/libc/sparc64/sys/pwrite.S =================================================================== RCS file: lib/libc/sparc64/sys/pwrite.S diff -N lib/libc/sparc64/sys/pwrite.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/pwrite.S 28 Oct 2002 03:51:34 -0000 @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(pwrite) + mov %o3, %o4 + clr %o3 + _SYSCALL(pwrite) + retl + nop +_SYSEND(pwrite) Index: lib/libc/sparc64/sys/syscall.S =================================================================== RCS file: lib/libc/sparc64/sys/syscall.S diff -N lib/libc/sparc64/sys/syscall.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/syscall.S 27 Oct 2002 22:36:01 -0000 @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(__syscall) +_SYSENTRY(syscall) + save %sp, -(CCFSZ + (5 * 8)), %sp + ldx [%fp + SPOFF + 176 + (0 * 8)], %o5 + ldx [%fp + SPOFF + 176 + (1 * 8)], %l0 + ldx [%fp + SPOFF + 176 + (2 * 8)], %l1 + ldx [%fp + SPOFF + 176 + (3 * 8)], %l2 + ldx [%fp + SPOFF + 176 + (4 * 8)], %l3 + stx %l0, [%sp + SPOFF + 176 + (0 * 8)] + stx %l1, [%sp + SPOFF + 176 + (1 * 8)] + stx %l2, [%sp + SPOFF + 176 + (2 * 8)] + stx %l3, [%sp + SPOFF + 176 + (3 * 8)] + mov %i1, %o0 + mov %i2, %o1 + mov %i3, %o2 + mov %i4, %o3 + mov %i5, %o4 + mov %i0, %g1 + ta %xcc, ST_SYSCALL + bcc,a,pt %xcc, 1f + nop + restore %o0, 0, %o0 + ERROR() +1: ret + restore %o0, 0, %o0 +_SYSEND(syscall) Index: lib/libc/sparc64/sys/truncate.S =================================================================== RCS file: lib/libc/sparc64/sys/truncate.S diff -N lib/libc/sparc64/sys/truncate.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/libc/sparc64/sys/truncate.S 28 Oct 2002 03:51:56 -0000 @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2002 Jake Burkholder. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +_SYSENTRY(truncate) + mov %o1, %o2 + clr %o1 + _SYSCALL(truncate) + retl + nop +_SYSEND(truncate) Index: lib/libc/sys/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libc/sys/Makefile.inc,v retrieving revision 1.97 diff -u -r1.97 Makefile.inc --- lib/libc/sys/Makefile.inc 8 Oct 2002 17:43:40 -0000 1.97 +++ lib/libc/sys/Makefile.inc 28 Oct 2002 03:42:22 -0000 @@ -18,7 +18,10 @@ .endif # Sources common to both syscall interfaces: -SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c sem.c truncate.c __error.c +.if 0 +SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c +.endif +SRCS+= sem.c __error.c # Add machine dependent asm sources: SRCS+=${MDASM}