[BACK]Return to sub_n.asm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / mips64

Annotation of OpenXM_contrib/gmp/mpn/mips64/sub_n.asm, Revision 1.1.1.1

1.1       ohara       1: dnl  MIPS64 mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
                      2: dnl  store difference in a third limb vector.
                      3:
                      4: dnl  Copyright 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
                      5:
                      6: dnl  This file is part of the GNU MP Library.
                      7:
                      8: dnl  The GNU MP Library is free software; you can redistribute it and/or modify
                      9: dnl  it under the terms of the GNU Lesser General Public License as published
                     10: dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
                     11: dnl  your option) any later version.
                     12:
                     13: dnl  The GNU MP Library is distributed in the hope that it will be useful, but
                     14: dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     15: dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
                     16: dnl  License for more details.
                     17:
                     18: dnl  You should have received a copy of the GNU Lesser General Public License
                     19: dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     20: dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     21: dnl  MA 02111-1307, USA.
                     22:
                     23: include(`../config.m4')
                     24:
                     25: C INPUT PARAMETERS
                     26: C res_ptr      $4
                     27: C s1_ptr       $5
                     28: C s2_ptr       $6
                     29: C size         $7
                     30:
                     31: ASM_START()
                     32: PROLOGUE(mpn_sub_n)
                     33:        ld      $10,0($5)
                     34:        ld      $11,0($6)
                     35:
                     36:        daddiu  $7,$7,-1
                     37:        and     $9,$7,4-1       C number of limbs in first loop
                     38:        beq     $9,$0,.L0       C if multiple of 4 limbs, skip first loop
                     39:         move   $2,$0
                     40:
                     41:        dsubu   $7,$7,$9
                     42:
                     43: .Loop0:        daddiu  $9,$9,-1
                     44:        ld      $12,8($5)
                     45:        daddu   $11,$11,$2
                     46:        ld      $13,8($6)
                     47:        sltu    $8,$11,$2
                     48:        dsubu   $11,$10,$11
                     49:        sltu    $2,$10,$11
                     50:        sd      $11,0($4)
                     51:        or      $2,$2,$8
                     52:
                     53:        daddiu  $5,$5,8
                     54:        daddiu  $6,$6,8
                     55:        move    $10,$12
                     56:        move    $11,$13
                     57:        bne     $9,$0,.Loop0
                     58:         daddiu $4,$4,8
                     59:
                     60: .L0:   beq     $7,$0,.Lend
                     61:         nop
                     62:
                     63: .Loop: daddiu  $7,$7,-4
                     64:
                     65:        ld      $12,8($5)
                     66:        dsubu   $11,$10,$11
                     67:        ld      $13,8($6)
                     68:        sltu    $8,$10,$11
                     69:        dsubu   $14,$11,$2
                     70:        sltu    $2,$11,$14
                     71:        sd      $14,0($4)
                     72:        or      $2,$2,$8
                     73:
                     74:        ld      $10,16($5)
                     75:        dsubu   $13,$12,$13
                     76:        ld      $11,16($6)
                     77:        sltu    $8,$12,$13
                     78:        dsubu   $14,$13,$2
                     79:        sltu    $2,$13,$14
                     80:        sd      $14,8($4)
                     81:        or      $2,$2,$8
                     82:
                     83:        ld      $12,24($5)
                     84:        dsubu   $11,$10,$11
                     85:        ld      $13,24($6)
                     86:        sltu    $8,$10,$11
                     87:        dsubu   $14,$11,$2
                     88:        sltu    $2,$11,$14
                     89:        sd      $14,16($4)
                     90:        or      $2,$2,$8
                     91:
                     92:        ld      $10,32($5)
                     93:        dsubu   $13,$12,$13
                     94:        ld      $11,32($6)
                     95:        sltu    $8,$12,$13
                     96:        dsubu   $14,$13,$2
                     97:        sltu    $2,$13,$14
                     98:        sd      $14,24($4)
                     99:        or      $2,$2,$8
                    100:
                    101:        daddiu  $5,$5,32
                    102:        daddiu  $6,$6,32
                    103:
                    104:        bne     $7,$0,.Loop
                    105:         daddiu $4,$4,32
                    106:
                    107: .Lend: daddu   $11,$11,$2
                    108:        sltu    $8,$11,$2
                    109:        dsubu   $11,$10,$11
                    110:        sltu    $2,$10,$11
                    111:        sd      $11,0($4)
                    112:        j       $31
                    113:        or      $2,$2,$8
                    114: EPILOGUE(mpn_sub_n)

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