]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/hppa/hppa1.1/udiv_qrnnd.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / hppa / hppa1.1 / udiv_qrnnd.S
CommitLineData
acc97172
UD
1;! HP-PA __udiv_qrnnd division support, used from longlong.h.
2;! This version runs fast on PA 7000 and later.
7def3d92 3
b168057a 4;! Copyright (C) 1993-2015 Free Software Foundation, Inc.
7def3d92 5
acc97172 6;! This file is part of the GNU MP Library.
7def3d92 7
acc97172 8;! The GNU MP Library is free software; you can redistribute it and/or modify
f01ec467
AJ
9;! it under the terms of the GNU Lesser General Public License as published by
10;! the Free Software Foundation; either version 2.1 of the License, or (at your
acc97172 11;! option) any later version.
7def3d92 12
acc97172
UD
13;! The GNU MP Library is distributed in the hope that it will be useful, but
14;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
f01ec467 15;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
acc97172 16;! License for more details.
7def3d92 17
f01ec467 18;! You should have received a copy of the GNU Lesser General Public License
ab84e3ff
PE
19;! along with the GNU MP Library. If not, see
20;! <http://www.gnu.org/licenses/>.
7def3d92
RM
21
22
acc97172
UD
23;! INPUT PARAMETERS
24;! rem_ptr gr26
25;! n1 gr25
26;! n0 gr24
27;! d gr23
7def3d92 28
acc97172 29 .text
5556231d 30L$0000:
acc97172 31 .word 0x43f00000
7def3d92
RM
32 .word 0x0
33 .export __udiv_qrnnd
5556231d 34__udiv_qrnnd:
7def3d92
RM
35 .proc
36 .callinfo frame=64,no_calls
37 .entry
38 ldo 64(%r30),%r30
39
e4782a56
RM
40 stws %r25,-16(%r30) ;! n_hi
41 stws %r24,-12(%r30) ;! n_lo
acc97172
UD
42 b,l L$0,%r1
43 ldo L$0000-L$0(%r1),%r1
44L$0:
e4782a56
RM
45 fldds -16(%r30),%fr5
46 stws %r23,-12(%r30)
7def3d92
RM
47 comib,<= 0,%r25,L$1
48 fcnvxf,dbl,dbl %fr5,%fr5
e4782a56 49 fldds 0(%r1),%fr4
7def3d92 50 fadd,dbl %fr4,%fr5,%fr5
5556231d 51L$1:
7def3d92 52 fcpy,sgl %fr0,%fr6L
e4782a56 53 fldws -12(%r30),%fr6R
7def3d92
RM
54 fcnvxf,dbl,dbl %fr6,%fr4
55
56 fdiv,dbl %fr5,%fr4,%fr5
57
58 fcnvfx,dbl,dbl %fr5,%fr4
59 fstws %fr4R,-16(%r30)
60 xmpyu %fr4R,%fr6R,%fr6
61 ldws -16(%r30),%r28
e4782a56
RM
62 fstds %fr6,-16(%r30)
63 ldws -12(%r30),%r21
64 ldws -16(%r30),%r20
7def3d92 65 sub %r24,%r21,%r22
acc97172
UD
66 subb %r25,%r20,%r1
67 comib,= 0,%r1,L$2
7def3d92
RM
68 ldo -64(%r30),%r30
69
70 add %r22,%r23,%r22
71 ldo -1(%r28),%r28
5556231d 72L$2:
acc97172 73 bv 0(%r2)
e4782a56 74 stws %r22,0(%r26)
7def3d92
RM
75
76 .exit
77 .procend