Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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