Edward O'Callaghan | dabf71f | 2009-08-05 19:06:50 +0000 | [diff] [blame] | 1 | /* ===-- fixsfti.c - Implement __fixsfti -----------------------------------=== |
| 2 | * |
| 3 | * The LLVM Compiler Infrastructure |
| 4 | * |
Howard Hinnant | 5b791f6 | 2010-11-16 22:13:33 +0000 | [diff] [blame] | 5 | * This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | * Source Licenses. See LICENSE.TXT for details. |
Edward O'Callaghan | dabf71f | 2009-08-05 19:06:50 +0000 | [diff] [blame] | 7 | * |
| 8 | * ===----------------------------------------------------------------------=== |
Edward O'Callaghan | dabf71f | 2009-08-05 19:06:50 +0000 | [diff] [blame] | 9 | */ |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 10 | |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 11 | #include "int_lib.h" |
| 12 | |
Joerg Sonnenberger | 938b0df | 2014-02-21 23:53:03 +0000 | [diff] [blame] | 13 | #ifdef CRT_HAS_128BIT |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 14 | #define SINGLE_PRECISION |
| 15 | #include "fp_lib.h" |
Chandler Carruth | 6e2bf8f | 2012-06-22 21:09:22 +0000 | [diff] [blame] | 16 | |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 17 | typedef ti_int fixint_t; |
| 18 | typedef tu_int fixuint_t; |
| 19 | #include "fp_fixint_impl.inc" |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 20 | |
Joerg Sonnenberger | 6e99daa | 2014-03-01 15:30:50 +0000 | [diff] [blame] | 21 | COMPILER_RT_ABI ti_int |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 22 | __fixsfti(fp_t a) { |
| 23 | return __fixint(a); |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 24 | } |
| 25 | |
Joerg Sonnenberger | 938b0df | 2014-02-21 23:53:03 +0000 | [diff] [blame] | 26 | #endif /* CRT_HAS_128BIT */ |