diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2014-05-29 00:58:27 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2014-05-29 00:58:27 +0000 |
commit | d891c7d7b7ccb5469ad3b71f5942fa52d1d9c526 (patch) | |
tree | a1716073b6f1e538b7b6bb5cbd8814ce30288172 /lib/builtins/trunctfdf2.c | |
parent | 9883e32ad6650a978c7602ba32ed39cac03d3270 (diff) | |
download | compiler-rt-d891c7d7b7ccb5469ad3b71f5942fa52d1d9c526.tar.gz |
Implement __trunctfdf2 and __trunctfsf2 for IEEE quad precision.
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2803
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/trunctfdf2.c')
-rw-r--r-- | lib/builtins/trunctfdf2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/builtins/trunctfdf2.c b/lib/builtins/trunctfdf2.c new file mode 100644 index 000000000..741a71b33 --- /dev/null +++ b/lib/builtins/trunctfdf2.c @@ -0,0 +1,22 @@ +//===-- lib/truncdfsf2.c - quad -> double 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 QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +#define SRC_QUAD +#define DST_DOUBLE +#include "fp_trunc_impl.inc" + +COMPILER_RT_ABI double __trunctfdf2(long double a) { + return __truncXfYf2__(a); +} + +#endif |