4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
34 movl
16(%rsp
),%eax
/ ax
<-- sign
and bexp of x
42 .L6: / here, (eax) = 0.0
44 xorl $
0x80000000,%ecx
/ handle unsupported implicitly
53 / TRUE iff
(x is finite
, but
54 / neither subnormal
nor zero
)
55 / iff
(msb
(sgnfcnd
(x
) /= 0
56 / & 0 < bexp
(x
) < 0x7fff)
57 movl
12(%rsp
),%eax
/ eax
<-- hi_32
(sgnfcnd
(x
))
58 andl $
-0x80000000,%eax
/ eax
[31] <-- msb
(sgnfcnd
(x
)),
60 jz
.L8 / jump iff msb(sgnfcnd(x)) = 0
61 movl
16(%rsp
),%eax
/ ax
<-- sign
and bexp of x
62 notl
%eax
/ ax
[0..14] <-- not(bexp(x))
63 andq $
0x7fff,%rax
/ eax
<-- zero_xtnd
(not(bexp
(x
)))
64 jz
.L8 / jump iff bexp(x) = 0x7fff or 0
65 xorq $
0x7fff,%rax
/ treat pseudo-denormal as subnormal
74 / TRUE iff
(bexp
(x
) = 0 &
75 / msb
(sgnfcnd
(x
)) = 0 & frac
(x
) /= 0)
76 movl
12(%rsp
),%eax
/ eax
<-- hi_32
(sgnfcnd
(x
))
77 testl $
0x80000000,%eax
/ eax
[31] = msb
(sgnfcnd
(x
));
79 jz .may_be_subnorm / jump iff msb(sgnfcnd(x)) = 0
84 testl $0x7fff,16(%rsp) / set ZF iff bexp(x) = 0
85 jnz .not_subnorm / jump iff bexp(x) /= 0
86 orl 8(%rsp),%eax / (eax) = 0 iff sgnfcnd(x) = 0
91 SET_SIZE(issubnormall)
94 movl 16(%rsp),%eax / ax <-- sign and bexp of x
95 andl $0x7fff,%eax / eax <-- zero_xtnd(bexp(x))
96 jz .may_be_zero / jump iff bexp(x) = 0
100 .may_be_zero: / here, (eax) = 0
101 orl 12(%rsp),%eax / is hi_32(sgnfcnd(x)) = 0?
102 jnz .not_zero / jump iff hi_32(sgnfcnd(x)) /= 0
103 orl 8(%rsp),%eax / is lo_32(sgnfcnd(x)) = 0?
104 jnz .not_zero / jump iff lo_32(sgnfcnd(x)) /= 0
111 movl 16(%rsp),%eax / eax[15] <-- sign_bit(x)
112 shrl $15,%eax / eax <-- zero_xtnd(sign_bit(x))