11debfc3dSmrg /* Software floating-point emulation.
21debfc3dSmrg Return a converted to IEEE double
3*8feb0f0bSmrg Copyright (C) 1997-2019 Free Software Foundation, Inc.
41debfc3dSmrg This file is part of the GNU C Library.
51debfc3dSmrg Contributed by Richard Henderson (rth@cygnus.com) and
61debfc3dSmrg Jakub Jelinek (jj@ultra.linux.cz).
71debfc3dSmrg
81debfc3dSmrg The GNU C Library is free software; you can redistribute it and/or
91debfc3dSmrg modify it under the terms of the GNU Lesser General Public
101debfc3dSmrg License as published by the Free Software Foundation; either
111debfc3dSmrg version 2.1 of the License, or (at your option) any later version.
121debfc3dSmrg
131debfc3dSmrg In addition to the permissions in the GNU Lesser General Public
141debfc3dSmrg License, the Free Software Foundation gives you unlimited
151debfc3dSmrg permission to link the compiled version of this file into
161debfc3dSmrg combinations with other programs, and to distribute those
171debfc3dSmrg combinations without any restriction coming from the use of this
181debfc3dSmrg file. (The Lesser General Public License restrictions do apply in
191debfc3dSmrg other respects; for example, they cover modification of the file,
201debfc3dSmrg and distribution when not linked into a combine executable.)
211debfc3dSmrg
221debfc3dSmrg The GNU C Library is distributed in the hope that it will be useful,
231debfc3dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
241debfc3dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
251debfc3dSmrg Lesser General Public License for more details.
261debfc3dSmrg
271debfc3dSmrg You should have received a copy of the GNU Lesser General Public
281debfc3dSmrg License along with the GNU C Library; if not, see
291debfc3dSmrg <http://www.gnu.org/licenses/>. */
301debfc3dSmrg
311debfc3dSmrg #define FP_NO_EXACT_UNDERFLOW
321debfc3dSmrg #include "soft-fp.h"
331debfc3dSmrg #include "single.h"
341debfc3dSmrg #include "double.h"
351debfc3dSmrg
361debfc3dSmrg DFtype
__extendsfdf2(SFtype a)371debfc3dSmrg __extendsfdf2 (SFtype a)
381debfc3dSmrg {
391debfc3dSmrg FP_DECL_EX;
401debfc3dSmrg FP_DECL_S (A);
411debfc3dSmrg FP_DECL_D (R);
421debfc3dSmrg DFtype r;
431debfc3dSmrg
441debfc3dSmrg FP_INIT_EXCEPTIONS;
451debfc3dSmrg FP_UNPACK_RAW_S (A, a);
461debfc3dSmrg #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
471debfc3dSmrg FP_EXTEND (D, S, 2, 1, R, A);
481debfc3dSmrg #else
491debfc3dSmrg FP_EXTEND (D, S, 1, 1, R, A);
501debfc3dSmrg #endif
511debfc3dSmrg FP_PACK_RAW_D (r, R);
521debfc3dSmrg FP_HANDLE_EXCEPTIONS;
531debfc3dSmrg
541debfc3dSmrg return r;
551debfc3dSmrg }
56