xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/extendhftf2.c (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
1*e8d8bef9SDimitry Andric //===-- lib/extendhftf2.c - half -> quad conversion ---------------*- C -*-===//
2*e8d8bef9SDimitry Andric //
3*e8d8bef9SDimitry Andric //                     The LLVM Compiler Infrastructure
4*e8d8bef9SDimitry Andric //
5*e8d8bef9SDimitry Andric // This file is dual licensed under the MIT and the University of Illinois Open
6*e8d8bef9SDimitry Andric // Source Licenses. See LICENSE.TXT for details.
7*e8d8bef9SDimitry Andric //
8*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
9*e8d8bef9SDimitry Andric 
10*e8d8bef9SDimitry Andric #define QUAD_PRECISION
11*e8d8bef9SDimitry Andric #include "fp_lib.h"
12*e8d8bef9SDimitry Andric 
13*e8d8bef9SDimitry Andric #if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) &&                     \
14*e8d8bef9SDimitry Andric     defined(COMPILER_RT_HAS_FLOAT16)
15*e8d8bef9SDimitry Andric #define SRC_HALF
16*e8d8bef9SDimitry Andric #define DST_QUAD
17*e8d8bef9SDimitry Andric #include "fp_extend_impl.inc"
18*e8d8bef9SDimitry Andric 
19*e8d8bef9SDimitry Andric COMPILER_RT_ABI long double __extendhftf2(_Float16 a) {
20*e8d8bef9SDimitry Andric   return __extendXfYf2__(a);
21*e8d8bef9SDimitry Andric }
22*e8d8bef9SDimitry Andric 
23*e8d8bef9SDimitry Andric #endif
24