~ubuntu-branches/ubuntu/karmic/gnupg2/karmic-updates

« back to all changes in this revision

Viewing changes to mpi/hppa/mpih-shift.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
 
/* hppa   rshift, lshift
2
 
 *      Copyright (C) 1992, 1994 Free Software Foundation, Inc.
3
 
 *      Copyright (C) 1998 Free Software Foundation, Inc.
4
 
 *
5
 
 * This file is part of GNUPG.
6
 
 *
7
 
 * GNUPG is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 2 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * GNUPG is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
 
 *
21
 
 * Note: This code is heavily based on the GNU MP Library.
22
 
 *       Actually it's the same code with only minor changes in the
23
 
 *       way the data is stored; this is to support the abstraction
24
 
 *       of an optional secure memory allocation which may be used
25
 
 *       to avoid revealing of sensitive data due to paging etc.
26
 
 *       The GNU MP Library itself is published under the LGPL;
27
 
 *       however I decided to publish this code under the plain GPL.
28
 
 */
29
 
 
30
 
 
31
 
 
32
 
/*******************
33
 
 * mpi_limb_t
34
 
 * mpihelp_lshift( mpi_ptr_t wp,        (gr26)
35
 
 *                 mpi_ptr_t up,        (gr25)
36
 
 *                 mpi_size_t usize,    (gr24)
37
 
 *                 unsigned cnt)        (gr23)
38
 
 */
39
 
 
40
 
        .code
41
 
        .export         mpihelp_lshift
42
 
mpihelp_lshift
43
 
        .proc
44
 
        .callinfo       frame=64,no_calls
45
 
        .entry
46
 
 
47
 
        sh2add          %r24,%r25,%r25
48
 
        sh2add          %r24,%r26,%r26
49
 
        ldws,mb         -4(0,%r25),%r22
50
 
        subi            32,%r23,%r1
51
 
        mtsar           %r1
52
 
        addib,=         -1,%r24,L$0004
53
 
        vshd            %r0,%r22,%r28           ; compute carry out limb
54
 
        ldws,mb         -4(0,%r25),%r29
55
 
        addib,=         -1,%r24,L$0002
56
 
        vshd            %r22,%r29,%r20
57
 
 
58
 
L$loop  ldws,mb         -4(0,%r25),%r22
59
 
        stws,mb         %r20,-4(0,%r26)
60
 
        addib,=         -1,%r24,L$0003
61
 
        vshd            %r29,%r22,%r20
62
 
        ldws,mb         -4(0,%r25),%r29
63
 
        stws,mb         %r20,-4(0,%r26)
64
 
        addib,<>        -1,%r24,L$loop
65
 
        vshd            %r22,%r29,%r20
66
 
 
67
 
L$0002  stws,mb         %r20,-4(0,%r26)
68
 
        vshd            %r29,%r0,%r20
69
 
        bv              0(%r2)
70
 
        stw             %r20,-4(0,%r26)
71
 
L$0003  stws,mb         %r20,-4(0,%r26)
72
 
L$0004  vshd            %r22,%r0,%r20
73
 
        bv              0(%r2)
74
 
        stw             %r20,-4(0,%r26)
75
 
 
76
 
        .exit
77
 
        .procend
78
 
 
79
 
 
80
 
 
81
 
/*******************
82
 
 * mpi_limb_t
83
 
 * mpihelp_rshift( mpi_ptr_t wp,       (gr26)
84
 
 *                 mpi_ptr_t up,       (gr25)
85
 
 *                 mpi_size_t usize,   (gr24)
86
 
 *                 unsigned cnt)       (gr23)
87
 
 */
88
 
 
89
 
        .code
90
 
        .export         mpihelp_rshift
91
 
mpihelp_rshift
92
 
        .proc
93
 
        .callinfo       frame=64,no_calls
94
 
        .entry
95
 
 
96
 
        ldws,ma         4(0,%r25),%r22
97
 
        mtsar           %r23
98
 
        addib,=         -1,%r24,L$r004
99
 
        vshd            %r22,%r0,%r28           ; compute carry out limb
100
 
        ldws,ma         4(0,%r25),%r29
101
 
        addib,=         -1,%r24,L$r002
102
 
        vshd            %r29,%r22,%r20
103
 
 
104
 
L$roop  ldws,ma         4(0,%r25),%r22
105
 
        stws,ma         %r20,4(0,%r26)
106
 
        addib,=         -1,%r24,L$r003
107
 
        vshd            %r22,%r29,%r20
108
 
        ldws,ma         4(0,%r25),%r29
109
 
        stws,ma         %r20,4(0,%r26)
110
 
        addib,<>        -1,%r24,L$roop
111
 
        vshd            %r29,%r22,%r20
112
 
 
113
 
L$r002  stws,ma         %r20,4(0,%r26)
114
 
        vshd            %r0,%r29,%r20
115
 
        bv              0(%r2)
116
 
        stw             %r20,0(0,%r26)
117
 
L$r003  stws,ma         %r20,4(0,%r26)
118
 
L$r004  vshd            %r0,%r22,%r20
119
 
        bv              0(%r2)
120
 
        stw             %r20,0(0,%r26)
121
 
 
122
 
        .exit
123
 
        .procend
124