1*0b57cec5SDimitry Andric //===-- lib/truncdfsf2.c - double -> single conversion ------------*- C -*-===// 2*0b57cec5SDimitry Andric // 3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric // 7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric 9*0b57cec5SDimitry Andric #define SRC_DOUBLE 10*0b57cec5SDimitry Andric #define DST_SINGLE 11*0b57cec5SDimitry Andric #include "fp_trunc_impl.inc" 12*0b57cec5SDimitry Andric __truncdfsf2(double a)13*0b57cec5SDimitry AndricCOMPILER_RT_ABI float __truncdfsf2(double a) { return __truncXfYf2__(a); } 14*0b57cec5SDimitry Andric 15*0b57cec5SDimitry Andric #if defined(__ARM_EABI__) 16*0b57cec5SDimitry Andric #if defined(COMPILER_RT_ARMHF_TARGET) __aeabi_d2f(double a)17*0b57cec5SDimitry AndricAEABI_RTABI float __aeabi_d2f(double a) { return __truncdfsf2(a); } 18*0b57cec5SDimitry Andric #else 19*0b57cec5SDimitry Andric COMPILER_RT_ALIAS(__truncdfsf2, __aeabi_d2f) 20*0b57cec5SDimitry Andric #endif 21*0b57cec5SDimitry Andric #endif 22