Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. #include<libc/asm.h>
  3. MK_C_SYM(__modfl)
  4.         pushl %ebp
  5.         movl %esp,%ebp
  6.         subl $4,%esp
  7.         fldt 8(%ebp)
  8.         movl 20(%ebp),%eax
  9.         fnstcw -2(%ebp)
  10.         movw -2(%ebp),%dx
  11.         orb $0x0c,%dh
  12.         movw %dx,-4(%ebp)
  13.         fldcw -4(%ebp)
  14.         fld %st(0)
  15.         frndint
  16.         fldcw -2(%ebp)
  17.         fld %st(0)
  18.         fstpt (%eax)
  19.         fsubrp %st,%st(1)
  20.         leave
  21.         ret
  22.