2015-04-11 12:44:55 +00:00
|
|
|
/*
|
2015-04-30 21:04:29 +00:00
|
|
|
* COPYRIGHT: BSD - See COPYING.ARM in the top level directory
|
|
|
|
* PROJECT: ReactOS CRT library
|
2015-04-11 12:44:55 +00:00
|
|
|
* PURPOSE: Implementation of floor
|
|
|
|
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
2015-04-30 21:04:29 +00:00
|
|
|
* Original implementation: dawncrow
|
|
|
|
* SOURCE: MinGW-w64\mingw-w64-crt\math\floor.S
|
2015-04-11 12:44:55 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2015-05-10 21:04:27 +00:00
|
|
|
#include <kxarm.h>
|
2015-04-11 12:44:55 +00:00
|
|
|
|
|
|
|
/* CODE **********************************************************************/
|
2015-04-30 21:04:29 +00:00
|
|
|
|
2015-04-11 12:44:55 +00:00
|
|
|
TEXTAREA
|
|
|
|
|
|
|
|
LEAF_ENTRY floor
|
|
|
|
|
2015-04-30 21:04:29 +00:00
|
|
|
vmrs r1, fpscr
|
|
|
|
bic r0, r1, #0x00c00000
|
|
|
|
orr r0, r0, #0x00800000 /* Round towards Minus Infinity */
|
|
|
|
vmsr fpscr, r0
|
|
|
|
vcvtr.s32.f64 s0, d0
|
|
|
|
vcvt.f64.s32 d0, s0
|
|
|
|
vmsr fpscr, r1
|
|
|
|
bx lr
|
|
|
|
|
2015-04-11 12:44:55 +00:00
|
|
|
LEAF_END floor
|
|
|
|
|
|
|
|
END
|
|
|
|
/* EOF */
|