home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / astrnomy / de118i.zip / FLOORL.387 < prev    next >
Text File  |  1993-03-01  |  3KB  |  215 lines

  1.     .file    "floorl.c"
  2. gcc2_compiled.:
  3. .text
  4.     .align 2
  5. .globl _fabsl
  6. _fabsl:
  7.     pushl %ebp
  8.     movl %esp,%ebp
  9.     subl $12,%esp
  10.     fldt 8(%ebp)
  11.     fabs
  12.     leave
  13.     ret
  14.     .align 2
  15. .globl _ceill
  16. _ceill:
  17.     pushl %ebp
  18.     movl %esp,%ebp
  19.     pushl 16(%ebp)
  20.     pushl 12(%ebp)
  21.     pushl 8(%ebp)
  22.     call _floorl
  23.     fldt 8(%ebp)
  24.     fcomp %st(1)
  25.     fnstsw %ax
  26.     andb $69,%ah
  27.     jne L6
  28.     fld1
  29.     faddp %st,%st(1)
  30. L6:
  31.     leave
  32.     ret
  33.  
  34.     .align 2
  35. .globl _floorl
  36. _floorl:
  37.     pushl %ebp
  38.     movl %esp,%ebp
  39.     subl $4,%esp
  40.     fstcw -4(%ebp)
  41.     fwait
  42.     movw -4(%ebp),%ax
  43.     andw $0xf3ff,%ax
  44.     orw $0x400,%ax
  45.     movw %ax,-2(%ebp)
  46.     fldcw -2(%ebp)
  47.     fldt 8(%ebp)
  48.     frndint
  49.     fldcw -4(%ebp)
  50.     leave
  51.     ret
  52.  
  53.     .align 2
  54. .globl _frexpl
  55. _frexpl:
  56.     pushl %ebp
  57.     movl %esp,%ebp
  58.     subl $24,%esp
  59.     pushl %esi
  60.     pushl %ebx
  61.     fldt 8(%ebp)
  62.     movl 20(%ebp),%ebx
  63.     fld %st(0)
  64.     fstpt -12(%ebp)
  65.     leal -4(%ebp),%ecx
  66.     movw -4(%ebp),%dx
  67.     andl $32767,%edx
  68.     jne L25
  69.     fldz
  70.     fucompp
  71.     fnstsw %ax
  72.     andb $68,%ah
  73.     xorb $64,%ah
  74.     jne L21
  75.     movl $0,(%ebx)
  76.     fldz
  77.     jmp L24
  78.     .align 2,0x90
  79.     .align 2,0x90
  80. L21:
  81.     fldt -12(%ebp)
  82.     fadd %st(0),%st
  83.     fstpt -12(%ebp)
  84.     decl %edx
  85.     movw (%ecx),%si
  86.     andl $32767,%esi
  87.     jne L22
  88.     cmpl $-66,%edx
  89.     jg L21
  90. L22:
  91.     addl %esi,%edx
  92.     jmp L19
  93.     .align 2,0x90
  94. L25:
  95.     fstp %st(0)
  96. L19:
  97.     addl $-16382,%edx
  98.     movl %edx,(%ebx)
  99.     movw $16382,(%ecx)
  100.     fldt -12(%ebp)
  101. L24:
  102.     leal -32(%ebp),%esp
  103.     popl %ebx
  104.     popl %esi
  105.     leave
  106.     ret
  107.     .align 2
  108. LC1:
  109.     .long 0x0,0x80000000,0x433ffe
  110.     .align 2
  111. .globl _ldexpl
  112. _ldexpl:
  113.     pushl %ebp
  114.     movl %esp,%ebp
  115.     subl $24,%esp
  116.     pushl %ebx
  117.     movl 20(%ebp),%edx
  118.     fldt 8(%ebp)
  119.     fstpt -12(%ebp)
  120.     leal -4(%ebp),%ecx
  121.     movw -4(%ebp),%bx
  122.     andl $32767,%ebx
  123.     jne L28
  124.     fldz
  125.     fldt LC1
  126.     .align 2,0x90
  127. L34:
  128.     fldt -12(%ebp)
  129.     fucom %st(2)
  130.     fnstsw %ax
  131.     andb $69,%ah
  132.     cmpb $64,%ah
  133.     je L47
  134.     testl %edx,%edx
  135.     jle L48
  136.     fadd %st(0),%st
  137.     fstpt -12(%ebp)
  138.     decl %edx
  139.     jmp L30
  140.     .align 2,0x90
  141. L48:
  142.     fstp %st(0)
  143. L30:
  144.     testl %edx,%edx
  145.     jge L31
  146.     cmpl $-64,%edx
  147.     jl L49
  148.     fldt -12(%ebp)
  149.     fmul %st(1),%st
  150.     fstpt -12(%ebp)
  151.     incl %edx
  152. L31:
  153.     testl %edx,%edx
  154.     je L50
  155.     movw (%ecx),%bx
  156.     andl $32767,%ebx
  157.     je L34
  158.     fstp %st(0)
  159.     fstp %st(0)
  160. L28:
  161.     addl %edx,%ebx
  162.     cmpl $32767,%ebx
  163.     jle L35
  164.     fldl _MAXNUML
  165.     jmp L41
  166.     .align 2,0x90
  167. L35:
  168.     andw $32768,(%ecx)
  169.     testl %ebx,%ebx
  170.     jg L36
  171.     cmpl $-64,%ebx
  172.     jge L37
  173.     jmp L45
  174.     .align 2,0x90
  175. L47:
  176.     fstp %st(0)
  177. L49:
  178.     fstp %st(0)
  179.     fstp %st(0)
  180. L45:
  181.     fldz
  182.     jmp L41
  183.     .align 2,0x90
  184. L37:
  185.     orw $32768,-2(%ecx)
  186.     testl %ebx,%ebx
  187.     jg L39
  188.     fldt LC1
  189.     .align 2,0x90
  190. L40:
  191.     fldt -12(%ebp)
  192.     fmul %st(1),%st
  193.     fstpt -12(%ebp)
  194.     incl %ebx
  195.     testl %ebx,%ebx
  196.     jle L40
  197.     fstp %st(0)
  198. L39:
  199.     xorl %ebx,%ebx
  200. L36:
  201.     movl %ebx,%eax
  202.     andb $127,%ah
  203.     orw %ax,(%ecx)
  204.     jmp L46
  205.     .align 2,0x90
  206. L50:
  207.     fstp %st(0)
  208.     fstp %st(0)
  209. L46:
  210.     fldt -12(%ebp)
  211. L41:
  212.     movl -28(%ebp),%ebx
  213.     leave
  214.     ret
  215.