xref: /netbsd-src/external/gpl3/gcc.old/dist/libgcc/config/pru/led.c (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1*4c3eb207Smrg /* Software floating-point emulation.
2*4c3eb207Smrg    Return 1 iff a <= b, 0 otherwise.
3*4c3eb207Smrg    Copyright (C) 1997-2020 Free Software Foundation, Inc.
4*4c3eb207Smrg    Contributed by Richard Henderson (rth@cygnus.com) and
5*4c3eb207Smrg 		  Jakub Jelinek (jj@ultra.linux.cz).
6*4c3eb207Smrg 
7*4c3eb207Smrg    This file is free software; you can redistribute it and/or
8*4c3eb207Smrg    modify it under the terms of the GNU Lesser General Public
9*4c3eb207Smrg    License as published by the Free Software Foundation; either
10*4c3eb207Smrg    version 2.1 of the License, or (at your option) any later version.
11*4c3eb207Smrg 
12*4c3eb207Smrg    In addition to the permissions in the GNU Lesser General Public
13*4c3eb207Smrg    License, the Free Software Foundation gives you unlimited
14*4c3eb207Smrg    permission to link the compiled version of this file into
15*4c3eb207Smrg    combinations with other programs, and to distribute those
16*4c3eb207Smrg    combinations without any restriction coming from the use of this
17*4c3eb207Smrg    file.  (The Lesser General Public License restrictions do apply in
18*4c3eb207Smrg    other respects; for example, they cover modification of the file,
19*4c3eb207Smrg    and distribution when not linked into a combine executable.)
20*4c3eb207Smrg 
21*4c3eb207Smrg    This file is distributed in the hope that it will be useful,
22*4c3eb207Smrg    but WITHOUT ANY WARRANTY; without even the implied warranty of
23*4c3eb207Smrg    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24*4c3eb207Smrg    Lesser General Public License for more details.
25*4c3eb207Smrg 
26*4c3eb207Smrg    You should have received a copy of the GNU Lesser General Public
27*4c3eb207Smrg    License along with GCC; see the file COPYING.LIB.  If not see
28*4c3eb207Smrg    <http://www.gnu.org/licenses/>.  */
29*4c3eb207Smrg 
30*4c3eb207Smrg #include <soft-fp/soft-fp.h>
31*4c3eb207Smrg #include <soft-fp/double.h>
32*4c3eb207Smrg 
__pruabi_led(DFtype a,DFtype b)33*4c3eb207Smrg CMPtype __pruabi_led(DFtype a, DFtype b)
34*4c3eb207Smrg {
35*4c3eb207Smrg   FP_DECL_EX;
36*4c3eb207Smrg   FP_DECL_D(A); FP_DECL_D(B);
37*4c3eb207Smrg   CMPtype r;
38*4c3eb207Smrg 
39*4c3eb207Smrg   FP_UNPACK_RAW_D(A, a);
40*4c3eb207Smrg   FP_UNPACK_RAW_D(B, b);
41*4c3eb207Smrg   FP_CMP_D(r, A, B, 2, 2);
42*4c3eb207Smrg   FP_HANDLE_EXCEPTIONS;
43*4c3eb207Smrg 
44*4c3eb207Smrg   return r <= 0;
45*4c3eb207Smrg }
46