diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/mips3/mpih-mul1.S | 178 |
1 files changed, 89 insertions, 89 deletions
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 index 35f32c7..6c0099d 100755..100644 --- 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 | |||
@@ -1,89 +1,89 @@ | |||
1 | /* mips3 mpih-mul1.S -- Multiply a limb vector with a limb and store | 1 | /* mips3 mpih-mul1.S -- Multiply a limb vector with a limb and store |
2 | * the result in a second limb vector. | 2 | * the result in a second limb vector. |
3 | * | 3 | * |
4 | * Copyright (C) 1992, 1994, 1995, 1998, 2000 | 4 | * Copyright (C) 1992, 1994, 1995, 1998, 2000 |
5 | * 2001, 2002 Free Software Foundation, Inc. | 5 | * 2001, 2002 Free Software Foundation, Inc. |
6 | * | 6 | * |
7 | * This file is part of Libgcrypt. | 7 | * This file is part of Libgcrypt. |
8 | * | 8 | * |
9 | * Libgcrypt is free software; you can redistribute it and/or modify | 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 | 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 | 11 | * published by the Free Software Foundation; either version 2.1 of |
12 | * the License, or (at your option) any later version. | 12 | * the License, or (at your option) any later version. |
13 | * | 13 | * |
14 | * Libgcrypt is distributed in the hope that it will be useful, | 14 | * Libgcrypt is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU Lesser General Public License for more details. | 17 | * GNU Lesser General Public License for more details. |
18 | * | 18 | * |
19 | * You should have received a copy of the GNU Lesser General Public | 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 | 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 | 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | 24 | ||
25 | /******************* | 25 | /******************* |
26 | * mpi_limb_t | 26 | * mpi_limb_t |
27 | * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (r4) | 27 | * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (r4) |
28 | * mpi_ptr_t s1_ptr, (r5) | 28 | * mpi_ptr_t s1_ptr, (r5) |
29 | * mpi_size_t s1_size, (r6) | 29 | * mpi_size_t s1_size, (r6) |
30 | * mpi_limb_t s2_limb) (r7) | 30 | * mpi_limb_t s2_limb) (r7) |
31 | */ | 31 | */ |
32 | 32 | ||
33 | .text | 33 | .text |
34 | .align 4 | 34 | .align 4 |
35 | .globl _gcry_mpih_mul_1 | 35 | .globl _gcry_mpih_mul_1 |
36 | .ent _gcry_mpih_mul_1 | 36 | .ent _gcry_mpih_mul_1 |
37 | _gcry_mpih_mul_1: | 37 | _gcry_mpih_mul_1: |
38 | .set noreorder | 38 | .set noreorder |
39 | .set nomacro | 39 | .set nomacro |
40 | 40 | ||
41 | /* # warm up phase 0 */ | 41 | /* # warm up phase 0 */ |
42 | ld $8,0($5) | 42 | ld $8,0($5) |
43 | 43 | ||
44 | /* # warm up phase 1 */ | 44 | /* # warm up phase 1 */ |
45 | daddiu $5,$5,8 | 45 | daddiu $5,$5,8 |
46 | dmultu $8,$7 | 46 | dmultu $8,$7 |
47 | 47 | ||
48 | daddiu $6,$6,-1 | 48 | daddiu $6,$6,-1 |
49 | beq $6,$0,$LC0 | 49 | beq $6,$0,$LC0 |
50 | move $2,$0 # zero cy2 | 50 | move $2,$0 # zero cy2 |
51 | 51 | ||
52 | daddiu $6,$6,-1 | 52 | daddiu $6,$6,-1 |
53 | beq $6,$0,$LC1 | 53 | beq $6,$0,$LC1 |
54 | ld $8,0($5) # load new s1 limb as early as possible | 54 | ld $8,0($5) # load new s1 limb as early as possible |
55 | 55 | ||
56 | Loop: mflo $10 | 56 | Loop: mflo $10 |
57 | mfhi $9 | 57 | mfhi $9 |
58 | daddiu $5,$5,8 | 58 | daddiu $5,$5,8 |
59 | daddu $10,$10,$2 # add old carry limb to low product limb | 59 | daddu $10,$10,$2 # add old carry limb to low product limb |
60 | dmultu $8,$7 | 60 | dmultu $8,$7 |
61 | ld $8,0($5) # load new s1 limb as early as possible | 61 | ld $8,0($5) # load new s1 limb as early as possible |
62 | daddiu $6,$6,-1 # decrement loop counter | 62 | daddiu $6,$6,-1 # decrement loop counter |
63 | sltu $2,$10,$2 # carry from previous addition -> $2 | 63 | sltu $2,$10,$2 # carry from previous addition -> $2 |
64 | sd $10,0($4) | 64 | sd $10,0($4) |
65 | daddiu $4,$4,8 | 65 | daddiu $4,$4,8 |
66 | bne $6,$0,Loop | 66 | bne $6,$0,Loop |
67 | daddu $2,$9,$2 # add high product limb and carry from addition | 67 | daddu $2,$9,$2 # add high product limb and carry from addition |
68 | 68 | ||
69 | /* # cool down phase 1 */ | 69 | /* # cool down phase 1 */ |
70 | $LC1: mflo $10 | 70 | $LC1: mflo $10 |
71 | mfhi $9 | 71 | mfhi $9 |
72 | daddu $10,$10,$2 | 72 | daddu $10,$10,$2 |
73 | sltu $2,$10,$2 | 73 | sltu $2,$10,$2 |
74 | dmultu $8,$7 | 74 | dmultu $8,$7 |
75 | sd $10,0($4) | 75 | sd $10,0($4) |
76 | daddiu $4,$4,8 | 76 | daddiu $4,$4,8 |
77 | daddu $2,$9,$2 # add high product limb and carry from addition | 77 | daddu $2,$9,$2 # add high product limb and carry from addition |
78 | 78 | ||
79 | /* # cool down phase 0 */ | 79 | /* # cool down phase 0 */ |
80 | $LC0: mflo $10 | 80 | $LC0: mflo $10 |
81 | mfhi $9 | 81 | mfhi $9 |
82 | daddu $10,$10,$2 | 82 | daddu $10,$10,$2 |
83 | sltu $2,$10,$2 | 83 | sltu $2,$10,$2 |
84 | sd $10,0($4) | 84 | sd $10,0($4) |
85 | j $31 | 85 | j $31 |
86 | daddu $2,$9,$2 # add high product limb and carry from addition | 86 | daddu $2,$9,$2 # add high product limb and carry from addition |
87 | 87 | ||
88 | .end _gcry_mpih_mul_1 | 88 | .end _gcry_mpih_mul_1 |
89 | 89 | ||