Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

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