diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa')
7 files changed, 686 insertions, 0 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/README b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/README new file mode 100755 index 0000000..ae42a48 --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/README | |||
@@ -0,0 +1,84 @@ | |||
1 | This directory contains mpn functions for various HP PA-RISC chips. Code | ||
2 | that runs faster on the PA7100 and later implementations, is in the pa7100 | ||
3 | directory. | ||
4 | |||
5 | RELEVANT OPTIMIZATION ISSUES | ||
6 | |||
7 | Load and Store timing | ||
8 | |||
9 | On the PA7000 no memory instructions can issue the two cycles after a store. | ||
10 | For the PA7100, this is reduced to one cycle. | ||
11 | |||
12 | The PA7100 has a lookup-free cache, so it helps to schedule loads and the | ||
13 | dependent instruction really far from each other. | ||
14 | |||
15 | STATUS | ||
16 | |||
17 | 1. mpn_mul_1 could be improved to 6.5 cycles/limb on the PA7100, using the | ||
18 | instructions bwlow (but some sw pipelining is needed to avoid the | ||
19 | xmpyu-fstds delay): | ||
20 | |||
21 | fldds s1_ptr | ||
22 | |||
23 | xmpyu | ||
24 | fstds N(%r30) | ||
25 | xmpyu | ||
26 | fstds N(%r30) | ||
27 | |||
28 | ldws N(%r30) | ||
29 | ldws N(%r30) | ||
30 | ldws N(%r30) | ||
31 | ldws N(%r30) | ||
32 | |||
33 | addc | ||
34 | stws res_ptr | ||
35 | addc | ||
36 | stws res_ptr | ||
37 | |||
38 | addib Loop | ||
39 | |||
40 | 2. mpn_addmul_1 could be improved from the current 10 to 7.5 cycles/limb | ||
41 | (asymptotically) on the PA7100, using the instructions below. With proper | ||
42 | sw pipelining and the unrolling level below, the speed becomes 8 | ||
43 | cycles/limb. | ||
44 | |||
45 | fldds s1_ptr | ||
46 | fldds s1_ptr | ||
47 | |||
48 | xmpyu | ||
49 | fstds N(%r30) | ||
50 | xmpyu | ||
51 | fstds N(%r30) | ||
52 | xmpyu | ||
53 | fstds N(%r30) | ||
54 | xmpyu | ||
55 | fstds N(%r30) | ||
56 | |||
57 | ldws N(%r30) | ||
58 | ldws N(%r30) | ||
59 | ldws N(%r30) | ||
60 | ldws N(%r30) | ||
61 | ldws N(%r30) | ||
62 | ldws N(%r30) | ||
63 | ldws N(%r30) | ||
64 | ldws N(%r30) | ||
65 | addc | ||
66 | addc | ||
67 | addc | ||
68 | addc | ||
69 | addc %r0,%r0,cy-limb | ||
70 | |||
71 | ldws res_ptr | ||
72 | ldws res_ptr | ||
73 | ldws res_ptr | ||
74 | ldws res_ptr | ||
75 | add | ||
76 | stws res_ptr | ||
77 | addc | ||
78 | stws res_ptr | ||
79 | addc | ||
80 | stws res_ptr | ||
81 | addc | ||
82 | stws res_ptr | ||
83 | |||
84 | addib | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/distfiles b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/distfiles new file mode 100755 index 0000000..ef180c6 --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/distfiles | |||
@@ -0,0 +1,7 @@ | |||
1 | README | ||
2 | udiv-qrnnd.S | ||
3 | mpih-add1.S | ||
4 | mpih-sub1.S | ||
5 | mpih-lshift.S | ||
6 | mpih-rshift.S | ||
7 | |||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-add1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-add1.S new file mode 100755 index 0000000..f521de0 --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-add1.S | |||
@@ -0,0 +1,70 @@ | |||
1 | /* hppa add_n -- Add two limb vectors of the same length > 0 and store | ||
2 | * sum in a third limb vector. | ||
3 | * | ||
4 | * Copyright (C) 1992, 1994, 1998, | ||
5 | * 2001, 2002 Fee 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 | * Note: This code is heavily based on the GNU MP Library. | ||
24 | * Actually it's the same code with only minor changes in the | ||
25 | * way the data is stored; this is to support the abstraction | ||
26 | * of an optional secure memory allocation which may be used | ||
27 | * to avoid revealing of sensitive data due to paging etc. | ||
28 | */ | ||
29 | |||
30 | |||
31 | |||
32 | /******************* | ||
33 | * mpi_limb_t | ||
34 | * _gcry_mpih_add_n( mpi_ptr_t res_ptr, (gr26) | ||
35 | * mpi_ptr_t s1_ptr, (gr25) | ||
36 | * mpi_ptr_t s2_ptr, (gr24) | ||
37 | * mpi_size_t size) (gr23) | ||
38 | * | ||
39 | * One might want to unroll this as for other processors, but it turns | ||
40 | * out that the data cache contention after a store makes such | ||
41 | * unrolling useless. We can't come under 5 cycles/limb anyway. | ||
42 | */ | ||
43 | |||
44 | .code | ||
45 | .export _gcry_mpih_add_n | ||
46 | .label _gcry_mpih_add_n | ||
47 | .proc | ||
48 | .callinfo frame=0,no_calls | ||
49 | .entry | ||
50 | |||
51 | ldws,ma 4(0,%r25),%r20 | ||
52 | ldws,ma 4(0,%r24),%r19 | ||
53 | |||
54 | addib,= -1,%r23,L$end ; check for (SIZE == 1) | ||
55 | add %r20,%r19,%r28 ; add first limbs ignoring cy | ||
56 | |||
57 | .label L$loop | ||
58 | ldws,ma 4(0,%r25),%r20 | ||
59 | ldws,ma 4(0,%r24),%r19 | ||
60 | stws,ma %r28,4(0,%r26) | ||
61 | addib,<> -1,%r23,L$loop | ||
62 | addc %r20,%r19,%r28 | ||
63 | |||
64 | .label L$end | ||
65 | stws %r28,0(0,%r26) | ||
66 | bv 0(%r2) | ||
67 | addc %r0,%r0,%r28 | ||
68 | |||
69 | .exit | ||
70 | .procend | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-lshift.S new file mode 100755 index 0000000..607982f --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-lshift.S | |||
@@ -0,0 +1,77 @@ | |||
1 | /* hppa lshift | ||
2 | * | ||
3 | * Copyright (C) 1992, 1994, 1998 | ||
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 | |||
25 | /******************* | ||
26 | * mpi_limb_t | ||
27 | * _gcry_mpih_lshift( mpi_ptr_t wp, (gr26) | ||
28 | * mpi_ptr_t up, (gr25) | ||
29 | * mpi_size_t usize, (gr24) | ||
30 | * unsigned cnt) (gr23) | ||
31 | */ | ||
32 | |||
33 | .code | ||
34 | .export _gcry_mpih_lshift | ||
35 | .label _gcry_mpih_lshift | ||
36 | .proc | ||
37 | .callinfo frame=64,no_calls | ||
38 | .entry | ||
39 | |||
40 | sh2add %r24,%r25,%r25 | ||
41 | sh2add %r24,%r26,%r26 | ||
42 | ldws,mb -4(0,%r25),%r22 | ||
43 | subi 32,%r23,%r1 | ||
44 | mtsar %r1 | ||
45 | addib,= -1,%r24,L$0004 | ||
46 | vshd %r0,%r22,%r28 ; compute carry out limb | ||
47 | ldws,mb -4(0,%r25),%r29 | ||
48 | addib,= -1,%r24,L$0002 | ||
49 | vshd %r22,%r29,%r20 | ||
50 | |||
51 | .label L$loop | ||
52 | ldws,mb -4(0,%r25),%r22 | ||
53 | stws,mb %r20,-4(0,%r26) | ||
54 | addib,= -1,%r24,L$0003 | ||
55 | vshd %r29,%r22,%r20 | ||
56 | ldws,mb -4(0,%r25),%r29 | ||
57 | stws,mb %r20,-4(0,%r26) | ||
58 | addib,<> -1,%r24,L$loop | ||
59 | vshd %r22,%r29,%r20 | ||
60 | |||
61 | .label L$0002 | ||
62 | stws,mb %r20,-4(0,%r26) | ||
63 | vshd %r29,%r0,%r20 | ||
64 | bv 0(%r2) | ||
65 | stw %r20,-4(0,%r26) | ||
66 | .label L$0003 | ||
67 | stws,mb %r20,-4(0,%r26) | ||
68 | .label L$0004 | ||
69 | vshd %r22,%r0,%r20 | ||
70 | bv 0(%r2) | ||
71 | stw %r20,-4(0,%r26) | ||
72 | |||
73 | .exit | ||
74 | .procend | ||
75 | |||
76 | |||
77 | |||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-rshift.S new file mode 100755 index 0000000..9801c02 --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-rshift.S | |||
@@ -0,0 +1,73 @@ | |||
1 | /* hppa rshift | ||
2 | * | ||
3 | * Copyright (C) 1992, 1994, 1998, | ||
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 | |||
25 | |||
26 | /******************* | ||
27 | * mpi_limb_t | ||
28 | * _gcry_mpih_rshift( mpi_ptr_t wp, (gr26) | ||
29 | * mpi_ptr_t up, (gr25) | ||
30 | * mpi_size_t usize, (gr24) | ||
31 | * unsigned cnt) (gr23) | ||
32 | */ | ||
33 | |||
34 | .code | ||
35 | .export _gcry_mpih_rshift | ||
36 | .label _gcry_mpih_rshift | ||
37 | .proc | ||
38 | .callinfo frame=64,no_calls | ||
39 | .entry | ||
40 | |||
41 | ldws,ma 4(0,%r25),%r22 | ||
42 | mtsar %r23 | ||
43 | addib,= -1,%r24,L$r004 | ||
44 | vshd %r22,%r0,%r28 ; compute carry out limb | ||
45 | ldws,ma 4(0,%r25),%r29 | ||
46 | addib,= -1,%r24,L$r002 | ||
47 | vshd %r29,%r22,%r20 | ||
48 | |||
49 | .label L$roop | ||
50 | ldws,ma 4(0,%r25),%r22 | ||
51 | stws,ma %r20,4(0,%r26) | ||
52 | addib,= -1,%r24,L$r003 | ||
53 | vshd %r22,%r29,%r20 | ||
54 | ldws,ma 4(0,%r25),%r29 | ||
55 | stws,ma %r20,4(0,%r26) | ||
56 | addib,<> -1,%r24,L$roop | ||
57 | vshd %r29,%r22,%r20 | ||
58 | |||
59 | .label L$r002 | ||
60 | stws,ma %r20,4(0,%r26) | ||
61 | vshd %r0,%r29,%r20 | ||
62 | bv 0(%r2) | ||
63 | stw %r20,0(0,%r26) | ||
64 | .label L$r003 | ||
65 | stws,ma %r20,4(0,%r26) | ||
66 | .label L$r004 | ||
67 | vshd %r0,%r22,%r20 | ||
68 | bv 0(%r2) | ||
69 | stw %r20,0(0,%r26) | ||
70 | |||
71 | .exit | ||
72 | .procend | ||
73 | |||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-sub1.S new file mode 100755 index 0000000..cc4b837 --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/mpih-sub1.S | |||
@@ -0,0 +1,78 @@ | |||
1 | /* hppa sub_n -- Sub two limb vectors of the same length > 0 and store | ||
2 | * sum in a third limb vector. | ||
3 | * | ||
4 | * Copyright (C) 1992, 1994, 1998, | ||
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 | * Note: This code is heavily based on the GNU MP Library. | ||
24 | * Actually it's the same code with only minor changes in the | ||
25 | * way the data is stored; this is to support the abstraction | ||
26 | * of an optional secure memory allocation which may be used | ||
27 | * to avoid revealing of sensitive data due to paging etc. | ||
28 | */ | ||
29 | |||
30 | |||
31 | #include "sysdep.h" | ||
32 | #include "asm-syntax.h" | ||
33 | |||
34 | |||
35 | /******************* | ||
36 | * mpi_limb_t | ||
37 | * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (gr26) | ||
38 | * mpi_ptr_t s1_ptr, (gr25) | ||
39 | * mpi_ptr_t s2_ptr, (gr24) | ||
40 | * mpi_size_t size) (gr23) | ||
41 | * | ||
42 | * One might want to unroll this as for other processors, but it turns | ||
43 | * out that the data cache contention after a store makes such | ||
44 | * unrolling useless. We can't come under 5 cycles/limb anyway. | ||
45 | */ | ||
46 | |||
47 | |||
48 | .code | ||
49 | .export _gcry_mpih_sub_n | ||
50 | .label _gcry_mpih_sub_n | ||
51 | .proc | ||
52 | .callinfo frame=0,no_calls | ||
53 | .entry | ||
54 | |||
55 | ldws,ma 4(0,%r25),%r20 | ||
56 | ldws,ma 4(0,%r24),%r19 | ||
57 | |||
58 | addib,= -1,%r23,L$end ; check for (SIZE == 1) | ||
59 | sub %r20,%r19,%r28 ; subtract first limbs ignoring cy | ||
60 | |||
61 | .label L$loop | ||
62 | ldws,ma 4(0,%r25),%r20 | ||
63 | ldws,ma 4(0,%r24),%r19 | ||
64 | stws,ma %r28,4(0,%r26) | ||
65 | addib,<> -1,%r23,L$loop | ||
66 | subb %r20,%r19,%r28 | ||
67 | |||
68 | .label L$end | ||
69 | stws %r28,0(0,%r26) | ||
70 | addc %r0,%r0,%r28 | ||
71 | bv 0(%r2) | ||
72 | subi 1,%r28,%r28 | ||
73 | |||
74 | .exit | ||
75 | .procend | ||
76 | |||
77 | |||
78 | |||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/udiv-qrnnd.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/udiv-qrnnd.S new file mode 100755 index 0000000..81b432b --- /dev/null +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/hppa/udiv-qrnnd.S | |||
@@ -0,0 +1,297 @@ | |||
1 | /* HP-PA __udiv_qrnnd division support, used from longlong.h. | ||
2 | * This version runs fast on pre-PA7000 CPUs. | ||
3 | * | ||
4 | * Copyright (C) 1993, 1994, 1998, 2001, | ||
5 | * 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 | * Note: This code is heavily based on the GNU MP Library. | ||
24 | * Actually it's the same code with only minor changes in the | ||
25 | * way the data is stored; this is to support the abstraction | ||
26 | * of an optional secure memory allocation which may be used | ||
27 | * to avoid revealing of sensitive data due to paging etc. | ||
28 | */ | ||
29 | |||
30 | |||
31 | |||
32 | /* INPUT PARAMETERS | ||
33 | * rem_ptr gr26 | ||
34 | * n1 gr25 | ||
35 | * n0 gr24 | ||
36 | * d gr23 | ||
37 | * | ||
38 | * The code size is a bit excessive. We could merge the last two ds;addc | ||
39 | * sequences by simply moving the "bb,< Odd" instruction down. The only | ||
40 | * trouble is the FFFFFFFF code that would need some hacking. | ||
41 | */ | ||
42 | |||
43 | .code | ||
44 | .export __udiv_qrnnd | ||
45 | .label __udiv_qrnnd | ||
46 | .proc | ||
47 | .callinfo frame=0,no_calls | ||
48 | .entry | ||
49 | |||
50 | comb,< %r23,0,L$largedivisor | ||
51 | sub %r0,%r23,%r1 ; clear cy as side-effect | ||
52 | ds %r0,%r1,%r0 | ||
53 | addc %r24,%r24,%r24 | ||
54 | ds %r25,%r23,%r25 | ||
55 | addc %r24,%r24,%r24 | ||
56 | ds %r25,%r23,%r25 | ||
57 | addc %r24,%r24,%r24 | ||
58 | ds %r25,%r23,%r25 | ||
59 | addc %r24,%r24,%r24 | ||
60 | ds %r25,%r23,%r25 | ||
61 | addc %r24,%r24,%r24 | ||
62 | ds %r25,%r23,%r25 | ||
63 | addc %r24,%r24,%r24 | ||
64 | ds %r25,%r23,%r25 | ||
65 | addc %r24,%r24,%r24 | ||
66 | ds %r25,%r23,%r25 | ||
67 | addc %r24,%r24,%r24 | ||
68 | ds %r25,%r23,%r25 | ||
69 | addc %r24,%r24,%r24 | ||
70 | ds %r25,%r23,%r25 | ||
71 | addc %r24,%r24,%r24 | ||
72 | ds %r25,%r23,%r25 | ||
73 | addc %r24,%r24,%r24 | ||
74 | ds %r25,%r23,%r25 | ||
75 | addc %r24,%r24,%r24 | ||
76 | ds %r25,%r23,%r25 | ||
77 | addc %r24,%r24,%r24 | ||
78 | ds %r25,%r23,%r25 | ||
79 | addc %r24,%r24,%r24 | ||
80 | ds %r25,%r23,%r25 | ||
81 | addc %r24,%r24,%r24 | ||
82 | ds %r25,%r23,%r25 | ||
83 | addc %r24,%r24,%r24 | ||
84 | ds %r25,%r23,%r25 | ||
85 | addc %r24,%r24,%r24 | ||
86 | ds %r25,%r23,%r25 | ||
87 | addc %r24,%r24,%r24 | ||
88 | ds %r25,%r23,%r25 | ||
89 | addc %r24,%r24,%r24 | ||
90 | ds %r25,%r23,%r25 | ||
91 | addc %r24,%r24,%r24 | ||
92 | ds %r25,%r23,%r25 | ||
93 | addc %r24,%r24,%r24 | ||
94 | ds %r25,%r23,%r25 | ||
95 | addc %r24,%r24,%r24 | ||
96 | ds %r25,%r23,%r25 | ||
97 | addc %r24,%r24,%r24 | ||
98 | ds %r25,%r23,%r25 | ||
99 | addc %r24,%r24,%r24 | ||
100 | ds %r25,%r23,%r25 | ||
101 | addc %r24,%r24,%r24 | ||
102 | ds %r25,%r23,%r25 | ||
103 | addc %r24,%r24,%r24 | ||
104 | ds %r25,%r23,%r25 | ||
105 | addc %r24,%r24,%r24 | ||
106 | ds %r25,%r23,%r25 | ||
107 | addc %r24,%r24,%r24 | ||
108 | ds %r25,%r23,%r25 | ||
109 | addc %r24,%r24,%r24 | ||
110 | ds %r25,%r23,%r25 | ||
111 | addc %r24,%r24,%r24 | ||
112 | ds %r25,%r23,%r25 | ||
113 | addc %r24,%r24,%r24 | ||
114 | ds %r25,%r23,%r25 | ||
115 | addc %r24,%r24,%r28 | ||
116 | ds %r25,%r23,%r25 | ||
117 | comclr,>= %r25,%r0,%r0 | ||
118 | addl %r25,%r23,%r25 | ||
119 | stws %r25,0(0,%r26) | ||
120 | bv 0(%r2) | ||
121 | addc %r28,%r28,%r28 | ||
122 | |||
123 | .label L$largedivisor | ||
124 | extru %r24,31,1,%r19 ; r19 = n0 & 1 | ||
125 | bb,< %r23,31,L$odd | ||
126 | extru %r23,30,31,%r22 ; r22 = d >> 1 | ||
127 | shd %r25,%r24,1,%r24 ; r24 = new n0 | ||
128 | extru %r25,30,31,%r25 ; r25 = new n1 | ||
129 | sub %r0,%r22,%r21 | ||
130 | ds %r0,%r21,%r0 | ||
131 | addc %r24,%r24,%r24 | ||
132 | ds %r25,%r22,%r25 | ||
133 | addc %r24,%r24,%r24 | ||
134 | ds %r25,%r22,%r25 | ||
135 | addc %r24,%r24,%r24 | ||
136 | ds %r25,%r22,%r25 | ||
137 | addc %r24,%r24,%r24 | ||
138 | ds %r25,%r22,%r25 | ||
139 | addc %r24,%r24,%r24 | ||
140 | ds %r25,%r22,%r25 | ||
141 | addc %r24,%r24,%r24 | ||
142 | ds %r25,%r22,%r25 | ||
143 | addc %r24,%r24,%r24 | ||
144 | ds %r25,%r22,%r25 | ||
145 | addc %r24,%r24,%r24 | ||
146 | ds %r25,%r22,%r25 | ||
147 | addc %r24,%r24,%r24 | ||
148 | ds %r25,%r22,%r25 | ||
149 | addc %r24,%r24,%r24 | ||
150 | ds %r25,%r22,%r25 | ||
151 | addc %r24,%r24,%r24 | ||
152 | ds %r25,%r22,%r25 | ||
153 | addc %r24,%r24,%r24 | ||
154 | ds %r25,%r22,%r25 | ||
155 | addc %r24,%r24,%r24 | ||
156 | ds %r25,%r22,%r25 | ||
157 | addc %r24,%r24,%r24 | ||
158 | ds %r25,%r22,%r25 | ||
159 | addc %r24,%r24,%r24 | ||
160 | ds %r25,%r22,%r25 | ||
161 | addc %r24,%r24,%r24 | ||
162 | ds %r25,%r22,%r25 | ||
163 | addc %r24,%r24,%r24 | ||
164 | ds %r25,%r22,%r25 | ||
165 | addc %r24,%r24,%r24 | ||
166 | ds %r25,%r22,%r25 | ||
167 | addc %r24,%r24,%r24 | ||
168 | ds %r25,%r22,%r25 | ||
169 | addc %r24,%r24,%r24 | ||
170 | ds %r25,%r22,%r25 | ||
171 | addc %r24,%r24,%r24 | ||
172 | ds %r25,%r22,%r25 | ||
173 | addc %r24,%r24,%r24 | ||
174 | ds %r25,%r22,%r25 | ||
175 | addc %r24,%r24,%r24 | ||
176 | ds %r25,%r22,%r25 | ||
177 | addc %r24,%r24,%r24 | ||
178 | ds %r25,%r22,%r25 | ||
179 | addc %r24,%r24,%r24 | ||
180 | ds %r25,%r22,%r25 | ||
181 | addc %r24,%r24,%r24 | ||
182 | ds %r25,%r22,%r25 | ||
183 | addc %r24,%r24,%r24 | ||
184 | ds %r25,%r22,%r25 | ||
185 | addc %r24,%r24,%r24 | ||
186 | ds %r25,%r22,%r25 | ||
187 | addc %r24,%r24,%r24 | ||
188 | ds %r25,%r22,%r25 | ||
189 | addc %r24,%r24,%r24 | ||
190 | ds %r25,%r22,%r25 | ||
191 | addc %r24,%r24,%r24 | ||
192 | ds %r25,%r22,%r25 | ||
193 | addc %r24,%r24,%r24 | ||
194 | ds %r25,%r22,%r25 | ||
195 | comclr,>= %r25,%r0,%r0 | ||
196 | addl %r25,%r22,%r25 | ||
197 | sh1addl %r25,%r19,%r25 | ||
198 | stws %r25,0(0,%r26) | ||
199 | bv 0(%r2) | ||
200 | addc %r24,%r24,%r28 | ||
201 | |||
202 | .label L$odd | ||
203 | addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1) | ||
204 | shd %r25,%r24,1,%r24 ; r24 = new n0 | ||
205 | extru %r25,30,31,%r25 ; r25 = new n1 | ||
206 | sub %r0,%r22,%r21 | ||
207 | ds %r0,%r21,%r0 | ||
208 | addc %r24,%r24,%r24 | ||
209 | ds %r25,%r22,%r25 | ||
210 | addc %r24,%r24,%r24 | ||
211 | ds %r25,%r22,%r25 | ||
212 | addc %r24,%r24,%r24 | ||
213 | ds %r25,%r22,%r25 | ||
214 | addc %r24,%r24,%r24 | ||
215 | ds %r25,%r22,%r25 | ||
216 | addc %r24,%r24,%r24 | ||
217 | ds %r25,%r22,%r25 | ||
218 | addc %r24,%r24,%r24 | ||
219 | ds %r25,%r22,%r25 | ||
220 | addc %r24,%r24,%r24 | ||
221 | ds %r25,%r22,%r25 | ||
222 | addc %r24,%r24,%r24 | ||
223 | ds %r25,%r22,%r25 | ||
224 | addc %r24,%r24,%r24 | ||
225 | ds %r25,%r22,%r25 | ||
226 | addc %r24,%r24,%r24 | ||
227 | ds %r25,%r22,%r25 | ||
228 | addc %r24,%r24,%r24 | ||
229 | ds %r25,%r22,%r25 | ||
230 | addc %r24,%r24,%r24 | ||
231 | ds %r25,%r22,%r25 | ||
232 | addc %r24,%r24,%r24 | ||
233 | ds %r25,%r22,%r25 | ||
234 | addc %r24,%r24,%r24 | ||
235 | ds %r25,%r22,%r25 | ||
236 | addc %r24,%r24,%r24 | ||
237 | ds %r25,%r22,%r25 | ||
238 | addc %r24,%r24,%r24 | ||
239 | ds %r25,%r22,%r25 | ||
240 | addc %r24,%r24,%r24 | ||
241 | ds %r25,%r22,%r25 | ||
242 | addc %r24,%r24,%r24 | ||
243 | ds %r25,%r22,%r25 | ||
244 | addc %r24,%r24,%r24 | ||
245 | ds %r25,%r22,%r25 | ||
246 | addc %r24,%r24,%r24 | ||
247 | ds %r25,%r22,%r25 | ||
248 | addc %r24,%r24,%r24 | ||
249 | ds %r25,%r22,%r25 | ||
250 | addc %r24,%r24,%r24 | ||
251 | ds %r25,%r22,%r25 | ||
252 | addc %r24,%r24,%r24 | ||
253 | ds %r25,%r22,%r25 | ||
254 | addc %r24,%r24,%r24 | ||
255 | ds %r25,%r22,%r25 | ||
256 | addc %r24,%r24,%r24 | ||
257 | ds %r25,%r22,%r25 | ||
258 | addc %r24,%r24,%r24 | ||
259 | ds %r25,%r22,%r25 | ||
260 | addc %r24,%r24,%r24 | ||
261 | ds %r25,%r22,%r25 | ||
262 | addc %r24,%r24,%r24 | ||
263 | ds %r25,%r22,%r25 | ||
264 | addc %r24,%r24,%r24 | ||
265 | ds %r25,%r22,%r25 | ||
266 | addc %r24,%r24,%r24 | ||
267 | ds %r25,%r22,%r25 | ||
268 | addc %r24,%r24,%r24 | ||
269 | ds %r25,%r22,%r25 | ||
270 | addc %r24,%r24,%r24 | ||
271 | ds %r25,%r22,%r25 | ||
272 | addc %r24,%r24,%r28 | ||
273 | comclr,>= %r25,%r0,%r0 | ||
274 | addl %r25,%r22,%r25 | ||
275 | sh1addl %r25,%r19,%r25 | ||
276 | ; We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25 | ||
277 | add,nuv %r28,%r25,%r25 | ||
278 | addl %r25,%r1,%r25 | ||
279 | addc %r0,%r28,%r28 | ||
280 | sub,<< %r25,%r23,%r0 | ||
281 | addl %r25,%r1,%r25 | ||
282 | stws %r25,0(0,%r26) | ||
283 | bv 0(%r2) | ||
284 | addc %r0,%r28,%r28 | ||
285 | |||
286 | ; This is just a special case of the code above. | ||
287 | ; We come here when d == 0xFFFFFFFF | ||
288 | .label L$FF.. | ||
289 | add,uv %r25,%r24,%r24 | ||
290 | sub,<< %r24,%r23,%r0 | ||
291 | ldo 1(%r24),%r24 | ||
292 | stws %r24,0(0,%r26) | ||
293 | bv 0(%r2) | ||
294 | addc %r0,%r25,%r28 | ||
295 | |||
296 | .exit | ||
297 | .procend | ||