25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER START
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Common Development and Distribution License (the "License").
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You may not use this file except in compliance with the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * See the License for the specific language governing permissions
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * and limitations under the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER END
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Use is subject to license terms.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis andl $0x7fffffff,%ecx / ecx <-- hi_32(|x|)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis je .check_tail / |x| may be only slightly < ln(2)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis cmpl $0x7ff00000,%ecx / hi_32(|x|) >= hi_32(INF)?
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis cmpl $0x00000000,%edx / Is |x| slightly > 1?
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis ja .finite_non_special / branch if |x| slightly > 1
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fldl 4(%esp) / push x
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis f2xm1 / 2**x - 1
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fld1 / 1,2**x - 1
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddp %st,%st(1) / 2**x
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis cmpl $0x7ff00000,%ecx / hi_32(|x|) > hi_32(INF)?
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis ja .NaN_or_pinf / if so, x is NaN
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis movl 4(%esp),%edx / edx <-- lo_32(x)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis cmpl $0,%edx / lo_32(x) = 0?
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis jne .NaN_or_pinf / if not, x is NaN
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis movl 8(%esp),%eax / eax <-- hi_32(x)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis andl $0x80000000,%eax / here, x is infinite, but +/-?
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis jz .NaN_or_pinf / branch if x = +INF
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fldz / Here, x = -inf, so return 0
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis / Here, x = NaN or +inf, so load x and return immediately.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis SET_SIZE(exp2)