]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/pa/quadlib.c
rs6000.c (output_cbranch): Output branches on separate lines instead of using ';...
[thirdparty/gcc.git] / gcc / config / pa / quadlib.c
CommitLineData
a7a1d270
JL
1/* Subroutines for long double support.
2 Copyright (C) 2000 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
f7af368f
JL
11In addition to the permissions in the GNU General Public License, the
12Free Software Foundation gives you unlimited permission to link the
13compiled version of this file into combinations with other programs,
14and to distribute those combinations without any restriction coming
15from the use of this file. (The General Public License restrictions
16do apply in other respects; for example, they cover modification of
17the file, and distribution when not linked into a combine
18executable.)
19
a7a1d270
JL
20GNU CC is distributed in the hope that it will be useful,
21but WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23GNU General Public License for more details.
24
25You should have received a copy of the GNU General Public License
26along with GNU CC; see the file COPYING. If not, write to
27the Free Software Foundation, 59 Temple Place - Suite 330,
28Boston, MA 02111-1307, USA. */
29
30int _U_Qfcmp (long double a, long double b, int);
31long _U_Qfcnvfxt_quad_to_sgl (long double);
32
33int
34_U_Qfeq (long double a, long double b)
35{
36 return (_U_Qfcmp (a, b, 4) != 0);
37}
38
39int
40_U_Qfne (long double a, long double b)
41{
42 return (_U_Qfcmp (a, b, 4) == 0);
43}
44
45int
46_U_Qfgt (long double a, long double b)
47{
48 return (_U_Qfcmp (a, b, 17) != 0);
49}
50
51int
52_U_Qfge (long double a, long double b)
53{
54 return (_U_Qfcmp (a, b, 21) != 0);
55}
56
57int
58_U_Qflt (long double a, long double b)
59{
60 return (_U_Qfcmp (a, b, 9) != 0);
61}
62
63int
64_U_Qfle (long double a, long double b)
65{
66 return (_U_Qfcmp (a, b, 13) != 0);
67}
68
69int
70_U_Qfcomp (long double a, long double b)
71{
72 if (_U_Qfcmp (a, b, 4) == 0)
73 return 0;
74
75 return (_U_Qfcmp (a, b, 22) != 0 ? 1 : -1);
76}
77
78
79long double
80_U_Qfneg (long double a)
81{
82 return (0.0L - a);
83}
84
85#ifdef __LP64__
86/* This routine is only necessary for the PA64 port; for reasons unknown
87 _U_Qfcnvfxt_quad_to_sgl returns the integer in the high 32bits of the
88 return value. Ugh. */
89int
90__U_Qfcnvfxt_quad_to_sgl (long double a)
91{
92 return _U_Qfcnvfxt_quad_to_sgl (a) >> 32;
93}
94#endif