floatunsidf.c revision 169689
1295011Sandrew/* Software floating-point emulation. 2295011Sandrew Convert a 32bit unsigned integer to IEEE double 3295011Sandrew Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. 4295011Sandrew This file is part of the GNU C Library. 5295011Sandrew Contributed by Richard Henderson (rth@cygnus.com) and 6295011Sandrew Jakub Jelinek (jj@ultra.linux.cz). 7295011Sandrew 8295011Sandrew The GNU C Library is free software; you can redistribute it and/or 9295011Sandrew modify it under the terms of the GNU Lesser General Public 10295011Sandrew License as published by the Free Software Foundation; either 11295011Sandrew version 2.1 of the License, or (at your option) any later version. 12295011Sandrew 13295011Sandrew In addition to the permissions in the GNU Lesser General Public 14295011Sandrew License, the Free Software Foundation gives you unlimited 15295011Sandrew permission to link the compiled version of this file into 16295011Sandrew combinations with other programs, and to distribute those 17295011Sandrew combinations without any restriction coming from the use of this 18295011Sandrew file. (The Lesser General Public License restrictions do apply in 19295011Sandrew other respects; for example, they cover modification of the file, 20295011Sandrew and distribution when not linked into a combine executable.) 21295011Sandrew 22295011Sandrew The GNU C Library is distributed in the hope that it will be useful, 23295011Sandrew but WITHOUT ANY WARRANTY; without even the implied warranty of 24295011Sandrew MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25295011Sandrew Lesser General Public License for more details. 26295011Sandrew 27295011Sandrew You should have received a copy of the GNU Lesser General Public 28295011Sandrew License along with the GNU C Library; if not, write to the Free 29295011Sandrew Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 30295011Sandrew MA 02110-1301, USA. */ 31295011Sandrew 32295011Sandrew#include "soft-fp.h" 33295011Sandrew#include "double.h" 34295011Sandrew 35295011Sandrewdouble 36295011Sandrew__floatunsidf(USItype i) 37295011Sandrew{ 38295011Sandrew FP_DECL_EX; 39295011Sandrew FP_DECL_D(A); 40295011Sandrew DFtype a; 41295011Sandrew 42295011Sandrew FP_FROM_INT_D(A, i, SI_BITS, USItype); 43295011Sandrew FP_PACK_RAW_D(a, A); 44295011Sandrew FP_HANDLE_EXCEPTIONS; 45295011Sandrew 46295011Sandrew return a; 47295011Sandrew} 48295011Sandrew