diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S index 5e08ac3..02748fc 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-sub1.S | |||
@@ -1,88 +1,88 @@ | |||
1 | /* IBM POWER sub_n -- Subtract two limb vectors of equal, non-zero length. | 1 | /* IBM POWER sub_n -- Subtract two limb vectors of equal, non-zero length. |
2 | * | 2 | * |
3 | * Copyright (C) 1992, 1994, 1995, 1996, 1999, | 3 | * Copyright (C) 1992, 1994, 1995, 1996, 1999, |
4 | * 2002 Free Software Foundation, Inc. | 4 | * 2002 Free Software Foundation, Inc. |
5 | * | 5 | * |
6 | * This file is part of Libgcrypt. | 6 | * This file is part of Libgcrypt. |
7 | * | 7 | * |
8 | * Libgcrypt is free software; you can redistribute it and/or modify | 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 | 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 | 10 | * published by the Free Software Foundation; either version 2.1 of |
11 | * the License, or (at your option) any later version. | 11 | * the License, or (at your option) any later version. |
12 | * | 12 | * |
13 | * Libgcrypt is distributed in the hope that it will be useful, | 13 | * Libgcrypt is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Lesser General Public License for more details. | 16 | * GNU Lesser General Public License for more details. |
17 | * | 17 | * |
18 | * You should have received a copy of the GNU Lesser General Public | 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 | 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 | 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "sysdep.h" | 23 | #include "sysdep.h" |
24 | #include "asm-syntax.h" | 24 | #include "asm-syntax.h" |
25 | 25 | ||
26 | /* | 26 | /* |
27 | # INPUT PARAMETERS | 27 | # INPUT PARAMETERS |
28 | # res_ptr r3 | 28 | # res_ptr r3 |
29 | # s1_ptr r4 | 29 | # s1_ptr r4 |
30 | # s2_ptr r5 | 30 | # s2_ptr r5 |
31 | # size r6 | 31 | # size r6 |
32 | */ | 32 | */ |
33 | 33 | ||
34 | .toc | 34 | .toc |
35 | .extern _gcry_mpih_sub_n[DS] | 35 | .extern _gcry_mpih_sub_n[DS] |
36 | .extern ._gcry_mpih_sub_n | 36 | .extern ._gcry_mpih_sub_n |
37 | .csect [PR] | 37 | .csect [PR] |
38 | .align 2 | 38 | .align 2 |
39 | .globl _gcry_mpih_sub_n | 39 | .globl _gcry_mpih_sub_n |
40 | .globl ._gcry_mpih_sub_n | 40 | .globl ._gcry_mpih_sub_n |
41 | .csect _gcry_mpih_sub_n[DS] | 41 | .csect _gcry_mpih_sub_n[DS] |
42 | _gcry_mpih_sub_n: | 42 | _gcry_mpih_sub_n: |
43 | .long ._gcry_mpih_sub_n, TOC[tc0], 0 | 43 | .long ._gcry_mpih_sub_n, TOC[tc0], 0 |
44 | .csect [PR] | 44 | .csect [PR] |
45 | ._gcry_mpih_sub_n: | 45 | ._gcry_mpih_sub_n: |
46 | andil. 10,6,1 # odd or even number of limbs? | 46 | andil. 10,6,1 # odd or even number of limbs? |
47 | l 8,0(4) # load least significant s1 limb | 47 | l 8,0(4) # load least significant s1 limb |
48 | l 0,0(5) # load least significant s2 limb | 48 | l 0,0(5) # load least significant s2 limb |
49 | cal 3,-4(3) # offset res_ptr, it's updated before it's used | 49 | cal 3,-4(3) # offset res_ptr, it's updated before it's used |
50 | sri 10,6,1 # count for unrolled loop | 50 | sri 10,6,1 # count for unrolled loop |
51 | sf 7,0,8 # subtract least significant limbs, set cy | 51 | sf 7,0,8 # subtract least significant limbs, set cy |
52 | mtctr 10 # copy count into CTR | 52 | mtctr 10 # copy count into CTR |
53 | beq 0,Leven # branch if even # of limbs (# of limbs >= 2) | 53 | beq 0,Leven # branch if even # of limbs (# of limbs >= 2) |
54 | 54 | ||
55 | # We have an odd # of limbs. Add the first limbs separately. | 55 | # We have an odd # of limbs. Add the first limbs separately. |
56 | cmpi 1,10,0 # is count for unrolled loop zero? | 56 | cmpi 1,10,0 # is count for unrolled loop zero? |
57 | bne 1,L1 # branch if not | 57 | bne 1,L1 # branch if not |
58 | st 7,4(3) | 58 | st 7,4(3) |
59 | sfe 3,0,0 # load !cy into ... | 59 | sfe 3,0,0 # load !cy into ... |
60 | sfi 3,3,0 # ... return value register | 60 | sfi 3,3,0 # ... return value register |
61 | br # return | 61 | br # return |
62 | 62 | ||
63 | # We added least significant limbs. Now reload the next limbs to enter loop. | 63 | # We added least significant limbs. Now reload the next limbs to enter loop. |
64 | L1: lu 8,4(4) # load s1 limb and update s1_ptr | 64 | L1: lu 8,4(4) # load s1 limb and update s1_ptr |
65 | lu 0,4(5) # load s2 limb and update s2_ptr | 65 | lu 0,4(5) # load s2 limb and update s2_ptr |
66 | stu 7,4(3) | 66 | stu 7,4(3) |
67 | sfe 7,0,8 # subtract limbs, set cy | 67 | sfe 7,0,8 # subtract limbs, set cy |
68 | Leven: lu 9,4(4) # load s1 limb and update s1_ptr | 68 | Leven: lu 9,4(4) # load s1 limb and update s1_ptr |
69 | lu 10,4(5) # load s2 limb and update s2_ptr | 69 | lu 10,4(5) # load s2 limb and update s2_ptr |
70 | bdz Lend # If done, skip loop | 70 | bdz Lend # If done, skip loop |
71 | 71 | ||
72 | Loop: lu 8,4(4) # load s1 limb and update s1_ptr | 72 | Loop: lu 8,4(4) # load s1 limb and update s1_ptr |
73 | lu 0,4(5) # load s2 limb and update s2_ptr | 73 | lu 0,4(5) # load s2 limb and update s2_ptr |
74 | sfe 11,10,9 # subtract previous limbs with cy, set cy | 74 | sfe 11,10,9 # subtract previous limbs with cy, set cy |
75 | stu 7,4(3) # | 75 | stu 7,4(3) # |
76 | lu 9,4(4) # load s1 limb and update s1_ptr | 76 | lu 9,4(4) # load s1 limb and update s1_ptr |
77 | lu 10,4(5) # load s2 limb and update s2_ptr | 77 | lu 10,4(5) # load s2 limb and update s2_ptr |
78 | sfe 7,0,8 # subtract previous limbs with cy, set cy | 78 | sfe 7,0,8 # subtract previous limbs with cy, set cy |
79 | stu 11,4(3) # | 79 | stu 11,4(3) # |
80 | bdn Loop # decrement CTR and loop back | 80 | bdn Loop # decrement CTR and loop back |
81 | 81 | ||
82 | Lend: sfe 11,10,9 # subtract limbs with cy, set cy | 82 | Lend: sfe 11,10,9 # subtract limbs with cy, set cy |
83 | st 7,4(3) # | 83 | st 7,4(3) # |
84 | st 11,8(3) # | 84 | st 11,8(3) # |
85 | sfe 3,0,0 # load !cy into ... | 85 | sfe 3,0,0 # load !cy into ... |
86 | sfi 3,3,0 # ... return value register | 86 | sfi 3,3,0 # ... return value register |
87 | br | 87 | br |
88 | 88 | ||