summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/truncsfhf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/truncsfhf2.c')
-rw-r--r--compiler-rt/lib/builtins/truncsfhf2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/truncsfhf2.c b/compiler-rt/lib/builtins/truncsfhf2.c
new file mode 100644
index 00000000000..a25dd83d868
--- /dev/null
+++ b/compiler-rt/lib/builtins/truncsfhf2.c
@@ -0,0 +1,20 @@
+//===-- lib/truncsfhf2.c - single -> half conversion --------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#define SRC_SINGLE
+#define DST_HALF
+#include "fp_trunc_impl.inc"
+
+COMPILER_RT_ABI uint16_t __truncsfhf2(float a) {
+ return __truncXfYf2__(a);
+}
+
+COMPILER_RT_ABI uint16_t __gnu_f2h_ieee(float a) {
+ return __truncXfYf2__(a);
+}
OpenPOWER on IntegriCloud