summaryrefslogtreecommitdiff
path: root/lib/libcompiler_rt/fixunsdfti.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcompiler_rt/fixunsdfti.c')
-rw-r--r--lib/libcompiler_rt/fixunsdfti.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libcompiler_rt/fixunsdfti.c b/lib/libcompiler_rt/fixunsdfti.c
new file mode 100644
index 00000000000..f8046a02632
--- /dev/null
+++ b/lib/libcompiler_rt/fixunsdfti.c
@@ -0,0 +1,23 @@
+/* ===-- fixunsdfti.c - Implement __fixunsdfti -----------------------------===
+ *
+ * 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.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#include "int_lib.h"
+
+#ifdef CRT_HAS_128BIT
+#define DOUBLE_PRECISION
+#include "fp_lib.h"
+typedef tu_int fixuint_t;
+#include "fp_fixuint_impl.inc"
+
+COMPILER_RT_ABI tu_int
+__fixunsdfti(fp_t a) {
+ return __fixuint(a);
+}
+#endif /* CRT_HAS_128BIT */