1af526226Smrg /* Software floating-point emulation.
2af526226Smrg Convert a 64bit signed integer to IEEE quad
3*8d286336Smrg Copyright (C) 1997-2019 Free Software Foundation, Inc.
4af526226Smrg This file is part of the GNU C Library.
5af526226Smrg Contributed by Richard Henderson (rth@cygnus.com) and
6af526226Smrg Jakub Jelinek (jj@ultra.linux.cz).
7af526226Smrg
8af526226Smrg The GNU C Library is free software; you can redistribute it and/or
9af526226Smrg modify it under the terms of the GNU Lesser General Public
10af526226Smrg License as published by the Free Software Foundation; either
11af526226Smrg version 2.1 of the License, or (at your option) any later version.
12af526226Smrg
13af526226Smrg In addition to the permissions in the GNU Lesser General Public
14af526226Smrg License, the Free Software Foundation gives you unlimited
15af526226Smrg permission to link the compiled version of this file into
16af526226Smrg combinations with other programs, and to distribute those
17af526226Smrg combinations without any restriction coming from the use of this
18af526226Smrg file. (The Lesser General Public License restrictions do apply in
19af526226Smrg other respects; for example, they cover modification of the file,
20af526226Smrg and distribution when not linked into a combine executable.)
21af526226Smrg
22af526226Smrg The GNU C Library is distributed in the hope that it will be useful,
23af526226Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of
24af526226Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25af526226Smrg Lesser General Public License for more details.
26af526226Smrg
27af526226Smrg You should have received a copy of the GNU Lesser General Public
28af526226Smrg License along with the GNU C Library; if not, see
29af526226Smrg <http://www.gnu.org/licenses/>. */
30af526226Smrg
315ef59e75Smrg #define FP_NO_EXCEPTIONS
32af526226Smrg #include "soft-fp.h"
33af526226Smrg #include "quad.h"
34af526226Smrg
355ef59e75Smrg TFtype
__floatditf(DItype i)365ef59e75Smrg __floatditf (DItype i)
37af526226Smrg {
38af526226Smrg FP_DECL_Q (A);
39af526226Smrg TFtype a;
40af526226Smrg
41af526226Smrg FP_FROM_INT_Q (A, i, DI_BITS, UDItype);
42af526226Smrg FP_PACK_RAW_Q (a, A);
43af526226Smrg
44af526226Smrg return a;
45af526226Smrg }
46