Subversion Repositories Kolibri OS

Rev

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

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