mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 18:43:30 +00:00
[MSVCRTEX] Add some floating point functions for CLang build
Clang makes optimisations requiring functions not present in msvcrt
This commit is contained in:
parent
3936c3f19e
commit
15c9f63b65
2 changed files with 47 additions and 0 deletions
38
sdk/lib/crt/math/i386/exp2_asm.s
Normal file
38
sdk/lib/crt/math/i386/exp2_asm.s
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <asm.inc>
|
||||
|
||||
PUBLIC _exp2
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
_exp2:
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
|
||||
fld qword ptr [ebp + 8]
|
||||
fxam
|
||||
fstsw ax
|
||||
fwait
|
||||
sahf
|
||||
jnp .not_inf
|
||||
jnc .not_inf
|
||||
test ah, 2
|
||||
jz .done
|
||||
fstp st
|
||||
fldz
|
||||
jmp .done
|
||||
.not_inf:
|
||||
fst st(1)
|
||||
frndint
|
||||
fxch st(1)
|
||||
fsub st, st(1)
|
||||
f2xm1
|
||||
fld1
|
||||
faddp st(1), st
|
||||
fscale
|
||||
fstp st(1)
|
||||
.done:
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue