[PR C++/83287] Mark lookup for keeping
[official-gcc.git] / libgcc / config / rs6000 / floattikf.c
blobb9c93412de1fe8ab70e7a103655a0c165416f1af
1 /* Software floating-point emulation, convert a 128bit signed integer to IEEE
2 quad.
4 Copyright (C) 2016-2017 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).
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.
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.)
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.
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/>. */
33 #ifdef _ARCH_PPC64
34 #include "soft-fp.h"
35 #include "quad-float128.h"
37 TFtype
38 __floattikf (TItype i)
40 FP_DECL_EX;
41 FP_DECL_Q (A);
42 TFtype a;
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;
49 return a;
51 #endif