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

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

1.1.1.2 ! maekawa     1:  # MIPS2 __gmpn_add_n -- Add two limb vectors of the same length > 0 and
1.1       maekawa     2:  # store sum in a third limb vector.
                      3:
1.1.1.2 ! maekawa     4:  # Copyright (C) 1995, 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     $4
                     26:  # s1_ptr      $5
                     27:  # s2_ptr      $6
                     28:  # size                $7
                     29:
                     30:        .text
                     31:        .align  2
1.1.1.2 ! maekawa    32:        .globl  __gmpn_add_n
        !            33:        .ent    __gmpn_add_n
        !            34: __gmpn_add_n:
1.1       maekawa    35:        .set    noreorder
                     36:        .set    nomacro
                     37:
                     38:        lw      $10,0($5)
                     39:        lw      $11,0($6)
                     40:
                     41:        addiu   $7,$7,-1
                     42:        and     $9,$7,4-1       # number of limbs in first loop
                     43:        beq     $9,$0,.L0       # if multiple of 4 limbs, skip first loop
                     44:         move   $2,$0
                     45:
                     46:        subu    $7,$7,$9
                     47:
                     48: .Loop0:        addiu   $9,$9,-1
                     49:        lw      $12,4($5)
                     50:        addu    $11,$11,$2
                     51:        lw      $13,4($6)
                     52:        sltu    $8,$11,$2
                     53:        addu    $11,$10,$11
                     54:        sltu    $2,$11,$10
                     55:        sw      $11,0($4)
                     56:        or      $2,$2,$8
                     57:
                     58:        addiu   $5,$5,4
                     59:        addiu   $6,$6,4
                     60:        move    $10,$12
                     61:        move    $11,$13
                     62:        bne     $9,$0,.Loop0
                     63:         addiu  $4,$4,4
                     64:
                     65: .L0:   beq     $7,$0,.Lend
                     66:         nop
                     67:
                     68: .Loop: addiu   $7,$7,-4
                     69:
                     70:        lw      $12,4($5)
                     71:        addu    $11,$11,$2
                     72:        lw      $13,4($6)
                     73:        sltu    $8,$11,$2
                     74:        addu    $11,$10,$11
                     75:        sltu    $2,$11,$10
                     76:        sw      $11,0($4)
                     77:        or      $2,$2,$8
                     78:
                     79:        lw      $10,8($5)
                     80:        addu    $13,$13,$2
                     81:        lw      $11,8($6)
                     82:        sltu    $8,$13,$2
                     83:        addu    $13,$12,$13
                     84:        sltu    $2,$13,$12
                     85:        sw      $13,4($4)
                     86:        or      $2,$2,$8
                     87:
                     88:        lw      $12,12($5)
                     89:        addu    $11,$11,$2
                     90:        lw      $13,12($6)
                     91:        sltu    $8,$11,$2
                     92:        addu    $11,$10,$11
                     93:        sltu    $2,$11,$10
                     94:        sw      $11,8($4)
                     95:        or      $2,$2,$8
                     96:
                     97:        lw      $10,16($5)
                     98:        addu    $13,$13,$2
                     99:        lw      $11,16($6)
                    100:        sltu    $8,$13,$2
                    101:        addu    $13,$12,$13
                    102:        sltu    $2,$13,$12
                    103:        sw      $13,12($4)
                    104:        or      $2,$2,$8
                    105:
                    106:        addiu   $5,$5,16
                    107:        addiu   $6,$6,16
                    108:
                    109:        bne     $7,$0,.Loop
                    110:         addiu  $4,$4,16
                    111:
                    112: .Lend: addu    $11,$11,$2
                    113:        sltu    $8,$11,$2
                    114:        addu    $11,$10,$11
                    115:        sltu    $2,$11,$10
                    116:        sw      $11,0($4)
                    117:        j       $31
                    118:        or      $2,$2,$8
                    119:
1.1.1.2 ! maekawa   120:        .end    __gmpn_add_n

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