gimplify: Handle void expression as asm input [PR100501, PR100792]
[gcc.git] / libgcc / config / rs6000 / float128-p10.c
blob547341d7480f3aa6b95e81e3145ff7ed4a9b5d5a
1 /* Automatic switching between software and hardware IEEE 128-bit
2 ISA 3.1 floating-point emulation for PowerPC.
4 Copyright (C) 2016-2024 Free Software Foundation, Inc.
5 This file is part of the GNU C Library.
6 Contributed by Carl Love (cel@us.ibm.com)
7 Code is based on the main soft-fp library written by:
8 Richard Henderson (rth@cygnus.com) and
9 Jakub Jelinek (jj@ultra.linux.cz).
11 The GNU C Library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
16 In addition to the permissions in the GNU Lesser General Public
17 License, the Free Software Foundation gives you unlimited
18 permission to link the compiled version of this file into
19 combinations with other programs, and to distribute those
20 combinations without any restriction coming from the use of this
21 file. (The Lesser General Public License restrictions do apply in
22 other respects; for example, they cover modification of the file,
23 and distribution when not linked into a combine executable.)
25 The GNU C Library is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 Lesser General Public License for more details.
30 You should have received a copy of the GNU Lesser General Public
31 License along with the GNU C Library; if not, see
32 <http://www.gnu.org/licenses/>. */
34 /* Note, the hardware conversion instructions for 128-bit integers are
35 supported for ISA 3.1 and later. Only compile this file with -mcpu=power10
36 or newer support. */
38 #include <soft-fp.h>
39 #include <quad-float128.h>
41 #ifndef __FLOAT128_HARDWARE__
42 #error "This module must be compiled with IEEE 128-bit hardware support"
43 #endif
45 #ifndef _ARCH_PWR10
46 #error "This module must be compiled for Power 10 support"
47 #endif
49 TFtype
50 __floattikf_hw (TItype_ppc a)
52 return (TFtype) a;
55 TFtype
56 __floatuntikf_hw (UTItype_ppc a)
58 return (TFtype) a;
61 TItype_ppc
62 __fixkfti_hw (TFtype a)
64 return (TItype_ppc) a;
67 UTItype_ppc
68 __fixunskfti_hw (TFtype a)
70 return (UTItype_ppc) a;