aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3
diff options
context:
space:
mode:
authorJay Threeth2011-04-04 11:48:26 -0700
committerJay Threeth2011-04-04 11:48:26 -0700
commit3c9cc506f741b980565ff5b3b001cd8b6ee36b12 (patch)
treecb862c57b3d5f74177cde3bd962a53fc377166f6 /linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3
parentbuild fixes, might build on linux now (diff)
downloadmeta-impy-3c9cc506f741b980565ff5b3b001cd8b6ee36b12.zip
meta-impy-3c9cc506f741b980565ff5b3b001cd8b6ee36b12.tar.gz
meta-impy-3c9cc506f741b980565ff5b3b001cd8b6ee36b12.tar.bz2
meta-impy-3c9cc506f741b980565ff5b3b001cd8b6ee36b12.tar.xz
add source to libraries, and cruft for building under windows
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3')
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/Manifest28
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/README23
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/distfiles11
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpi-asm-defs.h10
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-add1.S124
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-lshift.S97
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S89
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul2.S101
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul3.S101
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-rshift.S95
-rwxr-xr-xlinden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-sub1.S125
11 files changed, 804 insertions, 0 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/Manifest b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/Manifest
new file mode 100755
index 0000000..5d9e570
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/Manifest
@@ -0,0 +1,28 @@
1# Manifest - checksums
2# Copyright 2003 Free Software Foundation, Inc.
3#
4# This file is part of Libgcrypt.
5#
6# Libgcrypt is free software; you can redistribute it and/or modify
7# it under the terms of the GNU Lesser general Public License as
8# published by the Free Software Foundation; either version 2.1 of
9# the License, or (at your option) any later version.
10#
11# Libgcrypt is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public
17# License along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20mpih-add1.S
21mpih-sub1.S
22mpih-mul1.S
23mpih-mul2.S
24mpih-mul3.S
25mpih-lshift.S
26mpih-rshift.S
27mpi-asm-defs.h
28$names$ iQCVAwUAP+LmUTEAnp832S/7AQLm/gP/RHR2aLMwHPxsq0mGO5H0kneVn8a9l9yDNEZBefkYcOJMb7MZGKxbGspyENiU04Mc2TFnA1wS9gjNHlRWtUYxxn/wyuV6BIRgfstXt2nXGgEQrK07GIz8ETFcYqcxu7JKiICIuXZgnIgdwBJswbBV1zaMUDXeg5B8vkkEeRWj8hQ==IQVO
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/README b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/README
new file mode 100755
index 0000000..2144076
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/README
@@ -0,0 +1,23 @@
1This directory contains mpn functions optimized for MIPS3. Example of
2processors that implement MIPS3 are R4000, R4400, R4600, R4700, and R8000.
3
4RELEVANT OPTIMIZATION ISSUES
5
61. On the R4000 and R4400, branches, both the plain and the "likely" ones,
7 take 3 cycles to execute. (The fastest possible loop will take 4 cycles,
8 because of the delay insn.)
9
10 On the R4600, branches takes a single cycle
11
12 On the R8000, branches often take no noticable cycles, as they are
13 executed in a separate function unit..
14
152. The R4000 and R4400 have a load latency of 4 cycles.
16
173. On the R4000 and R4400, multiplies take a data-dependent number of
18 cycles, contrary to the SGI documentation. There seem to be 3 or 4
19 possible latencies.
20
21STATUS
22
23Good...
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/distfiles b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/distfiles
new file mode 100755
index 0000000..0c825c6
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/distfiles
@@ -0,0 +1,11 @@
1Manifest
2README
3mpih-add1.S
4mpih-sub1.S
5mpih-mul1.S
6mpih-mul2.S
7mpih-mul3.S
8mpih-lshift.S
9mpih-rshift.S
10mpi-asm-defs.h
11
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpi-asm-defs.h b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpi-asm-defs.h
new file mode 100755
index 0000000..a1b5824
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpi-asm-defs.h
@@ -0,0 +1,10 @@
1/* This file defines some basic constants for the MPI machinery. We
2 * need to define the types on a per-CPU basis, so it is done with
3 * this file here. */
4#define BYTES_PER_MPI_LIMB 8
5
6
7
8
9
10
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-add1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-add1.S
new file mode 100755
index 0000000..fb8e34e
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-add1.S
@@ -0,0 +1,124 @@
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, 2002 Free Software Foundation, Inc.
6 *
7 * This file is part of Libgcrypt.
8 *
9 * Libgcrypt is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * Libgcrypt 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 Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License 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 * _gcry_mpih_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 _gcry_mpih_add_n
36 .ent _gcry_mpih_add_n
37_gcry_mpih_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 _gcry_mpih_add_n
124
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-lshift.S
new file mode 100755
index 0000000..0b92453
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-lshift.S
@@ -0,0 +1,97 @@
1/* mips3 lshift
2 *
3 * Copyright (C) 1995, 1998, 2000,
4 * 2001, 2002 Free Software Foundation, Inc.
5 *
6 * This file is part of Libgcrypt.
7 *
8 * Libgcrypt is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * Libgcrypt 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 Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License 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 * _gcry_mpih_lshift( 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 _gcry_mpih_lshift
34 .ent _gcry_mpih_lshift
35_gcry_mpih_lshift:
36 .set noreorder
37 .set nomacro
38
39 dsll $2,$6,3
40 daddu $5,$5,$2 # make r5 point at end of src
41 ld $10,-8($5) # load first limb
42 dsubu $13,$0,$7
43 daddu $4,$4,$2 # make r4 point at end of res
44 daddiu $6,$6,-1
45 and $9,$6,4-1 # number of limbs in first loop
46 beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
47 dsrl $2,$10,$13 # compute function result
48
49 dsubu $6,$6,$9
50
51.Loop0: ld $3,-16($5)
52 daddiu $4,$4,-8
53 daddiu $5,$5,-8
54 daddiu $9,$9,-1
55 dsll $11,$10,$7
56 dsrl $12,$3,$13
57 move $10,$3
58 or $8,$11,$12
59 bne $9,$0,.Loop0
60 sd $8,0($4)
61
62.L0: beq $6,$0,.Lend
63 nop
64
65.Loop: ld $3,-16($5)
66 daddiu $4,$4,-32
67 daddiu $6,$6,-4
68 dsll $11,$10,$7
69 dsrl $12,$3,$13
70
71 ld $10,-24($5)
72 dsll $14,$3,$7
73 or $8,$11,$12
74 sd $8,24($4)
75 dsrl $9,$10,$13
76
77 ld $3,-32($5)
78 dsll $11,$10,$7
79 or $8,$14,$9
80 sd $8,16($4)
81 dsrl $12,$3,$13
82
83 ld $10,-40($5)
84 dsll $14,$3,$7
85 or $8,$11,$12
86 sd $8,8($4)
87 dsrl $9,$10,$13
88
89 daddiu $5,$5,-32
90 or $8,$14,$9
91 bgtz $6,.Loop
92 sd $8,0($4)
93
94.Lend: dsll $8,$10,$7
95 j $31
96 sd $8,-8($4)
97 .end _gcry_mpih_lshift
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S
new file mode 100755
index 0000000..35f32c7
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S
@@ -0,0 +1,89 @@
1/* mips3 mpih-mul1.S -- Multiply a limb vector with a limb and store
2 * the result in a second limb vector.
3 *
4 * Copyright (C) 1992, 1994, 1995, 1998, 2000
5 * 2001, 2002 Free Software Foundation, Inc.
6 *
7 * This file is part of Libgcrypt.
8 *
9 * Libgcrypt is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * Libgcrypt 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 Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License 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 * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (r4)
28 * mpi_ptr_t s1_ptr, (r5)
29 * mpi_size_t s1_size, (r6)
30 * mpi_limb_t s2_limb) (r7)
31 */
32
33 .text
34 .align 4
35 .globl _gcry_mpih_mul_1
36 .ent _gcry_mpih_mul_1
37_gcry_mpih_mul_1:
38 .set noreorder
39 .set nomacro
40
41/* # warm up phase 0 */
42 ld $8,0($5)
43
44/* # warm up phase 1 */
45 daddiu $5,$5,8
46 dmultu $8,$7
47
48 daddiu $6,$6,-1
49 beq $6,$0,$LC0
50 move $2,$0 # zero cy2
51
52 daddiu $6,$6,-1
53 beq $6,$0,$LC1
54 ld $8,0($5) # load new s1 limb as early as possible
55
56Loop: mflo $10
57 mfhi $9
58 daddiu $5,$5,8
59 daddu $10,$10,$2 # add old carry limb to low product limb
60 dmultu $8,$7
61 ld $8,0($5) # load new s1 limb as early as possible
62 daddiu $6,$6,-1 # decrement loop counter
63 sltu $2,$10,$2 # carry from previous addition -> $2
64 sd $10,0($4)
65 daddiu $4,$4,8
66 bne $6,$0,Loop
67 daddu $2,$9,$2 # add high product limb and carry from addition
68
69/* # cool down phase 1 */
70$LC1: mflo $10
71 mfhi $9
72 daddu $10,$10,$2
73 sltu $2,$10,$2
74 dmultu $8,$7
75 sd $10,0($4)
76 daddiu $4,$4,8
77 daddu $2,$9,$2 # add high product limb and carry from addition
78
79/* # cool down phase 0 */
80$LC0: mflo $10
81 mfhi $9
82 daddu $10,$10,$2
83 sltu $2,$10,$2
84 sd $10,0($4)
85 j $31
86 daddu $2,$9,$2 # add high product limb and carry from addition
87
88 .end _gcry_mpih_mul_1
89
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul2.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul2.S
new file mode 100755
index 0000000..a83c9eb
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul2.S
@@ -0,0 +1,101 @@
1/* MIPS3 addmul_1 -- Multiply a limb vector with a single limb and
2 * add the product to a second limb vector.
3 *
4 * Copyright (C) 1992, 1994, 1995, 1998, 2000
5 * 2001, 2002 Free Software Foundation, Inc.
6 *
7 * This file is part of Libgcrypt.
8 *
9 * Libgcrypt is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * Libgcrypt 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 Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License 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 * _gcry_mpih_addmul_1( mpi_ptr_t res_ptr, (r4)
28 * mpi_ptr_t s1_ptr, (r5)
29 * mpi_size_t s1_size, (r6)
30 * mpi_limb_t s2_limb) (r7)
31 */
32
33 .text
34 .align 4
35 .globl _gcry_mpih_addmul_1
36 .ent _gcry_mpih_addmul_1
37_gcry_mpih_addmul_1:
38 .set noreorder
39 .set nomacro
40
41/* # warm up phase 0 */
42 ld $8,0($5)
43
44/* # warm up phase 1 */
45 daddiu $5,$5,8
46 dmultu $8,$7
47
48 daddiu $6,$6,-1
49 beq $6,$0,$LC0
50 move $2,$0 # zero cy2
51
52 daddiu $6,$6,-1
53 beq $6,$0,$LC1
54 ld $8,0($5) # load new s1 limb as early as possible
55
56Loop: ld $10,0($4)
57 mflo $3
58 mfhi $9
59 daddiu $5,$5,8
60 daddu $3,$3,$2 # add old carry limb to low product limb
61 dmultu $8,$7
62 ld $8,0($5) # load new s1 limb as early as possible
63 daddiu $6,$6,-1 # decrement loop counter
64 sltu $2,$3,$2 # carry from previous addition -> $2
65 daddu $3,$10,$3
66 sltu $10,$3,$10
67 daddu $2,$2,$10
68 sd $3,0($4)
69 daddiu $4,$4,8
70 bne $6,$0,Loop
71 daddu $2,$9,$2 # add high product limb and carry from addition
72
73/* # cool down phase 1 */
74$LC1: ld $10,0($4)
75 mflo $3
76 mfhi $9
77 daddu $3,$3,$2
78 sltu $2,$3,$2
79 dmultu $8,$7
80 daddu $3,$10,$3
81 sltu $10,$3,$10
82 daddu $2,$2,$10
83 sd $3,0($4)
84 daddiu $4,$4,8
85 daddu $2,$9,$2 # add high product limb and carry from addition
86
87/* # cool down phase 0 */
88$LC0: ld $10,0($4)
89 mflo $3
90 mfhi $9
91 daddu $3,$3,$2
92 sltu $2,$3,$2
93 daddu $3,$10,$3
94 sltu $10,$3,$10
95 daddu $2,$2,$10
96 sd $3,0($4)
97 j $31
98 daddu $2,$9,$2 # add high product limb and carry from addition
99
100 .end _gcry_mpih_addmul_1
101
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul3.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul3.S
new file mode 100755
index 0000000..1815044
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul3.S
@@ -0,0 +1,101 @@
1/* MIPS3 submul_1 -- Multiply a limb vector with a single limb and
2 * subtract the product from a second limb vector.
3 *
4 * Copyright (C) 1992, 1994, 1995, 1998, 2000
5 * 2001, 2002 Free Software Foundation, Inc.
6 *
7 * This file is part of Libgcrypt.
8 *
9 * Libgcrypt is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * Libgcrypt 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 Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License 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 * _gcry_mpih_submul_1( mpi_ptr_t res_ptr, (r4)
28 * mpi_ptr_t s1_ptr, (r5)
29 * mpi_size_t s1_size, (r6)
30 * mpi_limb_t s2_limb) (r7)
31 */
32
33 .text
34 .align 4
35 .globl _gcry_mpih_submul_1
36 .ent _gcry_mpih_submul_1
37_gcry_mpih_submul_1:
38 .set noreorder
39 .set nomacro
40
41/* # warm up phase 0 */
42 ld $8,0($5)
43
44/* # warm up phase 1 */
45 daddiu $5,$5,8
46 dmultu $8,$7
47
48 daddiu $6,$6,-1
49 beq $6,$0,$LC0
50 move $2,$0 # zero cy2
51
52 daddiu $6,$6,-1
53 beq $6,$0,$LC1
54 ld $8,0($5) # load new s1 limb as early as possible
55
56Loop: ld $10,0($4)
57 mflo $3
58 mfhi $9
59 daddiu $5,$5,8
60 daddu $3,$3,$2 # add old carry limb to low product limb
61 dmultu $8,$7
62 ld $8,0($5) # load new s1 limb as early as possible
63 daddiu $6,$6,-1 # decrement loop counter
64 sltu $2,$3,$2 # carry from previous addition -> $2
65 dsubu $3,$10,$3
66 sgtu $10,$3,$10
67 daddu $2,$2,$10
68 sd $3,0($4)
69 daddiu $4,$4,8
70 bne $6,$0,Loop
71 daddu $2,$9,$2 # add high product limb and carry from addition
72
73/* # cool down phase 1 */
74$LC1: ld $10,0($4)
75 mflo $3
76 mfhi $9
77 daddu $3,$3,$2
78 sltu $2,$3,$2
79 dmultu $8,$7
80 dsubu $3,$10,$3
81 sgtu $10,$3,$10
82 daddu $2,$2,$10
83 sd $3,0($4)
84 daddiu $4,$4,8
85 daddu $2,$9,$2 # add high product limb and carry from addition
86
87/* # cool down phase 0 */
88$LC0: ld $10,0($4)
89 mflo $3
90 mfhi $9
91 daddu $3,$3,$2
92 sltu $2,$3,$2
93 dsubu $3,$10,$3
94 sgtu $10,$3,$10
95 daddu $2,$2,$10
96 sd $3,0($4)
97 j $31
98 daddu $2,$9,$2 # add high product limb and carry from addition
99
100 .end _gcry_mpih_submul_1
101
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-rshift.S
new file mode 100755
index 0000000..265fd9e
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-rshift.S
@@ -0,0 +1,95 @@
1/* mips3 rshift
2 *
3 * Copyright (C) 1995, 1998, 2000
4 * 2001, 2002 Free Software Foundation, Inc.
5 *
6 * This file is part of Libgcrypt.
7 *
8 * Libgcrypt is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * Libgcrypt 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 Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License 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 * _gcry_mpih_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 _gcry_mpih_rshift
34 .ent _gcry_mpih_rshift
35_gcry_mpih_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 _gcry_mpih_rshift
95
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-sub1.S
new file mode 100755
index 0000000..32cc0e5
--- /dev/null
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-sub1.S
@@ -0,0 +1,125 @@
1/* mips3 sub_n -- Subtract two limb vectors of the same length > 0 and
2 * store difference in a third limb vector.
3 *
4 * Copyright (C) 1995, 1998, 1999, 2000,
5 * 2001, 2002 Free Software Foundation, Inc.
6 *
7 * This file is part of Libgcrypt.
8 *
9 * Libgcrypt is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * Libgcrypt 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 Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License 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 * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (r4)
28 * mpi_ptr_t s1_ptr, (r5)
29 * mpi_ptr_t s2_ptr, (r6)
30 * mpi_size_t size) (r7)
31 */
32
33
34 .text
35 .align 2
36 .globl _gcry_mpih_sub_n
37 .ent _gcry_mpih_sub_n
38_gcry_mpih_sub_n:
39 .set noreorder
40 .set nomacro
41
42 ld $10,0($5)
43 ld $11,0($6)
44
45 daddiu $7,$7,-1
46 and $9,$7,4-1 # number of limbs in first loop
47 beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
48 move $2,$0
49
50 dsubu $7,$7,$9
51
52.Loop0: daddiu $9,$9,-1
53 ld $12,8($5)
54 daddu $11,$11,$2
55 ld $13,8($6)
56 sltu $8,$11,$2
57 dsubu $11,$10,$11
58 sltu $2,$10,$11
59 sd $11,0($4)
60 or $2,$2,$8
61
62 daddiu $5,$5,8
63 daddiu $6,$6,8
64 move $10,$12
65 move $11,$13
66 bne $9,$0,.Loop0
67 daddiu $4,$4,8
68
69.L0: beq $7,$0,.Lend
70 nop
71
72.Loop: daddiu $7,$7,-4
73
74 ld $12,8($5)
75 daddu $11,$11,$2
76 ld $13,8($6)
77 sltu $8,$11,$2
78 dsubu $11,$10,$11
79 sltu $2,$10,$11
80 sd $11,0($4)
81 or $2,$2,$8
82
83 ld $10,16($5)
84 daddu $13,$13,$2
85 ld $11,16($6)
86 sltu $8,$13,$2
87 dsubu $13,$12,$13
88 sltu $2,$12,$13
89 sd $13,8($4)
90 or $2,$2,$8
91
92 ld $12,24($5)
93 daddu $11,$11,$2
94 ld $13,24($6)
95 sltu $8,$11,$2
96 dsubu $11,$10,$11
97 sltu $2,$10,$11
98 sd $11,16($4)
99 or $2,$2,$8
100
101 ld $10,32($5)
102 daddu $13,$13,$2
103 ld $11,32($6)
104 sltu $8,$13,$2
105 dsubu $13,$12,$13
106 sltu $2,$12,$13
107 sd $13,24($4)
108 or $2,$2,$8
109
110 daddiu $5,$5,32
111 daddiu $6,$6,32
112
113 bne $7,$0,.Loop
114 daddiu $4,$4,32
115
116.Lend: daddu $11,$11,$2
117 sltu $8,$11,$2
118 dsubu $11,$10,$11
119 sltu $2,$10,$11
120 sd $11,0($4)
121 j $31
122 or $2,$2,$8
123
124 .end _gcry_mpih_sub_n
125