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 .word 0xffff8000,0x00000000 ! N.B.: low-order words used
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis .word 0x3fc90000,0x80000000 ! for sign bit hacking; see
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis .word 0x3fc40000,0x00000000 ! references to "thresh" below
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! sizeof temp storage - must be a multiple of 16 for V9
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis!--------------------------------------------------------------------
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! define __vlibm_TBL_sincos_hi & lo for easy reading
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! when in pri range, using value as transition from poly to table.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! for Medium range,change use of %l6 and use to keep track of biguns.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis!--------------------------------------------------------------------
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis wr %g0,0x82,%asi ! set %asi for non-faulting loads
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! the following are 64-bit registers in both V8+ and V9
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis sethi %hi(0x80000000),MSK_SIGN ! load/set up constants
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands P0_f0,MSK_BIT31,P0_f9 ! save signbit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bl,pn %icc,.range0 ! if hx < 0x3e400000 or > 0x3fe921fb
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fmuld C_ONE,C_ONE,C_ONE ! one*one; a nop for alignment only
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands P1_f10,MSK_BIT31,P1_f19 ! save signbit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bl,pn %icc,.range1 ! if hx < 0x3e400000 or > 0x3fe921fb
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fmuld C_ONE,C_ONE,C_ONE ! one*one; a nop for alignment only
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands P2_f20,MSK_BIT31,P2_f29 ! save signbit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bl,pn %icc,.range2 ! if hx < 0x3e400000 or > 0x3fe921fb
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P2_f24,P2_f26 !!(vsin)faddd P2_f20,P2_f24,P2_f26
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P1_f14,P1_f16 !!(vsin)faddd P1_f10,P1_f14,P1_f16
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P1_f14,P1_f16 !!(vsin)faddd P1_f10,P1_f14,P1_f16
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P2_f24,P2_f26 !!(vsin)faddd P2_f20,P2_f24,P2_f26
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P0_f4,P0_f6 !!(vsin)faddd P0_f6,P0_f4,P0_f6 ! faddd then spaces for processing
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P0_f4,P0_f6 !!(vsin)faddd P0_f6,P0_f4,P0_f6 ! faddd then spaces for processing
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P2_f24,P2_f26 !!(vsin)faddd P2_f20,P2_f24,P2_f26
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P0_f4,P0_f6 !!(vsin)faddd P0_f6,P0_f4,P0_f6 ! faddd then spaces for processing
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P1_f14,P1_f16 !!(vsin)faddd P1_f10,P1_f14,P1_f16
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P0_f4,P0_f6 !!(vsin)faddd P0_f6,P0_f4,P0_f6 ! faddd then spaces for processing
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P1_f14,P1_f16 !!(vsin)faddd P1_f10,P1_f14,P1_f16
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P2_f24,P2_f26 !!(vsin)faddd P2_f20,P2_f24,P2_f26
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P1_f14,P2_f20 !!(vsin)faddd P1_f10,P1_f14,P2_f20
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis faddd C_ONE,P0_f4,P2_f20 !!(vsin)faddd P0_f0,P0_f4,P2_f20
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! return. finished off with only primary range arguments
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bg,a,pt %icc,.MEDIUM ! branch to Medium range on big arg.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fdtoi P0_f0,P0_f2; fmovd C_ONE,P0_f0 ; st P0_f0,[%o0] ! *y = *x with inexact if x nonzero
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bg,a,pt %icc,.MEDIUM ! branch to Medium range on big arg.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fdtoi P1_f10,P1_f12; fmovd C_ONE,P1_f10 ; st P1_f10,[%o1] ! *y = *x with inexact if x nonzero
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis bg,a,pt %icc,.MEDIUM ! brance to Medium range on big arg.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fdtoi P2_f20,P2_f22; fmovd C_ONE,P2_f20 ; st P2_f20,[%o2] ! *y = *x with inexact if x nonzero
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! l6 biguns stored here : still called LIM_l6
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! the following are 64-bit registers in both V8+ and V9
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! branched here in the middle of the array. Need to adjust
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! for the members of the triple that were selected in the primary
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! no adjustment since all three selected here
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! ajust 1st triple since 2d and 3d done here
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! ajust 1st and 2d triple since 3d done here
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis sub %i3,%i4,%i3 ! adjust to not double increment
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fabsd %f54,%f54 ! a nop for alignment only
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f9,%f8,%f9 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f19,%f18,%f19 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f29,%f28,%f29 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f29,%f28,%f29 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f19,%f18,%f19 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis fands %f9,%f8,%f9 ! if (n & 1) clear sign bit
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis! ========== huge range (use C code) ==========