eqsf2.c revision 169689
1169689Skan/* Software floating-point emulation. 2169689Skan Return 0 iff a == b, 1 otherwise 3169689Skan Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 4169689Skan This file is part of the GNU C Library. 5169689Skan Contributed by Richard Henderson (rth@cygnus.com) and 6169689Skan Jakub Jelinek (jj@ultra.linux.cz). 7169689Skan 8169689Skan The GNU C Library is free software; you can redistribute it and/or 9169689Skan modify it under the terms of the GNU Lesser General Public 10169689Skan License as published by the Free Software Foundation; either 11169689Skan version 2.1 of the License, or (at your option) any later version. 12169689Skan 13169689Skan In addition to the permissions in the GNU Lesser General Public 14169689Skan License, the Free Software Foundation gives you unlimited 15169689Skan permission to link the compiled version of this file into 16169689Skan combinations with other programs, and to distribute those 17169689Skan combinations without any restriction coming from the use of this 18169689Skan file. (The Lesser General Public License restrictions do apply in 19169689Skan other respects; for example, they cover modification of the file, 20169689Skan and distribution when not linked into a combine executable.) 21169689Skan 22169689Skan The GNU C Library is distributed in the hope that it will be useful, 23169689Skan but WITHOUT ANY WARRANTY; without even the implied warranty of 24169689Skan MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25169689Skan Lesser General Public License for more details. 26169689Skan 27169689Skan You should have received a copy of the GNU Lesser General Public 28169689Skan License along with the GNU C Library; if not, write to the Free 29169689Skan Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 30169689Skan MA 02110-1301, USA. */ 31169689Skan 32169689Skan#include "soft-fp.h" 33169689Skan#include "single.h" 34169689Skan 35169689Skanint __eqsf2(SFtype a, SFtype b) 36169689Skan{ 37169689Skan FP_DECL_EX; 38169689Skan FP_DECL_S(A); FP_DECL_S(B); 39169689Skan int r; 40169689Skan 41169689Skan FP_UNPACK_RAW_S(A, a); 42169689Skan FP_UNPACK_RAW_S(B, b); 43169689Skan FP_CMP_EQ_S(r, A, B); 44169689Skan if (r && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B))) 45169689Skan FP_SET_EXCEPTION(FP_EX_INVALID); 46169689Skan FP_HANDLE_EXCEPTIONS; 47169689Skan 48169689Skan return r; 49169689Skan} 50169689Skan 51169689Skanstrong_alias(__eqsf2, __nesf2); 52