1184610Salfred/* Software floating-point emulation. 2184610Salfred Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b 3184610Salfred Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 4184610Salfred This file is part of the GNU C Library. 5184610Salfred Contributed by Richard Henderson (rth@cygnus.com) and 6184610Salfred Jakub Jelinek (jj@ultra.linux.cz). 7184610Salfred 8184610Salfred The GNU C Library is free software; you can redistribute it and/or 9184610Salfred modify it under the terms of the GNU Lesser General Public 10184610Salfred License as published by the Free Software Foundation; either 11184610Salfred version 2.1 of the License, or (at your option) any later version. 12184610Salfred 13184610Salfred In addition to the permissions in the GNU Lesser General Public 14184610Salfred License, the Free Software Foundation gives you unlimited 15184610Salfred permission to link the compiled version of this file into 16184610Salfred combinations with other programs, and to distribute those 17184610Salfred combinations without any restriction coming from the use of this 18184610Salfred file. (The Lesser General Public License restrictions do apply in 19184610Salfred other respects; for example, they cover modification of the file, 20184610Salfred and distribution when not linked into a combine executable.) 21184610Salfred 22184610Salfred The GNU C Library is distributed in the hope that it will be useful, 23184610Salfred but WITHOUT ANY WARRANTY; without even the implied warranty of 24184610Salfred MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25184610Salfred Lesser General Public License for more details. 26184610Salfred 27184610Salfred You should have received a copy of the GNU Lesser General Public 28184610Salfred License along with the GNU C Library; if not, write to the Free 29184610Salfred Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 30184610Salfred MA 02110-1301, USA. */ 31184610Salfred 32184610Salfred#include "soft-fp.h" 33184610Salfred#include "single.h" 34184610Salfred 35184610Salfredint __gesf2(SFtype a, SFtype b) 36184610Salfred{ 37184610Salfred FP_DECL_EX; 38184610Salfred FP_DECL_S(A); FP_DECL_S(B); 39184610Salfred int r; 40184610Salfred 41184610Salfred FP_UNPACK_RAW_S(A, a); 42184610Salfred FP_UNPACK_RAW_S(B, b); 43184610Salfred FP_CMP_S(r, A, B, -2); 44184610Salfred if (r == -2 && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B))) 45184610Salfred FP_SET_EXCEPTION(FP_EX_INVALID); 46184610Salfred FP_HANDLE_EXCEPTIONS; 47184610Salfred 48184610Salfred return r; 49184610Salfred} 50184610Salfred 51184610Salfredstrong_alias(__gesf2, __gtsf2); 52184610Salfred