diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S index 25e08d4..f0c9814 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/alpha/mpih-rshift.S | |||
@@ -1,118 +1,118 @@ | |||
1 | /* alpha rshift | 1 | /* alpha rshift |
2 | * Copyright (C) 1994, 1995, 1998, 1999, | 2 | * Copyright (C) 1994, 1995, 1998, 1999, |
3 | * 2000, 2001, 2002 Free Software Foundation, Inc. | 3 | * 2000, 2001, 2002 Free Software Foundation, Inc. |
4 | * | 4 | * |
5 | * This file is part of Libgcrypt. | 5 | * This file is part of Libgcrypt. |
6 | * | 6 | * |
7 | * Libgcrypt is free software; you can redistribute it and/or modify | 7 | * Libgcrypt is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU Lesser General Public License as | 8 | * it under the terms of the GNU Lesser General Public License as |
9 | * published by the Free Software Foundation; either version 2.1 of | 9 | * published by the Free Software Foundation; either version 2.1 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * Libgcrypt is distributed in the hope that it will be useful, | 12 | * Libgcrypt is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU Lesser General Public License for more details. | 15 | * GNU Lesser General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public |
18 | * License along with this program; if not, write to the Free Software | 18 | * License along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
20 | * | 20 | * |
21 | * Note: This code is heavily based on the GNU MP Library. | 21 | * Note: This code is heavily based on the GNU MP Library. |
22 | * Actually it's the same code with only minor changes in the | 22 | * Actually it's the same code with only minor changes in the |
23 | * way the data is stored; this is to support the abstraction | 23 | * way the data is stored; this is to support the abstraction |
24 | * of an optional secure memory allocation which may be used | 24 | * of an optional secure memory allocation which may be used |
25 | * to avoid revealing of sensitive data due to paging etc. | 25 | * to avoid revealing of sensitive data due to paging etc. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | /******************* | 31 | /******************* |
32 | * mpi_limb_t | 32 | * mpi_limb_t |
33 | * _gcry_mpih_rshift( mpi_ptr_t wp, (r16) | 33 | * _gcry_mpih_rshift( mpi_ptr_t wp, (r16) |
34 | * mpi_ptr_t up, (r17) | 34 | * mpi_ptr_t up, (r17) |
35 | * mpi_size_t usize, (r18) | 35 | * mpi_size_t usize, (r18) |
36 | * unsigned cnt) (r19) | 36 | * unsigned cnt) (r19) |
37 | * | 37 | * |
38 | * This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling, | 38 | * This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling, |
39 | * it would take 4 cycles/limb. It should be possible to get down to 3 | 39 | * it would take 4 cycles/limb. It should be possible to get down to 3 |
40 | * cycles/limb since both ldq and stq can be paired with the other used | 40 | * cycles/limb since both ldq and stq can be paired with the other used |
41 | * instructions. But there are many restrictions in the 21064 pipeline that | 41 | * instructions. But there are many restrictions in the 21064 pipeline that |
42 | * makes it hard, if not impossible, to get down to 3 cycles/limb: | 42 | * makes it hard, if not impossible, to get down to 3 cycles/limb: |
43 | * | 43 | * |
44 | * 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay. | 44 | * 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay. |
45 | * 2. Only aligned instruction pairs can be paired. | 45 | * 2. Only aligned instruction pairs can be paired. |
46 | * 3. The store buffer or silo might not be able to deal with the bandwidth. | 46 | * 3. The store buffer or silo might not be able to deal with the bandwidth. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | .set noreorder | 49 | .set noreorder |
50 | .set noat | 50 | .set noat |
51 | .text | 51 | .text |
52 | .align 3 | 52 | .align 3 |
53 | .globl _gcry_mpih_rshift | 53 | .globl _gcry_mpih_rshift |
54 | .ent _gcry_mpih_rshift | 54 | .ent _gcry_mpih_rshift |
55 | _gcry_mpih_rshift: | 55 | _gcry_mpih_rshift: |
56 | .frame $30,0,$26,0 | 56 | .frame $30,0,$26,0 |
57 | 57 | ||
58 | ldq $4,0($17) # load first limb | 58 | ldq $4,0($17) # load first limb |
59 | addq $17,8,$17 | 59 | addq $17,8,$17 |
60 | subq $31,$19,$7 | 60 | subq $31,$19,$7 |
61 | subq $18,1,$18 | 61 | subq $18,1,$18 |
62 | and $18,4-1,$20 # number of limbs in first loop | 62 | and $18,4-1,$20 # number of limbs in first loop |
63 | sll $4,$7,$0 # compute function result | 63 | sll $4,$7,$0 # compute function result |
64 | 64 | ||
65 | beq $20,.R0 | 65 | beq $20,.R0 |
66 | subq $18,$20,$18 | 66 | subq $18,$20,$18 |
67 | 67 | ||
68 | .align 3 | 68 | .align 3 |
69 | .Roop0: | 69 | .Roop0: |
70 | ldq $3,0($17) | 70 | ldq $3,0($17) |
71 | addq $16,8,$16 | 71 | addq $16,8,$16 |
72 | addq $17,8,$17 | 72 | addq $17,8,$17 |
73 | subq $20,1,$20 | 73 | subq $20,1,$20 |
74 | srl $4,$19,$5 | 74 | srl $4,$19,$5 |
75 | sll $3,$7,$6 | 75 | sll $3,$7,$6 |
76 | bis $3,$3,$4 | 76 | bis $3,$3,$4 |
77 | bis $5,$6,$8 | 77 | bis $5,$6,$8 |
78 | stq $8,-8($16) | 78 | stq $8,-8($16) |
79 | bne $20,.Roop0 | 79 | bne $20,.Roop0 |
80 | 80 | ||
81 | .R0: beq $18,.Rend | 81 | .R0: beq $18,.Rend |
82 | 82 | ||
83 | .align 3 | 83 | .align 3 |
84 | .Roop: ldq $3,0($17) | 84 | .Roop: ldq $3,0($17) |
85 | addq $16,32,$16 | 85 | addq $16,32,$16 |
86 | subq $18,4,$18 | 86 | subq $18,4,$18 |
87 | srl $4,$19,$5 | 87 | srl $4,$19,$5 |
88 | sll $3,$7,$6 | 88 | sll $3,$7,$6 |
89 | 89 | ||
90 | ldq $4,8($17) | 90 | ldq $4,8($17) |
91 | srl $3,$19,$1 | 91 | srl $3,$19,$1 |
92 | bis $5,$6,$8 | 92 | bis $5,$6,$8 |
93 | stq $8,-32($16) | 93 | stq $8,-32($16) |
94 | sll $4,$7,$2 | 94 | sll $4,$7,$2 |
95 | 95 | ||
96 | ldq $3,16($17) | 96 | ldq $3,16($17) |
97 | srl $4,$19,$5 | 97 | srl $4,$19,$5 |
98 | bis $1,$2,$8 | 98 | bis $1,$2,$8 |
99 | stq $8,-24($16) | 99 | stq $8,-24($16) |
100 | sll $3,$7,$6 | 100 | sll $3,$7,$6 |
101 | 101 | ||
102 | ldq $4,24($17) | 102 | ldq $4,24($17) |
103 | srl $3,$19,$1 | 103 | srl $3,$19,$1 |
104 | bis $5,$6,$8 | 104 | bis $5,$6,$8 |
105 | stq $8,-16($16) | 105 | stq $8,-16($16) |
106 | sll $4,$7,$2 | 106 | sll $4,$7,$2 |
107 | 107 | ||
108 | addq $17,32,$17 | 108 | addq $17,32,$17 |
109 | bis $1,$2,$8 | 109 | bis $1,$2,$8 |
110 | stq $8,-8($16) | 110 | stq $8,-8($16) |
111 | 111 | ||
112 | bgt $18,.Roop | 112 | bgt $18,.Roop |
113 | 113 | ||
114 | .Rend: srl $4,$19,$8 | 114 | .Rend: srl $4,$19,$8 |
115 | stq $8,0($16) | 115 | stq $8,0($16) |
116 | ret $31,($26),1 | 116 | ret $31,($26),1 |
117 | .end _gcry_mpih_rshift | 117 | .end _gcry_mpih_rshift |
118 | 118 | ||