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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* mips3    rshift
2
 
 *
3
 
 *      Copyright (C) 1995, 1998, 2000
4
 
 *                    2001 Free Software Foundation, Inc.
5
 
 *
6
 
 * This file is part of GnuPG.
7
 
 *
8
 
 * GnuPG is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License as published by
10
 
 * the Free Software Foundation; either version 2 of the License, or
11
 
 * (at your option) any later version.
12
 
 *
13
 
 * GnuPG is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21
 
 */
22
 
 
23
 
/*******************
24
 
 * mpi_limb_t
25
 
 * mpihelp_rshift( mpi_ptr_t wp,        ($4)
26
 
 *                 mpi_ptr_t up,        ($5)
27
 
 *                 mpi_size_t usize,    ($6)
28
 
 *                 unsigned cnt)        ($7)
29
 
 */
30
 
 
31
 
        .text
32
 
        .align  2
33
 
        .globl  mpihelp_rshift
34
 
        .ent    mpihelp_rshift
35
 
mpihelp_rshift:
36
 
        .set    noreorder
37
 
        .set    nomacro
38
 
 
39
 
        ld      $10,0($5)       # load first limb
40
 
        dsubu   $13,$0,$7
41
 
        daddiu  $6,$6,-1
42
 
        and     $9,$6,4-1       # number of limbs in first loop
43
 
        beq     $9,$0,.L0       # if multiple of 4 limbs, skip first loop
44
 
         dsll   $2,$10,$13      # compute function result
45
 
 
46
 
        dsubu   $6,$6,$9
47
 
 
48
 
.Loop0: ld      $3,8($5)
49
 
        daddiu  $4,$4,8
50
 
        daddiu  $5,$5,8
51
 
        daddiu  $9,$9,-1
52
 
        dsrl    $11,$10,$7
53
 
        dsll    $12,$3,$13
54
 
        move    $10,$3
55
 
        or      $8,$11,$12
56
 
        bne     $9,$0,.Loop0
57
 
         sd     $8,-8($4)
58
 
 
59
 
.L0:    beq     $6,$0,.Lend
60
 
         nop
61
 
 
62
 
.Loop:  ld      $3,8($5)
63
 
        daddiu  $4,$4,32
64
 
        daddiu  $6,$6,-4
65
 
        dsrl    $11,$10,$7
66
 
        dsll    $12,$3,$13
67
 
 
68
 
        ld      $10,16($5)
69
 
        dsrl    $14,$3,$7
70
 
        or      $8,$11,$12
71
 
        sd      $8,-32($4)
72
 
        dsll    $9,$10,$13
73
 
 
74
 
        ld      $3,24($5)
75
 
        dsrl    $11,$10,$7
76
 
        or      $8,$14,$9
77
 
        sd      $8,-24($4)
78
 
        dsll    $12,$3,$13
79
 
 
80
 
        ld      $10,32($5)
81
 
        dsrl    $14,$3,$7
82
 
        or      $8,$11,$12
83
 
        sd      $8,-16($4)
84
 
        dsll    $9,$10,$13
85
 
 
86
 
        daddiu  $5,$5,32
87
 
        or      $8,$14,$9
88
 
        bgtz    $6,.Loop
89
 
         sd     $8,-8($4)
90
 
 
91
 
.Lend:  dsrl    $8,$10,$7
92
 
        j       $31
93
 
        sd      $8,0($4)
94
 
        .end    mpihelp_rshift
95