Update.
[glibc.git] / sysdeps / libm-i387 / s_remquol.S
blob9c91d90c45d274a1fac814df20871bae30badcb0
1 /*
2  * Written by Ulrich Drepper <drepper@cygnus.com>.
3  * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
4  * Public domain.
5  */
7 #include <machine/asm.h>
9 ENTRY(__remquol)
10         fldt    16(%esp)
11         fldt    4(%esp)
12 1:      fprem1
13         fstsw   %ax
14         sahf
15         jp      1b
16         fstpl   %st(1)
17         /* Compute the congruent of the quotient.  */
18         movl    %eax, %ecx
19         shrl    $8, %eax
20         shrl    $12, %ecx
21         andl    $4, %ecx
22         andl    $3, %eax
23         orl     %eax, %ecx
24         movl    $0xef2960, %eax
25         shrl    %cl, %eax
26         andl    $3, %eax
27         movl    28(%esp), %ecx
28         movl    %eax, (%ecx)
29         ret
30 END (__remquol)
31 weak_alias (__remquol, remquol)