Edward O'Callaghan | 4856eef | 2009-08-05 04:02:56 +0000 | [diff] [blame] | 1 | /* ===-- fixunssfti.c - Implement __fixunssfti -----------------------------=== |
| 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 | 4856eef | 2009-08-05 04:02:56 +0000 | [diff] [blame] | 7 | * |
| 8 | * ===----------------------------------------------------------------------=== |
| 9 | * |
| 10 | * This file implements __fixunssfti for the compiler_rt library. |
| 11 | * |
| 12 | * ===----------------------------------------------------------------------=== |
| 13 | */ |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 14 | |
Joerg Sonnenberger | 1aa3faa | 2015-03-13 00:18:28 +0000 | [diff] [blame^] | 15 | #define SINGLE_PRECISION |
| 16 | #include "fp_lib.h" |
| 17 | |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 18 | #if defined(CRT_HAS_128BIT) |
| 19 | typedef tu_int fixuint_t; |
| 20 | #include "fp_fixuint_impl.inc" |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 21 | |
Joerg Sonnenberger | 6e99daa | 2014-03-01 15:30:50 +0000 | [diff] [blame] | 22 | COMPILER_RT_ABI tu_int |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 23 | __fixunssfti(fp_t a) { |
| 24 | return __fixuint(a); |
Daniel Dunbar | fd08999 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 25 | } |
Joerg Sonnenberger | 91bd698 | 2015-03-11 21:13:56 +0000 | [diff] [blame] | 26 | #endif |