1/* Software floating-point emulation, convert a 128bit unsigned integer to IEEE
2   quad.
3
4   Copyright (C) 2016-2020 Free Software Foundation, Inc.
5   This file is part of the GNU C Library.
6   Contributed by Steven Munroe (munroesj@linux.vnet.ibm.com)
7   Code is based on the main soft-fp library written by:
8   	   Uros Bizjak (ubizjak@gmail.com).
9
10   The GNU C Library is free software; you can redistribute it and/or
11   modify it under the terms of the GNU Lesser General Public
12   License as published by the Free Software Foundation; either
13   version 2.1 of the License, or (at your option) any later version.
14
15   In addition to the permissions in the GNU Lesser General Public
16   License, the Free Software Foundation gives you unlimited
17   permission to link the compiled version of this file into
18   combinations with other programs, and to distribute those
19   combinations without any restriction coming from the use of this
20   file.  (The Lesser General Public License restrictions do apply in
21   other respects; for example, they cover modification of the file,
22   and distribution when not linked into a combine executable.)
23
24   The GNU C Library is distributed in the hope that it will be useful,
25   but WITHOUT ANY WARRANTY; without even the implied warranty of
26   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27   Lesser General Public License for more details.
28
29   You should have received a copy of the GNU Lesser General Public
30   License along with the GNU C Library; if not, see
31   <http://www.gnu.org/licenses/>.  */
32
33#ifdef _ARCH_PPC64
34#include "soft-fp.h"
35#include "quad-float128.h"
36
37TFtype
38__floatuntikf (UTItype i)
39{
40  FP_DECL_EX;
41  FP_DECL_Q (A);
42  TFtype a;
43
44  FP_INIT_ROUNDMODE;
45  FP_FROM_INT_Q (A, i, TI_BITS, UTItype);
46  FP_PACK_RAW_Q (a, A);
47  FP_HANDLE_EXCEPTIONS;
48
49  return a;
50}
51#endif
52