diff options
Diffstat (limited to 'lib/libc/i386/gen')
| -rw-r--r-- | lib/libc/i386/gen/_setjmp.S (renamed from lib/libc/i386/gen/_setjmp.s) | 0 | ||||
| -rw-r--r-- | lib/libc/i386/gen/alloca.S (renamed from lib/libc/i386/gen/alloca.s) | 0 | ||||
| -rw-r--r-- | lib/libc/i386/gen/divsi3.S (renamed from lib/libc/i386/gen/divsi3.s) | 1 | ||||
| -rw-r--r-- | lib/libc/i386/gen/fabs.S (renamed from lib/libc/i386/gen/fabs.s) | 0 | ||||
| -rw-r--r-- | lib/libc/i386/gen/fixdfsi.S (renamed from lib/libc/i386/gen/fixdfsi.s) | 1 | ||||
| -rw-r--r-- | lib/libc/i386/gen/fixunsdfsi.S | 82 | ||||
| -rw-r--r-- | lib/libc/i386/gen/fixunsdfsi.s | 50 | ||||
| -rw-r--r-- | lib/libc/i386/gen/modf.S (renamed from lib/libc/i386/gen/modf.s) | 1 | ||||
| -rw-r--r-- | lib/libc/i386/gen/setjmp.S (renamed from lib/libc/i386/gen/setjmp.s) | 5 | ||||
| -rw-r--r-- | lib/libc/i386/gen/sigsetjmp.S (renamed from lib/libc/i386/gen/sigsetjmp.s) | 9 | ||||
| -rw-r--r-- | lib/libc/i386/gen/udivsi3.S (renamed from lib/libc/i386/gen/udivsi3.s) | 1 |
11 files changed, 94 insertions, 56 deletions
diff --git a/lib/libc/i386/gen/_setjmp.s b/lib/libc/i386/gen/_setjmp.S index 7aa3e69f84fb..7aa3e69f84fb 100644 --- a/lib/libc/i386/gen/_setjmp.s +++ b/lib/libc/i386/gen/_setjmp.S diff --git a/lib/libc/i386/gen/alloca.s b/lib/libc/i386/gen/alloca.S index 65378f5ff22b..65378f5ff22b 100644 --- a/lib/libc/i386/gen/alloca.s +++ b/lib/libc/i386/gen/alloca.S diff --git a/lib/libc/i386/gen/divsi3.s b/lib/libc/i386/gen/divsi3.S index a3731eca0247..b08319eaa659 100644 --- a/lib/libc/i386/gen/divsi3.s +++ b/lib/libc/i386/gen/divsi3.S @@ -39,6 +39,7 @@ #endif /* LIBC_SCCS and not lint */ .globl ___divsi3 + .type ___divsi3,@function ___divsi3: movl 4(%esp),%eax cltd diff --git a/lib/libc/i386/gen/fabs.s b/lib/libc/i386/gen/fabs.S index 2519e8b8abcf..2519e8b8abcf 100644 --- a/lib/libc/i386/gen/fabs.s +++ b/lib/libc/i386/gen/fabs.S diff --git a/lib/libc/i386/gen/fixdfsi.s b/lib/libc/i386/gen/fixdfsi.S index a264e83a37f2..a61c667c482c 100644 --- a/lib/libc/i386/gen/fixdfsi.s +++ b/lib/libc/i386/gen/fixdfsi.S @@ -2,6 +2,7 @@ .text .align 2 .globl ___fixdfsi +.type ___fixdfsi,@function ___fixdfsi: pushl %ebp movl %esp,%ebp diff --git a/lib/libc/i386/gen/fixunsdfsi.S b/lib/libc/i386/gen/fixunsdfsi.S new file mode 100644 index 000000000000..f61daeeea27c --- /dev/null +++ b/lib/libc/i386/gen/fixunsdfsi.S @@ -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 diff --git a/lib/libc/i386/gen/fixunsdfsi.s b/lib/libc/i386/gen/fixunsdfsi.s deleted file mode 100644 index 9f31df35d290..000000000000 --- a/lib/libc/i386/gen/fixunsdfsi.s +++ /dev/null @@ -1,50 +0,0 @@ - .file "__fixdfsi.s" -.text - .align 2 -.globl ___fixunsdfsi -___fixunsdfsi: - 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) - - fcoml fbiggestsigned /* bigger than biggest signed? */ - fstsw %ax - sahf - jnb 1f - - fistpl -12(%ebp) - movl -12(%ebp),%eax - jmp 2f - -1: fsubl fbiggestsigned /* reduce for proper conversion */ - fistpl -12(%ebp) /* convert */ - movl -12(%ebp),%eax - orl $0x80000000,%eax /* restore bias */ - -2: fldcw -4(%ebp) - leave - ret - - fcoml fbiggestsigned /* bigger than biggest signed? */ - fstsw %ax - sahf - jnb 1f - - fistpl 4(%esp) - movl 4(%esp),%eax - ret - -1: fsubl fbiggestsigned /* reduce for proper conversion */ - fistpl 4(%esp) /* convert */ - movl 4(%esp),%eax - orl $0x80000000,%eax /* restore bias */ - ret - - .data -fbiggestsigned: .double 0r2147483648.0 diff --git a/lib/libc/i386/gen/modf.s b/lib/libc/i386/gen/modf.S index 978782a50d03..246729f13e95 100644 --- a/lib/libc/i386/gen/modf.s +++ b/lib/libc/i386/gen/modf.S @@ -49,6 +49,7 @@ /* With CHOP mode on, frndint behaves as TRUNC does. Useful. */ .text .globl _modf +.type _modf,@function _modf: pushl %ebp movl %esp,%ebp diff --git a/lib/libc/i386/gen/setjmp.s b/lib/libc/i386/gen/setjmp.S index 5482caa24541..d9fc66e6f991 100644 --- a/lib/libc/i386/gen/setjmp.s +++ b/lib/libc/i386/gen/setjmp.S @@ -50,10 +50,11 @@ */ #include "DEFS.h" +#include "SYS.h" ENTRY(setjmp) pushl $0 - call _sigblock + call PIC_PLT(_sigblock) popl %edx movl 4(%esp),%ecx movl 0(%esp),%edx @@ -71,7 +72,7 @@ ENTRY(setjmp) ENTRY(longjmp) movl 4(%esp),%edx pushl 24(%edx) - call _sigsetmask /* XXX this is not reentrant */ + call PIC_PLT(_sigsetmask) /* XXX this is not reentrant */ popl %eax movl 4(%esp),%edx movl 8(%esp),%eax diff --git a/lib/libc/i386/gen/sigsetjmp.s b/lib/libc/i386/gen/sigsetjmp.S index a2f8d4269214..6c243869daad 100644 --- a/lib/libc/i386/gen/sigsetjmp.s +++ b/lib/libc/i386/gen/sigsetjmp.S @@ -35,15 +35,16 @@ * * * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90" - * $Id: sigsetjmp.s,v 1.2 1993/10/20 17:37:41 jtc Exp $ + * $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.2 1993/10/20 17:37:41 jtc Exp $" + .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 @@ -52,7 +53,7 @@ ENTRY(sigsetjmp) testl %eax,%eax jz 1f pushl $0 - call _sigblock + call PIC_PLT(_sigblock) addl $4,%esp movl 4(%esp),%ecx movl %eax,28(%ecx) @@ -71,7 +72,7 @@ ENTRY(siglongjmp) cmpl $0,24(%edx) jz 1f pushl 28(%edx) - call _sigsetmask + call PIC_PLT(_sigsetmask) addl $4,%esp 1: movl 4(%esp),%edx movl 8(%esp),%eax diff --git a/lib/libc/i386/gen/udivsi3.s b/lib/libc/i386/gen/udivsi3.S index da395d34490e..f05e004b10c6 100644 --- a/lib/libc/i386/gen/udivsi3.s +++ b/lib/libc/i386/gen/udivsi3.S @@ -39,6 +39,7 @@ #endif /* LIBC_SCCS and not lint */ .globl ___udivsi3 + .type ___udivsi3,@function ___udivsi3: movl 4(%esp),%eax xorl %edx,%edx |
