floatunsisf.c revision 169689
1230557Sjimharris/* Software floating-point emulation.
2230557Sjimharris   Convert a 32bit unsigned integer to IEEE single
3230557Sjimharris   Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
4230557Sjimharris   This file is part of the GNU C Library.
5230557Sjimharris   Contributed by Richard Henderson (rth@cygnus.com) and
6230557Sjimharris		  Jakub Jelinek (jj@ultra.linux.cz).
7230557Sjimharris
8230557Sjimharris   The GNU C Library is free software; you can redistribute it and/or
9230557Sjimharris   modify it under the terms of the GNU Lesser General Public
10230557Sjimharris   License as published by the Free Software Foundation; either
11230557Sjimharris   version 2.1 of the License, or (at your option) any later version.
12230557Sjimharris
13230557Sjimharris   In addition to the permissions in the GNU Lesser General Public
14230557Sjimharris   License, the Free Software Foundation gives you unlimited
15230557Sjimharris   permission to link the compiled version of this file into
16230557Sjimharris   combinations with other programs, and to distribute those
17230557Sjimharris   combinations without any restriction coming from the use of this
18230557Sjimharris   file.  (The Lesser General Public License restrictions do apply in
19230557Sjimharris   other respects; for example, they cover modification of the file,
20230557Sjimharris   and distribution when not linked into a combine executable.)
21230557Sjimharris
22230557Sjimharris   The GNU C Library is distributed in the hope that it will be useful,
23230557Sjimharris   but WITHOUT ANY WARRANTY; without even the implied warranty of
24230557Sjimharris   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25230557Sjimharris   Lesser General Public License for more details.
26230557Sjimharris
27230557Sjimharris   You should have received a copy of the GNU Lesser General Public
28230557Sjimharris   License along with the GNU C Library; if not, write to the Free
29230557Sjimharris   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
30230557Sjimharris   MA 02110-1301, USA.  */
31230557Sjimharris
32230557Sjimharris#include "soft-fp.h"
33230557Sjimharris#include "single.h"
34230557Sjimharris
35230557Sjimharrisfloat
36230557Sjimharris__floatunsisf(USItype i)
37230557Sjimharris{
38230557Sjimharris  FP_DECL_EX;
39230557Sjimharris  FP_DECL_S(A);
40230557Sjimharris  SFtype a;
41230557Sjimharris
42230557Sjimharris  FP_FROM_INT_S(A, i, SI_BITS, USItype);
43230557Sjimharris  FP_PACK_RAW_S(a, A);
44230557Sjimharris  FP_HANDLE_EXCEPTIONS;
45230557Sjimharris
46230557Sjimharris  return a;
47230557Sjimharris}
48230557Sjimharris