Index: head/lib/libc/Makefile =================================================================== --- head/lib/libc/Makefile (revision 1848) +++ head/lib/libc/Makefile (revision 1849) @@ -1,51 +1,52 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS # from CFLAGS below. To remove these strings from just the system call # stubs, remove just -DSYSLIBC_SCCS from CFLAGS. LIB=c CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS AINC= -I${.CURDIR}/${MACHINE} CLEANFILES+=tags +INSTALL_PIC_ARCHIVE= yes .include "${.CURDIR}/db/Makefile.inc" .include "${.CURDIR}/compat-43/Makefile.inc" .include "${.CURDIR}/gen/Makefile.inc" .include "${.CURDIR}/gmon/Makefile.inc" .include "${.CURDIR}/locale/Makefile.inc" .include "${.CURDIR}/net/Makefile.inc" .include "${.CURDIR}/quad/Makefile.inc" .include "${.CURDIR}/regex/Makefile.inc" .include "${.CURDIR}/stdio/Makefile.inc" .include "${.CURDIR}/stdlib/Makefile.inc" .include "${.CURDIR}/string/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c KSRCS= bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \ strlen.c strncpy.c libkern: libkern.gen libkern.${MACHINE} libkern.gen: ${KQSRCS} ${KSRCS} cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} /sys/libkern libkern.${MACHINE}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) cp -p ${.ALLSRC} /sys/libkern/${MACHINE} .endif beforeinstall: tags install -c -o bin -g bin -m 444 tags /var/db/libc.tags tags: ${SRCS} ctags ${.ALLSRC:M*.c} egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \ sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \ >> tags; sort -o tags tags .include Index: head/lib/libc/amd64/SYS.h =================================================================== --- head/lib/libc/amd64/SYS.h (revision 1848) +++ head/lib/libc/amd64/SYS.h (revision 1849) @@ -1,57 +1,73 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * 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. 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, Berkeley and its contributors. * 4. 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. * - * @(#)SYS.h 8.1 (Berkeley) 6/4/93 + * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 + * + * $Id: SYS.h,v 1.3 1993/11/04 00:01:17 paul Exp $ */ #include +#include "DEFS.h" -#ifdef PROF -#define ENTRY(x) .globl _/**/x; \ - .data; 1:; .long 0; .text; .align 2; _/**/x: \ - movl $1b,%eax; call mcount +#ifdef PIC +#define PIC_PROLOGUE \ + pushl %ebx; \ + call 1f; \ +1: \ + popl %ebx; \ + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx +#define PIC_EPILOGUE \ + popl %ebx +#define PIC_PLT(x) x@PLT +#define PIC_GOT(x) x@GOT(%ebx) +#define PIC_GOTOFF(x) x@GOTOFF(%ebx) #else -#define ENTRY(x) .globl _/**/x; .text; .align 2; _/**/x: -#endif PROF +#define PIC_PROLOGUE +#define PIC_EPILOGUE +#define PIC_PLT(x) x +#define PIC_GOT(x) x +#define PIC_GOTOFF(x) x +#endif + #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b #define RSYSCALL(x) SYSCALL(x); ret #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0); ret #define CALL(x,y) call _/**/y; addl $4*x,%esp /* gas fucks up offset -- although we don't currently need it, do for BCS */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x #define ASMSTR .asciz .globl cerror Index: head/lib/libc/amd64/gen/Makefile.inc =================================================================== --- head/lib/libc/amd64/gen/Makefile.inc (revision 1848) +++ head/lib/libc/amd64/gen/Makefile.inc (revision 1849) @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 SRCS+= isinf.c -SRCS+= _setjmp.s alloca.s fabs.s ldexp.c modf.s setjmp.s -SRCS+= divsi3.s fixdfsi.s fixunsdfsi.s udivsi3.s +SRCS+= _setjmp.S alloca.S fabs.S ldexp.c modf.S setjmp.S +SRCS+= divsi3.S fixdfsi.S fixunsdfsi.S udivsi3.S Index: head/lib/libc/amd64/gen/_setjmp.S =================================================================== --- head/lib/libc/amd64/gen/_setjmp.S (nonexistent) +++ head/lib/libc/amd64/gen/_setjmp.S (revision 1849) @@ -0,0 +1,82 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)_setjmp.s 5.1 (Berkeley) 4/23/90" + .align 2,0x90 +#endif /* LIBC_SCCS and not lint */ + +/* + * C library -- _setjmp, _longjmp + * + * _longjmp(a,v) + * will generate a "return(v)" from the last call to + * _setjmp(a) + * by restoring registers from the environment 'a'. + * The previous signal state is NOT restored. + */ + +#include "DEFS.h" + +ENTRY(_setjmp) + movl 4(%esp),%eax + movl 0(%esp),%edx + movl %edx, 0(%eax) /* rta */ + movl %ebx, 4(%eax) + movl %esp, 8(%eax) + movl %ebp,12(%eax) + movl %esi,16(%eax) + movl %edi,20(%eax) + fnstcw 28(%eax) + xorl %eax,%eax + ret + +ENTRY(_longjmp) + movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + fninit + fldcw 28(%edx) + testl %eax,%eax + jnz 1f + incl %eax +1: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/amd64/gen/_setjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/gen/setjmp.S =================================================================== --- head/lib/libc/amd64/gen/setjmp.S (nonexistent) +++ head/lib/libc/amd64/gen/setjmp.S (revision 1849) @@ -0,0 +1,91 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90" + .align 2,0x90 +#endif /* LIBC_SCCS and not lint */ + +/* + * C library -- _setjmp, _longjmp + * + * longjmp(a,v) + * will generate a "return(v)" from the last call to + * setjmp(a) + * by restoring registers from the environment 'a'. + * The previous signal state is restored. + */ + +#include "DEFS.h" +#include "SYS.h" + +ENTRY(setjmp) + pushl $0 + call PIC_PLT(_sigblock) + popl %edx + movl 4(%esp),%ecx + movl 0(%esp),%edx + movl %edx, 0(%ecx) + movl %ebx, 4(%ecx) + movl %esp, 8(%ecx) + movl %ebp,12(%ecx) + movl %esi,16(%ecx) + movl %edi,20(%ecx) + movl %eax,24(%ecx) + fnstcw 28(%ecx) + xorl %eax,%eax + ret + +ENTRY(longjmp) + movl 4(%esp),%edx + pushl 24(%edx) + call PIC_PLT(_sigsetmask) /* XXX this is not reentrant */ + popl %eax + movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + fninit + fldcw 28(%edx) + testl %eax,%eax + jnz 1f + incl %eax +1: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/amd64/gen/setjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/gen/sigsetjmp.S =================================================================== --- head/lib/libc/amd64/gen/sigsetjmp.S (nonexistent) +++ head/lib/libc/amd64/gen/sigsetjmp.S (revision 1849) @@ -0,0 +1,89 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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" + * $Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $ + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .text + .asciz "$Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $" +#endif /* LIBC_SCCS and not lint */ + +#include "DEFS.h" +#include "SYS.h" + +ENTRY(sigsetjmp) + movl 8(%esp),%eax + movl 4(%esp),%ecx + movl %eax,24(%ecx) + testl %eax,%eax + jz 1f + pushl $0 + call PIC_PLT(_sigblock) + addl $4,%esp + movl 4(%esp),%ecx + movl %eax,28(%ecx) +1: movl 0(%esp),%edx + movl %edx, 0(%ecx) + movl %ebx, 4(%ecx) + movl %esp, 8(%ecx) + movl %ebp,12(%ecx) + movl %esi,16(%ecx) + movl %edi,20(%ecx) + xorl %eax,%eax + ret + +ENTRY(siglongjmp) + movl 4(%esp),%edx + cmpl $0,24(%edx) + jz 1f + pushl 28(%edx) + call PIC_PLT(_sigsetmask) + addl $4,%esp +1: movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + testl %eax,%eax + jnz 2f + incl %eax +2: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/amd64/gen/sigsetjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/net/Makefile.inc =================================================================== --- head/lib/libc/amd64/net/Makefile.inc (revision 1848) +++ head/lib/libc/amd64/net/Makefile.inc (revision 1849) @@ -1,3 +1,3 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -SRCS+= htonl.s htons.s ntohl.s ntohs.s +SRCS+= htonl.S htons.S ntohl.S ntohs.S Index: head/lib/libc/amd64/net/htonl.S =================================================================== --- head/lib/libc/amd64/net/htonl.S (nonexistent) +++ head/lib/libc/amd64/net/htonl.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htonl.s 5.3 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* netorder = htonl(hostorder) */ + +#include "DEFS.h" + +ENTRY(htonl) + movl 4(%esp),%eax + xchgb %al,%ah + roll $16,%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/amd64/net/htonl.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/net/htons.S =================================================================== --- head/lib/libc/amd64/net/htons.S (nonexistent) +++ head/lib/libc/amd64/net/htons.S (revision 1849) @@ -0,0 +1,48 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htons.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* netorder = htons(hostorder) */ + +#include "DEFS.h" + +ENTRY(htons) + movzwl 4(%esp),%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/amd64/net/htons.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/net/ntohl.S =================================================================== --- head/lib/libc/amd64/net/ntohl.S (nonexistent) +++ head/lib/libc/amd64/net/ntohl.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohl.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohl(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohl) + movl 4(%esp),%eax + xchgb %al,%ah + roll $16,%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/amd64/net/ntohl.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/net/ntohs.S =================================================================== --- head/lib/libc/amd64/net/ntohs.S (nonexistent) +++ head/lib/libc/amd64/net/ntohs.S (revision 1849) @@ -0,0 +1,48 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohs.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohs(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohs) + movzwl 4(%esp),%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/amd64/net/ntohs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/brk.S =================================================================== --- head/lib/libc/amd64/sys/brk.S (nonexistent) +++ head/lib/libc/amd64/sys/brk.S (revision 1849) @@ -0,0 +1,91 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: brk.S,v 1.3 1994/02/21 05:13:26 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)brk.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl curbrk + .globl minbrk +ENTRY(_brk) + jmp ok + +ENTRY(brk) +#ifdef PIC + movl 4(%esp),%eax + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx # set up GOT addressing + movl PIC_GOT(minbrk),%ecx # + cmpl %eax,(%ecx) + PIC_EPILOGUE + jl ok + movl (%ecx),%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,(%edx) + movl $0,%eax + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%eax + cmpl %eax,minbrk + jl ok + movl minbrk,%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,curbrk + movl $0,%eax + ret +err: + jmp cerror +#endif Property changes on: head/lib/libc/amd64/sys/brk.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/cerror.S =================================================================== --- head/lib/libc/amd64/sys/cerror.S (nonexistent) +++ head/lib/libc/amd64/sys/cerror.S (revision 1849) @@ -0,0 +1,56 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: cerror.S,v 1.2 1994/02/21 05:19:09 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)cerror.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + + .globl _errno +cerror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%ecx + movl %eax,(%ecx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + ret Property changes on: head/lib/libc/amd64/sys/cerror.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/exect.S =================================================================== --- head/lib/libc/amd64/sys/exect.S (nonexistent) +++ head/lib/libc/amd64/sys/exect.S (revision 1849) @@ -0,0 +1,54 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: exect.S,v 1.2 1994/02/21 05:19:10 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)exect.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" +#include + +ENTRY(exect) + lea SYS_execve,%eax + pushf + popl %edx + orl $ PSL_T,%edx + pushl %edx + popf + LCALL(7,0) + jmp cerror /* exect(file, argv, env); */ Property changes on: head/lib/libc/amd64/sys/exect.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/pipe.S =================================================================== --- head/lib/libc/amd64/sys/pipe.S (nonexistent) +++ head/lib/libc/amd64/sys/pipe.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: pipe.S,v 1.2 1994/02/21 05:19:13 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)pipe.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(pipe) + movl 4(%esp),%ecx + movl %eax,(%ecx) + movl %edx,4(%ecx) + movl $0,%eax + ret Property changes on: head/lib/libc/amd64/sys/pipe.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/ptrace.S =================================================================== --- head/lib/libc/amd64/sys/ptrace.S (nonexistent) +++ head/lib/libc/amd64/sys/ptrace.S (revision 1849) @@ -0,0 +1,60 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: ptrace.S,v 1.2 1994/02/21 05:19:14 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)ptrace.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +ENTRY(ptrace) + xorl %eax,%eax +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + lea SYS_ptrace,%eax + LCALL(7,0) + jb err + ret +err: + jmp cerror Property changes on: head/lib/libc/amd64/sys/ptrace.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/reboot.S =================================================================== --- head/lib/libc/amd64/sys/reboot.S (nonexistent) +++ head/lib/libc/amd64/sys/reboot.S (revision 1849) @@ -0,0 +1,46 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: reboot.S,v 1.2 1994/02/21 05:19:15 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)reboot.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(reboot) + iret Property changes on: head/lib/libc/amd64/sys/reboot.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/sbrk.S =================================================================== --- head/lib/libc/amd64/sys/sbrk.S (nonexistent) +++ head/lib/libc/amd64/sys/sbrk.S (revision 1849) @@ -0,0 +1,89 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sbrk.S,v 1.2 1994/02/21 05:19:16 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sbrk.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl _end + .globl minbrk + .globl curbrk + + .data +minbrk: .long _end +curbrk: .long _end + .text + +ENTRY(sbrk) +#ifdef PIC + movl 4(%esp),%ecx + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + PIC_EPILOGUE + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + addl %ecx,(%edx) + PIC_EPILOGUE + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%ecx + movl curbrk,%eax + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl curbrk,%eax + addl %ecx,curbrk + ret +err: + jmp cerror +#endif Property changes on: head/lib/libc/amd64/sys/sbrk.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/setlogin.S =================================================================== --- head/lib/libc/amd64/sys/setlogin.S (nonexistent) +++ head/lib/libc/amd64/sys/setlogin.S (revision 1849) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 1991 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: setlogin.S,v 1.2 1994/02/21 05:19:17 rgrimes Exp $ + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)setlogin.s 5.2 (Berkeley) 4/12/91" +#endif /* LIBC_SCCS and not lint */ + +#include "SYS.h" + +.globl __logname_valid /* in getlogin() */ + +SYSCALL(setlogin) +#ifdef PIC + PIC_PROLOGUE + pushl %eax + movl PIC_GOT(__logname_valid),%eax + movl $0,(%eax) + popl %eax + PIC_EPILOGUE +#else + movl $0,__logname_valid +#endif + ret /* setlogin(name) */ Property changes on: head/lib/libc/amd64/sys/setlogin.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/sigreturn.S =================================================================== --- head/lib/libc/amd64/sys/sigreturn.S (nonexistent) +++ head/lib/libc/amd64/sys/sigreturn.S (revision 1849) @@ -0,0 +1,56 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sigreturn.S,v 1.2 1994/02/21 05:19:21 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigreturn.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * We must preserve the state of the registers as the user has set them up. + */ +#ifdef PROF +#undef ENTRY +#define ENTRY(x) \ + .globl _/**/x; .align 2; _/**/x: pusha ; \ + .data; 1:; .long 0; .text; movl $1b,%eax; call mcount; popa ; nop +#endif /* PROF */ + +SYSCALL(sigreturn) + ret Property changes on: head/lib/libc/amd64/sys/sigreturn.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/amd64/sys/vfork.S =================================================================== --- head/lib/libc/amd64/sys/vfork.S (nonexistent) +++ head/lib/libc/amd64/sys/vfork.S (revision 1849) @@ -0,0 +1,80 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: Ovfork.S,v 1.3 1994/02/21 05:19:08 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)Ovfork.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * pid = vfork(); + * + * %edx == 0 in parent process, %edx == 1 in child process. + * %eax == pid of child in parent, %eax == pid of parent in child. + * + */ + .set vfork,66 +.globl _vfork +.type _vfork,@function + +_vfork: + popl %ecx /* my rta into ecx */ + movl $vfork, %eax + LCALL(7,0) + jb verror +vforkok: + cmpl $0,%edx /* child process? */ + jne child /* yes */ + jmp parent +.globl _errno +verror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno), %edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + jmp %ecx +child: + movl $0,%eax +parent: + jmp %ecx Property changes on: head/lib/libc/amd64/sys/vfork.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/compat-43/Makefile.inc =================================================================== --- head/lib/libc/compat-43/Makefile.inc (revision 1848) +++ head/lib/libc/compat-43/Makefile.inc (revision 1849) @@ -1,13 +1,16 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/2/93 # compat-43 sources .PATH: ${.CURDIR}/${MACHINE}/compat-43 ${.CURDIR}/compat-43 SRCS+= creat.c gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \ setregid.c setreuid.c setrgid.c setruid.c sigcompat.c -MAN2+= creat.0 gethostid.0 killpg.0 setregid.0 setreuid.0 setruid.0 \ - sigblock.0 sigpause.0 sigsetmask.0 sigvec.0 +MAN2+= compat-43/creat.2 compat-43/killpg.2 \ + compat-43/setregid.2 compat-43/setreuid.2 compat-43/sigblock.2 \ + compat-43/sigpause.2 compat-43/sigsetmask.2 compat-43/sigvec.2 -MLINKS+=setruid.2 setrgid.2 +MAN3+= compat-43/gethostid.3 compat-43/setruid.3 + +MLINKS+=setruid.3 setrgid.3 MLINKS+=gethostid.2 sethostid.2 Index: head/lib/libc/db/man/Makefile.inc =================================================================== --- head/lib/libc/db/man/Makefile.inc (revision 1848) +++ head/lib/libc/db/man/Makefile.inc (revision 1849) @@ -1,7 +1,7 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 .PATH: ${.CURDIR}/db/man # mpool.3 -MAN3+= btree.0 dbopen.0 hash.0 recno.0 +MAN3+= db/man/btree.3 db/man/dbopen.3 db/man/hash.3 db/man/recno.3 MLINKS+= dbopen.3 db.3 Index: head/lib/libc/gen/Makefile.inc =================================================================== --- head/lib/libc/gen/Makefile.inc (revision 1848) +++ head/lib/libc/gen/Makefile.inc (revision 1849) @@ -1,92 +1,95 @@ # @(#)Makefile.inc 8.3 (Berkeley) 4/16/94 # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE}/gen ${.CURDIR}/gen SRCS+= alarm.c assert.c clock.c closedir.c confstr.c crypt.c ctermid.c \ ctime.c daemon.c devname.c difftime.c disklabel.c err.c errlst.c \ exec.c fnmatch.c frexp.c fstab.c fts.c getbsize.c getcap.c getcwd.c \ getgrent.c getgrouplist.c gethostname.c getloadavg.c getlogin.c \ getmntinfo.c getnetgrent.c getpagesize.c getpass.c getpwent.c \ getttyent.c getusershell.c glob.c initgroups.c isatty.c nice.c nlist.c \ opendir.c pause.c popen.c psignal.c pwcache.c raise.c readdir.c \ rewinddir.c scandir.c seekdir.c sethostname.c setjmperr.c \ setmode.c siginterrupt.c siglist.c signal.c sigsetjmp.c \ sigsetops.c sleep.c sysconf.c sysctl.c syslog.c telldir.c \ termios.c time.c times.c timezone.c ttyname.c ttyslot.c ualarm.c \ uname.c unvis.c usleep.c utime.c valloc.c vis.c wait.c wait3.c \ waitpid.c # machine-dependent gen sources .include "${.CURDIR}/${MACHINE}/gen/Makefile.inc" .if (${MACHINE} == "tahoe" || ${MACHINE} == "vax") errlst.o errlst.po: ${CC} -S ${CFLAGS} ${.IMPSRC} ed - < ${.CURDIR}/${MACHINE}/:errfix errlst.s ${AS} -o ${.TARGET} errlst.s rm -f errlst.s .endif -MAN3+= alarm.0 clock.0 confstr.0 crypt.0 ctermid.0 ctime.0 daemon.0 \ - devname.0 directory.0 err.0 exec.0 fnmatch.0 frexp.0 fts.0 \ - getbsize.0 getcap.0 getcwd.0 getdiskbyname.0 getfsent.0 \ - getgrent.0 getgrouplist.0 gethostname.0 getloadavg.0 \ - getmntinfo.0 getnetgrent.0 getpagesize.0 getpass.0 getpwent.0 \ - getttyent.0 getusershell.0 glob.0 initgroups.0 isinf.0 ldexp.0 \ - modf.0 nice.0 nlist.0 pause.0 popen.0 psignal.0 pwcache.0 \ - raise.0 scandir.0 setjmp.0 setmode.0 siginterrupt.0 signal.0 \ - sigsetops.0 sleep.0 sysconf.0 sysctl.0 syslog.0 tcgetpgrp.0 \ - tcsendbreak.0 tcsetattr.0 tcsetpgrp.0 time.0 times.0 timezone.0 \ - ttyname.0 tzset.0 ualarm.0 uname.0 unvis.0 usleep.0 utime.0 \ - valloc.0 vis.0 +MAN3+= gen/alarm.3 gen/clock.3 gen/confstr.3 gen/crypt.3 gen/ctermid.3 \ + gen/ctime.3 gen/daemon.3 gen/devname.3 gen/directory.3 gen/err.3 \ + gen/exec.3 gen/fnmatch.3 gen/frexp.3 gen/fts.3 gen/getbsize.3 \ + gen/getcap.3 gen/getcwd.3 gen/getdiskbyname.3 gen/getfsent.3 \ + gen/getgrent.3 gen/getgrouplist.3 gen/gethostname.3 gen/getloadavg.3 \ + gen/getmntinfo.3 gen/getnetgrent.3 gen/getpagesize.3 gen/getpass.3 \ + gen/getpwent.3 gen/getttyent.3 gen/getusershell.3 gen/glob.3 \ + gen/initgroups.3 gen/isinf.3 gen/ldexp.3 gen/modf.3 gen/nice.3 \ + gen/nlist.3 gen/pause.3 gen/popen.3 gen/psignal.3 gen/pwcache.3 \ + gen/raise.3 gen/scandir.3 gen/setjmp.3 gen/setmode.3 \ + gen/siginterrupt.3 gen/signal.3 gen/sigsetops.3 gen/sleep.3 \ + gen/sysconf.3 gen/sysctl.3 gen/syslog.3 gen/tcgetpgrp.3 \ + gen/tcsendbreak.3 gen/tcsetattr.3 gen/tcsetpgrp.3 gen/time.3 \ + gen/times.3 gen/timezone.3 gen/ttyname.3 gen/tzset.3 gen/ualarm.3 \ + gen/uname.3 gen/unvis.3 gen/usleep.3 gen/utime.3 gen/valloc.3 gen/vis.3 MLINKS+=crypt.3 encrypt.3 crypt.3 setkey.3 MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \ ctime.3 localtime.3 ctime.3 mktime.3 MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \ directory.3 readdir.3 directory.3 rewinddir.3 directory.3 seekdir.3 \ directory.3 telldir.3 MLINKS+=exec.3 execl.3 exec.3 execle.3 exec.3 execlp.3 exec.3 execv.3 \ exec.3 execvp.3 MLINKS+=err.3 verr.3 err.3 errx.3 err.3 verrx.3 err.3 warn.3 err.3 vwarn.3 \ err.3 warnx.3 err.3 vwarnx.3 MLINKS+=isinf.3 isnan.3 MLINKS+=getcap.3 cgetcap.3 getcap.3 cgetclose.3 getcap.3 cgetent.3 \ getcap.3 cgetfirst.3 getcap.3 cgetmatch.3 getcap.3 cgetnext.3 \ getcap.3 cgetnum.3 getcap.3 cgetset.3 getcap.3 cgetstr.3 \ getcap.3 cgetustr.3 MLINKS+=getcwd.3 getwd.3 MLINKS+=getfsent.3 endfsent.3 getfsent.3 getfsfile.3 getfsent.3 getfsspec.3 \ getfsent.3 getfstype.3 getfsent.3 setfsent.3 MLINKS+=getgrent.3 endgrent.3 getgrent.3 setgroupent.3 getgrent.3 getgrgid.3 \ getgrent.3 getgrnam.3 getgrent.3 setgrent.3 getgrent.3 setgrfile.3 MLINKS+=gethostname.3 sethostname.3 MLINKS+=getnetgrent.3 endnetgrent.3 getnetgrent.3 setnetgrent.3 \ getnetgrent.3 innetgr.3 MLINKS+=getpwent.3 endpwent.3 getpwent.3 setpassent.3 getpwent.3 getpwnam.3 \ getpwent.3 getpwuid.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3 MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 getttyent.3 setttyent.3 MLINKS+=getusershell.3 endusershell.3 getusershell.3 setusershell.3 MLINKS+=glob.3 globfree.3 MLINKS+=popen.3 pclose.3 MLINKS+=psignal.3 sys_siglist.3 MLINKS+=pwcache.3 user_from_uid.3 pwcache.3 group_from_gid.3 MLINKS+=scandir.3 alphasort.3 MLINKS+=setjmp.3 _longjmp.3 setjmp.3 _setjmp.3 setjmp.3 longjmp.3 \ setjmp.3 longjmperr.3 setjmp.3 longjmperror.3 \ setjmp.3 sigsetjmp.3 setjmp.3 siglongjmp.3 MLINKS+=setmode.3 getmode.3 MLINKS+=sigsetops.3 sigemptyset.3 sigsetops.3 sigfillset.3 \ sigsetops.3 sigaddset.3 sigsetops.3 sigdelset.3 \ sigsetops.3 sigismember.3 MLINKS+=syslog.3 closelog.3 syslog.3 openlog.3 syslog.3 setlogmask.3 \ syslog.3 vsyslog.3 MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflush.3 tcsendbreak.3 tcflow.3 MLINKS+=tcsetattr.3 tcgetattr.3 tcsetattr.3 cfsetospeed.3 \ tcsetattr.3 cfgetospeed.3 tcsetattr.3 cfgetispeed.3 \ tcsetattr.3 cfsetispeed.3 tcsetattr.3 cfsetspeed.3 \ tcsetattr.3 cfmakeraw.3 MLINKS+=ttyname.3 isatty.3 ttyname.3 ttyslot.3 MLINKS+=tzset.3 tzsetwall.3 MLINKS+=vis.3 strvis.3 vis.3 strvisx.3 Index: head/lib/libc/gmon/Makefile.inc =================================================================== --- head/lib/libc/gmon/Makefile.inc (revision 1848) +++ head/lib/libc/gmon/Makefile.inc (revision 1849) @@ -1,11 +1,11 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # gmon sources .PATH: ${.CURDIR}/gmon SRCS+= gmon.c mcount.c -MAN3+= moncontrol.0 +MAN3+= gmon/moncontrol.3 # mcount cannot be compiled with profiling mcount.po: mcount.o cp mcount.o mcount.po Index: head/lib/libc/i386/DEFS.h =================================================================== --- head/lib/libc/i386/DEFS.h (revision 1848) +++ head/lib/libc/i386/DEFS.h (revision 1849) @@ -1,47 +1,83 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * 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. 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, Berkeley and its contributors. * 4. 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. * - * @(#)DEFS.h 8.1 (Berkeley) 6/4/93 + * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90 + * + * $Id: DEFS.h,v 1.4 1994/05/03 16:29:13 jkh Exp $ */ -#ifdef PROF -#define ENTRY(x) .globl _/**/x; _/**/x: \ - .data; 1:; .long 0; .text; lea 1b,%eax ; call mcount -#define ASENTRY(x) .globl x; x: \ - .data; 1:; .long 0; .text; lea 1b,%eax ; call mcount +/* XXX should use align 4,0x90 for -m486. */ +#define _START_ENTRY .align 2,0x90; +#if 0 +/* Data is not used, except perhaps by non-g prof, which we don't support. */ +#define _MID_ENTRY .data; .align 2; 8:; .long 0; \ + .text; lea 8b,%eax; #else -#define ENTRY(x) .globl _/**/x; _/**/x: -#define ASENTRY(x) .globl x; x: +#define _MID_ENTRY +#endif + +#ifdef PROF + +#define ALTENTRY(x) _START_ENTRY \ + .globl _/**/x; .type _/**/x,@function; _/**/x:; \ + _MID_ENTRY \ + call mcount; jmp 9f + +#define ENTRY(x) _START_ENTRY \ + .globl _/**/x; .type _/**/x,@function; _/**/x:; \ + _MID_ENTRY \ + call mcount; 9: + + +#define ALTASENTRY(x) _START_ENTRY \ + .globl x; .type x,@function; x:; \ + _MID_ENTRY \ + call mcount; jmp 9f + +#define ASENTRY(x) _START_ENTRY \ + .globl x; .type x,@function; x:; \ + _MID_ENTRY \ + call mcount; 9: + +#else /* !PROF */ + +#define ENTRY(x) _START_ENTRY .globl _/**/x; .type _/**/x,@function; \ + _/**/x: +#define ALTENTRY(x) ENTRY(x) + +#define ASENTRY(x) _START_ENTRY .globl x; .type x,@function; x: +#define ALTASENTRY(x) ASENTRY(x) + #endif Index: head/lib/libc/i386/SYS.h =================================================================== --- head/lib/libc/i386/SYS.h (revision 1848) +++ head/lib/libc/i386/SYS.h (revision 1849) @@ -1,57 +1,73 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * 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. 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, Berkeley and its contributors. * 4. 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. * - * @(#)SYS.h 8.1 (Berkeley) 6/4/93 + * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 + * + * $Id: SYS.h,v 1.3 1993/11/04 00:01:17 paul Exp $ */ #include +#include "DEFS.h" -#ifdef PROF -#define ENTRY(x) .globl _/**/x; \ - .data; 1:; .long 0; .text; .align 2; _/**/x: \ - movl $1b,%eax; call mcount +#ifdef PIC +#define PIC_PROLOGUE \ + pushl %ebx; \ + call 1f; \ +1: \ + popl %ebx; \ + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx +#define PIC_EPILOGUE \ + popl %ebx +#define PIC_PLT(x) x@PLT +#define PIC_GOT(x) x@GOT(%ebx) +#define PIC_GOTOFF(x) x@GOTOFF(%ebx) #else -#define ENTRY(x) .globl _/**/x; .text; .align 2; _/**/x: -#endif PROF +#define PIC_PROLOGUE +#define PIC_EPILOGUE +#define PIC_PLT(x) x +#define PIC_GOT(x) x +#define PIC_GOTOFF(x) x +#endif + #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b #define RSYSCALL(x) SYSCALL(x); ret #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0); ret #define CALL(x,y) call _/**/y; addl $4*x,%esp /* gas fucks up offset -- although we don't currently need it, do for BCS */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x #define ASMSTR .asciz .globl cerror Index: head/lib/libc/i386/gen/Makefile.inc =================================================================== --- head/lib/libc/i386/gen/Makefile.inc (revision 1848) +++ head/lib/libc/i386/gen/Makefile.inc (revision 1849) @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 SRCS+= isinf.c -SRCS+= _setjmp.s alloca.s fabs.s ldexp.c modf.s setjmp.s -SRCS+= divsi3.s fixdfsi.s fixunsdfsi.s udivsi3.s +SRCS+= _setjmp.S alloca.S fabs.S ldexp.c modf.S setjmp.S +SRCS+= divsi3.S fixdfsi.S fixunsdfsi.S udivsi3.S Index: head/lib/libc/i386/gen/_setjmp.S =================================================================== --- head/lib/libc/i386/gen/_setjmp.S (nonexistent) +++ head/lib/libc/i386/gen/_setjmp.S (revision 1849) @@ -0,0 +1,82 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)_setjmp.s 5.1 (Berkeley) 4/23/90" + .align 2,0x90 +#endif /* LIBC_SCCS and not lint */ + +/* + * C library -- _setjmp, _longjmp + * + * _longjmp(a,v) + * will generate a "return(v)" from the last call to + * _setjmp(a) + * by restoring registers from the environment 'a'. + * The previous signal state is NOT restored. + */ + +#include "DEFS.h" + +ENTRY(_setjmp) + movl 4(%esp),%eax + movl 0(%esp),%edx + movl %edx, 0(%eax) /* rta */ + movl %ebx, 4(%eax) + movl %esp, 8(%eax) + movl %ebp,12(%eax) + movl %esi,16(%eax) + movl %edi,20(%eax) + fnstcw 28(%eax) + xorl %eax,%eax + ret + +ENTRY(_longjmp) + movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + fninit + fldcw 28(%edx) + testl %eax,%eax + jnz 1f + incl %eax +1: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/i386/gen/_setjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/alloca.S =================================================================== --- head/lib/libc/i386/gen/alloca.S (nonexistent) +++ head/lib/libc/i386/gen/alloca.S (revision 1849) @@ -0,0 +1,57 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)alloca.s 5.2 (Berkeley) 5/14/90" +#endif /* LIBC_SCCS and not lint */ + +/* like alloc, but automatic automatic free in return */ + +#include "DEFS.h" + +ENTRY(alloca) + popl %edx /* pop return addr */ + popl %eax /* pop amount to allocate */ + movl %esp,%ecx + addl $3,%eax /* round up to next word */ + andl $0xfffffffc,%eax + subl %eax,%esp + movl %esp,%eax /* base of newly allocated space */ + pushl 8(%ecx) /* copy possible saved registers */ + pushl 4(%ecx) + pushl 0(%ecx) + pushl %eax /* dummy to pop at callsite */ + jmp %edx /* "return" */ Property changes on: head/lib/libc/i386/gen/alloca.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/divsi3.S =================================================================== --- head/lib/libc/i386/gen/divsi3.S (nonexistent) +++ head/lib/libc/i386/gen/divsi3.S (revision 1849) @@ -0,0 +1,47 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)divsi3.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + + .globl ___divsi3 + .type ___divsi3,@function +___divsi3: + movl 4(%esp),%eax + cltd + idivl 8(%esp) + ret Property changes on: head/lib/libc/i386/gen/divsi3.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/fabs.S =================================================================== --- head/lib/libc/i386/gen/fabs.S (nonexistent) +++ head/lib/libc/i386/gen/fabs.S (revision 1849) @@ -0,0 +1,46 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)fabs.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +#include "DEFS.h" + +ENTRY(fabs) + fldl 4(%esp) + fabs + ret Property changes on: head/lib/libc/i386/gen/fabs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/fixdfsi.S =================================================================== --- head/lib/libc/i386/gen/fixdfsi.S (nonexistent) +++ head/lib/libc/i386/gen/fixdfsi.S (revision 1849) @@ -0,0 +1,20 @@ + .file "__fixdfsi.s" +.text + .align 2 +.globl ___fixdfsi +.type ___fixdfsi,@function +___fixdfsi: + pushl %ebp + movl %esp,%ebp + subl $12,%esp + fstcw -4(%ebp) + movw -4(%ebp),%ax + orw $0x0c00,%ax + movw %ax,-2(%ebp) + fldcw -2(%ebp) + fldl 8(%ebp) + fistpl -12(%ebp) + fldcw -4(%ebp) + movl -12(%ebp),%eax + leave + ret Property changes on: head/lib/libc/i386/gen/fixdfsi.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/fixunsdfsi.S =================================================================== --- head/lib/libc/i386/gen/fixunsdfsi.S (nonexistent) +++ head/lib/libc/i386/gen/fixunsdfsi.S (revision 1849) @@ -0,0 +1,82 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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: @(#)fixunsdfsi.s 5.1 12/17/90 + * $Id: fixunsdfsi.S,v 1.1 1993/12/05 13:01:03 ats Exp $ + */ + +#if defined(LIBC_SCCS) + .text + .asciz "$Id: fixunsdfsi.S,v 1.1 1993/12/05 13:01:03 ats Exp $" +#endif + +#include "DEFS.h" +#include "SYS.h" + +ENTRY(__fixunsdfsi) + fldl 4(%esp) /* argument double to accum stack */ + frndint /* create integer */ +#ifdef PIC + PIC_PROLOGUE + leal PIC_GOTOFF(fbiggestsigned),%eax + PIC_EPILOGUE + fcoml (%eax) +#else + fcoml PIC_GOTOFF(fbiggestsigned) /* bigger than biggest signed? */ +#endif + fstsw %ax + sahf + jnb 1f + + fistpl 4(%esp) + movl 4(%esp),%eax + ret + +1: +#ifdef PIC + PIC_PROLOGUE + leal PIC_GOTOFF(fbiggestsigned),%eax + PIC_EPILOGUE + fsubl (%eax) +#else + fsubl PIC_GOTOFF(fbiggestsigned) /* reduce for proper conversion */ +#endif + fistpl 4(%esp) /* convert */ + movl 4(%esp),%eax + orl $0x80000000,%eax /* restore bias */ + PIC_EPILOGUE + ret + +fbiggestsigned: .double 0r2147483648.0 Property changes on: head/lib/libc/i386/gen/fixunsdfsi.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/modf.S =================================================================== --- head/lib/libc/i386/gen/modf.S (nonexistent) +++ head/lib/libc/i386/gen/modf.S (revision 1849) @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Sean Eric Fagan. + * + * 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 University of + * California, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)modf.s 5.5 (Berkeley) 3/18/91" +#endif /* LIBC_SCCS and not lint */ + +/* + * modf(value, iptr): return fractional part of value, and stores the + * integral part into iptr (a pointer to double). + * + * Written by Sean Eric Fagan (sef@kithrup.COM) + * Sun Mar 11 20:27:30 PST 1990 + */ + +/* With CHOP mode on, frndint behaves as TRUNC does. Useful. */ +.text +.globl _modf +.type _modf,@function +_modf: + pushl %ebp + movl %esp,%ebp + subl $16,%esp + fnstcw -12(%ebp) + movw -12(%ebp),%dx + orw $3072,%dx + movw %dx,-16(%ebp) + fldcw -16(%ebp) + fldl 8(%ebp) + frndint + fstpl -8(%ebp) + fldcw -12(%ebp) + movl 16(%ebp),%eax + movl -8(%ebp),%edx + movl -4(%ebp),%ecx + movl %edx,(%eax) + movl %ecx,4(%eax) + fldl 8(%ebp) + fsubl -8(%ebp) + jmp L1 +L1: + leave + ret Property changes on: head/lib/libc/i386/gen/modf.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/setjmp.S =================================================================== --- head/lib/libc/i386/gen/setjmp.S (nonexistent) +++ head/lib/libc/i386/gen/setjmp.S (revision 1849) @@ -0,0 +1,91 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90" + .align 2,0x90 +#endif /* LIBC_SCCS and not lint */ + +/* + * C library -- _setjmp, _longjmp + * + * longjmp(a,v) + * will generate a "return(v)" from the last call to + * setjmp(a) + * by restoring registers from the environment 'a'. + * The previous signal state is restored. + */ + +#include "DEFS.h" +#include "SYS.h" + +ENTRY(setjmp) + pushl $0 + call PIC_PLT(_sigblock) + popl %edx + movl 4(%esp),%ecx + movl 0(%esp),%edx + movl %edx, 0(%ecx) + movl %ebx, 4(%ecx) + movl %esp, 8(%ecx) + movl %ebp,12(%ecx) + movl %esi,16(%ecx) + movl %edi,20(%ecx) + movl %eax,24(%ecx) + fnstcw 28(%ecx) + xorl %eax,%eax + ret + +ENTRY(longjmp) + movl 4(%esp),%edx + pushl 24(%edx) + call PIC_PLT(_sigsetmask) /* XXX this is not reentrant */ + popl %eax + movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + fninit + fldcw 28(%edx) + testl %eax,%eax + jnz 1f + incl %eax +1: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/i386/gen/setjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/sigsetjmp.S =================================================================== --- head/lib/libc/i386/gen/sigsetjmp.S (nonexistent) +++ head/lib/libc/i386/gen/sigsetjmp.S (revision 1849) @@ -0,0 +1,89 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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" + * $Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $ + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .text + .asciz "$Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $" +#endif /* LIBC_SCCS and not lint */ + +#include "DEFS.h" +#include "SYS.h" + +ENTRY(sigsetjmp) + movl 8(%esp),%eax + movl 4(%esp),%ecx + movl %eax,24(%ecx) + testl %eax,%eax + jz 1f + pushl $0 + call PIC_PLT(_sigblock) + addl $4,%esp + movl 4(%esp),%ecx + movl %eax,28(%ecx) +1: movl 0(%esp),%edx + movl %edx, 0(%ecx) + movl %ebx, 4(%ecx) + movl %esp, 8(%ecx) + movl %ebp,12(%ecx) + movl %esi,16(%ecx) + movl %edi,20(%ecx) + xorl %eax,%eax + ret + +ENTRY(siglongjmp) + movl 4(%esp),%edx + cmpl $0,24(%edx) + jz 1f + pushl 28(%edx) + call PIC_PLT(_sigsetmask) + addl $4,%esp +1: movl 4(%esp),%edx + movl 8(%esp),%eax + movl 0(%edx),%ecx + movl 4(%edx),%ebx + movl 8(%edx),%esp + movl 12(%edx),%ebp + movl 16(%edx),%esi + movl 20(%edx),%edi + testl %eax,%eax + jnz 2f + incl %eax +2: movl %ecx,0(%esp) + ret Property changes on: head/lib/libc/i386/gen/sigsetjmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/gen/udivsi3.S =================================================================== --- head/lib/libc/i386/gen/udivsi3.S (nonexistent) +++ head/lib/libc/i386/gen/udivsi3.S (revision 1849) @@ -0,0 +1,47 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)udivsi3.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + + .globl ___udivsi3 + .type ___udivsi3,@function +___udivsi3: + movl 4(%esp),%eax + xorl %edx,%edx + divl 8(%esp) + ret Property changes on: head/lib/libc/i386/gen/udivsi3.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/net/Makefile.inc =================================================================== --- head/lib/libc/i386/net/Makefile.inc (revision 1848) +++ head/lib/libc/i386/net/Makefile.inc (revision 1849) @@ -1,3 +1,3 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -SRCS+= htonl.s htons.s ntohl.s ntohs.s +SRCS+= htonl.S htons.S ntohl.S ntohs.S Index: head/lib/libc/i386/net/htonl.S =================================================================== --- head/lib/libc/i386/net/htonl.S (nonexistent) +++ head/lib/libc/i386/net/htonl.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htonl.s 5.3 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* netorder = htonl(hostorder) */ + +#include "DEFS.h" + +ENTRY(htonl) + movl 4(%esp),%eax + xchgb %al,%ah + roll $16,%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/i386/net/htonl.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/net/htons.S =================================================================== --- head/lib/libc/i386/net/htons.S (nonexistent) +++ head/lib/libc/i386/net/htons.S (revision 1849) @@ -0,0 +1,48 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htons.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* netorder = htons(hostorder) */ + +#include "DEFS.h" + +ENTRY(htons) + movzwl 4(%esp),%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/i386/net/htons.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/net/ntohl.S =================================================================== --- head/lib/libc/i386/net/ntohl.S (nonexistent) +++ head/lib/libc/i386/net/ntohl.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohl.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohl(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohl) + movl 4(%esp),%eax + xchgb %al,%ah + roll $16,%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/i386/net/ntohl.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/net/ntohs.S =================================================================== --- head/lib/libc/i386/net/ntohs.S (nonexistent) +++ head/lib/libc/i386/net/ntohs.S (revision 1849) @@ -0,0 +1,48 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohs.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohs(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohs) + movzwl 4(%esp),%eax + xchgb %al,%ah + ret Property changes on: head/lib/libc/i386/net/ntohs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/stdlib/Makefile.inc =================================================================== --- head/lib/libc/i386/stdlib/Makefile.inc (revision 1848) +++ head/lib/libc/i386/stdlib/Makefile.inc (revision 1849) @@ -1,3 +1,3 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -SRCS+= abs.s +SRCS+= abs.S Index: head/lib/libc/i386/stdlib/abs.S =================================================================== --- head/lib/libc/i386/stdlib/abs.S (nonexistent) +++ head/lib/libc/i386/stdlib/abs.S (revision 1849) @@ -0,0 +1,49 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .text + .asciz "@(#)abs.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +#include "DEFS.h" + +ENTRY(abs) + movl 4(%esp),%eax + cmpl $0,%eax + jge 1f + negl %eax +1: ret Property changes on: head/lib/libc/i386/stdlib/abs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/stdlib/div.S =================================================================== --- head/lib/libc/i386/stdlib/div.S (nonexistent) +++ head/lib/libc/i386/stdlib/div.S (revision 1849) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: div.S,v 1.1 1993/12/04 21:46:15 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .text + .asciz "$Id: div.S,v 1.1 1993/12/04 21:46:15 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +ENTRY(div) + movl 4(%esp),%eax + movl 8(%esp),%ecx + cdq + idiv %ecx + movl %eax,4(%esp) + movl %edx,8(%esp) + ret Property changes on: head/lib/libc/i386/stdlib/div.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/stdlib/labs.S =================================================================== --- head/lib/libc/i386/stdlib/labs.S (nonexistent) +++ head/lib/libc/i386/stdlib/labs.S (revision 1849) @@ -0,0 +1,49 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .text + .asciz "@(#)abs.s 5.2 (Berkeley) 12/17/90" +#endif /* LIBC_SCCS and not lint */ + +#include "DEFS.h" + +ENTRY(labs) + movl 4(%esp),%eax + cmpl $0,%eax + jge 1f + negl %eax +1: ret Property changes on: head/lib/libc/i386/stdlib/labs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/stdlib/ldiv.S =================================================================== --- head/lib/libc/i386/stdlib/ldiv.S (nonexistent) +++ head/lib/libc/i386/stdlib/ldiv.S (revision 1849) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: ldiv.S,v 1.1 1993/12/04 21:46:17 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .text + .asciz "$Id: ldiv.S,v 1.1 1993/12/04 21:46:17 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +ENTRY(ldiv) + movl 4(%esp),%eax + movl 8(%esp),%ecx + cdq + idiv %ecx + movl %eax,4(%esp) + movl %edx,8(%esp) + ret Property changes on: head/lib/libc/i386/stdlib/ldiv.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/Makefile.inc =================================================================== --- head/lib/libc/i386/string/Makefile.inc (revision 1848) +++ head/lib/libc/i386/string/Makefile.inc (revision 1849) @@ -1,5 +1,7 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -SRCS+= bcmp.c bcopy.c bzero.s ffs.c index.c memchr.c memcmp.c memset.c \ - rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c strncat.c \ - strncmp.c strncpy.c strpbrk.c strsep.c strspn.c strstr.c +SRCS+= bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S \ + memmove.S memset.S \ + rindex.S strcat.S strchr.S strcmp.S strcpy.S strcspn.c \ + strlen.S strncat.c strncmp.S strncpy.c strpbrk.c strsep.c \ + strspn.c strrchr.S strstr.c Index: head/lib/libc/i386/string/bcmp.S =================================================================== --- head/lib/libc/i386/string/bcmp.S (nonexistent) +++ head/lib/libc/i386/string/bcmp.S (revision 1849) @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. 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. + * + * $Id: bcmp.S,v 1.2 1994/03/31 14:10:57 davidg Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: bcmp.S,v 1.2 1994/03/31 14:10:57 davidg Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * bcmp (void *b1, void *b2, size_t len) + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(bcmp) + pushl %edi + pushl %esi + movl 12(%esp),%edi + movl 16(%esp),%esi + xorl %eax,%eax /* clear return value */ + cld /* set compare direction forward */ + + movl 20(%esp),%ecx /* compare by words */ + shrl $2,%ecx + repe + cmpsl + jne L1 + + movl 20(%esp),%ecx /* compare remainder by bytes */ + andl $3,%ecx + repe + cmpsb + je L2 + +L1: incl %eax +L2: popl %esi + popl %edi + ret Property changes on: head/lib/libc/i386/string/bcmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/bcopy.S =================================================================== --- head/lib/libc/i386/string/bcopy.S (nonexistent) +++ head/lib/libc/i386/string/bcopy.S (revision 1849) @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * + * 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 University of + * California, Berkeley and its contributors. + * 4. 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. + * + * $Id: bcopy.S,v 1.1 1993/12/05 13:01:41 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: bcopy.S,v 1.1 1993/12/05 13:01:41 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + + /* + * (ov)bcopy (src,dst,cnt) + * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 + */ + +ENTRY(bcopy) + pushl %esi + pushl %edi + movl 12(%esp),%esi + movl 16(%esp),%edi + movl 20(%esp),%ecx + cmpl %esi,%edi /* potentially overlapping? */ + jnb 1f + cld /* nope, copy forwards. */ + shrl $2,%ecx /* copy by words */ + rep + movsl + movl 20(%esp),%ecx + andl $3,%ecx /* any bytes left? */ + rep + movsb + popl %edi + popl %esi + ret +1: + addl %ecx,%edi /* copy backwards. */ + addl %ecx,%esi + std + andl $3,%ecx /* any fractional bytes? */ + decl %edi + decl %esi + rep + movsb + movl 20(%esp),%ecx /* copy remainder by words */ + shrl $2,%ecx + subl $3,%esi + subl $3,%edi + rep + movsl + popl %edi + popl %esi + cld + ret Property changes on: head/lib/libc/i386/string/bcopy.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/bzero.S =================================================================== --- head/lib/libc/i386/string/bzero.S (nonexistent) +++ head/lib/libc/i386/string/bzero.S (revision 1849) @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: bzero.S,v 1.1 1993/12/05 13:01:42 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: bzero.S,v 1.1 1993/12/05 13:01:42 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * bzero (void *b, size_t len) + * write len zero bytes to the string b. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(bzero) + pushl %edi + pushl %ebx + movl 12(%esp),%edi + movl 16(%esp),%ecx + + cld /* set fill direction forward */ + xorl %eax,%eax /* set fill data to 0 */ + + /* + * if the string is too short, it's really not worth the overhead + * of aligning to word boundries, etc. So we jump to a plain + * unaligned set. + */ + cmpl $0x0f,%ecx + jle L1 + + movl %edi,%edx /* compute misalignment */ + negl %edx + andl $3,%edx + movl %ecx,%ebx + subl %edx,%ebx + + movl %edx,%ecx /* zero until word aligned */ + rep + stosb + + movl %ebx,%ecx /* zero by words */ + shrl $2,%ecx + rep + stosl + + movl %ebx,%ecx + andl $3,%ecx /* zero remainder by bytes */ +L1: rep + stosb + + popl %ebx + popl %edi + ret Property changes on: head/lib/libc/i386/string/bzero.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/ffs.S =================================================================== --- head/lib/libc/i386/string/ffs.S (nonexistent) +++ head/lib/libc/i386/string/ffs.S (revision 1849) @@ -0,0 +1,58 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: ffs.S,v 1.1 1993/12/05 13:01:43 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: ffs.S,v 1.1 1993/12/05 13:01:43 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * ffs(value) + * finds the first bit set in value and returns the index of + * that bit. Bits are numbered starting from 1, starting at the + * rightmost bit. A return value of 0 means that the argument + * was zero. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(ffs) + bsfl 4(%esp),%eax + jz L1 /* ZF is set if all bits are 0 */ + incl %eax /* bits numbered from 1, not 0 */ + ret + + .align 2 +L1: xorl %eax,%eax /* clear result */ + ret Property changes on: head/lib/libc/i386/string/ffs.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/index.S =================================================================== --- head/lib/libc/i386/string/index.S (nonexistent) +++ head/lib/libc/i386/string/index.S (revision 1849) @@ -0,0 +1,68 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: index.S,v 1.1 1993/12/05 13:01:46 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: index.S,v 1.1 1993/12/05 13:01:46 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * index(s, c) + * return a pointer to the first occurance of the character c in + * string s, or NULL if c does not occur in the string. + * + * %edx - pointer iterating through string + * %eax - pointer to first occurance of 'c' + * %cl - character we're comparing against + * %bl - character at %edx + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(index) + pushl %ebx + movl 8(%esp),%eax + movb 12(%esp),%cl + .align 2,0x90 +L1: + movb (%eax),%bl + cmpb %bl,%cl /* found char??? */ + je L2 + incl %eax + testb %bl,%bl /* null terminator??? */ + jne L1 + xorl %eax,%eax +L2: + popl %ebx + ret Property changes on: head/lib/libc/i386/string/index.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/memchr.S =================================================================== --- head/lib/libc/i386/string/memchr.S (nonexistent) +++ head/lib/libc/i386/string/memchr.S (revision 1849) @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: memchr.S,v 1.1 1993/12/05 13:01:47 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: memchr.S,v 1.1 1993/12/05 13:01:47 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * memchr (b, c, len) + * locates the first occurance of c in string b. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(memchr) + pushl %edi + movl 8(%esp),%edi /* string address */ + movl 12(%esp),%eax /* set character to search for */ + movl 16(%esp),%ecx /* set length of search */ + testl %eax,%eax /* clear Z flag, for len == 0 */ + cld /* set search forward */ + repne /* search! */ + scasb + jnz L1 /* scan failed, return null */ + leal -1(%edi),%eax /* adjust result of scan */ + popl %edi + ret + .align 2,0x90 +L1: xorl %eax,%eax + popl %edi + ret Property changes on: head/lib/libc/i386/string/memchr.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/memcmp.S =================================================================== --- head/lib/libc/i386/string/memcmp.S (nonexistent) +++ head/lib/libc/i386/string/memcmp.S (revision 1849) @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. 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. + * + * $Id: memcmp.S,v 1.3 1994/03/31 14:10:59 davidg Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: memcmp.S,v 1.3 1994/03/31 14:10:59 davidg Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * memcmp (void *b1, void *b2, size_t len) + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(memcmp) + pushl %edi + pushl %esi + movl 12(%esp),%edi + movl 16(%esp),%esi + cld /* set compare direction forward */ + + movl 20(%esp),%ecx /* compare by words */ + shrl $2,%ecx + repe + cmpsl + jne L5 /* do we match so far? */ + + movl 20(%esp),%ecx /* compare remainder by bytes */ + andl $3,%ecx + repe + cmpsb + jne L6 /* do we match? */ + + xorl %eax,%eax /* we match, return zero */ + popl %esi + popl %edi + ret + +L5: movl $4,%ecx /* We know that one of the next */ + subl %ecx,%edi /* four pairs of bytes do not */ + subl %ecx,%esi /* match. */ + repe + cmpsb +L6: movzbl -1(%edi),%eax /* Perform unsigned comparison */ + movzbl -1(%esi),%edx + subl %edx,%eax + popl %esi + popl %edi + ret Property changes on: head/lib/libc/i386/string/memcmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/memmove.S =================================================================== --- head/lib/libc/i386/string/memmove.S (nonexistent) +++ head/lib/libc/i386/string/memmove.S (revision 1849) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * + * 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 University of + * California, Berkeley and its contributors. + * 4. 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. + * + * $Id: memmove.S,v 1.2 1994/03/31 14:11:00 davidg Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: memmove.S,v 1.2 1994/03/31 14:11:00 davidg Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + + /* + * (ov)bcopy (src,dst,cnt) + * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 + */ + +ALTENTRY(memcpy) +ENTRY(memmove) + pushl %esi + pushl %edi + movl 12(%esp),%edi + movl 16(%esp),%esi + movl 20(%esp),%ecx + cmpl %esi,%edi /* potentially overlapping? */ + jnb 1f + cld /* nope, copy forwards. */ + shrl $2,%ecx /* copy by words */ + rep + movsl + movl 20(%esp),%ecx + andl $3,%ecx /* any bytes left? */ + rep + movsb + movl 12(%esp),%eax + popl %edi + popl %esi + ret +1: + addl %ecx,%edi /* copy backwards. */ + addl %ecx,%esi + std + andl $3,%ecx /* any fractional bytes? */ + decl %edi + decl %esi + rep + movsb + movl 20(%esp),%ecx /* copy remainder by words */ + shrl $2,%ecx + subl $3,%esi + subl $3,%edi + rep + movsl + movl 12(%esp),%eax + popl %edi + popl %esi + cld + ret Property changes on: head/lib/libc/i386/string/memmove.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/memset.S =================================================================== --- head/lib/libc/i386/string/memset.S (nonexistent) +++ head/lib/libc/i386/string/memset.S (revision 1849) @@ -0,0 +1,94 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. 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. + * + * $Id: memset.S,v 1.2 1994/03/31 14:11:01 davidg Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: memset.S,v 1.2 1994/03/31 14:11:01 davidg Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * memset(void *b, int c, size_t len) + * write len bytes of value c (converted to an unsigned char) to + * the string b. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(memset) + pushl %edi + pushl %ebx + movl 12(%esp),%edi + movzbl 16(%esp),%eax /* unsigned char, zero extend */ + movl 20(%esp),%ecx + pushl %edi /* push address of buffer */ + + cld /* set fill direction forward */ + + /* + * if the string is too short, it's really not worth the overhead + * of aligning to word boundries, etc. So we jump to a plain + * unaligned set. + */ + cmpl $0x0f,%ecx + jle L1 + + movb %al,%ah /* copy char to all bytes in word */ + movl %eax,%edx + sall $16,%eax + orl %edx,%eax + + movl %edi,%edx /* compute misalignment */ + negl %edx + andl $3,%edx + movl %ecx,%ebx + subl %edx,%ebx + + movl %edx,%ecx /* set until word aligned */ + rep + stosb + + movl %ebx,%ecx + shrl $2,%ecx /* set by words */ + rep + stosl + + movl %ebx,%ecx /* set remainder by bytes */ + andl $3,%ecx +L1: rep + stosb + + popl %eax /* pop address of buffer */ + popl %ebx + popl %edi + ret Property changes on: head/lib/libc/i386/string/memset.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/rindex.S =================================================================== --- head/lib/libc/i386/string/rindex.S (nonexistent) +++ head/lib/libc/i386/string/rindex.S (revision 1849) @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: rindex.S,v 1.1 1993/12/05 13:01:55 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: rindex.S,v 1.1 1993/12/05 13:01:55 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * rindex(s, c) + * return a pointer to the last occurance of the character c in + * string s, or NULL if c does not occur in the string. + * + * %edx - pointer iterating through string + * %eax - pointer to last occurance of 'c' + * %cl - character we're comparing against + * %bl - character at %edx + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(rindex) + pushl %ebx + movl 8(%esp),%edx + movb 12(%esp),%cl + xorl %eax,%eax /* init pointer to null */ + .align 2,0x90 +L1: + movb (%edx),%bl + cmpb %bl,%cl + jne L2 + movl %edx,%eax +L2: + incl %edx + testb %bl,%bl /* null terminator??? */ + jne L1 + popl %ebx + ret Property changes on: head/lib/libc/i386/string/rindex.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strcat.S =================================================================== --- head/lib/libc/i386/string/strcat.S (nonexistent) +++ head/lib/libc/i386/string/strcat.S (revision 1849) @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strcat.S,v 1.1 1993/12/05 13:01:56 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strcat.S,v 1.1 1993/12/05 13:01:56 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strcat(s, append) + * append a copy of the null-terminated string "append" to the end + * of the null-terminated string s, then add a terminating `\0'. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +/* + * I've unrolled the loop eight times: large enough to make a + * significant difference, and small enough not to totally trash the + * cashe. + */ + +ENTRY(strcat) + pushl %edi /* save edi */ + movl 8(%esp),%edi /* dst address */ + movl 12(%esp),%edx /* src address */ + pushl %edi /* push destination address */ + + cld /* set search forward */ + xorl %eax,%eax /* set search for null terminator */ + movl $-1,%ecx /* set search for lots of characters */ + repne /* search! */ + scasb + + leal -1(%edi),%ecx /* correct dst address */ + + .align 2,0x90 +L1: movb (%edx),%al /* unroll loop, but not too much */ + movb %al,(%ecx) + testb %al,%al + je L2 + movb 1(%edx),%al + movb %al,1(%ecx) + testb %al,%al + je L2 + movb 2(%edx),%al + movb %al,2(%ecx) + testb %al,%al + je L2 + movb 3(%edx),%al + movb %al,3(%ecx) + testb %al,%al + je L2 + movb 4(%edx),%al + movb %al,4(%ecx) + testb %al,%al + je L2 + movb 5(%edx),%al + movb %al,5(%ecx) + testb %al,%al + je L2 + movb 6(%edx),%al + movb %al,6(%ecx) + testb %al,%al + je L2 + movb 7(%edx),%al + movb %al,7(%ecx) + addl $8,%edx + addl $8,%ecx + testb %al,%al + jne L1 +L2: popl %eax /* pop destination address */ + popl %edi /* restore edi */ + ret Property changes on: head/lib/libc/i386/string/strcat.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strchr.S =================================================================== --- head/lib/libc/i386/string/strchr.S (nonexistent) +++ head/lib/libc/i386/string/strchr.S (revision 1849) @@ -0,0 +1,68 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strchr.S,v 1.1 1993/12/05 13:01:56 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strchr.S,v 1.1 1993/12/05 13:01:56 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strchr(s, c) + * return a pointer to the first occurance of the character c in + * string s, or NULL if c does not occur in the string. + * + * %edx - pointer iterating through string + * %eax - pointer to first occurance of 'c' + * %cl - character we're comparing against + * %bl - character at %edx + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(strchr) + pushl %ebx + movl 8(%esp),%eax + movb 12(%esp),%cl + .align 2,0x90 +L1: + movb (%eax),%bl + cmpb %bl,%cl /* found char??? */ + je L2 + incl %eax + testb %bl,%bl /* null terminator??? */ + jne L1 + xorl %eax,%eax +L2: + popl %ebx + ret Property changes on: head/lib/libc/i386/string/strchr.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strcmp.S =================================================================== --- head/lib/libc/i386/string/strcmp.S (nonexistent) +++ head/lib/libc/i386/string/strcmp.S (revision 1849) @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strcmp.S,v 1.2 1994/03/04 15:50:28 ache Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strcmp.S,v 1.2 1994/03/04 15:50:28 ache Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strcmp(s1, s2) + * return an integer greater than, equal to, or less than 0, + * according as string s1 is greater than, equal to, or less + * than the string s2. + * + * %eax - pointer to s1 + * %edx - pointer to s2 + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +/* + * I've unrolled the loop eight times: large enough to make a + * significant difference, and small enough not to totally trash the + * cashe. + */ + +ENTRY(strcmp) + movl 0x04(%esp),%eax + movl 0x08(%esp),%edx + jmp L2 /* Jump into the loop! */ + + .align 2,0x90 +L1: incl %eax + incl %edx +L2: movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + jne L3 + incl %eax + incl %edx + movb (%eax),%cl + testb %cl,%cl + je L3 + cmpb %cl,(%edx) + je L1 + .align 2, 0x90 +L3: movzbl (%eax),%eax /* unsigned comparison */ + movzbl (%edx),%edx + subl %edx,%eax + ret Property changes on: head/lib/libc/i386/string/strcmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strcpy.S =================================================================== --- head/lib/libc/i386/string/strcpy.S (nonexistent) +++ head/lib/libc/i386/string/strcpy.S (revision 1849) @@ -0,0 +1,94 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strcpy.S,v 1.1 1993/12/05 13:01:58 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strcpy.S,v 1.1 1993/12/05 13:01:58 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strcpy (dst, src) + * copy the string src to dst. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +/* + * I've unrolled the loop eight times: large enough to make a + * significant difference, and small enough not to totally trash the + * cashe. + */ + +ENTRY(strcpy) + movl 4(%esp),%ecx /* dst address */ + movl 8(%esp),%edx /* src address */ + pushl %ecx /* push dst address */ + + .align 2,0x90 +L1: movb (%edx),%al /* unroll loop, but not too much */ + movb %al,(%ecx) + testb %al,%al + je L2 + movb 1(%edx),%al + movb %al,1(%ecx) + testb %al,%al + je L2 + movb 2(%edx),%al + movb %al,2(%ecx) + testb %al,%al + je L2 + movb 3(%edx),%al + movb %al,3(%ecx) + testb %al,%al + je L2 + movb 4(%edx),%al + movb %al,4(%ecx) + testb %al,%al + je L2 + movb 5(%edx),%al + movb %al,5(%ecx) + testb %al,%al + je L2 + movb 6(%edx),%al + movb %al,6(%ecx) + testb %al,%al + je L2 + movb 7(%edx),%al + movb %al,7(%ecx) + addl $8,%edx + addl $8,%ecx + testb %al,%al + jne L1 +L2: popl %eax /* pop dst address */ + ret Property changes on: head/lib/libc/i386/string/strcpy.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strlen.S =================================================================== --- head/lib/libc/i386/string/strlen.S (nonexistent) +++ head/lib/libc/i386/string/strlen.S (revision 1849) @@ -0,0 +1,58 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strlen.S,v 1.1 1993/12/05 13:01:59 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strlen.S,v 1.1 1993/12/05 13:01:59 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strlen (s) + * compute the length of the string s. + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(strlen) + pushl %edi + movl 8(%esp),%edi /* string address */ + cld /* set search forward */ + xorl %eax,%eax /* set search for null terminator */ + movl $-1,%ecx /* set search for lots of characters */ + repne /* search! */ + scasb + notl %ecx /* get length by taking complement */ + leal -1(%ecx),%eax /* and subtracting one */ + popl %edi + ret Property changes on: head/lib/libc/i386/string/strlen.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strncmp.S =================================================================== --- head/lib/libc/i386/string/strncmp.S (nonexistent) +++ head/lib/libc/i386/string/strncmp.S (revision 1849) @@ -0,0 +1,157 @@ +/* + * Copyright (c) 1993,94 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. 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. + * + * $Id: strncmp.S,v 1.3 1994/03/31 14:11:02 davidg Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strncmp.S,v 1.3 1994/03/31 14:11:02 davidg Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strncmp(s1, s2, n) + * return an integer greater than, equal to, or less than 0, + * according as the first n characters of string s1 is greater + * than, equal to, or less than the string s2. + * + * %eax - pointer to s1 + * %ecx - pointer to s2 + * %edx - length + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +/* + * I've unrolled the loop eight times: large enough to make a + * significant difference, and small enough not to totally trash the + * cache. + */ + +ENTRY(strncmp) + pushl %ebx + movl 8(%esp),%eax + movl 12(%esp),%ecx + movl 16(%esp),%edx + testl %edx,%edx + jmp L2 /* Jump into the loop! */ + + .align 2,0x90 +L1: incl %eax + incl %ecx + decl %edx +L2: jz L4 /* strings are equal */ + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + jne L3 + + incl %eax + incl %ecx + decl %edx + jz L4 + movb (%eax),%bl + testb %bl,%bl + jz L3 + cmpb %bl,(%ecx) + je L1 + + .align 2,0x90 +L3: movzbl (%eax),%eax /* unsigned comparision */ + movzbl (%ecx),%ecx + subl %ecx,%eax + popl %ebx + ret + .align 2,0x90 +L4: xorl %eax,%eax + popl %ebx + ret Property changes on: head/lib/libc/i386/string/strncmp.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/string/strrchr.S =================================================================== --- head/lib/libc/i386/string/strrchr.S (nonexistent) +++ head/lib/libc/i386/string/strrchr.S (revision 1849) @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1993 Winning Strategies, Inc. + * 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 Winning Strategies, Inc. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software withough 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. + * + * $Id: strrchr.S,v 1.1 1993/12/05 13:02:01 ats Exp $ + */ + +#if defined(LIBC_RCS) && !defined(lint) + .asciz "$Id: strrchr.S,v 1.1 1993/12/05 13:02:01 ats Exp $" +#endif /* LIBC_RCS and not lint */ + +#include "DEFS.h" + +/* + * strrchr(s, c) + * return a pointer to the last occurance of the character c in + * string s, or NULL if c does not occur in the string. + * + * %edx - pointer iterating through string + * %eax - pointer to last occurance of 'c' + * %cl - character we're comparing against + * %bl - character at %edx + * + * Written by: + * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. + */ + +ENTRY(strrchr) + pushl %ebx + movl 8(%esp),%edx + movb 12(%esp),%cl + xorl %eax,%eax /* init pointer to null */ + .align 2,0x90 +L1: + movb (%edx),%bl + cmpb %bl,%cl + jne L2 + movl %edx,%eax +L2: + incl %edx + testb %bl,%bl /* null terminator??? */ + jne L1 + popl %ebx + ret Property changes on: head/lib/libc/i386/string/strrchr.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/Ovfork.S =================================================================== --- head/lib/libc/i386/sys/Ovfork.S (nonexistent) +++ head/lib/libc/i386/sys/Ovfork.S (revision 1849) @@ -0,0 +1,80 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: Ovfork.S,v 1.3 1994/02/21 05:19:08 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)Ovfork.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * pid = vfork(); + * + * %edx == 0 in parent process, %edx == 1 in child process. + * %eax == pid of child in parent, %eax == pid of parent in child. + * + */ + .set vfork,66 +.globl _vfork +.type _vfork,@function + +_vfork: + popl %ecx /* my rta into ecx */ + movl $vfork, %eax + LCALL(7,0) + jb verror +vforkok: + cmpl $0,%edx /* child process? */ + jne child /* yes */ + jmp parent +.globl _errno +verror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno), %edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + jmp %ecx +child: + movl $0,%eax +parent: + jmp %ecx Property changes on: head/lib/libc/i386/sys/Ovfork.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/brk.S =================================================================== --- head/lib/libc/i386/sys/brk.S (nonexistent) +++ head/lib/libc/i386/sys/brk.S (revision 1849) @@ -0,0 +1,91 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: brk.S,v 1.3 1994/02/21 05:13:26 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)brk.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl curbrk + .globl minbrk +ENTRY(_brk) + jmp ok + +ENTRY(brk) +#ifdef PIC + movl 4(%esp),%eax + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx # set up GOT addressing + movl PIC_GOT(minbrk),%ecx # + cmpl %eax,(%ecx) + PIC_EPILOGUE + jl ok + movl (%ecx),%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,(%edx) + movl $0,%eax + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%eax + cmpl %eax,minbrk + jl ok + movl minbrk,%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,curbrk + movl $0,%eax + ret +err: + jmp cerror +#endif Property changes on: head/lib/libc/i386/sys/brk.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/cerror.S =================================================================== --- head/lib/libc/i386/sys/cerror.S (nonexistent) +++ head/lib/libc/i386/sys/cerror.S (revision 1849) @@ -0,0 +1,56 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: cerror.S,v 1.2 1994/02/21 05:19:09 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)cerror.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + + .globl _errno +cerror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%ecx + movl %eax,(%ecx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + ret Property changes on: head/lib/libc/i386/sys/cerror.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/exect.S =================================================================== --- head/lib/libc/i386/sys/exect.S (nonexistent) +++ head/lib/libc/i386/sys/exect.S (revision 1849) @@ -0,0 +1,54 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: exect.S,v 1.2 1994/02/21 05:19:10 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)exect.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" +#include + +ENTRY(exect) + lea SYS_execve,%eax + pushf + popl %edx + orl $ PSL_T,%edx + pushl %edx + popf + LCALL(7,0) + jmp cerror /* exect(file, argv, env); */ Property changes on: head/lib/libc/i386/sys/exect.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/fork.S =================================================================== --- head/lib/libc/i386/sys/fork.S (nonexistent) +++ head/lib/libc/i386/sys/fork.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: fork.S,v 1.2 1994/02/21 05:19:11 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)fork.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(fork) + cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */ + je 1f + movl $0,%eax +1: + ret /* pid = fork(); */ Property changes on: head/lib/libc/i386/sys/fork.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/mount.S =================================================================== --- head/lib/libc/i386/sys/mount.S (nonexistent) +++ head/lib/libc/i386/sys/mount.S (revision 1849) @@ -0,0 +1,47 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: mount.S,v 1.2 1994/02/21 05:19:12 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)mount.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(mount) + movl $0,%eax + ret Property changes on: head/lib/libc/i386/sys/mount.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/pipe.S =================================================================== --- head/lib/libc/i386/sys/pipe.S (nonexistent) +++ head/lib/libc/i386/sys/pipe.S (revision 1849) @@ -0,0 +1,50 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: pipe.S,v 1.2 1994/02/21 05:19:13 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)pipe.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(pipe) + movl 4(%esp),%ecx + movl %eax,(%ecx) + movl %edx,4(%ecx) + movl $0,%eax + ret Property changes on: head/lib/libc/i386/sys/pipe.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/ptrace.S =================================================================== --- head/lib/libc/i386/sys/ptrace.S (nonexistent) +++ head/lib/libc/i386/sys/ptrace.S (revision 1849) @@ -0,0 +1,60 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: ptrace.S,v 1.2 1994/02/21 05:19:14 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)ptrace.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +ENTRY(ptrace) + xorl %eax,%eax +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + lea SYS_ptrace,%eax + LCALL(7,0) + jb err + ret +err: + jmp cerror Property changes on: head/lib/libc/i386/sys/ptrace.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/reboot.S =================================================================== --- head/lib/libc/i386/sys/reboot.S (nonexistent) +++ head/lib/libc/i386/sys/reboot.S (revision 1849) @@ -0,0 +1,46 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: reboot.S,v 1.2 1994/02/21 05:19:15 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)reboot.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(reboot) + iret Property changes on: head/lib/libc/i386/sys/reboot.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/sbrk.S =================================================================== --- head/lib/libc/i386/sys/sbrk.S (nonexistent) +++ head/lib/libc/i386/sys/sbrk.S (revision 1849) @@ -0,0 +1,89 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sbrk.S,v 1.2 1994/02/21 05:19:16 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sbrk.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl _end + .globl minbrk + .globl curbrk + + .data +minbrk: .long _end +curbrk: .long _end + .text + +ENTRY(sbrk) +#ifdef PIC + movl 4(%esp),%ecx + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + PIC_EPILOGUE + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + addl %ecx,(%edx) + PIC_EPILOGUE + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%ecx + movl curbrk,%eax + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl curbrk,%eax + addl %ecx,curbrk + ret +err: + jmp cerror +#endif Property changes on: head/lib/libc/i386/sys/sbrk.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/setlogin.S =================================================================== --- head/lib/libc/i386/sys/setlogin.S (nonexistent) +++ head/lib/libc/i386/sys/setlogin.S (revision 1849) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 1991 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: setlogin.S,v 1.2 1994/02/21 05:19:17 rgrimes Exp $ + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)setlogin.s 5.2 (Berkeley) 4/12/91" +#endif /* LIBC_SCCS and not lint */ + +#include "SYS.h" + +.globl __logname_valid /* in getlogin() */ + +SYSCALL(setlogin) +#ifdef PIC + PIC_PROLOGUE + pushl %eax + movl PIC_GOT(__logname_valid),%eax + movl $0,(%eax) + popl %eax + PIC_EPILOGUE +#else + movl $0,__logname_valid +#endif + ret /* setlogin(name) */ Property changes on: head/lib/libc/i386/sys/setlogin.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/sigpending.S =================================================================== --- head/lib/libc/i386/sys/sigpending.S (nonexistent) +++ head/lib/libc/i386/sys/sigpending.S (revision 1849) @@ -0,0 +1,49 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sigpending.S,v 1.2 1994/02/21 05:19:19 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigpending.s 5.1 (Berkeley) 7/1/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(sigpending) + movl 4(%esp),%ecx # fetch pointer to... + movl %eax,(%ecx) # store old mask + xorl %eax,%eax + ret Property changes on: head/lib/libc/i386/sys/sigpending.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/sigprocmask.S =================================================================== --- head/lib/libc/i386/sys/sigprocmask.S (nonexistent) +++ head/lib/libc/i386/sys/sigprocmask.S (revision 1849) @@ -0,0 +1,66 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sigprocmask.S,v 1.2 1994/02/21 05:19:20 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigprocmask.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +err: + jmp cerror + +ENTRY(sigprocmask) + movl 8(%esp),%ecx # fetch new sigset pointer + cmpl $0,%ecx # check new sigset pointer + jne 1f # if not null, indirect +/* movl $0,8(%esp) # null mask pointer: block empty set */ + movl $1,4(%esp) # SIG_BLOCK + jmp 2f +1: movl (%ecx),%ecx # fetch indirect ... + movl %ecx,8(%esp) # to new mask arg +2: movl $ SYS_sigprocmask , %eax + LCALL(0x7,0) + jb err + movl 12(%esp),%ecx # fetch old mask requested + cmpl $0,%ecx # test if old mask requested + je out + movl %eax,(%ecx) # store old mask +out: + xorl %eax,%eax + ret Property changes on: head/lib/libc/i386/sys/sigprocmask.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/sigreturn.S =================================================================== --- head/lib/libc/i386/sys/sigreturn.S (nonexistent) +++ head/lib/libc/i386/sys/sigreturn.S (revision 1849) @@ -0,0 +1,56 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: sigreturn.S,v 1.2 1994/02/21 05:19:21 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigreturn.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * We must preserve the state of the registers as the user has set them up. + */ +#ifdef PROF +#undef ENTRY +#define ENTRY(x) \ + .globl _/**/x; .align 2; _/**/x: pusha ; \ + .data; 1:; .long 0; .text; movl $1b,%eax; call mcount; popa ; nop +#endif /* PROF */ + +SYSCALL(sigreturn) + ret Property changes on: head/lib/libc/i386/sys/sigreturn.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/sigsuspend.S =================================================================== --- head/lib/libc/i386/sys/sigsuspend.S (nonexistent) +++ head/lib/libc/i386/sys/sigsuspend.S (revision 1849) @@ -0,0 +1,54 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigsuspend.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +err: + jmp cerror + +ENTRY(sigsuspend) + movl 4(%esp),%eax # fetch mask arg + movl (%eax),%eax # indirect to mask arg + movl %eax,4(%esp) + movl $ SYS_sigsuspend ,%eax + LCALL(0x7,0) + jb err + xorl %eax,%eax # shouldn t happen + ret Property changes on: head/lib/libc/i386/sys/sigsuspend.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/i386/sys/syscall.S =================================================================== --- head/lib/libc/i386/sys/syscall.S (nonexistent) +++ head/lib/libc/i386/sys/syscall.S (revision 1849) @@ -0,0 +1,55 @@ +/*- + * 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. 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, Berkeley and its contributors. + * 4. 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. + * + * $Id: syscall.S,v 1.2 1994/02/21 05:19:22 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +ENTRY(syscall) + pop %ecx /* rta */ + pop %eax /* syscall number */ + push %ecx + LCALL(7,0) + push %ecx /* need to push a word to keep stack frame intact + upon return; the word must be the return address. */ + jb 1f + ret +1: + jmp cerror Property changes on: head/lib/libc/i386/sys/syscall.S ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/lib/libc/locale/Makefile.inc =================================================================== --- head/lib/libc/locale/Makefile.inc (revision 1848) +++ head/lib/libc/locale/Makefile.inc (revision 1849) @@ -1,13 +1,15 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # locale sources .PATH: ${.CURDIR}/${MACHINE}/locale ${.CURDIR}/locale SRCS+= ansi.c ctype.c euc.c frune.c isctype.c lconv.c localeconv.c \ mbrune.c none.c rune.c setlocale.c table.c utf2.c -MAN3+= ctype.0 isalnum.0 isalpha.0 isascii.0 isblank.0 iscntrl.0 \ - isdigit.0 isgraph.0 islower.0 isprint.0 ispunct.0 isspace.0 \ - isupper.0 isxdigit.0 mbrune.0 multibyte.0 rune.0 setlocale.0 \ - toascii.0 tolower.0 toupper.0 -MAN4+= euc.0 utf2.0 +MAN3+= locale/ctype.3 locale/isalnum.3 locale/isalpha.3 locale/isascii.3 \ + locale/isblank.3 locale/iscntrl.3 locale/isdigit.3 locale/isgraph.3 \ + locale/islower.3 locale/isprint.3 locale/ispunct.3 locale/isspace.3 \ + locale/isupper.3 locale/isxdigit.3 locale/mbrune.3 locale/multibyte.3 \ + locale/rune.3 locale/setlocale.3 locale/toascii.3 locale/tolower.3 \ + locale/toupper.3 +MAN4+= locale/euc.4 locale/utf2.4 Index: head/lib/libc/net/Makefile.inc =================================================================== --- head/lib/libc/net/Makefile.inc (revision 1848) +++ head/lib/libc/net/Makefile.inc (revision 1849) @@ -1,39 +1,40 @@ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # machine-independent net sources .PATH: ${.CURDIR}/${MACHINE}/net ${.CURDIR}/net SRCS+= gethostnamadr.c getnetbyaddr.c getnetbyname.c getnetent.c \ getproto.c getprotoent.c getprotoname.c getservbyname.c \ getservbyport.c getservent.c herror.c inet_addr.c inet_lnaof.c \ inet_makeaddr.c inet_netof.c inet_network.c inet_ntoa.c \ iso_addr.c linkaddr.c ns_addr.c ns_ntoa.c rcmd.c recv.c res_comp.c \ res_debug.c res_init.c res_mkquery.c res_query.c res_send.c \ send.c sethostent.c # machine-dependent net sources .include "${.CURDIR}/${MACHINE}/net/Makefile.inc" -MAN3+= byteorder.0 gethostbyname.0 getnetent.0 getprotoent.0 getservent.0 \ - inet.0 linkaddr.0 ns.0 rcmd.0 resolver.0 \ +MAN3+= net/byteorder.3 net/gethostbyname.3 net/getnetent.3 net/getprotoent.3 \ + net/getservent.3 net/inet.3 net/linkaddr.3 net/ns.3 net/rcmd.3 \ + net/resolver.3 MLINKS+=byteorder.3 htonl.3 byteorder.3 htons.3 byteorder.3 ntohl.3 \ byteorder.3 ntohs.3 MLINKS+=gethostbyname.3 endhostent.3 gethostbyname.3 gethostbyaddr.3 \ gethostbyname.3 sethostent.3 gethostbyname.3 gethostent.3 \ gethostbyname.3 herror.3 MLINKS+=getnetent.3 endnetent.3 getnetent.3 getnetbyaddr.3 \ getnetent.3 getnetbyname.3 getnetent.3 setnetent.3 MLINKS+=getprotoent.3 endprotoent.3 getprotoent.3 getprotobyname.3 \ getprotoent.3 getprotobynumber.3 getprotoent.3 setprotoent.3 MLINKS+=getservent.3 endservent.3 getservent.3 getservbyname.3 \ getservent.3 getservbyport.3 getservent.3 setservent.3 MLINKS+=inet.3 addr.3 inet.3 inet_addr.3 inet.3 inet_lnaof.3 \ inet.3 inet_makeaddr.3 inet.3 inet_netof.3 inet.3 inet_network.3 \ inet.3 inet_ntoa.3 inet.3 network.3 inet.3 ntoa.3 inet.3 inet_aton.3 MLINKS+=linkaddr.3 linkntoa.3 MLINKS+=ns.3 ns_addr.3 ns.3 ns_ntoa.3 MLINKS+=rcmd.3 rresvport.3 rcmd.3 ruserok.3 MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \ resolver.3 res_mkquery.3 resolver.3 res_send.3 resolver.3 res_query.3 \ resolver.3 res_search.3 Index: head/lib/libc/regex/Makefile.inc =================================================================== --- head/lib/libc/regex/Makefile.inc (revision 1848) +++ head/lib/libc/regex/Makefile.inc (revision 1849) @@ -1,14 +1,14 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # regex sources .PATH: ${.CURDIR}/regex CFLAGS+=-DPOSIX_MISTAKE SRCS+= regcomp.c regerror.c regexec.c regfree.c -MAN3+= regex.0 -MAN7+= re_format.0 +MAN3+= regex/regex.3 +MAN7+= regex/re_format.7 MLINKS+=regex.3 regcomp.3 regex.3 regexec.3 regex.3 regerror.3 MLINKS+=regexec.3 regfree.3 Index: head/lib/libc/stdio/Makefile.inc =================================================================== --- head/lib/libc/stdio/Makefile.inc (revision 1848) +++ head/lib/libc/stdio/Makefile.inc (revision 1849) @@ -1,38 +1,40 @@ # @(#)Makefile.inc 8.3 (Berkeley) 4/17/94 # stdio sources .PATH: ${.CURDIR}/stdio SRCS+= clrerr.c fclose.c fdopen.c feof.c ferror.c fflush.c fgetc.c \ fgetln.c fgetpos.c fgets.c fileno.c findfp.c flags.c fopen.c \ fprintf.c fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \ fseek.c fsetpos.c ftell.c funopen.c fvwrite.c fwalk.c fwrite.c \ getc.c getchar.c gets.c getw.c makebuf.c mktemp.c perror.c \ printf.c putc.c putchar.c puts.c putw.c refill.c remove.c rewind.c \ rget.c scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c sprintf.c \ sscanf.c stdio.c tempnam.c tmpfile.c tmpnam.c ungetc.c vfprintf.c \ vfscanf.c vprintf.c vscanf.c vsnprintf.c vsprintf.c vsscanf.c \ wbuf.c wsetup.c -MAN3+= fclose.0 ferror.0 fflush.0 fgetln.0 fgets.0 fopen.0 fputs.0 \ - fread.0 fseek.0 funopen.0 getc.0 mktemp.0 printf.0 putc.0 remove.0 \ - scanf.0 setbuf.0 stdio.0 tmpnam.0 ungetc.0 +MAN3+= stdio/fclose.3 stdio/ferror.3 stdio/fflush.3 stdio/fgetln.3 \ + stdio/fgets.3 stdio/fopen.3 stdio/fputs.3 stdio/fread.3 stdio/fseek.3 \ + stdio/funopen.3 stdio/getc.3 stdio/mktemp.3 stdio/printf.3 \ + stdio/putc.3 stdio/remove.3 stdio/scanf.3 stdio/setbuf.3 \ + stdio/stdio.3 stdio/tmpnam.3 stdio/ungetc.3 MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3 MLINKS+=fflush.3 fpurge.3 MLINKS+=fgets.3 gets.3 MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 MLINKS+=fputs.3 puts.3 MLINKS+=fread.3 fwrite.3 MLINKS+=fseek.3 fgetpos.3 fseek.3 fsetpos.3 fseek.3 ftell.3 fseek.3 rewind.3 MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3 MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3 MLINKS+=mktemp.3 mkstemp.3 MLINKS+=printf.3 fprintf.3 printf.3 snprintf.3 printf.3 sprintf.3 \ printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \ printf.3 vsprintf.3 MLINKS+=putc.3 fputc.3 putc.3 putchar.3 putc.3 putw.3 MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3 scanf.3 vfscanf.3 scanf.3 vscanf.3 \ scanf.3 vsscanf.3 MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3 setbuf.3 setvbuf.3 MLINKS+=tmpnam.3 tempnam.3 tmpnam.3 tmpfile.3 Index: head/lib/libc/stdlib/Makefile.inc =================================================================== --- head/lib/libc/stdlib/Makefile.inc (revision 1848) +++ head/lib/libc/stdlib/Makefile.inc (revision 1849) @@ -1,25 +1,29 @@ # @(#)Makefile.inc 8.2 (Berkeley) 2/16/94 # machine-independent stdlib sources .PATH: ${.CURDIR}/${MACHINE}/stdlib ${.CURDIR}/stdlib SRCS+= abort.c atexit.c atof.c atoi.c atol.c bsearch.c calloc.c div.c \ exit.c getenv.c getopt.c getsubopt.c heapsort.c labs.c ldiv.c \ malloc.c merge.c putenv.c qsort.c radixsort.c rand.c random.c \ realpath.c setenv.c strtod.c strtol.c strtoq.c strtoul.c \ strtouq.c system.c # machine-dependent stdlib sources .include "${.CURDIR}/${MACHINE}/stdlib/Makefile.inc" -MAN3+= abort.0 abs.0 alloca.0 atexit.0 atof.0 atoi.0 atol.0 bsearch.0 \ - calloc.0 div.0 exit.0 free.0 getenv.0 getopt.0 getsubopt.0 labs.0 \ - ldiv.0 malloc.0 memory.0 qsort.0 radixsort.0 rand.0 random.0 \ - realloc.0 realpath.0 strtod.0 strtol.0 strtoul.0 system.0 +MAN3+= stdlib/abort.3 stdlib/abs.3 stdlib/alloca.3 stdlib/atexit.3 \ + stdlib/atof.3 stdlib/atoi.3 stdlib/atol.3 stdlib/bsearch.3 \ + stdlib/calloc.3 stdlib/div.3 stdlib/exit.3 stdlib/free.3 \ + stdlib/getenv.3 stdlib/getopt.3 stdlib/getsubopt.3 stdlib/labs.3 \ + stdlib/ldiv.3 stdlib/malloc.3 stdlib/memory.3 stdlib/qsort.3 \ + stdlib/radixsort.3 stdlib/rand.3 stdlib/random.3 stdlib/realloc.3 \ + stdlib/realpath.3 stdlib/strtod.3 stdlib/strtol.3 stdlib/strtoul.3 \ + stdlib/system.3 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 MLINKS+=rand.3 srand.3 MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 MLINKS+=strtol.3 strtoq.3 MLINKS+=strtoul.3 strtouq.3 Index: head/lib/libc/string/Makefile.inc =================================================================== --- head/lib/libc/string/Makefile.inc (revision 1848) +++ head/lib/libc/string/Makefile.inc (revision 1849) @@ -1,92 +1,96 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 .PATH: ${.CURDIR}/${MACHINE}/string ${.CURDIR}/string # machine-independent string sources SRCS+= memccpy.c strcasecmp.c strcoll.c strdup.c strerror.c \ strftime.c strmode.c strtok.c strxfrm.c swab.c # machine-dependent string sources .include "${.CURDIR}/${MACHINE}/string/Makefile.inc" # If no machine specific bzero(3), build one out of memset(3). -.if empty(SRCS:Mbzero.s) +.if empty(SRCS:Mbzero.S) OBJS+= bzero.o bzero.o: memset.c ${CC} -DBZERO ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @${LD} -x -r ${.TARGET} @mv a.out ${.TARGET} bzero.po: memset.c ${CC} -DBZERO ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif # If no machine specific memmove(3), build one out of bcopy(3). -.if empty(SRCS:Mmemmove.s) +.if empty(SRCS:Mmemmove.S) OBJS+= memmove.o memmove.o: bcopy.c ${CC} -DMEMMOVE ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @${LD} -x -r ${.TARGET} @mv a.out ${.TARGET} memmove.po: bcopy.c ${CC} -DMEMMOVE ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif # If no machine specific memcpy(3), build one out of bcopy(3). -.if empty(SRCS:Mmemcpy.s) +.if empty(SRCS:Mmemmove.S) OBJS+= memcpy.o memcpy.o: bcopy.c ${CC} -DMEMCOPY ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @${LD} -x -r ${.TARGET} @mv a.out ${.TARGET} memcpy.po: bcopy.c ${CC} -DMEMCOPY ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif # If no machine specific strchr(3), build one out of index(3). -.if empty(SRCS:Mstrchr.s) +.if empty(SRCS:Mstrchr.S) OBJS+= strchr.o strchr.o: index.c ${CC} -DSTRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @${LD} -x -r ${.TARGET} @mv a.out ${.TARGET} strchr.po: index.c ${CC} -DSTRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif # If no machine specific strrchr(3), build one out of rindex(3). -.if empty(SRCS:Mstrrchr.s) +.if empty(SRCS:Mstrrchr.S) OBJS+= strrchr.o strrchr.o: rindex.c ${CC} -DSTRRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @${LD} -x -r ${.TARGET} @mv a.out ${.TARGET} strrchr.po: rindex.c ${CC} -DSTRRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif - -MAN3+= bcmp.0 bcopy.0 bstring.0 bzero.0 ffs.0 index.0 memccpy.0 memchr.0 \ - memcmp.0 memcpy.0 memmove.0 memset.0 rindex.0 strcasecmp.0 strcat.0 \ - strchr.0 strcmp.0 strcoll.0 strcpy.0 strcspn.0 strftime.0 string.0 \ - strlen.0 strmode.0 strdup.0 strerror.0 strpbrk.0 strrchr.0 strsep.0 \ - strspn.0 strstr.0 strtok.0 strxfrm.0 swab.0 - +# +MAN3+= string/bcmp.3 string/bcopy.3 string/bstring.3 string/bzero.3 \ + string/ffs.3 string/index.3 string/memccpy.3 string/memchr.3 \ + string/memcmp.3 string/memcpy.3 string/memmove.3 string/memset.3 \ + string/rindex.3 string/strcasecmp.3 string/strcat.3 string/strchr.3 \ + string/strcmp.3 string/strcoll.3 string/strcpy.3 string/strcspn.3 \ + string/strftime.3 string/string.3 string/strlen.3 string/strmode.3 \ + string/strdup.3 string/strerror.3 string/strpbrk.3 string/strrchr.3 \ + string/strsep.3 string/strspn.3 string/strstr.3 string/strtok.3 \ + string/strxfrm.3 string/swab.3 +# MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strcmp.3 strncmp.3 MLINKS+=strcpy.3 strncpy.3 MLINKS+=strerror.3 perror.3 Index: head/lib/libc/sys/Makefile.inc =================================================================== --- head/lib/libc/sys/Makefile.inc (revision 1848) +++ head/lib/libc/sys/Makefile.inc (revision 1849) @@ -1,110 +1,122 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 # sys sources .PATH: ${.CURDIR}/${MACHINE}/sys ${.CURDIR}/sys # modules with non-default implementations on at least one architecture: -SRCS+= Ovfork.s brk.s cerror.s exect.s fork.s pipe.s ptrace.s reboot.s \ - sbrk.s setlogin.s sigpending.s sigprocmask.s sigreturn.s \ - sigsuspend.s syscall.s +SRCS+= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S reboot.S \ + sbrk.S setlogin.S sigpending.S sigprocmask.S sigreturn.S \ + sigsuspend.S syscall.S # glue to provide compatibility between GCC 1.X and 2.X SRCS+= ftruncate.c lseek.c mmap.c truncate.c # modules with default implementations on all architectures: ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \ chown.o chroot.o close.o connect.o dup.o dup2.o execve.o fchdir.o \ fchflags.o fchmod.o fchown.o fcntl.o flock.o fpathconf.o fstat.o \ fstatfs.o fsync.o getdirentries.o getdtablesize.o getegid.o \ geteuid.o getfh.o getfsstat.o getgid.o getgroups.o getitimer.o \ getpeername.o getpgrp.o getpid.o getppid.o getpriority.o \ getrlimit.o getrusage.o getsockname.o getsockopt.o gettimeofday.o \ getuid.o ioctl.o kill.o ktrace.o lfs_bmapv.o lfs_markv.o \ lfs_segclean.o lfs_segwait.o link.o listen.o lstat.o \ madvise.o mincore.o mkdir.o mkfifo.o mknod.o mlock.o mount.o \ mprotect.o msync.o munlock.o munmap.o nfssvc.o open.o \ pathconf.o profil.o quotactl.o read.o \ readlink.o readv.o recvfrom.o recvmsg.o rename.o revoke.o rmdir.o \ select.o sendmsg.o sendto.o setegid.o seteuid.o setgid.o \ setgroups.o setitimer.o setpgid.o setpriority.o setrlimit.o \ setsid.o setsockopt.o settimeofday.o setuid.o shutdown.o \ sigaction.o sigaltstack.o socket.o socketpair.o stat.o statfs.o \ swapon.o symlink.o sync.o umask.o unlink.o unmount.o \ utimes.o vadvise.o wait4.o write.o writev.o __syscall.o __sysctl.o PSEUDO= _exit.o _getlogin.o OBJS+= ${ASM} ${PSEUDO} POBJS+= ${ASM:.o=.po} ${PSEUDO:.o=.po} -CLEANFILES+=${ASM} ${PSEUDO} ${POBJS} +SOBJS+= ${ASM:.o=.so} ${PSEUDO:.o=.so} +CLEANFILES+=${ASM} ${PSEUDO} ${POBJS} ${SOBJS} ${ASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @echo creating ${.PREFIX}.o ${.PREFIX}.po + @echo creating ${.PREFIX}.o ${.PREFIX}.po ${.PREFIX}.so @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o @${LD} -x -r ${.PREFIX}.o @mv a.out ${.PREFIX}.o @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po @${LD} -x -r ${.PREFIX}.po @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ + ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so ${PSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @echo creating ${.PREFIX}.o ${.PREFIX}.po + @echo creating ${.PREFIX}.o ${.PREFIX}.po ${.PREFIX}.so @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o @${LD} -x -r ${.PREFIX}.o @mv a.out ${.PREFIX}.o @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po @${LD} -x -r ${.PREFIX}.po @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ + ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so -MAN2+= accept.0 access.0 acct.0 adjtime.0 bind.0 brk.0 chdir.0 chflags.0 \ - chmod.0 chown.0 chroot.0 close.0 connect.0 dup.0 execve.0 _exit.0 \ - fcntl.0 flock.0 fork.0 fsync.0 getdirentries.0 getdtablesize.0 \ - getfh.0 getfsstat.0 getgid.0 getgroups.0 getitimer.0 getlogin.0 \ - getpeername.0 getpgrp.0 getpid.0 getpriority.0 getrlimit.0 \ - getrusage.0 getsockname.0 getsockopt.0 gettimeofday.0 getuid.0 \ - intro.0 ioctl.0 kill.0 ktrace.0 link.0 listen.0 lseek.0 \ - mkdir.0 mkfifo.0 mknod.0 madvise.0 mincore.0 mlock.0 mmap.0 \ - mount.0 mprotect.0 msync.0 munmap.0 \ - nfssvc.0 open.0 pathconf.0 pipe.0 profil.0 ptrace.0 quotactl.0 \ - munmap.0 nfssvc.0 open.0 pipe.0 profil.0 ptrace.0 quotactl.0 \ - read.0 readlink.0 reboot.0 recv.0 rename.0 revoke.0 rmdir.0 \ - select.0 send.0 setgroups.0 setpgid.0 setsid.0 setuid.0 shutdown.0 \ - sigaction.0 sigpending.0 sigprocmask.0 sigreturn.0 sigaltstack.0 \ - sigstack.0 sigsuspend.0 socket.0 socketpair.0 stat.0 statfs.0 \ - swapon.0 symlink.0 sync.0 syscall.0 truncate.0 umask.0 unlink.0 \ - utimes.0 vfork.0 wait.0 write.0 +MAN2+= sys/accept.2 sys/access.2 sys/acct.2 sys/adjtime.2 sys/bind.2 \ + sys/brk.2 sys/chdir.2 sys/chflags.2 sys/chmod.2 sys/chown.2 \ + sys/chroot.2 sys/close.2 sys/connect.2 sys/dup.2 sys/execve.2 \ + sys/_exit.2 sys/fcntl.2 sys/flock.2 sys/fork.2 sys/fsync.2 \ + sys/getdirentries.2 sys/getdtablesize.2 sys/getfh.2 sys/getfsstat.2 \ + sys/getgid.2 sys/getgroups.2 sys/getitimer.2 sys/getlogin.2 \ + sys/getpeername.2 sys/getpgrp.2 sys/getpid.2 sys/getpriority.2 \ + sys/getrlimit.2 sys/getrusage.2 sys/getsockname.2 sys/getsockopt.2 \ + sys/gettimeofday.2 sys/getuid.2 sys/intro.2 sys/ioctl.2 sys/kill.2 \ + sys/ktrace.2 sys/link.2 sys/listen.2 sys/lseek.2 sys/mkdir.2 \ + sys/mkfifo.2 sys/mknod.2 sys/madvise.2 sys/mincore.2 sys/mlock.2 \ + sys/mmap.2 sys/mount.2 sys/mprotect.2 sys/msync.2 sys/munmap.2 \ + sys/nfssvc.2 sys/open.2 sys/pathconf.2 sys/pipe.2 sys/profil.2 \ + sys/quotactl.2 \ + sys/read.2 sys/readlink.2 sys/reboot.2 sys/recv.2 sys/rename.2 \ + sys/revoke.2 sys/rmdir.2 sys/select.2 sys/send.2 sys/setgroups.2 \ + sys/setpgid.2 sys/setsid.2 sys/setuid.2 sys/shutdown.2 \ + sys/sigaction.2 sys/sigpending.2 sys/sigprocmask.2 sys/sigreturn.2 \ + sys/sigaltstack.2 sys/sigstack.2 sys/sigsuspend.2 sys/socket.2 \ + sys/socketpair.2 sys/stat.2 sys/statfs.2 sys/swapon.2 sys/symlink.2 \ + sys/sync.2 sys/syscall.2 sys/truncate.2 sys/umask.2 sys/unlink.2 \ + sys/utimes.2 sys/vfork.2 sys/wait.2 sys/write.2 + +# missing: ptrace.2 MLINKS+=brk.2 sbrk.2 MLINKS+=dup.2 dup2.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 fchflags.2 MLINKS+=chmod.2 fchmod.2 MLINKS+=chown.2 fchown.2 MLINKS+=getgid.2 getegid.2 MLINKS+=getitimer.2 setitimer.2 MLINKS+=getlogin.2 setlogin.2 MLINKS+=getpid.2 getppid.2 MLINKS+=getpriority.2 setpriority.2 MLINKS+=getrlimit.2 setrlimit.2 MLINKS+=getsockopt.2 setsockopt.2 MLINKS+=gettimeofday.2 settimeofday.2 MLINKS+=getuid.2 geteuid.2 MLINKS+=intro.2 errno.2 MLINKS+=lseek.2 seek.2 MLINKS+=mlock.2 munlock.2 MLINKS+=mount.2 unmount.2 MLINKS+=pathconf.2 fpathconf.2 MLINKS+=read.2 readv.2 MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 MLINKS+=send.2 sendmsg.2 send.2 sendto.2 MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2 MLINKS+=stat.2 fstat.2 stat.2 lstat.2 MLINKS+=statfs.2 fstatfs.2 MLINKS+=syscall.2 __syscall.2 MLINKS+=truncate.2 ftruncate.2 MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 MLINKS+=write.2 writev.2