blob: 195d3e0656e7552a93f1acd1dec832878becc5d0 [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__)
Eli Friedman0d586d02017-10-03 21:25:07 +000019#if defined(COMPILER_RT_ARMHF_TARGET)
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000020AEABI_RTABI float __aeabi_d2f(double a) {
21 return __truncdfsf2(a);
22}
Eli Friedman0d586d02017-10-03 21:25:07 +000023#else
24AEABI_RTABI float __aeabi_d2f(double a) COMPILER_RT_ALIAS(__truncdfsf2);
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000025#endif
Eli Friedman0d586d02017-10-03 21:25:07 +000026#endif