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 / expm1l.S < prev    next >
Encoding:
Text File  |  1994-10-10  |  1.3 KB  |  72 lines

  1. /*
  2. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  3. **
  4. ** Modified O.ROBERT 24, Avenue de Verdun 92170 VANVES, FRANCE
  5. **
  6. ** E-mail: roberto@germinal.ibp.fr
  7. **
  8. ** This file is distributed under the terms listed in the document
  9. ** "copying.dj", available from DJ Delorie at the address above.
  10. ** A copy of "copying.dj" should accompany this file; if not, a copy
  11. ** should be available from where this file was obtained.  This file
  12. ** may not be distributed without a verbatim copy of "copying.dj".
  13. **
  14. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  15. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. **
  17. ** or    03-Apr-1991    corrected bug about argument zero to pow
  18. **            fyl2x didn't like it
  19. */
  20.  
  21. /* Modified by H.J. Lu for Linux, 1992 */
  22.  
  23. /* History:15,24 */
  24.  
  25.     .file    "expm1l.S"
  26.  
  27.     .text
  28. #ifdef __ELF__
  29. #define _expm1l    expm1l
  30. #endif
  31.  
  32.     .globl    _expm1l
  33. #ifdef    __i486__
  34.     .align    4,0x90
  35. #else
  36.     .align    2,0x90
  37. #endif
  38. _expm1l:
  39.     pushl    %ebp
  40.     movl    %esp,%ebp
  41.     subl    $8,%esp
  42.     fldt    8(%ebp)
  43.     fldl2e
  44.     fmulp    %st,%st(1)
  45.     fstcw    -4(%ebp)
  46.     fstcw    -8(%ebp)
  47.     andw    $0xf3ff,-4(%ebp)
  48.     fldcw    -4(%ebp)
  49.     fldl    %st(0)
  50.     frndint
  51.     fldcw    -8(%ebp)
  52.     fxch    %st(1)
  53.     fsub    %st(1),%st
  54.     f2xm1
  55.  
  56.     fscale
  57.     fxch    %st(1)
  58.     fld1
  59.     fscale
  60.     fld1
  61.     fsubp    %st,%st(1)
  62.     fstp    %st(1)
  63.     fsubrp    %st,%st(1)
  64.  
  65.     movl    %ebp,%esp
  66.     popl    %ebp
  67.     ret
  68.  
  69. #ifdef __ELF__
  70.     .type expm1l,@function
  71. #endif
  72.