[BACK]Return to add_n.s CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / sh

Annotation of OpenXM_contrib/gmp/mpn/sh/add_n.s, Revision 1.1.1.2

1.1.1.2 ! maekawa     1: ! SH __gmpn_add_n -- Add two limb vectors of the same length > 0 and store
1.1       maekawa     2: ! sum in a third limb vector.
                      3:
1.1.1.2 ! maekawa     4: ! Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
1.1       maekawa     5:
                      6: ! This file is part of the GNU MP Library.
                      7:
                      8: ! The GNU MP Library is free software; you can redistribute it and/or modify
1.1.1.2 ! maekawa     9: ! it under the terms of the GNU Lesser General Public License as published by
        !            10: ! the Free Software Foundation; either version 2.1 of the License, or (at your
1.1       maekawa    11: ! option) any later version.
                     12:
                     13: ! The GNU MP Library is distributed in the hope that it will be useful, but
                     14: ! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1.1.1.2 ! maekawa    15: ! or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
1.1       maekawa    16: ! License for more details.
                     17:
1.1.1.2 ! maekawa    18: ! You should have received a copy of the GNU Lesser General Public License
1.1       maekawa    19: ! along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     20: ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     21: ! MA 02111-1307, USA.
                     22:
                     23:
                     24: ! INPUT PARAMETERS
                     25: ! res_ptr      r4
                     26: ! s1_ptr       r5
                     27: ! s2_ptr       r6
                     28: ! size         r7
                     29:
                     30:        .text
                     31:        .align 2
1.1.1.2 ! maekawa    32:        .global ___gmpn_add_n
        !            33: ___gmpn_add_n:
1.1       maekawa    34:        mov     #0,r3           ! clear cy save reg
                     35:
                     36: Loop:  mov.l   @r5+,r1
                     37:        mov.l   @r6+,r2
                     38:        shlr    r3              ! restore cy
                     39:        addc    r2,r1
                     40:        movt    r3              ! save cy
                     41:        mov.l   r1,@r4
                     42:        dt      r7
                     43:        bf.s    Loop
                     44:         add    #4,r4
                     45:
                     46:        rts
1.1.1.2 ! maekawa    47:        mov     r3,r0           ! return carry-out from most sign. limb

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>