Subversion Repositories Kolibri OS

Rev

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

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include<libc/asm.h>
  3. MK_C_SYM(ceil)
  4.         pushl   %ebp
  5.         movl    %esp,%ebp
  6.         subl    $8,%esp        
  7.  
  8.         fstcw   -4(%ebp)
  9.         fwait
  10.         movw    -4(%ebp),%ax
  11.         andw    $0xf3ff,%ax
  12.         orw     $0x0800,%ax
  13.         movw    %ax,-2(%ebp)
  14.         fldcw   -2(%ebp)
  15.  
  16.         fldl    8(%ebp)
  17.         frndint
  18.  
  19.         fldcw   -4(%ebp)
  20.  
  21.         movl    %ebp,%esp
  22.         popl    %ebp
  23.         ret
  24.  
  25.