gimplify: Handle void expression as asm input [PR100501, PR100792]
[gcc.git] / libgcc / config / rs6000 / trunctfkf2-sw.c
blobeb9f8eddda41684e5e699c7ced8d8fd6983df8da
1 /* Software IEEE 128-bit floating-point emulation for PowerPC.
3 Copyright (C) 2016-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5 Contributed by Michael Meissner (meissner@linux.vnet.ibm.com)
6 Code is based on the main soft-fp library written by:
7 Richard Henderson (rth@cygnus.com) and
8 Jakub Jelinek (jj@ultra.linux.cz).
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 /* Convert IBM long double to IEEE 128-bit floating point. */
35 #ifdef __FLOAT128_HARDWARE__
36 #error "This module must not be compiled with IEEE 128-bit hardware support"
37 #endif
39 #include "soft-fp.h"
40 #include "quad-float128.h"
42 #ifndef FLOAT128_HW_INSNS
43 #define __trunctfkf2_sw __trunctfkf2
44 #endif
46 TFtype
47 __trunctfkf2_sw (IBM128_TYPE value)
49 TFtype ret;
51 CVT_IBM128_TO_FLOAT128 (ret, value);
52 return ret;