]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/lib/builtins/fixsfdi.c
1 /* ===-- fixsfdi.c - Implement __fixsfdi -----------------------------------===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
11 #define SINGLE_PRECISION
14 ARM_EABI_FNALIAS(f2lz
, fixsfdi
)
17 /* Support for systems that have hardware floating-point; can set the invalid
18 * flag as a side-effect of computation.
21 COMPILER_RT_ABI du_int
__fixunssfdi(float a
);
23 COMPILER_RT_ABI di_int
27 return -__fixunssfdi(-a
);
29 return __fixunssfdi(a
);
33 /* Support for systems that don't have hardware floating-point; there are no
34 * flags to set, and we don't want to code-gen to an unknown soft-float
38 typedef di_int fixint_t
;
39 typedef du_int fixuint_t
;
40 #include "fp_fixint_impl.inc"
42 COMPILER_RT_ABI di_int