home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / LIBC / LIBC-4.6 / LIBC-4 / libc-linux / sysdeps / linux / i386 / math / sinl.S < prev    next >
Encoding:
Text File  |  1994-10-10  |  965 b   |  52 lines

  1. /* Copyright (C) 1993  Hongjiu Lu
  2. This file is part of the Linux C Library.
  3.  
  4. The Linux C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The Linux C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details. */
  13.  
  14.     .file    "sin.S"
  15.     .text
  16. #ifdef __ELF__
  17. #define _sinl sinl
  18. #endif
  19.  
  20.     .globl    _sinl
  21.  
  22. #ifdef __i486__
  23.     .align    4,0x90
  24. #else
  25.     .align    2,0x90
  26. #endif
  27. _sinl:
  28.     fldt    4(%esp)
  29.     jmp    L3
  30. L1:
  31.     fldpi
  32.     fld    %st(0)        /*  2 pi */
  33.     faddp    %st,%st(1)
  34.     fxch    %st(1)
  35. L2:
  36.     fprem1
  37.     fstsw    %ax
  38.     sahf
  39.     jp    L2
  40.     fxch    %st(1)
  41.     fstp    %st(0)
  42. L3:
  43.     fsin
  44.     fstsw    %ax
  45.     sahf
  46.     jp    L1
  47.     ret
  48.  
  49. #ifdef __ELF__
  50. .type sinl,@function
  51. #endif
  52.