sparc64: Remove unwind information from signal return stubs [BZ#31244]
[glibc.git] / sysdeps / alpha / ots_cmpe.c
blobe9f5ae54b8b644b04a241d936574d737b1f3fb54
1 /* Software floating-point emulation: comparison.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
19 #include "local-soft-fp.h"
21 static long
22 internal_compare (long al, long ah, long bl, long bh)
24 FP_DECL_EX;
25 FP_DECL_Q(A); FP_DECL_Q(B);
26 long r;
28 AXP_UNPACK_RAW_Q(A, a);
29 AXP_UNPACK_RAW_Q(B, b);
30 FP_CMP_Q (r, A, B, 2, 2);
32 FP_HANDLE_EXCEPTIONS;
34 return r;
37 long
38 _OtsLssX (long al, long ah, long bl, long bh)
40 long r = internal_compare (al, ah, bl, bh);
41 if (r == 2)
42 return -1;
43 else
44 return r < 0;
47 long
48 _OtsLeqX (long al, long ah, long bl, long bh)
50 long r = internal_compare (al, ah, bl, bh);
51 if (r == 2)
52 return -1;
53 else
54 return r <= 0;
57 long
58 _OtsGtrX (long al, long ah, long bl, long bh)
60 long r = internal_compare (al, ah, bl, bh);
61 if (r == 2)
62 return -1;
63 else
64 return r > 0;
67 long
68 _OtsGeqX (long al, long ah, long bl, long bh)
70 long r = internal_compare (al, ah, bl, bh);
71 if (r == 2)
72 return -1;
73 else
74 return r >= 0;