blob: 8bf58bb23a3b221be613c55a1353beb7ef13109f [file] [log] [blame]
Stephen Canon74eaf1f2010-07-01 17:58:24 +00001//===-- lib/truncdfsf2.c - double -> single conversion ------------*- C -*-===//
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.
Stephen Canon74eaf1f2010-07-01 17:58:24 +00007//
8//===----------------------------------------------------------------------===//
Stephen Canon74eaf1f2010-07-01 17:58:24 +00009
Joerg Sonnenberger304a36b2014-05-29 00:49:57 +000010#define SRC_DOUBLE
11#define DST_SINGLE
12#include "fp_trunc_impl.inc"
Stephen Canon74eaf1f2010-07-01 17:58:24 +000013
Joerg Sonnenberger304a36b2014-05-29 00:49:57 +000014COMPILER_RT_ABI float __truncdfsf2(double a) {
15 return __truncXfYf2__(a);
Stephen Canon74eaf1f2010-07-01 17:58:24 +000016}
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000017
18#if defined(__ARM_EABI__)
19AEABI_RTABI float __aeabi_d2f(double a) {
20 return __truncdfsf2(a);
21}
22#endif
23