Subversion Repositories Kolibri OS

Rev

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

  1. #include<libc/asm.h>
  2. MK_C_SYM(ceil)
  3.  
  4.         pushl   %ebp
  5.         movl    %esp,%ebp
  6.         subl    $8,%esp
  7.  
  8.         fstcw   -12(%ebp)              
  9.         movw    -12(%ebp),%dx
  10.         orw     $0x0800,%dx            
  11.         andw    $0xfbff,%dx
  12.         movw    %dx,-16(%ebp)
  13.         fldcw   -16(%ebp)              
  14.  
  15.         fldl    8(%ebp);               
  16.         frndint
  17.  
  18.         fldcw   -12(%ebp)              
  19.  
  20.         leave
  21.         ret
  22.