forked from KolibriOS/kolibrios
Magomed Kostoev (mkostoevr)
1f4d74f500
git-svn-id: svn://kolibrios.org@8622 a494cfbc-eb01-0410-851d-a64ba20cac60
32 lines
390 B
ArmAsm
32 lines
390 B
ArmAsm
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
|
#include "libc/asm.h"
|
|
.data
|
|
LCW1:
|
|
.word 0
|
|
LCW2:
|
|
.word 0
|
|
LC0:
|
|
.double 0d1.0e+00
|
|
|
|
.text
|
|
|
|
MK_C_SYM(__pow2)
|
|
MK_C_SYM(pow2)
|
|
fldl 4(%esp)
|
|
fstcw LCW1
|
|
fstcw LCW2
|
|
fwait
|
|
andw $0xf3ff,LCW2
|
|
orw $0x0400,LCW2
|
|
fldcw LCW2
|
|
fldl %st(0)
|
|
frndint
|
|
fldcw LCW1
|
|
fxch %st(1)
|
|
fsub %st(1),%st
|
|
f2xm1
|
|
faddl LC0
|
|
fscale
|
|
fstp %st(1)
|
|
ret
|