1*404b540aSrobert /* Subroutines for long double support.
2*404b540aSrobert Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3*404b540aSrobert
4*404b540aSrobert This file is part of GCC.
5*404b540aSrobert
6*404b540aSrobert GCC is free software; you can redistribute it and/or modify
7*404b540aSrobert it under the terms of the GNU General Public License as published by
8*404b540aSrobert the Free Software Foundation; either version 2, or (at your option)
9*404b540aSrobert any later version.
10*404b540aSrobert
11*404b540aSrobert In addition to the permissions in the GNU General Public License, the
12*404b540aSrobert Free Software Foundation gives you unlimited permission to link the
13*404b540aSrobert compiled version of this file into combinations with other programs,
14*404b540aSrobert and to distribute those combinations without any restriction coming
15*404b540aSrobert from the use of this file. (The General Public License restrictions
16*404b540aSrobert do apply in other respects; for example, they cover modification of
17*404b540aSrobert the file, and distribution when not linked into a combine
18*404b540aSrobert executable.)
19*404b540aSrobert
20*404b540aSrobert GCC is distributed in the hope that it will be useful,
21*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of
22*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23*404b540aSrobert GNU General Public License for more details.
24*404b540aSrobert
25*404b540aSrobert You should have received a copy of the GNU General Public License
26*404b540aSrobert along with GCC; see the file COPYING. If not, write to
27*404b540aSrobert the Free Software Foundation, 51 Franklin Street, Fifth Floor,
28*404b540aSrobert Boston, MA 02110-1301, USA. */
29*404b540aSrobert
30*404b540aSrobert extern int _U_Qfcmp (long double a, long double b, int);
31*404b540aSrobert
32*404b540aSrobert int _U_Qfeq (long double, long double);
33*404b540aSrobert int _U_Qfne (long double, long double);
34*404b540aSrobert int _U_Qfgt (long double, long double);
35*404b540aSrobert int _U_Qfge (long double, long double);
36*404b540aSrobert int _U_Qflt (long double, long double);
37*404b540aSrobert int _U_Qfle (long double, long double);
38*404b540aSrobert int _U_Qfcomp (long double, long double);
39*404b540aSrobert
40*404b540aSrobert int
_U_Qfeq(long double a,long double b)41*404b540aSrobert _U_Qfeq (long double a, long double b)
42*404b540aSrobert {
43*404b540aSrobert return (_U_Qfcmp (a, b, 4) != 0);
44*404b540aSrobert }
45*404b540aSrobert
46*404b540aSrobert int
_U_Qfne(long double a,long double b)47*404b540aSrobert _U_Qfne (long double a, long double b)
48*404b540aSrobert {
49*404b540aSrobert return (_U_Qfcmp (a, b, 4) == 0);
50*404b540aSrobert }
51*404b540aSrobert
52*404b540aSrobert int
_U_Qfgt(long double a,long double b)53*404b540aSrobert _U_Qfgt (long double a, long double b)
54*404b540aSrobert {
55*404b540aSrobert return (_U_Qfcmp (a, b, 17) != 0);
56*404b540aSrobert }
57*404b540aSrobert
58*404b540aSrobert int
_U_Qfge(long double a,long double b)59*404b540aSrobert _U_Qfge (long double a, long double b)
60*404b540aSrobert {
61*404b540aSrobert return (_U_Qfcmp (a, b, 21) != 0);
62*404b540aSrobert }
63*404b540aSrobert
64*404b540aSrobert int
_U_Qflt(long double a,long double b)65*404b540aSrobert _U_Qflt (long double a, long double b)
66*404b540aSrobert {
67*404b540aSrobert return (_U_Qfcmp (a, b, 9) != 0);
68*404b540aSrobert }
69*404b540aSrobert
70*404b540aSrobert int
_U_Qfle(long double a,long double b)71*404b540aSrobert _U_Qfle (long double a, long double b)
72*404b540aSrobert {
73*404b540aSrobert return (_U_Qfcmp (a, b, 13) != 0);
74*404b540aSrobert }
75*404b540aSrobert
76*404b540aSrobert int
_U_Qfcomp(long double a,long double b)77*404b540aSrobert _U_Qfcomp (long double a, long double b)
78*404b540aSrobert {
79*404b540aSrobert if (_U_Qfcmp (a, b, 4) == 0)
80*404b540aSrobert return 0;
81*404b540aSrobert
82*404b540aSrobert return (_U_Qfcmp (a, b, 22) != 0 ? 1 : -1);
83*404b540aSrobert }
84