00001 /* Software floating-point emulation. 00002 Return a converted to IEEE double 00003 Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 00004 This file is part of the GNU C Library. 00005 Contributed by Richard Henderson (rth@cygnus.com) and 00006 Jakub Jelinek (jj@ultra.linux.cz). 00007 00008 The GNU C Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 In addition to the permissions in the GNU Lesser General Public 00014 License, the Free Software Foundation gives you unlimited 00015 permission to link the compiled version of this file into 00016 combinations with other programs, and to distribute those 00017 combinations without any restriction coming from the use of this 00018 file. (The Lesser General Public License restrictions do apply in 00019 other respects; for example, they cover modification of the file, 00020 and distribution when not linked into a combine executable.) 00021 00022 The GNU C Library is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00025 Lesser General Public License for more details. 00026 00027 You should have received a copy of the GNU Lesser General Public 00028 License along with the GNU C Library; if not, write to the Free 00029 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 00030 MA 02110-1301, USA. */ 00031 00032 #include "soft-fp.h" 00033 #include "single.h" 00034 #include "double.h" 00035 00036 DFtype __extendsfdf2(SFtype a) 00037 { 00038 FP_DECL_EX; 00039 FP_DECL_S(A); 00040 FP_DECL_D(R); 00041 DFtype r; 00042 00043 FP_INIT_ROUNDMODE; 00044 FP_UNPACK_RAW_S(A, a); 00045 #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D 00046 FP_EXTEND(D,S,2,1,R,A); 00047 #else 00048 FP_EXTEND(D,S,1,1,R,A); 00049 #endif 00050 FP_PACK_RAW_D(r, R); 00051 FP_HANDLE_EXCEPTIONS; 00052 00053 return r; 00054 }
1.5.6