]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/ia64/tf-signs.c
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / ia64 / tf-signs.c
CommitLineData
a5544970 1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
c252db20
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
c252db20
L
8version.
9
c252db20
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/>. */
c252db20
L
23
24union _FP_UNION_Q
25{
26 __float128 flt;
27 struct
28 {
7d6aa9a6
UB
29 unsigned long frac0 : 64;
30 unsigned long frac1 : 48;
c252db20
L
31 unsigned exp : 15;
32 unsigned sign : 1;
33 } bits __attribute__((packed));
34};
35
ba181049
UB
36__float128 __copysigntf3 (__float128, __float128);
37__float128 __fabstf2 (__float128);
7d6aa9a6 38int __signbittf2 (__float128);
ba181049 39
c252db20
L
40__float128
41__copysigntf3 (__float128 a, __float128 b)
42{
43 union _FP_UNION_Q A, B;
44
45 A.flt = a;
46 B.flt = b;
47 A.bits.sign = B.bits.sign;
48
49 return A.flt;
50}
51
52__float128
53__fabstf2 (__float128 a)
54{
55 union _FP_UNION_Q A;
56
57 A.flt = a;
58 A.bits.sign = 0;
59
60 return A.flt;
61}
7d6aa9a6
UB
62
63int
64__signbittf2 (__float128 a)
65{
66 union _FP_UNION_Q A;
67
68 A.flt = a;
69
70 return A.bits.sign;
71}