blob: 986a63f809610aba16f766a93b39b6598c7b8f03 [file] [log] [blame]
Stephen Canon5c6d2ec2010-07-01 17:58:24 +00001//===-- lib/truncdfsf2.c - double -> single conversion ------------*- C -*-===//
2//
Chandler Carruth7a739a02019-01-19 10:56:40 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Stephen Canon5c6d2ec2010-07-01 17:58:24 +00006//
7//===----------------------------------------------------------------------===//
Stephen Canon5c6d2ec2010-07-01 17:58:24 +00008
Joerg Sonnenbergerb8e9b022014-05-29 00:49:57 +00009#define SRC_DOUBLE
10#define DST_SINGLE
11#include "fp_trunc_impl.inc"
Stephen Canon5c6d2ec2010-07-01 17:58:24 +000012
Joerg Sonnenbergerb8e9b022014-05-29 00:49:57 +000013COMPILER_RT_ABI float __truncdfsf2(double a) {
14 return __truncXfYf2__(a);
Stephen Canon5c6d2ec2010-07-01 17:58:24 +000015}
Saleem Abdulrasool99e2e662017-05-16 16:41:37 +000016
17#if defined(__ARM_EABI__)
Eli Friedman83774b42017-10-03 21:25:07 +000018#if defined(COMPILER_RT_ARMHF_TARGET)
Saleem Abdulrasool99e2e662017-05-16 16:41:37 +000019AEABI_RTABI float __aeabi_d2f(double a) {
20 return __truncdfsf2(a);
21}
Eli Friedman83774b42017-10-03 21:25:07 +000022#else
23AEABI_RTABI float __aeabi_d2f(double a) COMPILER_RT_ALIAS(__truncdfsf2);
Saleem Abdulrasool99e2e662017-05-16 16:41:37 +000024#endif
Eli Friedman83774b42017-10-03 21:25:07 +000025#endif