Subversion Repositories Kolibri OS

Rev

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

  1. /*
  2.  * Written by J.T. Conklin <jtc@netbsd.org>.
  3.  * Public domain.
  4.  *
  5.  * Removed glibc header dependancy by Danny Smith
  6.  *  <dannysmith@users.sourceforge.net>
  7.  */
  8.         .file   "cosf.S"
  9.         .text
  10.         .align 4
  11. .globl _cosl
  12.         .def    _cosf;  .scl    2;      .type   32;     .endef
  13. _cosf:
  14.         flds    4(%esp)
  15.         fcos
  16.         fnstsw  %ax
  17.         testl   $0x400,%eax
  18.         jnz     1f
  19.         ret
  20. 1:      fldpi
  21.         fadd    %st(0)
  22.         fxch    %st(1)
  23. 2:      fprem1
  24.         fnstsw  %ax
  25.         testl   $0x400,%eax
  26.         jnz     2b
  27.         fstp    %st(1)
  28.         fcos
  29.         ret
  30.