floatunsitf.c revision 169689
168651Skris/* Software floating-point emulation.
268651Skris   Convert a 32bit unsigned integer to IEEE quad
368651Skris   Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
468651Skris   This file is part of the GNU C Library.
568651Skris   Contributed by Richard Henderson (rth@cygnus.com) and
668651Skris		  Jakub Jelinek (jj@ultra.linux.cz).
768651Skris
868651Skris   The GNU C Library is free software; you can redistribute it and/or
968651Skris   modify it under the terms of the GNU Lesser General Public
1068651Skris   License as published by the Free Software Foundation; either
1168651Skris   version 2.1 of the License, or (at your option) any later version.
1268651Skris
1368651Skris   In addition to the permissions in the GNU Lesser General Public
1468651Skris   License, the Free Software Foundation gives you unlimited
1568651Skris   permission to link the compiled version of this file into
1668651Skris   combinations with other programs, and to distribute those
1768651Skris   combinations without any restriction coming from the use of this
1868651Skris   file.  (The Lesser General Public License restrictions do apply in
1968651Skris   other respects; for example, they cover modification of the file,
2068651Skris   and distribution when not linked into a combine executable.)
2168651Skris
2255714Skris   The GNU C Library is distributed in the hope that it will be useful,
2368651Skris   but WITHOUT ANY WARRANTY; without even the implied warranty of
2468651Skris   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2568651Skris   Lesser General Public License for more details.
2668651Skris
2768651Skris   You should have received a copy of the GNU Lesser General Public
2868651Skris   License along with the GNU C Library; if not, write to the Free
2968651Skris   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
3068651Skris   MA 02110-1301, USA.  */
3168651Skris
3268651Skris#include "soft-fp.h"
3368651Skris#include "quad.h"
3468651Skris
3568651SkrisTFtype
3668651Skris__floatunsitf(USItype i)
3768651Skris{
3868651Skris  FP_DECL_EX;
3968651Skris  FP_DECL_Q(A);
4068651Skris  TFtype a;
4168651Skris
4268651Skris  FP_FROM_INT_Q(A, i, SI_BITS, USItype);
4368651Skris  FP_PACK_RAW_Q(a, A);
4468651Skris  FP_HANDLE_EXCEPTIONS;
4568651Skris
4668651Skris  return a;
4768651Skris}
4868651Skris