1a6b264b5SAlexey Samsonov //===-- lib/truncdfsf2.c - double -> single conversion ------------*- C -*-===// 2a6b264b5SAlexey Samsonov // 357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6a6b264b5SAlexey Samsonov // 7a6b264b5SAlexey Samsonov //===----------------------------------------------------------------------===// 8a6b264b5SAlexey Samsonov 9304a36b5SJoerg Sonnenberger #define SRC_DOUBLE 10304a36b5SJoerg Sonnenberger #define DST_SINGLE 11304a36b5SJoerg Sonnenberger #include "fp_trunc_impl.inc" 12a6b264b5SAlexey Samsonov __truncdfsf2(double a)13082b89b2SPetr HosekCOMPILER_RT_ABI float __truncdfsf2(double a) { return __truncXfYf2__(a); } 1436ac5ddfSSaleem Abdulrasool 1536ac5ddfSSaleem Abdulrasool #if defined(__ARM_EABI__) 160d586d06SEli Friedman #if defined(COMPILER_RT_ARMHF_TARGET) __aeabi_d2f(double a)17082b89b2SPetr HosekAEABI_RTABI float __aeabi_d2f(double a) { return __truncdfsf2(a); } 180d586d06SEli Friedman #else 19*84da0e1bSPetr Hosek COMPILER_RT_ALIAS(__truncdfsf2, __aeabi_d2f) 2036ac5ddfSSaleem Abdulrasool #endif 210d586d06SEli Friedman #endif 22