aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/lib/builtins/truncxfhf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/truncxfhf2.c')
-rw-r--r--compiler-rt/lib/builtins/truncxfhf2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/truncxfhf2.c b/compiler-rt/lib/builtins/truncxfhf2.c
new file mode 100644
index 0000000..0f06398
--- /dev/null
+++ b/compiler-rt/lib/builtins/truncxfhf2.c
@@ -0,0 +1,15 @@
+//===-- lib/truncsfhf2.c - long double -> half conversion ---------*- C -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#define SRC_SINGLE
+#define DST_HALF
+#include "fp_trunc_impl.inc"
+
+COMPILER_RT_ABI dst_t __truncxfhf2(xf_float a) {
+ return __truncXfYf2__((float)a);
+}