Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Written by Ulrich Drepper <drepper@cygnus.com>.
  3.  * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
  4.  * Removed header file dependency for use in libmingwex.a by
  5.  *   Danny Smith <dannysmith@users.sourceforge.ne
  6.  * Public domain.
  7.  */
  8.  
  9.         .file   "remquo.S"
  10.         .text
  11.         .align 4;
  12. .globl _remquo;
  13. _remquo:    
  14.         fldl 4 +8(%esp)
  15.         fldl 4(%esp)
  16. 1:      fprem1
  17.         fstsw %ax
  18.         sahf
  19.         jp 1b
  20.         fstp %st(1)
  21.         movl %eax, %ecx
  22.         shrl $8, %eax
  23.         shrl $12, %ecx
  24.         andl $4, %ecx
  25.         andl $3, %eax
  26.         orl %eax, %ecx
  27.         movl $0xef2960, %eax
  28.         shrl %cl, %eax
  29.         andl $3, %eax
  30.         movl 4 +8 +8(%esp), %ecx      
  31.         movl 4 +4(%esp), %edx
  32.         xorl 4 +8 +4(%esp), %edx
  33.         testl $0x80000000, %edx
  34.         jz 1f
  35.         negl %eax
  36. 1:      movl %eax, (%ecx)
  37.  
  38.         ret
  39.