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 / tan.S < prev    next >
Encoding:
Text File  |  1994-08-26  |  931 b   |  51 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    "tan.S"
  15.     .text
  16. #ifdef __ELF__
  17. #define _tan tan
  18. #endif
  19.  
  20.     .globl    _tan
  21.  
  22. #ifdef __i486__
  23.     .align    4,0x90
  24. #else
  25.     .align    2,0x90
  26. #endif
  27. _tan:
  28.     fldl    4(%esp)
  29.     jmp    L3
  30. L1:
  31.     fldpi
  32.     fxch    %st(1)
  33. L2:
  34.     fprem1
  35.     fstsw    %ax
  36.     sahf
  37.     jp    L2
  38.     fxch    %st(1)
  39.     fstp    %st(0)
  40. L3:
  41.     fptan
  42.     fstsw    %ax
  43.     sahf
  44.     jp    L1
  45.     fstp    %st(0)
  46.     ret
  47.  
  48. #ifdef __ELF__
  49. .type tan,@function
  50. #endif
  51.