]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/i386/sub_n.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / i386 / sub_n.S
index 55f288ef32c86b991c4597a1c3d93fa6e5bb54d8..43952c7f4d6491ee35571e064e92eff0af0a2a60 100644 (file)
@@ -1,52 +1,45 @@
 /* i80386 __mpn_sub_n -- Add two limb vectors of the same length > 0 and store
    sum in a third limb vector.
-   Copyright (C) 1992, 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1992-2015 Free Software Foundation, Inc.
    This file is part of the GNU MP Library.
 
    The GNU MP Library is free software; you can redistribute it and/or modify
-   it under the terms of the GNU Library General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or (at your
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 of the License, or (at your
    option) any later version.
 
    The GNU MP Library is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    License for more details.
 
-   You should have received a copy of the GNU Library General Public License
-   along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA. */
+   You should have received a copy of the GNU Lesser General Public License
+   along with the GNU MP Library; see the file COPYING.LIB.  If not,
+   see <http://www.gnu.org/licenses/>.  */
 
 #include "sysdep.h"
 #include "asm-syntax.h"
-#include "bp-sym.h"
-#include "bp-asm.h"
 
-#define PARMS  LINKAGE+8               /* space for 2 saved regs */
+#define PARMS  4+8             /* space for 2 saved regs */
 #define RES    PARMS
-#define S1     RES+PTR_SIZE
-#define S2     S1+PTR_SIZE
-#define SIZE   S2+PTR_SIZE
+#define S1     RES+4
+#define S2     S1+4
+#define SIZE   S2+4
 
        .text
-ENTRY (BP_SYM (__mpn_sub_n))
-       ENTER
+ENTRY (__mpn_sub_n)
 
        pushl %edi
+       cfi_adjust_cfa_offset (4)
        pushl %esi
+       cfi_adjust_cfa_offset (4)
 
        movl    RES(%esp),%edi
+       cfi_rel_offset (edi, 4)
        movl    S1(%esp),%esi
+       cfi_rel_offset (esi, 0)
        movl    S2(%esp),%edx
        movl    SIZE(%esp),%ecx
-#if __BOUNDED_POINTERS__
-       shll    $2, %ecx        /* convert limbs to bytes */
-       CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx)
-       CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx)
-       CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx)
-       shrl    $2, %ecx
-#endif
        movl    %ecx,%eax
        shrl    $3,%ecx                 /* compute count for unrolled loop */
        negl    %eax
@@ -62,10 +55,12 @@ ENTRY (BP_SYM (__mpn_sub_n))
 /* Calculate start address in loop for PIC.  Due to limitations in some
    assemblers, Loop-L0-3 cannot be put into the leal */
        call    L(0)
+       cfi_adjust_cfa_offset (4)
 L(0):  leal    (%eax,%eax,8),%eax
        addl    (%esp),%eax
        addl    $(L(oop)-L(0)-3),%eax
        addl    $4,%esp
+       cfi_adjust_cfa_offset (-4)
 #else
 /* Calculate start address in loop for non-PIC.  */
        leal    (L(oop) - 3)(%eax,%eax,8),%eax
@@ -106,8 +101,11 @@ L(oop):    movl    (%esi),%eax
        negl    %eax
 
        popl %esi
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (esi)
        popl %edi
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (edi)
 
-       LEAVE
        ret
-END (BP_SYM (__mpn_sub_n))
+END (__mpn_sub_n)