~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to mpi/mips3/mpih-add1.S

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2006-01-24 04:31:42 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060124043142-pbg192or6qxv3yk2
Tags: 1.9.20-1
* New Upstream version. Closes:#306890,#344530
  * Closes:#320490: gpg-protect-tool fails to decrypt PKCS-12 files 
* Depend on libopensc2-dev, not -1-. Closes:#348106

Show diffs side-by-side

added added

removed removed

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