blob: 3a159b3e18e4aa5248718c602cbd147603ef381b [file] [log] [blame]
Edward O'Callaghandabf71f2009-08-05 19:06:50 +00001/* ===-- fixsfti.c - Implement __fixsfti -----------------------------------===
2 *
3 * The LLVM Compiler Infrastructure
4 *
Howard Hinnant5b791f62010-11-16 22:13:33 +00005 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
Edward O'Callaghandabf71f2009-08-05 19:06:50 +00007 *
8 * ===----------------------------------------------------------------------===
Edward O'Callaghandabf71f2009-08-05 19:06:50 +00009 */
Daniel Dunbarfd089992009-06-26 16:47:03 +000010
Daniel Dunbarfd089992009-06-26 16:47:03 +000011#include "int_lib.h"
12
Joerg Sonnenberger938b0df2014-02-21 23:53:03 +000013#ifdef CRT_HAS_128BIT
Joerg Sonnenberger91bd6982015-03-11 21:13:56 +000014#define SINGLE_PRECISION
15#include "fp_lib.h"
Chandler Carruth6e2bf8f2012-06-22 21:09:22 +000016
Joerg Sonnenberger91bd6982015-03-11 21:13:56 +000017typedef ti_int fixint_t;
18typedef tu_int fixuint_t;
19#include "fp_fixint_impl.inc"
Daniel Dunbarfd089992009-06-26 16:47:03 +000020
Joerg Sonnenberger6e99daa2014-03-01 15:30:50 +000021COMPILER_RT_ABI ti_int
Joerg Sonnenberger91bd6982015-03-11 21:13:56 +000022__fixsfti(fp_t a) {
23 return __fixint(a);
Daniel Dunbarfd089992009-06-26 16:47:03 +000024}
25
Joerg Sonnenberger938b0df2014-02-21 23:53:03 +000026#endif /* CRT_HAS_128BIT */