1 | #include "include/llvm-libc-macros/float16-macros.h" |
---|---|
2 | #include "include/llvm-libc-types/float128.h" |
3 | |
4 | #ifndef LIBC_TYPES_HAS_FLOAT16 |
5 | #error unsupported |
6 | #endif |
7 | |
8 | _Float16 cvt_from_float(float x) { return static_cast<_Float16>(x); } |
9 | |
10 | _Float16 cvt_from_double(double x) { return static_cast<_Float16>(x); } |
11 | |
12 | _Float16 cvt_from_long_double(long double x) { |
13 | return static_cast<_Float16>(x); |
14 | } |
15 | |
16 | #ifdef LIBC_TYPES_HAS_FLOAT128 |
17 | _Float16 cvt_from_float128(float128 x) { return static_cast<_Float16>(x); } |
18 | #endif |
19 | |
20 | float cvt_to_float(_Float16 x) { return x; } |
21 | |
22 | double cvt_to_double(_Float16 x) { return x; } |
23 | |
24 | long double cvt_to_long_double(_Float16 x) { return x; } |
25 | |
26 | #ifdef LIBC_TYPES_HAS_FLOAT128 |
27 | float128 cvt_to_float128(_Float16 x) { return x; } |
28 | #endif |
29 | |
30 | extern "C"void _start() {} |
31 |