xref: /openbsd-src/gnu/llvm/compiler-rt/lib/builtins/truncdfhf2.c (revision d89ec533011f513df1010f142a111086a0785f09)
13cab2bb3Spatrick //===-- lib/truncdfhf2.c - double -> half conversion --------------*- C -*-===//
23cab2bb3Spatrick //
33cab2bb3Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
43cab2bb3Spatrick // See https://llvm.org/LICENSE.txt for license information.
53cab2bb3Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
63cab2bb3Spatrick //
73cab2bb3Spatrick //===----------------------------------------------------------------------===//
83cab2bb3Spatrick 
93cab2bb3Spatrick #define SRC_DOUBLE
103cab2bb3Spatrick #define DST_HALF
113cab2bb3Spatrick #include "fp_trunc_impl.inc"
123cab2bb3Spatrick 
__truncdfhf2(double a)13*d89ec533Spatrick COMPILER_RT_ABI dst_t __truncdfhf2(double a) { return __truncXfYf2__(a); }
143cab2bb3Spatrick 
153cab2bb3Spatrick #if defined(__ARM_EABI__)
163cab2bb3Spatrick #if defined(COMPILER_RT_ARMHF_TARGET)
__aeabi_d2h(double a)17*d89ec533Spatrick AEABI_RTABI dst_t __aeabi_d2h(double a) { return __truncdfhf2(a); }
183cab2bb3Spatrick #else
193cab2bb3Spatrick COMPILER_RT_ALIAS(__truncdfhf2, __aeabi_d2h)
203cab2bb3Spatrick #endif
213cab2bb3Spatrick #endif
22