1/** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6#include <_mingw_mac.h> 7 8 .file "nearbyintf.S" 9 .text 10 .align 4 11 .globl __MINGW_USYMBOL(nearbyintf) 12 .def __MINGW_USYMBOL(nearbyintf); .scl 2; .type 32; .endef 13__MINGW_USYMBOL(nearbyintf): 14 vmov r2, r3, d0 15 lsr r3, r3, #20 16 bic r3, r3, #0x800 17 movw r2, #0x7ff 18 cmp r2, r3 /* Check for INF/NAN, just return the input in those cases */ 19 it eq 20 bxeq lr 21 vmrs r1, fpscr 22 vcvtr.s32.f32 s0, s0 23 vcvt.f32.s32 s0, s0 24 vmsr fpscr, r1 25 bx lr 26