Stephen Canon | 74eaf1f | 2010-07-01 17:58:24 +0000 | [diff] [blame] | 1 | //===-- lib/truncdfsf2.c - double -> single conversion ------------*- C -*-===// |
| 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. |
Stephen Canon | 74eaf1f | 2010-07-01 17:58:24 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Stephen Canon | 74eaf1f | 2010-07-01 17:58:24 +0000 | [diff] [blame] | 9 | |
Joerg Sonnenberger | 304a36b | 2014-05-29 00:49:57 +0000 | [diff] [blame] | 10 | #define SRC_DOUBLE |
| 11 | #define DST_SINGLE |
| 12 | #include "fp_trunc_impl.inc" |
Stephen Canon | 74eaf1f | 2010-07-01 17:58:24 +0000 | [diff] [blame] | 13 | |
Joerg Sonnenberger | 304a36b | 2014-05-29 00:49:57 +0000 | [diff] [blame] | 14 | COMPILER_RT_ABI float __truncdfsf2(double a) { |
| 15 | return __truncXfYf2__(a); |
Stephen Canon | 74eaf1f | 2010-07-01 17:58:24 +0000 | [diff] [blame] | 16 | } |
Saleem Abdulrasool | 36ac5dd | 2017-05-16 16:41:37 +0000 | [diff] [blame] | 17 | |
| 18 | #if defined(__ARM_EABI__) |
| 19 | AEABI_RTABI float __aeabi_d2f(double a) { |
| 20 | return __truncdfsf2(a); |
| 21 | } |
| 22 | #endif |
| 23 | |