aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S')
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S236
1 files changed, 118 insertions, 118 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S
index 2f65886..79e506a 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/supersparc/udiv.S
@@ -1,118 +1,118 @@
1/* SuperSPARC __udiv_qrnnd division support, used from longlong.h. 1/* SuperSPARC __udiv_qrnnd division support, used from longlong.h.
2 * This is for SuperSPARC only, to compensate for its 2 * This is for SuperSPARC only, to compensate for its
3 * semi-functional udiv instruction. 3 * semi-functional udiv instruction.
4 * 4 *
5 * Copyright (C) 1993, 1994, 1996, 1998, 5 * Copyright (C) 1993, 1994, 1996, 1998,
6 * 2001, 2002 Free Software Foundation, Inc. 6 * 2001, 2002 Free Software Foundation, Inc.
7 * 7 *
8 * This file is part of Libgcrypt. 8 * This file is part of Libgcrypt.
9 * 9 *
10 * Libgcrypt is free software; you can redistribute it and/or modify 10 * Libgcrypt is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as 11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2.1 of 12 * published by the Free Software Foundation; either version 2.1 of
13 * the License, or (at your option) any later version. 13 * the License, or (at your option) any later version.
14 * 14 *
15 * Libgcrypt is distributed in the hope that it will be useful, 15 * Libgcrypt is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details. 18 * GNU Lesser General Public License for more details.
19 * 19 *
20 * You should have received a copy of the GNU Lesser General Public 20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this program; if not, write to the Free Software 21 * License along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23 * 23 *
24 * Note: This code is heavily based on the GNU MP Library. 24 * Note: This code is heavily based on the GNU MP Library.
25 * Actually it's the same code with only minor changes in the 25 * Actually it's the same code with only minor changes in the
26 * way the data is stored; this is to support the abstraction 26 * way the data is stored; this is to support the abstraction
27 * of an optional secure memory allocation which may be used 27 * of an optional secure memory allocation which may be used
28 * to avoid revealing of sensitive data due to paging etc. 28 * to avoid revealing of sensitive data due to paging etc.
29 */ 29 */
30 30
31 31
32 32
33! INPUT PARAMETERS 33! INPUT PARAMETERS
34! rem_ptr i0 34! rem_ptr i0
35! n1 i1 35! n1 i1
36! n0 i2 36! n0 i2
37! d i3 37! d i3
38 38
39#include "sysdep.h" 39#include "sysdep.h"
40#undef ret /* Kludge for glibc */ 40#undef ret /* Kludge for glibc */
41 41
42 .text 42 .text
43 .align 8 43 .align 8
44LC0: .double 0r4294967296 44LC0: .double 0r4294967296
45LC1: .double 0r2147483648 45LC1: .double 0r2147483648
46 46
47 .align 4 47 .align 4
48 .global C_SYMBOL_NAME(__udiv_qrnnd) 48 .global C_SYMBOL_NAME(__udiv_qrnnd)
49C_SYMBOL_NAME(__udiv_qrnnd): 49C_SYMBOL_NAME(__udiv_qrnnd):
50 !#PROLOGUE# 0 50 !#PROLOGUE# 0
51 save %sp,-104,%sp 51 save %sp,-104,%sp
52 !#PROLOGUE# 1 52 !#PROLOGUE# 1
53 st %i1,[%fp-8] 53 st %i1,[%fp-8]
54 ld [%fp-8],%f10 54 ld [%fp-8],%f10
55 sethi %hi(LC0),%o7 55 sethi %hi(LC0),%o7
56 fitod %f10,%f4 56 fitod %f10,%f4
57 ldd [%o7+%lo(LC0)],%f8 57 ldd [%o7+%lo(LC0)],%f8
58 cmp %i1,0 58 cmp %i1,0
59 bge L248 59 bge L248
60 mov %i0,%i5 60 mov %i0,%i5
61 faddd %f4,%f8,%f4 61 faddd %f4,%f8,%f4
62L248: 62L248:
63 st %i2,[%fp-8] 63 st %i2,[%fp-8]
64 ld [%fp-8],%f10 64 ld [%fp-8],%f10
65 fmuld %f4,%f8,%f6 65 fmuld %f4,%f8,%f6
66 cmp %i2,0 66 cmp %i2,0
67 bge L249 67 bge L249
68 fitod %f10,%f2 68 fitod %f10,%f2
69 faddd %f2,%f8,%f2 69 faddd %f2,%f8,%f2
70L249: 70L249:
71 st %i3,[%fp-8] 71 st %i3,[%fp-8]
72 faddd %f6,%f2,%f2 72 faddd %f6,%f2,%f2
73 ld [%fp-8],%f10 73 ld [%fp-8],%f10
74 cmp %i3,0 74 cmp %i3,0
75 bge L250 75 bge L250
76 fitod %f10,%f4 76 fitod %f10,%f4
77 faddd %f4,%f8,%f4 77 faddd %f4,%f8,%f4
78L250: 78L250:
79 fdivd %f2,%f4,%f2 79 fdivd %f2,%f4,%f2
80 sethi %hi(LC1),%o7 80 sethi %hi(LC1),%o7
81 ldd [%o7+%lo(LC1)],%f4 81 ldd [%o7+%lo(LC1)],%f4
82 fcmped %f2,%f4 82 fcmped %f2,%f4
83 nop 83 nop
84 fbge,a L251 84 fbge,a L251
85 fsubd %f2,%f4,%f2 85 fsubd %f2,%f4,%f2
86 fdtoi %f2,%f2 86 fdtoi %f2,%f2
87 st %f2,[%fp-8] 87 st %f2,[%fp-8]
88 b L252 88 b L252
89 ld [%fp-8],%i4 89 ld [%fp-8],%i4
90L251: 90L251:
91 fdtoi %f2,%f2 91 fdtoi %f2,%f2
92 st %f2,[%fp-8] 92 st %f2,[%fp-8]
93 ld [%fp-8],%i4 93 ld [%fp-8],%i4
94 sethi %hi(-2147483648),%g2 94 sethi %hi(-2147483648),%g2
95 xor %i4,%g2,%i4 95 xor %i4,%g2,%i4
96L252: 96L252:
97 umul %i3,%i4,%g3 97 umul %i3,%i4,%g3
98 rd %y,%i0 98 rd %y,%i0
99 subcc %i2,%g3,%o7 99 subcc %i2,%g3,%o7
100 subxcc %i1,%i0,%g0 100 subxcc %i1,%i0,%g0
101 be L253 101 be L253
102 cmp %o7,%i3 102 cmp %o7,%i3
103 103
104 add %i4,-1,%i0 104 add %i4,-1,%i0
105 add %o7,%i3,%o7 105 add %o7,%i3,%o7
106 st %o7,[%i5] 106 st %o7,[%i5]
107 ret 107 ret
108 restore 108 restore
109L253: 109L253:
110 blu L246 110 blu L246
111 mov %i4,%i0 111 mov %i4,%i0
112 add %i4,1,%i0 112 add %i4,1,%i0
113 sub %o7,%i3,%o7 113 sub %o7,%i3,%o7
114L246: 114L246:
115 st %o7,[%i5] 115 st %o7,[%i5]
116 ret 116 ret
117 restore 117 restore
118 118