blob: 8354a41b8b6f11bdd1a0ad93c306603043cca310 [file] [log] [blame]
Ahmed Bougachaf1ac8502015-05-12 18:33:42 +00001//===-- lib/truncdfhf2.c - double -> half conversion --------------*- C -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#define SRC_DOUBLE
11#define DST_HALF
12#include "fp_trunc_impl.inc"
13
Ahmed Bougachaf1ac8502015-05-12 18:33:42 +000014COMPILER_RT_ABI uint16_t __truncdfhf2(double a) {
15 return __truncXfYf2__(a);
16}
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 uint16_t __aeabi_d2h(double a) {
21 return __truncdfhf2(a);
22}
Eli Friedman0d586d02017-10-03 21:25:07 +000023#else
24AEABI_RTABI uint16_t __aeabi_d2h(double a) COMPILER_RT_ALIAS(__truncdfhf2);
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000025#endif
Eli Friedman0d586d02017-10-03 21:25:07 +000026#endif