Subversion Repositories Kolibri OS

Rev

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

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