xref: /reactos/sdk/lib/crt/math/arm/ceil.s (revision b09b5584)
1/*
2 * COPYRIGHT:         BSD - See COPYING.ARM in the top level directory
3 * PROJECT:           ReactOS CRT library
4 * PURPOSE:           Implementation of ceil
5 * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
6 *                    Original implementation: dawncrow
7 * SOURCE:            MinGW-w64\mingw-w64-crt\math\ceil.S
8 */
9
10/* INCLUDES ******************************************************************/
11
12#include <kxarm.h>
13
14/* CODE **********************************************************************/
15
16    TEXTAREA
17
18    LEAF_ENTRY ceil
19
20	vmrs	r1, fpscr
21
22	bic		r0, r1, #0x00c00000
23	orr		r0, r0, #0x00400000 /* Round towards Plus Infinity */
24	vmsr	fpscr, r0
25	vcvtr.s32.f64	s0, d0
26	vcvt.f64.s32	d0, s0
27	vmsr	fpscr, r1
28	bx	lr
29
30    LEAF_END ceil
31
32    END
33/* EOF */
34