reactos/lib/sdk/crt/math/amd64/ceilf.S
Timo Kreuzer ab6c2ee54c [CRT]
incude asm.inc instead of reactos/asm.h
Fix a bug that smeaked into _chkstk

svn path=/branches/cmake-bringup/; revision=49591
2010-11-15 01:29:12 +00:00

47 lines
969 B
ArmAsm

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of tan
* FILE: lib/sdk/crt/math/amd64/ceilf.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <asm.inc>
#include <ksamd64.inc>
/* FUNCTIONS ****************************************************************/
.code64
PUBLIC ceilf
ceilf:
sub rsp, 16
/* Put parameter on the stack */
movss [rsp], xmm0
fld dword ptr [rsp]
/* Change fpu control word to round up */
fstcw [rsp + 8]
mov eax, [rsp + 8]
or eax, HEX(00800)
and eax, HEX(0fbff)
mov [rsp + 12], eax
fldcw [rsp + 12]
/* Round to integer */
frndint
/* Restore fpu control word */
fldcw [rsp + 8]
fstp dword ptr [rsp]
movss xmm0, [rsp]
add rsp, 16
ret
END