home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / MATH / FXAM.S < prev    next >
Encoding:
Text File  |  1993-01-02  |  493 b   |  26 lines

  1. / fxam.s (emx+gcc) -- Copyright (c) 1991-1993 by Eberhard Mattes
  2.  
  3.         .globl  __fxam
  4.  
  5.         .text
  6.  
  7.         .align  2, 0x90
  8.  
  9. / int fxam (double x)
  10.  
  11. #define x       4(%esp)
  12.  
  13. __fxam:
  14.         fldl    x                       / x
  15.         fxam
  16.         fstsww  %ax
  17.         ffree   %st(0)
  18.         fincstp
  19.         movl    %eax, %edx
  20.         shrl    $8, %eax
  21.         andl    $7, %eax
  22.         test    $0x4000, %edx
  23.         jz      fxam1
  24.         orl     $8, %eax
  25. fxam1:  ret
  26.