Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include<libc/asm.h>
  3.         .data
  4. LCW1:
  5.         .word   0
  6. LCW2:
  7.         .word   0
  8. LC0:
  9.         .double 0d1.0e+00
  10.  
  11.         .text
  12.  
  13. MK_C_SYM(__pow2)
  14.         fldl    4(%esp)
  15.         fstcw   LCW1
  16.         fstcw   LCW2
  17.         fwait
  18.         andw    $0xf3ff,LCW2
  19.         orw     $0x0400,LCW2
  20.         fldcw   LCW2
  21.         fldl    %st(0)
  22.         frndint
  23.         fldcw   LCW1
  24.         fxch    %st(1)
  25.         fsub    %st(1),%st
  26.         f2xm1
  27.         faddl   LC0
  28.         fscale
  29.         fstp    %st(1)
  30.         ret
  31.