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 / expm1.S < prev    next >
Encoding:
Text File  |  1994-09-21  |  1.3 KB  |  73 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    "expm1.S"
  26.  
  27. #ifdef __ELF__
  28. #define _expm1    expm1
  29. #endif
  30.  
  31.     .text
  32.     .globl    _expm1
  33. #ifdef __i486__
  34.     .align    4,0x90
  35. #else
  36.     .align    2,0x90
  37. #endif
  38.  
  39. _expm1:
  40.     pushl    %ebp
  41.     movl    %esp,%ebp
  42.     subl    $8,%esp
  43.     fldl    8(%ebp)
  44.     fldl2e
  45.     fmulp    %st,%st(1)
  46.     fstcw    -4(%ebp)
  47.     fstcw    -8(%ebp)
  48.     andw    $0xf3ff,-4(%ebp)
  49.     fldcw    -4(%ebp)
  50.     fldl    %st(0)
  51.     frndint
  52.     fldcw    -8(%ebp)
  53.     fxch    %st(1)
  54.     fsub    %st(1),%st
  55.     f2xm1
  56.  
  57.     fscale
  58.     fxch    %st(1)
  59.     fld1
  60.     fscale
  61.     fld1
  62.     fsubp    %st,%st(1)
  63.     fstp    %st(1)
  64.     fsubrp    %st,%st(1)
  65.  
  66.     movl    %ebp,%esp
  67.     popl    %ebp
  68.     ret
  69.  
  70. #ifdef __ELF__
  71.     .type expm1,@function
  72. #endif
  73.