aio: Remove support for BROKEN_THREAD_SIGNALS
[glibc.git] / sysdeps / i386 / fpu / s_remquol.S
blobf3d84fc7c2c22d73f903d65d125d0820a103857c
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 #define PARMS   4               /* no space for saved regs */
10 #define DVDND   PARMS
11 #define DVSOR   DVDND+12
12 #define QUOP    DVSOR+12
14         .text
15 ENTRY (__remquol)
17         fldt    DVSOR(%esp)
18         fldt    DVDND(%esp)
19 1:      fprem1
20         fstsw   %ax
21         sahf
22         jp      1b
23         fstp    %st(1)
24         /* Compute the congruent of the quotient.  */
25         movl    %eax, %ecx
26         shrl    $8, %eax
27         shrl    $12, %ecx
28         andl    $4, %ecx
29         andl    $3, %eax
30         orl     %eax, %ecx
31         leal    (%ecx,%ecx,2),%ecx
32         movl    $0xef2a60, %eax
33         shrl    %cl, %eax
34         andl    $7, %eax
35         movl    QUOP(%esp), %ecx
36         movl    DVDND+8(%esp), %edx
37         xorl    DVSOR+8(%esp), %edx
38         testl   $0x8000, %edx
39         jz      1f
40         negl    %eax
41 1:      movl    %eax, (%ecx)
43         ret
44 END (__remquol)
45 weak_alias (__remquol, remquol)