148fb7bfaSmrg /* Software floating-point emulation.
248fb7bfaSmrg Convert a 128bit unsigned integer to IEEE double
3*fb8a8121Smrg Copyright (C) 1997-2019 Free Software Foundation, Inc.
448fb7bfaSmrg This file is part of the GNU C Library.
548fb7bfaSmrg Contributed by Uros Bizjak (ubizjak@gmail.com).
648fb7bfaSmrg
748fb7bfaSmrg The GNU C Library is free software; you can redistribute it and/or
848fb7bfaSmrg modify it under the terms of the GNU Lesser General Public
948fb7bfaSmrg License as published by the Free Software Foundation; either
1048fb7bfaSmrg version 2.1 of the License, or (at your option) any later version.
1148fb7bfaSmrg
1248fb7bfaSmrg In addition to the permissions in the GNU Lesser General Public
1348fb7bfaSmrg License, the Free Software Foundation gives you unlimited
1448fb7bfaSmrg permission to link the compiled version of this file into
1548fb7bfaSmrg combinations with other programs, and to distribute those
1648fb7bfaSmrg combinations without any restriction coming from the use of this
1748fb7bfaSmrg file. (The Lesser General Public License restrictions do apply in
1848fb7bfaSmrg other respects; for example, they cover modification of the file,
1948fb7bfaSmrg and distribution when not linked into a combine executable.)
2048fb7bfaSmrg
2148fb7bfaSmrg The GNU C Library is distributed in the hope that it will be useful,
2248fb7bfaSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
2348fb7bfaSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2448fb7bfaSmrg Lesser General Public License for more details.
2548fb7bfaSmrg
2648fb7bfaSmrg You should have received a copy of the GNU Lesser General Public
274d5abbe8Smrg License along with the GNU C Library; if not, see
284d5abbe8Smrg <http://www.gnu.org/licenses/>. */
2948fb7bfaSmrg
3048fb7bfaSmrg #include "soft-fp.h"
3148fb7bfaSmrg #include "double.h"
3248fb7bfaSmrg
334d5abbe8Smrg DFtype
__floatuntidf(UTItype i)344d5abbe8Smrg __floatuntidf (UTItype i)
3548fb7bfaSmrg {
3648fb7bfaSmrg FP_DECL_EX;
3748fb7bfaSmrg FP_DECL_D (A);
3848fb7bfaSmrg DFtype a;
3948fb7bfaSmrg
404d5abbe8Smrg FP_INIT_ROUNDMODE;
4148fb7bfaSmrg FP_FROM_INT_D (A, i, TI_BITS, UTItype);
4248fb7bfaSmrg FP_PACK_RAW_D (a, A);
4348fb7bfaSmrg FP_HANDLE_EXCEPTIONS;
4448fb7bfaSmrg
4548fb7bfaSmrg return a;
4648fb7bfaSmrg }
47