]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/i386/32/tf-signs.c
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / i386 / 32 / tf-signs.c
CommitLineData
a945c346 1/* Copyright (C) 2008-2024 Free Software Foundation, Inc.
ff473280
L
2
3This file is part of GCC.
4
5GCC is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free
748086b7 7Software Foundation; either version 3, or (at your option) any later
ff473280
L
8version.
9
ff473280
L
10GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11WARRANTY; without even the implied warranty of MERCHANTABILITY or
12FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13for more details.
14
748086b7
JJ
15Under Section 7 of GPL version 3, you are granted additional
16permissions described in the GCC Runtime Library Exception, version
173.1, as published by the Free Software Foundation.
18
19You should have received a copy of the GNU General Public License and
20a copy of the GCC Runtime Library Exception along with this program;
21see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22<http://www.gnu.org/licenses/>. */
ff473280
L
23
24union _FP_UNION_Q
25{
26 __float128 flt;
27 struct
28 {
29 unsigned long frac0 : 32;
30 unsigned long frac1 : 32;
31 unsigned long frac2 : 32;
32 unsigned long frac3 : 16;
33 unsigned exp : 15;
34 unsigned sign : 1;
35 } bits __attribute__((packed));
36};
37
c60535f9
BE
38__float128 __copysigntf3 (__float128, __float128);
39__float128 __fabstf2 (__float128);
40
ff473280
L
41__float128
42__copysigntf3 (__float128 a, __float128 b)
43{
44 union _FP_UNION_Q A, B;
45
46 A.flt = a;
47 B.flt = b;
48 A.bits.sign = B.bits.sign;
49
50 return A.flt;
51}
52
53__float128
54__fabstf2 (__float128 a)
55{
56 union _FP_UNION_Q A;
57
58 A.flt = a;
59 A.bits.sign = 0;
60
61 return A.flt;
62}