1/* Return classification value corresponding to argument.
2   Copyright (C) 2000-2021 Free Software Foundation, Inc.
3   This file is part of the GNU C Library.
4
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.
9
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.
14
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/>.  */
18
19#include <sysdep.h>
20#undef ret
21
22ENTRY (__fpclassify)
23{
24.mfi
25	fclass.m p6, p7 = farg0, @nat | @qnan | @snan
26	;;
27}
28{
29.mfb
30(p6)	mov ret0 = 0
31(p7)	fclass.m p7, p8 = farg0, @inf
32(p6)	br.ret.sptk.many rp
33	;;
34}
35{
36.mfb
37(p7)	mov ret0 = 1
38(p8)	fclass.m p8, p6 = farg0, @zero
39(p7)	br.ret.sptk.many rp
40	;;
41}
42{
43.mfb
44(p8)	mov ret0 = 2
45(p6)	fclass.m p6, p7 = farg0, @unorm
46(p8)	br.ret.sptk.many rp
47	;;
48}
49{
50	.pred.rel.mutex p6, p7
51(p6)	mov ret0 = 3
52(p7)	mov ret0 = 4
53	br.ret.sptk.many rp
54}
55END (__fpclassify)
56
57strong_alias (__fpclassify, __fpclassifyf)
58strong_alias (__fpclassify, __fpclassifyl)
59libm_hidden_def (__fpclassify)
60libm_hidden_def (__fpclassifyf)
61libm_hidden_def (__fpclassifyl)
62