~ubuntu-branches/ubuntu/feisty/gnupg2/feisty

« back to all changes in this revision

Viewing changes to mpi/hppa1.1/udiv-qrnnd.S

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-07-11 11:38:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060711113813-zaw7unlbuh7gyxtl
Tags: 1.9.21-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* HP-PA  __udiv_qrnnd division support, used from longlong.h.
2
 
 *        This version runs fast on PA 7000 and later.
3
 
 *
4
 
 *      Copyright (C) 1993, 1994, 1998, 
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
 
 * Note: This code is heavily based on the GNU MP Library.
24
 
 *       Actually it's the same code with only minor changes in the
25
 
 *       way the data is stored; this is to support the abstraction
26
 
 *       of an optional secure memory allocation which may be used
27
 
 *       to avoid revealing of sensitive data due to paging etc.
28
 
 *       The GNU MP Library itself is published under the LGPL;
29
 
 *       however I decided to publish this code under the plain GPL.
30
 
 */
31
 
 
32
 
 
33
 
 
34
 
/* INPUT PARAMETERS
35
 
 *   rem_ptr       gr26
36
 
 *   n1            gr25
37
 
 *   n0            gr24
38
 
 *   d             gr23
39
 
 */
40
 
 
41
 
        .code
42
 
        .label L$0000
43
 
        .word           0x43f00000
44
 
        .word           0x0
45
 
        .export         __udiv_qrnnd
46
 
        .label          __udiv_qrnnd
47
 
        .proc
48
 
        .callinfo       frame=64,no_calls
49
 
        .entry
50
 
        ldo             64(%r30),%r30
51
 
 
52
 
        stws            %r25,-16(0,%r30)        ; n_hi
53
 
        stws            %r24,-12(0,%r30)        ; n_lo
54
 
        ldil            L'L$0000,%r19           ; '
55
 
        ldo             R'L$0000(%r19),%r19     ; '
56
 
        fldds           -16(0,%r30),%fr5
57
 
        stws            %r23,-12(0,%r30)
58
 
        comib,<=        0,%r25,L$1
59
 
        fcnvxf,dbl,dbl  %fr5,%fr5
60
 
        fldds           0(0,%r19),%fr4
61
 
        fadd,dbl        %fr4,%fr5,%fr5
62
 
        .label  L$1
63
 
        fcpy,sgl        %fr0,%fr6L
64
 
        fldws           -12(0,%r30),%fr6R
65
 
        fcnvxf,dbl,dbl  %fr6,%fr4
66
 
 
67
 
        fdiv,dbl        %fr5,%fr4,%fr5
68
 
 
69
 
        fcnvfx,dbl,dbl  %fr5,%fr4
70
 
        fstws           %fr4R,-16(%r30)
71
 
        xmpyu           %fr4R,%fr6R,%fr6
72
 
        ldws            -16(%r30),%r28
73
 
        fstds           %fr6,-16(0,%r30)
74
 
        ldws            -12(0,%r30),%r21
75
 
        ldws            -16(0,%r30),%r20
76
 
        sub             %r24,%r21,%r22
77
 
        subb            %r25,%r20,%r19
78
 
        comib,=         0,%r19,L$2
79
 
        ldo             -64(%r30),%r30
80
 
 
81
 
        add             %r22,%r23,%r22
82
 
        ldo             -1(%r28),%r28
83
 
        .label  L$2
84
 
        bv              0(%r2)
85
 
        stws            %r22,0(0,%r26)
86
 
 
87
 
        .exit
88
 
        .procend
89
 
 
90