Subversion Repositories Kolibri OS

Rev

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

  1. #include<libc/asm.h>
  2. MK_C_SYM(cos)
  3.         fldl    4(%esp)
  4.         fcos
  5.         fnstsw  %ax
  6.         andw    $0x400,%ax
  7.         jnz     1f
  8.         ret    
  9. 1:      fldpi
  10.         fadd    %st(0)
  11.         fxch    %st(1)
  12. 2:      fprem1
  13.         fnstsw  %ax
  14.         andw    $0x400,%ax
  15.         jnz     2b
  16.         fstp    %st(1)
  17.         fcos
  18.         ret
  19.