From 5d4f0e6a26b66f1dab8d20a65af4469c6dd7370d Mon Sep 17 00:00:00 2001 From: Jingwei Zhang Date: Fri, 31 Oct 2014 18:29:18 +0800 Subject: Add the optimized implementation of 18 math functions for x86 and x86_64 respectively Change-Id: I31bf601448a9427f825517f3a0ff24de47f49bfa Signed-off-by: Jingwei Zhang Signed-off-by: Mingwei Shi --- libm/Android.mk | 111 +- libm/x86/e_acos.S | 1930 +++++++++++++++++++ libm/x86/e_asin.S | 2004 ++++++++++++++++++++ libm/x86/e_atan2.S | 1222 ++++++++++++ libm/x86/e_cosh.S | 1350 +++++++++++++ libm/x86/e_exp.S | 577 ++++++ libm/x86/e_hypot.S | 221 +++ libm/x86/e_log.S | 781 ++++++++ libm/x86/e_log10.S | 796 ++++++++ libm/x86/e_pow.S | 4277 +++++++++++++++++++++++++++++++++++++++++ libm/x86/e_sinh.S | 1408 ++++++++++++++ libm/x86/libm_reduce_pi04l.S | 3718 ++++++++++++++++++++++++++++++++++++ libm/x86/libm_sincos_huge.S | 668 +++++++ libm/x86/libm_tancot_huge.S | 750 ++++++++ libm/x86/s_atan.S | 935 +++++++++ libm/x86/s_cbrt.S | 739 ++++++++ libm/x86/s_cos.S | 893 +++++++++ libm/x86/s_expm1.S | 703 +++++++ libm/x86/s_log1p.S | 828 ++++++++ libm/x86/s_sin.S | 908 +++++++++ libm/x86/s_tan.S | 1767 +++++++++++++++++ libm/x86/s_tanh.S | 1362 ++++++++++++++ libm/x86_64/e_acos.S | 1957 +++++++++++++++++++ libm/x86_64/e_asin.S | 2036 ++++++++++++++++++++ libm/x86_64/e_atan2.S | 1242 ++++++++++++ libm/x86_64/e_cosh.S | 1372 ++++++++++++++ libm/x86_64/e_exp.S | 636 +++++++ libm/x86_64/e_hypot.S | 210 +++ libm/x86_64/e_log.S | 779 ++++++++ libm/x86_64/e_log10.S | 807 ++++++++ libm/x86_64/e_pow.S | 4282 ++++++++++++++++++++++++++++++++++++++++++ libm/x86_64/e_sinh.S | 1430 ++++++++++++++ libm/x86_64/s_atan.S | 927 +++++++++ libm/x86_64/s_cbrt.S | 754 ++++++++ libm/x86_64/s_cos.S | 1275 +++++++++++++ libm/x86_64/s_expm1.S | 727 +++++++ libm/x86_64/s_log1p.S | 829 ++++++++ libm/x86_64/s_sin.S | 1300 +++++++++++++ libm/x86_64/s_tan.S | 2239 ++++++++++++++++++++++ libm/x86_64/s_tanh.S | 1392 ++++++++++++++ 40 files changed, 52124 insertions(+), 18 deletions(-) create mode 100644 libm/x86/e_acos.S create mode 100644 libm/x86/e_asin.S create mode 100644 libm/x86/e_atan2.S create mode 100644 libm/x86/e_cosh.S create mode 100644 libm/x86/e_exp.S create mode 100644 libm/x86/e_hypot.S create mode 100644 libm/x86/e_log.S create mode 100644 libm/x86/e_log10.S create mode 100644 libm/x86/e_pow.S create mode 100644 libm/x86/e_sinh.S create mode 100644 libm/x86/libm_reduce_pi04l.S create mode 100644 libm/x86/libm_sincos_huge.S create mode 100644 libm/x86/libm_tancot_huge.S create mode 100644 libm/x86/s_atan.S create mode 100644 libm/x86/s_cbrt.S create mode 100644 libm/x86/s_cos.S create mode 100644 libm/x86/s_expm1.S create mode 100644 libm/x86/s_log1p.S create mode 100644 libm/x86/s_sin.S create mode 100644 libm/x86/s_tan.S create mode 100644 libm/x86/s_tanh.S create mode 100644 libm/x86_64/e_acos.S create mode 100644 libm/x86_64/e_asin.S create mode 100644 libm/x86_64/e_atan2.S create mode 100644 libm/x86_64/e_cosh.S create mode 100644 libm/x86_64/e_exp.S create mode 100644 libm/x86_64/e_hypot.S create mode 100644 libm/x86_64/e_log.S create mode 100644 libm/x86_64/e_log10.S create mode 100644 libm/x86_64/e_pow.S create mode 100644 libm/x86_64/e_sinh.S create mode 100644 libm/x86_64/s_atan.S create mode 100644 libm/x86_64/s_cbrt.S create mode 100644 libm/x86_64/s_cos.S create mode 100644 libm/x86_64/s_expm1.S create mode 100644 libm/x86_64/s_log1p.S create mode 100644 libm/x86_64/s_sin.S create mode 100644 libm/x86_64/s_tan.S create mode 100644 libm/x86_64/s_tanh.S (limited to 'libm') diff --git a/libm/Android.mk b/libm/Android.mk index 418ec59..565d3fd 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -21,19 +21,14 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \ upstream-freebsd/lib/msun/src/catrig.c \ upstream-freebsd/lib/msun/src/catrigf.c \ - upstream-freebsd/lib/msun/src/e_acos.c \ upstream-freebsd/lib/msun/src/e_acosf.c \ upstream-freebsd/lib/msun/src/e_acosh.c \ upstream-freebsd/lib/msun/src/e_acoshf.c \ - upstream-freebsd/lib/msun/src/e_asin.c \ upstream-freebsd/lib/msun/src/e_asinf.c \ - upstream-freebsd/lib/msun/src/e_atan2.c \ upstream-freebsd/lib/msun/src/e_atan2f.c \ upstream-freebsd/lib/msun/src/e_atanh.c \ upstream-freebsd/lib/msun/src/e_atanhf.c \ - upstream-freebsd/lib/msun/src/e_cosh.c \ upstream-freebsd/lib/msun/src/e_coshf.c \ - upstream-freebsd/lib/msun/src/e_exp.c \ upstream-freebsd/lib/msun/src/e_expf.c \ upstream-freebsd/lib/msun/src/e_fmod.c \ upstream-freebsd/lib/msun/src/e_fmodf.c \ @@ -41,7 +36,6 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_gammaf.c \ upstream-freebsd/lib/msun/src/e_gammaf_r.c \ upstream-freebsd/lib/msun/src/e_gamma_r.c \ - upstream-freebsd/lib/msun/src/e_hypot.c \ upstream-freebsd/lib/msun/src/e_hypotf.c \ upstream-freebsd/lib/msun/src/e_j0.c \ upstream-freebsd/lib/msun/src/e_j0f.c \ @@ -53,13 +47,10 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_lgammaf.c \ upstream-freebsd/lib/msun/src/e_lgammaf_r.c \ upstream-freebsd/lib/msun/src/e_lgamma_r.c \ - upstream-freebsd/lib/msun/src/e_log10.c \ upstream-freebsd/lib/msun/src/e_log10f.c \ upstream-freebsd/lib/msun/src/e_log2.c \ upstream-freebsd/lib/msun/src/e_log2f.c \ - upstream-freebsd/lib/msun/src/e_log.c \ upstream-freebsd/lib/msun/src/e_logf.c \ - upstream-freebsd/lib/msun/src/e_pow.c \ upstream-freebsd/lib/msun/src/e_powf.c \ upstream-freebsd/lib/msun/src/e_remainder.c \ upstream-freebsd/lib/msun/src/e_remainderf.c \ @@ -67,7 +58,6 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_rem_pio2f.c \ upstream-freebsd/lib/msun/src/e_scalb.c \ upstream-freebsd/lib/msun/src/e_scalbf.c \ - upstream-freebsd/lib/msun/src/e_sinh.c \ upstream-freebsd/lib/msun/src/e_sinhf.c \ upstream-freebsd/lib/msun/src/imprecise.c \ upstream-freebsd/lib/msun/src/k_cos.c \ @@ -81,12 +71,10 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/k_tanf.c \ upstream-freebsd/lib/msun/src/s_asinh.c \ upstream-freebsd/lib/msun/src/s_asinhf.c \ - upstream-freebsd/lib/msun/src/s_atan.c \ upstream-freebsd/lib/msun/src/s_atanf.c \ upstream-freebsd/lib/msun/src/s_carg.c \ upstream-freebsd/lib/msun/src/s_cargf.c \ upstream-freebsd/lib/msun/src/s_cargl.c \ - upstream-freebsd/lib/msun/src/s_cbrt.c \ upstream-freebsd/lib/msun/src/s_cbrtf.c \ upstream-freebsd/lib/msun/src/s_ccosh.c \ upstream-freebsd/lib/msun/src/s_ccoshf.c \ @@ -100,7 +88,6 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_conjl.c \ upstream-freebsd/lib/msun/src/s_copysign.c \ upstream-freebsd/lib/msun/src/s_copysignf.c \ - upstream-freebsd/lib/msun/src/s_cos.c \ upstream-freebsd/lib/msun/src/s_cosf.c \ upstream-freebsd/lib/msun/src/s_cproj.c \ upstream-freebsd/lib/msun/src/s_cprojf.c \ @@ -119,7 +106,6 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_erff.c \ upstream-freebsd/lib/msun/src/s_exp2.c \ upstream-freebsd/lib/msun/src/s_exp2f.c \ - upstream-freebsd/lib/msun/src/s_expm1.c \ upstream-freebsd/lib/msun/src/s_expm1f.c \ upstream-freebsd/lib/msun/src/s_fabs.c \ upstream-freebsd/lib/msun/src/s_fabsf.c \ @@ -136,7 +122,6 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_ilogbf.c \ upstream-freebsd/lib/msun/src/s_llround.c \ upstream-freebsd/lib/msun/src/s_llroundf.c \ - upstream-freebsd/lib/msun/src/s_log1p.c \ upstream-freebsd/lib/msun/src/s_log1pf.c \ upstream-freebsd/lib/msun/src/s_logb.c \ upstream-freebsd/lib/msun/src/s_logbf.c \ @@ -158,11 +143,8 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_signgam.c \ upstream-freebsd/lib/msun/src/s_significand.c \ upstream-freebsd/lib/msun/src/s_significandf.c \ - upstream-freebsd/lib/msun/src/s_sin.c \ upstream-freebsd/lib/msun/src/s_sinf.c \ - upstream-freebsd/lib/msun/src/s_tan.c \ upstream-freebsd/lib/msun/src/s_tanf.c \ - upstream-freebsd/lib/msun/src/s_tanh.c \ upstream-freebsd/lib/msun/src/s_tanhf.c \ upstream-freebsd/lib/msun/src/s_tgammaf.c \ upstream-freebsd/lib/msun/src/w_cabs.c \ @@ -252,17 +234,35 @@ LOCAL_SRC_FILES += \ # ----------------------------------------------------------------------------- LOCAL_SRC_FILES_arm += \ arm/fenv.c \ + upstream-freebsd/lib/msun/src/e_acos.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ + upstream-freebsd/lib/msun/src/e_log.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ upstream-freebsd/lib/msun/src/s_ceil.c \ upstream-freebsd/lib/msun/src/s_ceilf.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ upstream-freebsd/lib/msun/src/s_fma.c \ upstream-freebsd/lib/msun/src/s_fmaf.c \ upstream-freebsd/lib/msun/src/s_floorf.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ upstream-freebsd/lib/msun/src/s_llrint.c \ upstream-freebsd/lib/msun/src/s_llrintf.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ upstream-freebsd/lib/msun/src/s_lrint.c \ upstream-freebsd/lib/msun/src/s_lrintf.c \ upstream-freebsd/lib/msun/src/s_rint.c \ upstream-freebsd/lib/msun/src/s_rintf.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ upstream-freebsd/lib/msun/src/s_trunc.c \ upstream-freebsd/lib/msun/src/s_truncf.c \ @@ -300,26 +300,62 @@ LOCAL_SRC_FILES_arm64 += \ arm64/rint.S \ arm64/sqrt.S \ arm64/trunc.S \ + upstream-freebsd/lib/msun/src/e_acos.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ + upstream-freebsd/lib/msun/src/e_log.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ # ----------------------------------------------------------------------------- # mips # ----------------------------------------------------------------------------- libm_mips_arch_files := \ mips/fenv.c \ + upstream-freebsd/lib/msun/src/e_acos.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ + upstream-freebsd/lib/msun/src/e_log.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ upstream-freebsd/lib/msun/src/e_sqrt.c \ upstream-freebsd/lib/msun/src/e_sqrtf.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ upstream-freebsd/lib/msun/src/s_ceil.c \ upstream-freebsd/lib/msun/src/s_ceilf.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ upstream-freebsd/lib/msun/src/s_fma.c \ upstream-freebsd/lib/msun/src/s_fmaf.c \ upstream-freebsd/lib/msun/src/s_floor.c \ upstream-freebsd/lib/msun/src/s_floorf.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ upstream-freebsd/lib/msun/src/s_llrint.c \ upstream-freebsd/lib/msun/src/s_llrintf.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ upstream-freebsd/lib/msun/src/s_lrint.c \ upstream-freebsd/lib/msun/src/s_lrintf.c \ upstream-freebsd/lib/msun/src/s_rint.c \ upstream-freebsd/lib/msun/src/s_rintf.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ upstream-freebsd/lib/msun/src/s_trunc.c \ upstream-freebsd/lib/msun/src/s_truncf.c \ @@ -341,6 +377,27 @@ LOCAL_SRC_FILES_x86 += \ upstream-freebsd/lib/msun/src/s_rintf.c \ x86/sqrt.S \ x86/sqrtf.S \ + x86/e_acos.S \ + x86/e_asin.S \ + x86/e_atan2.S \ + x86/e_cosh.S \ + x86/e_exp.S \ + x86/e_hypot.S \ + x86/e_log10.S \ + x86/e_log.S \ + x86/e_pow.S \ + x86/e_sinh.S \ + x86/libm_reduce_pi04l.S \ + x86/libm_sincos_huge.S \ + x86/libm_tancot_huge.S \ + x86/s_atan.S \ + x86/s_cbrt.S \ + x86/s_cos.S \ + x86/s_expm1.S \ + x86/s_log1p.S \ + x86/s_sin.S \ + x86/s_tanh.S \ + x86/s_tan.S \ ifeq ($(ARCH_X86_HAVE_SSE4_1),true) LOCAL_SRC_FILES_x86 += \ @@ -377,6 +434,24 @@ LOCAL_SRC_FILES_x86_64 += \ upstream-freebsd/lib/msun/src/s_rintf.c \ x86_64/sqrt.S \ x86_64/sqrtf.S \ + x86_64/e_acos.S \ + x86_64/e_asin.S \ + x86_64/e_atan2.S \ + x86_64/e_cosh.S \ + x86_64/e_exp.S \ + x86_64/e_hypot.S \ + x86_64/e_log10.S \ + x86_64/e_log.S \ + x86_64/e_pow.S \ + x86_64/e_sinh.S \ + x86_64/s_atan.S \ + x86_64/s_cbrt.S \ + x86_64/s_cos.S \ + x86_64/s_expm1.S \ + x86_64/s_log1p.S \ + x86_64/s_sin.S \ + x86_64/s_tanh.S \ + x86_64/s_tan.S \ ifeq ($(ARCH_X86_HAVE_SSE4_1),true) LOCAL_SRC_FILES_x86_64 += \ diff --git a/libm/x86/e_acos.S b/libm/x86/e_acos.S new file mode 100644 index 0000000..a429481 --- /dev/null +++ b/libm/x86/e_acos.S @@ -0,0 +1,1930 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// To compute acos(s), separate schemes are used when s is in different +// intervals. +// +// |s| in [2^{-4}, sqrt(3)/2): +// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52 +// acos(s)=pi/2-asin(t)-asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2) +// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7) +// For the first degree term, r is evaluated as +// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t) +// (sqrt(1-t^2) read from table) +// The main source of error is still R (may still be affected by up to 3 ulps +// of rounding error). The table size must be sufficiently large, to minimize +// this effect. +// +// |s| in [sqrt(3)/2, 255/256): +// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded) +// acos(|s|)=asin(t)-asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2) +// acos(-|s|)=pi-acos(|s|) +// (The -PI constant, or 0, is added to the result. The sign is set at +// the end) +// asin(r) evaluated as a polynomial (same as above) +// The first degree term is evaluated as +// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2)) +// +// |s|<2^{-4}: acos(s)=pi/2-asin(s) +// evaluate asin(s) as 13-degree polynomial +// +// |s| in [255/256,1): acos(|s|)=2*asin(q), where q=sqrt((1-|s|)/2) +// asin(q) is evaluated as 13-degree polynomial +// q^2=(1-|s|)/2 is obtained in advance +// 2*q*eps ~ ((1-|s|)/2-q^2)/q used for first term +// acos(-|s|)=pi-acos(|s|) +// (The -PI constant, or 0, is added to the result. The sign is set at +// the end) +// +// Special cases: +// acos(NaN) = quiet NaN, and raise invalid exception +// acos(INF) = QNaN and raise invalid exception +// acos(x) = QNaN and raise invalid exception, for |x|>1.0 +// acos(1) = +0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin acos +ENTRY(acos) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 48(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + movsd 6048(%ebx), %xmm4 + movsd 6080(%ebx), %xmm3 + xorpd %xmm5, %xmm5 + movsd 6064(%ebx), %xmm2 + movapd %xmm0, %xmm1 + movsd %xmm0, 8(%esp) + psrlq $44, %xmm0 + movd %xmm0, %edx + movapd %xmm1, %xmm7 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movapd %xmm1, %xmm0 + movl $524287, %eax + andl %edx, %eax + subl $260864, %eax + cmpl $955, %eax + jae .L_2TAG_PACKET_0.0.2 + mulsd %xmm1, %xmm1 + andl $65535, %edx + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + andpd %xmm7, %xmm2 + andl $-4, %edx + subl $64256, %edx + movsd 3840(%ebx,%edx,2), %xmm1 + orpd %xmm5, %xmm2 + movapd (%ebx,%edx,4), %xmm4 + movapd %xmm7, %xmm6 + addsd %xmm2, %xmm7 + subsd %xmm2, %xmm0 + mulsd %xmm0, %xmm7 + mulsd %xmm1, %xmm6 + mulsd %xmm2, %xmm3 + movapd %xmm6, %xmm1 + addsd %xmm3, %xmm6 + divsd %xmm6, %xmm7 + movsd 5976(%ebx), %xmm0 + movsd 5960(%ebx), %xmm5 + subsd %xmm3, %xmm1 + psrlq $63, %xmm2 + movapd %xmm1, %xmm3 + psllq $63, %xmm2 + mulsd %xmm1, %xmm1 + pshufd $68, %xmm2, %xmm2 + movsd 5968(%ebx), %xmm6 + mulsd %xmm1, %xmm3 + mulsd %xmm1, %xmm0 + xorpd %xmm2, %xmm4 + mulsd %xmm3, %xmm5 + subpd 5888(%ebx), %xmm4 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulsd %xmm3, %xmm0 + subsd %xmm4, %xmm5 + pshufd $238, %xmm4, %xmm4 + addsd %xmm5, %xmm0 + subsd %xmm7, %xmm0 + subsd %xmm4, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + subl $955, %eax + cmpl $65, %eax + jae .L_2TAG_PACKET_2.0.2 + psrlq $38, %xmm7 + psllq $38, %xmm7 + pmovmskb %xmm0, %eax + andnpd %xmm0, %xmm4 + subsd %xmm7, %xmm1 + movapd %xmm7, %xmm6 + mulsd %xmm7, %xmm7 + addsd %xmm6, %xmm0 + orpd %xmm4, %xmm5 + subsd %xmm7, %xmm3 + mulsd %xmm1, %xmm0 + movapd %xmm3, %xmm4 + subsd %xmm0, %xmm3 + sqrtsd %xmm3, %xmm3 + andl $128, %eax + shrl $7, %eax + negl %eax + movapd %xmm3, %xmm7 + andpd %xmm3, %xmm2 + psllq $2, %xmm3 + pextrw $3, %xmm3, %edx + orpd %xmm5, %xmm2 + movd %eax, %xmm3 + pshufd $0, %xmm3, %xmm3 + subl $65216, %edx + addl %edx, %edx + mulsd 3840(%ebx,%edx,4), %xmm7 + mulsd %xmm2, %xmm6 + mulsd %xmm2, %xmm1 + mulsd %xmm2, %xmm2 + subsd %xmm7, %xmm6 + andpd 5904(%ebx), %xmm3 + addsd %xmm1, %xmm6 + subsd %xmm2, %xmm4 + addsd %xmm7, %xmm7 + movsd 5960(%ebx), %xmm5 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm7 + movsd 5976(%ebx), %xmm0 + divsd %xmm7, %xmm4 + movsd 5968(%ebx), %xmm2 + addpd (%ebx,%edx,8), %xmm3 + movapd %xmm6, %xmm1 + mulsd %xmm6, %xmm6 + mulsd %xmm6, %xmm0 + mulsd %xmm6, %xmm1 + mulsd %xmm1, %xmm5 + mulsd %xmm6, %xmm1 + addsd %xmm2, %xmm0 + pxor %xmm6, %xmm6 + mulsd %xmm1, %xmm0 + addsd %xmm3, %xmm5 + addsd %xmm5, %xmm0 + andl $32768, %eax + pinsrw $3, %eax, %xmm6 + movapd %xmm4, %xmm5 + pshufd $238, %xmm3, %xmm3 + addsd %xmm3, %xmm4 + subsd %xmm4, %xmm3 + addsd %xmm3, %xmm5 + addsd %xmm5, %xmm0 + addsd %xmm4, %xmm0 + xorpd %xmm6, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + addl $15291, %eax + cmpl $14336, %eax + jae .L_2TAG_PACKET_3.0.2 + unpcklpd %xmm0, %xmm0 + movapd 5984(%ebx), %xmm6 + unpcklpd %xmm0, %xmm1 + movapd 6000(%ebx), %xmm2 + movapd 6016(%ebx), %xmm4 + mulpd %xmm0, %xmm0 + movapd 5888(%ebx), %xmm5 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm6 + mulpd %xmm0, %xmm0 + movapd %xmm1, %xmm3 + mulsd %xmm1, %xmm1 + addpd %xmm2, %xmm6 + mulpd %xmm0, %xmm4 + mulsd %xmm3, %xmm1 + addpd %xmm4, %xmm6 + pshufd $238, %xmm5, %xmm0 + mulpd %xmm6, %xmm1 + pshufd $238, %xmm5, %xmm6 + subsd %xmm7, %xmm0 + pshufd $238, %xmm1, %xmm2 + subsd %xmm1, %xmm5 + subsd %xmm0, %xmm6 + subsd %xmm2, %xmm5 + subsd %xmm6, %xmm7 + subsd %xmm7, %xmm5 + addsd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_3.0.2: + subl $15356, %eax + cmpl $4, %eax + jae .L_2TAG_PACKET_4.0.2 + xorpd %xmm6, %xmm6 + andpd 6048(%ebx), %xmm7 + movsd 6096(%ebx), %xmm4 + movapd 5984(%ebx), %xmm1 + mulsd %xmm4, %xmm7 + movapd 6000(%ebx), %xmm2 + subsd %xmm7, %xmm4 + movapd 6016(%ebx), %xmm3 + pshufd $68, %xmm4, %xmm7 + sqrtsd %xmm4, %xmm4 + mulpd %xmm7, %xmm1 + pshufd $68, %xmm7, %xmm5 + pextrw $3, %xmm0, %eax + mulpd %xmm7, %xmm7 + addpd %xmm1, %xmm2 + movsd 5936(%ebx), %xmm1 + mulpd %xmm7, %xmm3 + cmpsd $1, %xmm6, %xmm0 + mulsd %xmm5, %xmm7 + addpd %xmm3, %xmm2 + pshufd $68, %xmm0, %xmm0 + mulsd %xmm7, %xmm2 + andpd 5904(%ebx), %xmm0 + mulpd %xmm5, %xmm2 + andpd %xmm4, %xmm1 + pshufd $68, %xmm4, %xmm3 + subsd %xmm1, %xmm4 + addsd %xmm3, %xmm3 + mulsd %xmm1, %xmm1 + subsd %xmm4, %xmm3 + subsd %xmm1, %xmm5 + mulsd %xmm3, %xmm4 + pshufd $238, %xmm3, %xmm3 + subsd %xmm4, %xmm5 + divsd %xmm3, %xmm5 + addpd %xmm3, %xmm3 + mulpd %xmm3, %xmm2 + pshufd $238, %xmm2, %xmm4 + addsd %xmm0, %xmm2 + andl $32768, %eax + pinsrw $3, %eax, %xmm6 + pshufd $238, %xmm0, %xmm0 + addsd %xmm4, %xmm2 + addsd %xmm5, %xmm2 + addsd %xmm3, %xmm2 + addsd %xmm2, %xmm0 + xorpd %xmm6, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_4.0.2: + addl $261884, %eax + cmpl $261888, %eax + jb .L_2TAG_PACKET_5.0.2 + movd %xmm7, %ecx + psrlq $32, %xmm7 + movd %xmm7, %edx + andl $2147483647, %edx + movl $1072693248, %eax + subl %edx, %eax + orl %ecx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_6.0.2 + movq 8(%esp), %xmm2 + movd %xmm2, %edx + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $2147483647, %ecx + subl $1, %edx + sbbl $2146435072, %ecx + cmpl $0, %ecx + jge .L_2TAG_PACKET_7.0.2 + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %edx + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_6.0.2: + pextrw $1, %xmm7, %edx + shrl $15, %edx + negl %edx + movd %edx, %xmm7 + pshufd $0, %xmm7, %xmm7 + movsd 5920(%ebx), %xmm2 + movsd 5928(%ebx), %xmm0 + andpd %xmm7, %xmm2 + andpd %xmm7, %xmm0 + addsd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_5.0.2: + movsd 5888(%ebx), %xmm2 + movsd 5896(%ebx), %xmm0 + addsd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm6, %xmm6 + addsd %xmm6, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) +.L_2TAG_PACKET_1.0.2: + movl 48(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(acos) +# -- End acos + +# Start file scope ASM +.weak acosl +.equ acosl, acos +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 3822952792 + .long 1021639372 + .long 182792448 + .long 1068507836 + .long 2264213271 + .long 1019558908 + .long 649052928 + .long 1068524253 + .long 1797139609 + .long 1022295143 + .long 1243095296 + .long 1068540671 + .long 1415938756 + .long 1021439537 + .long 2033294592 + .long 1068557090 + .long 2356809978 + .long 1021777916 + .long 3088063744 + .long 1068573510 + .long 2669055318 + .long 1022124482 + .long 180888576 + .long 1068589932 + .long 3566445325 + .long 1021358712 + .long 1970196992 + .long 1068606354 + .long 896980323 + .long 1021319659 + .long 4229555456 + .long 1068622777 + .long 436049712 + .long 1021319758 + .long 2732572160 + .long 1068639202 + .long 583123209 + .long 1020797960 + .long 1842831872 + .long 1068655628 + .long 1370449804 + .long 1021429270 + .long 1628994560 + .long 1068672055 + .long 2411391464 + .long 1021057980 + .long 2159763712 + .long 1068688483 + .long 1208692749 + .long 1021943903 + .long 3503886336 + .long 1068704912 + .long 538793309 + .long 1019744063 + .long 1435187200 + .long 1068721343 + .long 4085087612 + .long 1020608419 + .long 317469952 + .long 1068737775 + .long 144386942 + .long 1021440732 + .long 219617280 + .long 1068754208 + .long 2940088361 + .long 1019981122 + .long 1210558208 + .long 1068770642 + .long 2176850347 + .long 1018373705 + .long 3359268352 + .long 1068787077 + .long 2395611454 + .long 1021889042 + .long 2439803648 + .long 1068803514 + .long 1650705253 + .long 1020227966 + .long 2816203520 + .long 1068819952 + .long 3702166386 + .long 1019379914 + .long 262620672 + .long 1068836392 + .long 1855649370 + .long 1020453124 + .long 3438159616 + .long 1068852832 + .long 923063860 + .long 1019273834 + .long 3822105856 + .long 1068869274 + .long 4289947947 + .long 1019434249 + .long 1483729920 + .long 1068885718 + .long 787455814 + .long 1020738379 + .long 787321088 + .long 1068902163 + .long 3321653337 + .long 1021842569 + .long 1802253312 + .long 1068918609 + .long 2653633526 + .long 1021821525 + .long 302985984 + .long 1068935057 + .long 161272028 + .long 1021655149 + .long 653966080 + .long 1068951506 + .long 2566098667 + .long 1020066219 + .long 2924727296 + .long 1068967956 + .long 3646493722 + .long 1014292285 + .long 2889890304 + .long 1068984408 + .long 1081009196 + .long 1022189620 + .long 619098112 + .long 1069000862 + .long 4011643355 + .long 1021773297 + .long 477017600 + .long 1069017317 + .long 4030305534 + .long 1021292252 + .long 2533403904 + .long 1069033773 + .long 2645187591 + .long 1019527099 + .long 2563102208 + .long 1069050231 + .long 3857293792 + .long 1022311697 + .long 635982336 + .long 1069066691 + .long 3625936637 + .long 1017511744 + .long 1116940800 + .long 1069083152 + .long 3653872993 + .long 1022016631 + .long 4075964160 + .long 1069099614 + .long 2468900271 + .long 1021769532 + .long 993165568 + .long 1069116079 + .long 1358104224 + .long 1021199776 + .long 528586752 + .long 1069132545 + .long 2200950332 + .long 1022024872 + .long 2752395776 + .long 1069149012 + .long 3197072454 + .long 1017751319 + .long 3439855616 + .long 1069165481 + .long 1651081806 + .long 1020809338 + .long 2661257728 + .long 1069181952 + .long 539032752 + .long 1021728805 + .long 486957312 + .long 1069198425 + .long 3136045149 + .long 1016888671 + .long 1282340352 + .long 1069214899 + .long 2593963259 + .long 1018956103 + .long 822921728 + .long 1069231375 + .long 2146032737 + .long 1022306465 + .long 3474216192 + .long 1069247852 + .long 3976811625 + .long 1021350207 + .long 716902656 + .long 1069264332 + .long 718267222 + .long 1018624727 + .long 1211594496 + .long 1069280813 + .long 1485641389 + .long 1018447451 + .long 734070272 + .long 1069297296 + .long 354455128 + .long 1021341291 + .long 3650110720 + .long 1069313780 + .long 682185947 + .long 1021651853 + .long 1440663040 + .long 1069330267 + .long 3558574550 + .long 1021615110 + .long 2766612224 + .long 1069346755 + .long 874607978 + .long 1017746872 + .long 3404011008 + .long 1069363245 + .long 4154988502 + .long 1021439906 + .long 3423949056 + .long 1069379737 + .long 2263202309 + .long 1021479615 + .long 2897587712 + .long 1069396231 + .long 2562065031 + .long 1022090363 + .long 1896159232 + .long 1069412727 + .long 3836237663 + .long 1019867288 + .long 490968576 + .long 1069429225 + .long 3322056743 + .long 1006752762 + .long 3048360192 + .long 1069445724 + .long 1152314833 + .long 1013122252 + .long 1049850624 + .long 1069462226 + .long 3601590727 + .long 1022214610 + .long 3156899584 + .long 1069478729 + .long 1855169970 + .long 1019487271 + .long 851173376 + .long 1069495235 + .long 312649594 + .long 1020868604 + .long 2794281728 + .long 1069511742 + .long 1093490181 + .long 1020777577 + .long 468042496 + .long 1069528252 + .long 1152540679 + .long 1021403732 + .long 2534219264 + .long 1069544763 + .long 2292126035 + .long 1021872430 + .long 1376146432 + .long 1069558527 + .long 3293753641 + .long 1020500454 + .long 4175442432 + .long 1069575044 + .long 3626347564 + .long 1021610969 + .long 3523113472 + .long 1069591566 + .long 339956500 + .long 1021119039 + .long 4003350528 + .long 1069608092 + .long 3429333082 + .long 1022813542 + .long 1611067392 + .long 1069624623 + .long 2298017544 + .long 1021977587 + .long 931782144 + .long 1069641158 + .long 2164684743 + .long 1021250988 + .long 2256725504 + .long 1069657697 + .long 1138762335 + .long 1021443776 + .long 1582853120 + .long 1069674241 + .long 1084010382 + .long 1022994693 + .long 3497758720 + .long 1069690789 + .long 406366244 + .long 1022713586 + .long 3999816960 + .long 1069707342 + .long 1488723042 + .long 1023381290 + .long 3383096064 + .long 1069723900 + .long 2541558953 + .long 1019137887 + .long 1942403584 + .long 1069740463 + .long 1879620343 + .long 1022653642 + .long 4268263680 + .long 1069757030 + .long 3039077047 + .long 1022252545 + .long 2067062272 + .long 1069773603 + .long 4190670677 + .long 1020725863 + .long 4225828096 + .long 1069790180 + .long 1998567321 + .long 1022014385 + .long 2452507136 + .long 1069806763 + .long 1511628873 + .long 1021900300 + .long 1340746240 + .long 1069823351 + .long 788367341 + .long 1022726208 + .long 1190035456 + .long 1069839944 + .long 3856337230 + .long 1021834118 + .long 2300688384 + .long 1069856542 + .long 3211396579 + .long 1022621365 + .long 678886400 + .long 1069873146 + .long 4001011887 + .long 1022042646 + .long 921594112 + .long 1069889755 + .long 557811968 + .long 1023065533 + .long 3331668992 + .long 1069906369 + .long 1877060679 + .long 1022419742 + .long 3917875200 + .long 1069922989 + .long 1181055171 + .long 1022752712 + .long 2984829696 + .long 1069939615 + .long 4294526932 + .long 1021499988 + .long 838049024 + .long 1069956247 + .long 3658081878 + .long 1022957952 + .long 2078928384 + .long 1069972884 + .long 820353701 + .long 1019391107 + .long 2719854336 + .long 1069989527 + .long 1644022489 + .long 1023378240 + .long 3069117696 + .long 1070006176 + .long 2771393702 + .long 1019319954 + .long 3435962368 + .long 1070022831 + .long 3876394145 + .long 1023024433 + .long 4130595328 + .long 1070039492 + .long 1630447748 + .long 1021465882 + .long 1169236224 + .long 1070056160 + .long 2828355997 + .long 1020458120 + .long 3453997312 + .long 1070072833 + .long 164091641 + .long 1020388279 + .long 2708127744 + .long 1070089513 + .long 3036550223 + .long 1023328684 + .long 3540797696 + .long 1070106199 + .long 3710949463 + .long 1022568805 + .long 1972276736 + .long 1070122892 + .long 3885277950 + .long 1019761674 + .long 2613815552 + .long 1070139591 + .long 2764165077 + .long 1022921023 + .long 1487791616 + .long 1070156297 + .long 1330644769 + .long 1023162679 + .long 3207593472 + .long 1070173009 + .long 3911007221 + .long 1022993496 + .long 3797764608 + .long 1070189728 + .long 979712598 + .long 1022554580 + .long 3578920448 + .long 1070206454 + .long 2825738223 + .long 1020223708 + .long 2872795648 + .long 1070223187 + .long 392451124 + .long 1022666279 + .long 2002258432 + .long 1070239927 + .long 3730407632 + .long 1023148291 + .long 1291326464 + .long 1070256674 + .long 3723802980 + .long 1022514089 + .long 1065180928 + .long 1070273428 + .long 2635617463 + .long 1022654470 + .long 1650181632 + .long 1070290189 + .long 2061982883 + .long 1022853411 + .long 3373882880 + .long 1070306957 + .long 319732785 + .long 1022017175 + .long 2270081280 + .long 1070323733 + .long 2237757411 + .long 1023064087 + .long 2963732736 + .long 1070340516 + .long 468839165 + .long 1023293774 + .long 1491099904 + .long 1070357307 + .long 1502657946 + .long 1021533479 + .long 2479636480 + .long 1070374105 + .long 482913562 + .long 1021986286 + .long 1968133632 + .long 1070390911 + .long 3281474337 + .long 1022646400 + .long 291639040 + .long 1070407725 + .long 2453320259 + .long 1022812423 + .long 2081472512 + .long 1070424546 + .long 2939989570 + .long 1023091888 + .long 3380340480 + .long 1070441375 + .long 2850707499 + .long 1021921109 + .long 232287488 + .long 1070458213 + .long 3674625342 + .long 1020725130 + .long 1567614208 + .long 1070475058 + .long 9347334 + .long 1022024009 + .long 3433091072 + .long 1070491911 + .long 282524999 + .long 1021433523 + .long 1876877312 + .long 1070508773 + .long 3470449440 + .long 1019309721 + .long 1538472192 + .long 1070525643 + .long 2089486825 + .long 1019698916 + .long 2763830784 + .long 1070542521 + .long 443498115 + .long 1020505194 + .long 1605381632 + .long 1070559408 + .long 3018871601 + .long 1022869913 + .long 2706946048 + .long 1070576303 + .long 3936260892 + .long 1023175875 + .long 2123887360 + .long 1070593207 + .long 2994220655 + .long 1022825948 + .long 104015104 + .long 1070603108 + .long 335054493 + .long 1023441853 + .long 2904568832 + .long 1070615800 + .long 1451215633 + .long 1023853857 + .long 3456197120 + .long 1070632739 + .long 436334733 + .long 1024026432 + .long 252452352 + .long 1070649697 + .long 34596167 + .long 1024031396 + .long 3328018432 + .long 1070666672 + .long 2644547073 + .long 1024296758 + .long 1255829248 + .long 1070683667 + .long 552832586 + .long 1023763122 + .long 4097058560 + .long 1070700680 + .long 1955640623 + .long 1021394654 + .long 451770112 + .long 1070717714 + .long 3428903777 + .long 1022941142 + .long 408920832 + .long 1070734767 + .long 165503263 + .long 1023894958 + .long 1186960640 + .long 1070751840 + .long 435826450 + .long 1024026134 + .long 19078656 + .long 1070768934 + .long 1834169749 + .long 1022899284 + .long 2743490304 + .long 1070786048 + .long 494581074 + .long 1018818479 + .long 2328961024 + .long 1070803184 + .long 2987908834 + .long 1022581110 + .long 350011392 + .long 1070820342 + .long 240771184 + .long 1024143083 + .long 2692326912 + .long 1070837521 + .long 666056837 + .long 1022394776 + .long 2373274368 + .long 1070854723 + .long 2484337770 + .long 1024228156 + .long 1017131520 + .long 1070871948 + .long 3285648279 + .long 1024025789 + .long 265558272 + .long 1070889196 + .long 392241896 + .long 1024252809 + .long 1778008064 + .long 1070906467 + .long 1536107943 + .long 1023949300 + .long 2937184768 + .long 1070923762 + .long 3541062251 + .long 1019448646 + .long 1144442880 + .long 1070941082 + .long 3691683781 + .long 1022123948 + .long 2410165504 + .long 1070958426 + .long 1804181960 + .long 1023945221 + .long 4174350848 + .long 1070975795 + .long 2016094861 + .long 1021716585 + .long 3897012480 + .long 1070993190 + .long 175294410 + .long 1023703404 + .long 3353623040 + .long 1071010611 + .long 167973242 + .long 1023240839 + .long 45671168 + .long 1071028059 + .long 2166856113 + .long 1021565413 + .long 86063872 + .long 1071045533 + .long 2676254727 + .long 1023985299 + .long 1019772672 + .long 1071063034 + .long 989043593 + .long 1021549587 + .long 414297344 + .long 1071080563 + .long 3960972046 + .long 1024307251 + .long 155173120 + .long 1071098120 + .long 1830919291 + .long 1021592251 + .long 2151562240 + .long 1071115705 + .long 405408666 + .long 1023423128 + .long 4041854720 + .long 1071133319 + .long 2043497827 + .long 1024411503 + .long 3489224192 + .long 1071150963 + .long 3072215864 + .long 1022698635 + .long 2477196288 + .long 1071168637 + .long 1812195139 + .long 1022689192 + .long 3015298816 + .long 1071186341 + .long 764841969 + .long 1021027331 + .long 2844731136 + .long 1071204076 + .long 2878117321 + .long 1019116513 + .long 4028950528 + .long 1071221842 + .long 698911452 + .long 1023265602 + .long 69441536 + .long 1071239641 + .long 3253467847 + .long 1020795075 + .long 1676209920 + .long 1071257471 + .long 4272431167 + .long 1022873982 + .long 2408752384 + .long 1071275334 + .long 648519100 + .long 1024385717 + .long 151623680 + .long 1071293231 + .long 345257017 + .long 1019561408 + .long 1410154240 + .long 1071311161 + .long 197863993 + .long 1023224207 + .long 4131351552 + .long 1071329125 + .long 2620801789 + .long 1024411169 + .long 1999664384 + .long 1071347125 + .long 3952692616 + .long 1024168086 + .long 1617668864 + .long 1071365160 + .long 3019889809 + .long 1021907692 + .long 1032074240 + .long 1071383231 + .long 59469899 + .long 1023656194 + .long 2619492096 + .long 1071401338 + .long 1417526820 + .long 1021457783 + .long 202429440 + .long 1071419483 + .long 2927667935 + .long 1019175447 + .long 525044224 + .long 1071437665 + .long 38166811 + .long 1023981879 + .long 1779258880 + .long 1071455885 + .long 481252500 + .long 1023310234 + .long 2195673600 + .long 1071474144 + .long 3962395981 + .long 1021339088 + .long 44573696 + .long 1071492443 + .long 3936281395 + .long 1023014829 + .long 2226905344 + .long 1071510781 + .long 1515320476 + .long 1024320623 + .long 2800512512 + .long 1071529160 + .long 1225403697 + .long 1021081846 + .long 161113600 + .long 1071547581 + .long 3064809733 + .long 1024173917 + .long 1338410240 + .long 1071566043 + .long 2027604973 + .long 1024362526 + .long 522433280 + .long 1071584548 + .long 2055171723 + .long 1023858825 + .long 539595776 + .long 1071603096 + .long 3868820135 + .long 1022936424 + .long 4264017664 + .long 1071621687 + .long 3228065145 + .long 1023479578 + .long 1733924096 + .long 1071640324 + .long 3511934475 + .long 1022496355 + .long 108880384 + .long 1071651839 + .long 615880967 + .long 1023519706 + .long 3517856512 + .long 1071661202 + .long 3113108559 + .long 1025190289 + .long 4043153152 + .long 1071670589 + .long 1571836218 + .long 1023106116 + .long 3251299072 + .long 1071680000 + .long 3444076102 + .long 1022187841 + .long 2736921600 + .long 1071689435 + .long 272771483 + .long 1025095280 + .long 3897698560 + .long 1071703633 + .long 2075390188 + .long 1022489022 + .long 3209485056 + .long 1071722652 + .long 1438094065 + .long 1021844944 + .long 3781432064 + .long 1071741774 + .long 1675017145 + .long 1024143828 + .long 2684184064 + .long 1071761003 + .long 2259963753 + .long 1024731393 + .long 1840489728 + .long 1071780342 + .long 3372883597 + .long 1023431408 + .long 3764087808 + .long 1071799794 + .long 3307523102 + .long 1024485788 + .long 3006232320 + .long 1071819364 + .long 3088971966 + .long 1025213251 + .long 3374881280 + .long 1071839055 + .long 834437749 + .long 1025236452 + .long 797284864 + .long 1071858872 + .long 3122663941 + .long 1025320473 + .long 545765120 + .long 1071878818 + .long 826539625 + .long 1022450955 + .long 107562240 + .long 1071898898 + .long 339584600 + .long 1022481255 + .long 2123649024 + .long 1071919116 + .long 3912959833 + .long 1024321009 + .long 1562385664 + .long 1071939478 + .long 2846067230 + .long 1023343981 + .long 2963085824 + .long 1071959988 + .long 954548627 + .long 1021475211 + .long 3325550592 + .long 1071980652 + .long 3459651155 + .long 1025305573 + .long 775752448 + .long 1072001476 + .long 3582746667 + .long 1023859460 + .long 3238590720 + .long 1072022464 + .long 634636162 + .long 1024472353 + .long 2758801920 + .long 1072043624 + .long 3078216319 + .long 1025304516 + .long 1370319104 + .long 1072064962 + .long 2570569078 + .long 1025099442 + .long 2615805184 + .long 1072086484 + .long 3729933412 + .long 1024605112 + .long 3077336576 + .long 1072108198 + .long 1948916066 + .long 1024781603 + .long 1099528192 + .long 1072130112 + .long 3139143157 + .long 1023729360 + .long 1231903232 + .long 1072152233 + .long 1349513477 + .long 1024737515 + .long 1507504128 + .long 1072174570 + .long 3484516322 + .long 1024000959 + .long 2214659840 + .long 1072197132 + .long 2563820917 + .long 1025225535 + .long 1804739840 + .long 1072219929 + .long 760038746 + .long 1024482855 + .long 1413746688 + .long 1072242971 + .long 3401734714 + .long 1025129838 + .long 821409536 + .long 1072266269 + .long 3729772551 + .long 1025484796 + .long 3031825664 + .long 1072289834 + .long 122256749 + .long 1024752594 + .long 1710784256 + .long 1072313680 + .long 1518205483 + .long 1024724809 + .long 3025265152 + .long 1072337819 + .long 409951989 + .long 1022835555 + .long 287769088 + .long 1072362267 + .long 800355594 + .long 1022484850 + .long 198179840 + .long 1072387038 + .long 3502926213 + .long 1024209373 + .long 1909130496 + .long 1072412149 + .long 3064694319 + .long 1025380823 + .long 1941732096 + .long 1072437619 + .long 4112930390 + .long 1024294679 + .long 3492010496 + .long 1072463467 + .long 2684918107 + .long 1023220233 + .long 81959680 + .long 1072489716 + .long 220021366 + .long 1020635131 + .long 2297837056 + .long 1072516387 + .long 4027683826 + .long 1021041185 + .long 270404096 + .long 1072543508 + .long 2012766065 + .long 1021780753 + .long 3667376896 + .long 1072571105 + .long 2727981522 + .long 1023009874 + .long 330400256 + .long 1072599212 + .long 2940017003 + .long 1025393439 + .long 1119293952 + .long 1072627861 + .long 1608550416 + .long 1022675612 + .long 3536155904 + .long 1072657091 + .long 349665778 + .long 1025156751 + .long 3078046720 + .long 1072686946 + .long 2016159996 + .long 1022193169 + .long 455228416 + .long 1072705361 + .long 1908539328 + .long 1026126332 + .long 1871505664 + .long 1072720988 + .long 2784700894 + .long 1025922277 + .long 1630994432 + .long 1072737010 + .long 361107678 + .long 1022887244 + .long 2084558336 + .long 1072753462 + .long 2642784509 + .long 1072689083 + .long 1514442531 + .long 1072688953 + .long 333108933 + .long 1072688821 + .long 3392112024 + .long 1072688686 + .long 2099852862 + .long 1072688550 + .long 749609004 + .long 1072688412 + .long 3634632596 + .long 1072688271 + .long 2163248461 + .long 1072688129 + .long 628657846 + .long 1072687985 + .long 3324036511 + .long 1072687838 + .long 1657632815 + .long 1072687690 + .long 4217538760 + .long 1072687539 + .long 2411951597 + .long 1072687387 + .long 533944872 + .long 1072687233 + .long 2876566508 + .long 1072687076 + .long 847936891 + .long 1072686918 + .long 3036019913 + .long 1072686757 + .long 848884575 + .long 1072686595 + .long 2874443326 + .long 1072686430 + .long 520713666 + .long 1072686264 + .long 2375556481 + .long 1072686095 + .long 4141904948 + .long 1072685924 + .long 1522666382 + .long 1072685752 + .long 3105624104 + .long 1072685577 + .long 298666327 + .long 1072685401 + .long 1689524500 + .long 1072685222 + .long 2981002200 + .long 1072685041 + .long 4170844284 + .long 1072684858 + .long 961802263 + .long 1072684674 + .long 1941503454 + .long 1072684487 + .long 2812647170 + .long 1072684298 + .long 3572873869 + .long 1072684107 + .long 4219797823 + .long 1072683914 + .long 456039788 + .long 1072683720 + .long 869096151 + .long 1072683523 + .long 1161535119 + .long 1072683324 + .long 1330865866 + .long 1072683123 + .long 1374571204 + .long 1072682920 + .long 1290107538 + .long 1072682715 + .long 1074904836 + .long 1072682508 + .long 726366587 + .long 1072682299 + .long 241869763 + .long 1072682088 + .long 3913732079 + .long 1072681874 + .long 3149342765 + .long 1072681659 + .long 2240966306 + .long 1072681442 + .long 1185873216 + .long 1072681223 + .long 4276274591 + .long 1072681001 + .long 2919452883 + .long 1072680778 + .long 1407565635 + .long 1072680553 + .long 4032743551 + .long 1072680325 + .long 2202188565 + .long 1072680096 + .long 207977577 + .long 1072679865 + .long 2342160518 + .long 1072679631 + .long 11858423 + .long 1072679396 + .long 1804034453 + .long 1072679158 + .long 3420722787 + .long 1072678918 + .long 563930456 + .long 1072678677 + .long 1820539192 + .long 1072678433 + .long 2892501606 + .long 1072678187 + .long 3776710320 + .long 1072677939 + .long 175063337 + .long 1072677690 + .long 674333171 + .long 1072677438 + .long 976363026 + .long 1072677184 + .long 1077935934 + .long 1072676928 + .long 1921075490 + .long 1072676540 + .long 881493302 + .long 1072676016 + .long 3275752439 + .long 1072675483 + .long 486855588 + .long 1072674943 + .long 1077229111 + .long 1072674394 + .long 723950308 + .long 1072673837 + .long 3693582199 + .long 1072673271 + .long 1367335316 + .long 1072672698 + .long 2305837020 + .long 1072672116 + .long 2184358641 + .long 1072671526 + .long 972682840 + .long 1072670928 + .long 2935101762 + .long 1072670321 + .long 3745513263 + .long 1072669706 + .long 3372320886 + .long 1072669083 + .long 1783464620 + .long 1072668452 + .long 3241386215 + .long 1072667812 + .long 3418125284 + .long 1072667164 + .long 2280219148 + .long 1072666508 + .long 4088700758 + .long 1072665843 + .long 219227400 + .long 1072665171 + .long 3521816918 + .long 1072664489 + .long 1076205279 + .long 1072663800 + .long 1436484616 + .long 1072663102 + .long 271362610 + .long 1072662396 + .long 1838996688 + .long 1072661681 + .long 1807122518 + .long 1072660958 + .long 137953542 + .long 1072660227 + .long 1088178584 + .long 1072659487 + .long 324057537 + .long 1072658739 + .long 2101288076 + .long 1072657982 + .long 2085133974 + .long 1072657217 + .long 235324451 + .long 1072656444 + .long 806051592 + .long 1072655662 + .long 3756033140 + .long 1072654871 + .long 453542543 + .long 1072654073 + .long 3741177327 + .long 1072653265 + .long 691216109 + .long 1072652450 + .long 4145223372 + .long 1072651625 + .long 1174439091 + .long 1072650793 + .long 324416139 + .long 1072649952 + .long 1550246310 + .long 1072649102 + .long 511524674 + .long 1072648244 + .long 1457248482 + .long 1072647377 + .long 45944955 + .long 1072646502 + .long 525537397 + .long 1072645618 + .long 2848440188 + .long 1072644725 + .long 2671555633 + .long 1072643824 + .long 4241172637 + .long 1072642914 + .long 3213094278 + .long 1072641996 + .long 3832503688 + .long 1072641069 + .long 1754091534 + .long 1072640134 + .long 1221921804 + .long 1072639190 + .long 2184526489 + .long 1072638237 + .long 294902089 + .long 1072637276 + .long 4090375270 + .long 1072636305 + .long 632860906 + .long 1072635327 + .long 2753498702 + .long 1072634339 + .long 1808009252 + .long 1072633343 + .long 2036428672 + .long 1072632338 + .long 3383235626 + .long 1072631324 + .long 1497347484 + .long 1072630302 + .long 617018317 + .long 1072629271 + .long 684933058 + .long 1072628231 + .long 1643170798 + .long 1072627182 + .long 3011066360 + .long 1072625592 + .long 957158713 + .long 1072623442 + .long 1390907941 + .long 1072621256 + .long 3819155270 + .long 1072619034 + .long 3443571196 + .long 1072616777 + .long 4045412458 + .long 1072614484 + .long 805503923 + .long 1072612156 + .long 1778922015 + .long 1072609791 + .long 2125033665 + .long 1072607390 + .long 1287203863 + .long 1072604953 + .long 2992629568 + .long 1072602479 + .long 2367267127 + .long 1072599969 + .long 3115526047 + .long 1072597422 + .long 340219539 + .long 1072594839 + .long 2017215719 + .long 1072592218 + .long 3225443424 + .long 1072589560 + .long 3326565673 + .long 1072586865 + .long 1669811211 + .long 1072584133 + .long 1886735022 + .long 1072581363 + .long 3301071171 + .long 1072578555 + .long 928514283 + .long 1072575710 + .long 2656364059 + .long 1072572826 + .long 3473490507 + .long 1072569904 + .long 2649965606 + .long 1072566944 + .long 3736819052 + .long 1072563945 + .long 1680885175 + .long 1072560908 + .long 4413771 + .long 1072557832 + .long 2214869753 + .long 1072554716 + .long 3214725184 + .long 1072551561 + .long 2186079903 + .long 1072548367 + .long 2590372131 + .long 1072545133 + .long 3578146079 + .long 1072541859 + .long 4283712755 + .long 1072538545 + .long 3824834510 + .long 1072535191 + .long 1302400298 + .long 1072531797 + .long 95058636 + .long 1072528362 + .long 3563906063 + .long 1072524885 + .long 2167230730 + .long 1072521368 + .long 3524918334 + .long 1072517809 + .long 2353304918 + .long 1072514209 + .long 1939625839 + .long 1072510567 + .long 1256714581 + .long 1072506883 + .long 3552525848 + .long 1072503156 + .long 3464809522 + .long 1072499387 + .long 4200542593 + .long 1072495575 + .long 355609124 + .long 1072491721 + .long 3684139099 + .long 1072487822 + .long 148355918 + .long 1072483881 + .long 1457689242 + .long 1072479895 + .long 2118591596 + .long 1072475865 + .long 908848089 + .long 1072471791 + .long 877032689 + .long 1072467672 + .long 752012304 + .long 1072463508 + .long 3532301749 + .long 1072459298 + .long 3600563221 + .long 1072455043 + .long 3902857084 + .long 1072450742 + .long 3063101036 + .long 1072446395 + .long 3972344374 + .long 1072442001 + .long 903183549 + .long 1072437561 + .long 983892938 + .long 1072433073 + .long 2722858568 + .long 1072428537 + .long 302790515 + .long 1072423954 + .long 759811057 + .long 1072419322 + .long 2507809922 + .long 1072414641 + .long 2388408813 + .long 1072407528 + .long 2084492942 + .long 1072397870 + .long 2435703301 + .long 1072388010 + .long 1935433360 + .long 1072377945 + .long 2742047290 + .long 1072367671 + .long 2053284205 + .long 1072357185 + .long 657783367 + .long 1072346483 + .long 2893664841 + .long 1072335560 + .long 3718906405 + .long 1072324413 + .long 1547896303 + .long 1072313038 + .long 2494058440 + .long 1072301429 + .long 3133238742 + .long 1072289582 + .long 3327000086 + .long 1072277492 + .long 1860667274 + .long 1072265154 + .long 665340747 + .long 1072252562 + .long 443347841 + .long 1072239710 + .long 581282618 + .long 1072226592 + .long 3349780465 + .long 1072213201 + .long 914217606 + .long 1072199532 + .long 989797661 + .long 1072185576 + .long 945436416 + .long 1072171326 + .long 549291300 + .long 1072156774 + .long 1814636389 + .long 1072141911 + .long 239092858 + .long 1072126729 + .long 1794680724 + .long 1072111217 + .long 1241534678 + .long 1072095366 + .long 3366566214 + .long 1072079164 + .long 1244090828 + .long 1072062601 + .long 1708448120 + .long 1072045663 + .long 3544260650 + .long 1072028337 + .long 1402741403 + .long 1072010610 + .long 2551936888 + .long 1071992465 + .long 617669739 + .long 1071973887 + .long 794002186 + .long 1071954857 + .long 2021237693 + .long 1071935356 + .long 540450384 + .long 1071915364 + .long 1920555537 + .long 1071894857 + .long 2879585206 + .long 1071873811 + .long 3000237455 + .long 1071852199 + .long 3352974346 + .long 1071829991 + .long 569629937 + .long 1071807155 + .long 2077237208 + .long 1071783653 + .long 2284891805 + .long 1071759446 + .long 1226651784 + .long 1071734489 + .long 1102047405 + .long 1071708731 + .long 2009896384 + .long 1071682115 + .long 927419082 + .long 1071654577 + .long 85010366 + .long 1071607413 + .long 696431025 + .long 1071548180 + .long 2611410541 + .long 1071486585 + .long 2612593658 + .long 1071422396 + .long 3548155306 + .long 1071355336 + .long 3887997484 + .long 1071285073 + .long 244854763 + .long 1071211202 + .long 4214445648 + .long 1071133216 + .long 2303966727 + .long 1071050478 + .long 3991040013 + .long 1070962152 + .long 3126952278 + .long 1070867118 + .long 1817448378 + .long 1070763804 + .long 1793814864 + .long 1070649884 + .long 3507224072 + .long 1070447193 + .long 4027609105 + .long 1070148772 + .long 577507993 + .long 1069779414 + .long 2310232419 + .long 1068931829 + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 3164710438 + .long 1413754136 + .long 3221823995 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 1074340347 + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .long 0 + .long 0 + .long 1431655765 + .long 3217380693 + .long 858993459 + .long 3216192307 + .long 3067833783 + .long 3215383405 + .long 780903145 + .long 1066854586 + .long 858993459 + .long 1068708659 + .long 3340530119 + .long 1067392113 + .long 1431655765 + .long 1069897045 + .long 1321528399 + .long 1066517740 + .long 3067833783 + .long 1067899757 + .long 2021159460 + .long 1065855096 + .long 2576980378 + .long 1066178969 + .long 4294967295 + .long 2147483647 + .long 0 + .long 0 + .long 0 + .long 4294950912 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 1071644672 + .long 0 + .long 0 + .type static_const_table,@object + .size static_const_table,6112 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_asin.S b/libm/x86/e_asin.S new file mode 100644 index 0000000..99dfb68 --- /dev/null +++ b/libm/x86/e_asin.S @@ -0,0 +1,2004 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// To compute asin(s), separate schemes are used when s is in different +// intervals. +// +// |s| in [2^{-4}, sqrt(3)/2): +// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52 +// asin(s)=asin(t)+asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2) +// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7) +// For the first degree term, r is evaluated as +// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t) +// (sqrt(1-t^2) read from table) +// The main source of error is still R (may still be affected by up to 3 ulps +// of rounding error). The table size must be sufficiently large, to minimize +// this effect. +// +// |s| in [sqrt(3)/2, 255/256): +// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded) +// asin(|s|)=pi/2-asin(t)+asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2) +// asin(r) evaluated as polynomial (same as above) +// The first degree term is evaluated as +// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2)) +// +// |s|<2^{-4}: evaluate as 13-degree polynomial +// +// |s| in [255/256,1): asin(|s|)=pi/2-asin(sqrt(1-s^2)) +// use 17-degree polynomial, get error term +// Q*eps ~ (1-s^2-Q^2)/(2*Q) for first term +// ( Q(1+eps)=sqrt(1-s^2) ) +// +// Special cases: +// asin(NaN) = quiet NaN, and raise invalid exception +// asin(INF) = QNaN and raise invalid exception +// asin(x) = QNaN and raise invalid exception, for |x|>1.0 +// asin(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin asin +ENTRY(asin) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 64(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + stmxcsr 16(%esp) + movl 16(%esp), %edx + andl $-24577, %edx + cmpl %edx, 16(%esp) + jne .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + movsd 5984(%ebx), %xmm4 + movsd 6016(%ebx), %xmm3 + xorpd %xmm5, %xmm5 + movsd 6000(%ebx), %xmm2 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movapd %xmm0, %xmm1 + movsd %xmm0, 8(%esp) + psrlq $44, %xmm0 + movd %xmm0, %edx + movapd %xmm1, %xmm7 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movapd %xmm1, %xmm0 + movl $524287, %eax + andl %edx, %eax + subl $260864, %eax + cmpl $955, %eax + jae .L_2TAG_PACKET_2.0.2 + mulsd %xmm1, %xmm1 + andl $65535, %edx + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + andpd %xmm7, %xmm2 + andl $-4, %edx + subl $64256, %edx + movsd 3936(%ebx,%edx,2), %xmm1 + orpd %xmm5, %xmm2 + movapd 96(%ebx,%edx,4), %xmm4 + movapd %xmm7, %xmm6 + addsd %xmm2, %xmm7 + subsd %xmm2, %xmm0 + mulsd %xmm7, %xmm0 + mulsd %xmm1, %xmm6 + mulsd %xmm2, %xmm3 + movapd %xmm6, %xmm1 + addsd %xmm3, %xmm6 + divsd %xmm6, %xmm0 + movsd 80(%ebx), %xmm7 + movsd 64(%ebx), %xmm5 + subsd %xmm3, %xmm1 + andpd 6064(%ebx), %xmm2 + movapd %xmm1, %xmm3 + mulsd %xmm1, %xmm1 + movsd 72(%ebx), %xmm6 + mulsd %xmm1, %xmm3 + mulsd %xmm1, %xmm7 + mulsd %xmm3, %xmm5 + xorpd %xmm2, %xmm4 + mulsd %xmm1, %xmm3 + addsd %xmm7, %xmm6 + mulsd %xmm3, %xmm6 + addsd %xmm4, %xmm5 + pshufd $238, %xmm4, %xmm4 + addsd %xmm5, %xmm6 + orpd %xmm2, %xmm4 + addsd %xmm6, %xmm0 + movl 16(%esp), %eax + andl $-24577, %eax + cmpl 16(%esp), %eax + je .L_2TAG_PACKET_3.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %eax + andl $24576, %eax + orl %eax, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_3.0.2: + addsd %xmm4, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_2.0.2: + subl $955, %eax + cmpl $67, %eax + jae .L_2TAG_PACKET_5.0.2 + mulsd %xmm1, %xmm1 + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + movl %edx, %eax + andpd 5984(%ebx), %xmm0 + andpd 6048(%ebx), %xmm7 + movapd %xmm0, %xmm1 + movsd 6016(%ebx), %xmm4 + movapd %xmm7, %xmm6 + subsd %xmm7, %xmm1 + mulsd %xmm7, %xmm7 + addsd %xmm6, %xmm0 + subsd %xmm7, %xmm4 + mulsd %xmm1, %xmm0 + movapd %xmm3, %xmm7 + andpd %xmm3, %xmm2 + psllq $2, %xmm3 + pextrw $3, %xmm3, %edx + orpd %xmm5, %xmm2 + subl $65216, %edx + addl %edx, %edx + mulsd 3936(%ebx,%edx,4), %xmm7 + mulsd %xmm2, %xmm6 + movapd 6080(%ebx), %xmm3 + mulsd %xmm2, %xmm1 + mulsd %xmm2, %xmm2 + subsd %xmm7, %xmm6 + addsd %xmm1, %xmm6 + subsd %xmm2, %xmm4 + addsd %xmm7, %xmm7 + movsd 64(%ebx), %xmm5 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm7 + movsd 80(%ebx), %xmm0 + divsd %xmm7, %xmm4 + movsd 72(%ebx), %xmm2 + subpd 96(%ebx,%edx,8), %xmm3 + movapd %xmm6, %xmm1 + mulsd %xmm6, %xmm6 + andl $524288, %eax + shrl $4, %eax + mulsd %xmm6, %xmm0 + mulsd %xmm6, %xmm1 + mulsd %xmm1, %xmm5 + mulsd %xmm6, %xmm1 + addsd %xmm2, %xmm0 + pxor %xmm6, %xmm6 + mulsd %xmm1, %xmm0 + addsd %xmm3, %xmm5 + pinsrw $3, %eax, %xmm6 + addsd %xmm5, %xmm0 + movapd %xmm4, %xmm5 + pshufd $238, %xmm3, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm3 + subsd %xmm3, %xmm5 + subsd %xmm5, %xmm0 + movl 16(%esp), %eax + andl $-24577, %eax + cmpl 16(%esp), %eax + je .L_2TAG_PACKET_6.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %eax + andl $24576, %eax + orl %eax, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_6.0.2: + xorpd %xmm6, %xmm0 + xorpd %xmm6, %xmm4 + subsd %xmm4, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + addl $15291, %eax + cmpl $14336, %eax + jae .L_2TAG_PACKET_7.0.2 + unpcklpd %xmm7, %xmm7 + movapd (%ebx), %xmm1 + movapd %xmm7, %xmm6 + movapd 16(%ebx), %xmm2 + movapd 32(%ebx), %xmm4 + mulpd %xmm7, %xmm7 + mulpd %xmm7, %xmm6 + mulpd %xmm7, %xmm1 + mulpd %xmm7, %xmm7 + movapd %xmm6, %xmm3 + mulsd %xmm6, %xmm6 + addpd %xmm2, %xmm1 + mulpd %xmm7, %xmm4 + mulsd %xmm3, %xmm6 + addpd %xmm4, %xmm1 + mulpd %xmm6, %xmm1 + pshufd $238, %xmm1, %xmm2 + addsd %xmm2, %xmm1 + movl 16(%esp), %eax + andl $-24577, %eax + cmpl 16(%esp), %eax + je .L_2TAG_PACKET_8.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %eax + andl $24576, %eax + orl %eax, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_8.0.2: + addsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_7.0.2: + subl $15358, %eax + cmpl $2, %eax + jae .L_2TAG_PACKET_9.0.2 + mulsd %xmm1, %xmm1 + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + movl %edx, %eax + andpd 6032(%ebx), %xmm7 + pshufd $68, %xmm3, %xmm5 + andpd 6032(%ebx), %xmm3 + movapd %xmm7, %xmm1 + movsd 6016(%ebx), %xmm4 + movapd %xmm7, %xmm6 + subsd %xmm7, %xmm0 + mulsd %xmm7, %xmm7 + addsd %xmm1, %xmm1 + mulsd %xmm0, %xmm1 + subsd %xmm7, %xmm4 + movapd %xmm3, %xmm6 + mulsd %xmm3, %xmm3 + mulsd %xmm0, %xmm0 + subsd %xmm1, %xmm4 + subsd %xmm5, %xmm6 + addsd %xmm5, %xmm5 + subsd %xmm3, %xmm4 + movapd (%ebx), %xmm2 + pshufd $238, %xmm5, %xmm3 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm5 + pshufd $238, %xmm3, %xmm7 + addsd %xmm3, %xmm3 + mulsd %xmm6, %xmm5 + addsd %xmm5, %xmm4 + pshufd $238, %xmm7, %xmm6 + divsd %xmm3, %xmm4 + movapd 48(%ebx), %xmm1 + movapd 16(%ebx), %xmm5 + movapd 32(%ebx), %xmm0 + mulpd %xmm7, %xmm7 + movapd %xmm6, %xmm3 + mulpd %xmm7, %xmm2 + mulpd %xmm7, %xmm6 + shrl $4, %eax + andl $32768, %eax + mulsd %xmm7, %xmm1 + mulpd %xmm7, %xmm7 + addpd %xmm2, %xmm5 + movapd %xmm6, %xmm2 + mulsd %xmm6, %xmm6 + mulpd %xmm0, %xmm7 + movapd 6080(%ebx), %xmm0 + mulsd %xmm6, %xmm2 + addpd %xmm5, %xmm7 + pshufd $238, %xmm1, %xmm5 + mulsd %xmm2, %xmm6 + mulpd %xmm2, %xmm7 + addsd %xmm5, %xmm1 + xorpd %xmm5, %xmm5 + pshufd $238, %xmm7, %xmm2 + mulsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm6 + addsd %xmm2, %xmm7 + movapd %xmm3, %xmm2 + pinsrw $3, %eax, %xmm5 + subsd %xmm6, %xmm3 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm6 + addsd %xmm4, %xmm7 + subsd %xmm6, %xmm2 + subsd %xmm7, %xmm0 + subsd %xmm2, %xmm0 + movl 16(%esp), %eax + andl $-24577, %eax + cmpl 16(%esp), %eax + je .L_2TAG_PACKET_10.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %eax + andl $24576, %eax + orl %eax, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_10.0.2: + xorpd %xmm5, %xmm0 + xorpd %xmm5, %xmm3 + subsd %xmm3, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_9.0.2: + addl $261886, %eax + cmpl $261888, %eax + jb .L_2TAG_PACKET_11.0.2 + movd %xmm0, %ecx + psrlq $32, %xmm0 + movd %xmm0, %edx + andl $2147483647, %edx + movl $1072693248, %eax + subl %edx, %eax + orl %ecx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_12.0.2 + movq 8(%esp), %xmm2 + movd %xmm2, %edx + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $2147483647, %ecx + subl $1, %edx + sbbl $2146435072, %ecx + cmpl $0, %ecx + jge .L_2TAG_PACKET_11.0.2 + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %edx + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_13.0.2 +.L_2TAG_PACKET_12.0.2: + movsd 5984(%ebx), %xmm1 + movsd 6080(%ebx), %xmm2 + movsd 6088(%ebx), %xmm0 + movl 16(%esp), %eax + andl $-24577, %eax + cmpl 16(%esp), %eax + je .L_2TAG_PACKET_14.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %eax + andl $24576, %eax + orl %eax, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_14.0.2: + andnpd %xmm7, %xmm1 + orpd %xmm1, %xmm0 + orpd %xmm1, %xmm2 + addsd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_0.0.2: + movl 16(%esp), %edx + andl $-24577, %edx + movl %edx, 24(%esp) + ldmxcsr 24(%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_11.0.2: + movsd 8(%esp), %xmm0 + xorpd %xmm6, %xmm6 + movapd %xmm0, %xmm7 + pextrw $3, %xmm0, %edx + andl $32752, %edx + subl $16, %edx + cmpl $32736, %edx + jb .L_2TAG_PACKET_15.0.2 + addsd %xmm0, %xmm6 + orpd %xmm6, %xmm0 + mulsd %xmm0, %xmm7 +.L_2TAG_PACKET_15.0.2: + movsd %xmm0, (%esp) + fldl (%esp) +.L_2TAG_PACKET_13.0.2: + movl 16(%esp), %edx + andl $-24577, %edx + cmpl 16(%esp), %edx + je .L_2TAG_PACKET_4.0.2 + stmxcsr 24(%esp) + movl 16(%esp), %edx + andl $24576, %edx + orl %edx, 24(%esp) + ldmxcsr 24(%esp) +.L_2TAG_PACKET_4.0.2: + movl 64(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(asin) +# -- End asin + +# Start file scope ASM +.weak asinl +.equ asinl, asin +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 780903145 + .long 1066854586 + .long 858993459 + .long 1068708659 + .long 3340530119 + .long 1067392113 + .long 1431655765 + .long 1069897045 + .long 1321528399 + .long 1066517740 + .long 3067833783 + .long 1067899757 + .long 2021159460 + .long 1065855096 + .long 2576980378 + .long 1066178969 + .long 1431655765 + .long 1069897045 + .long 858993459 + .long 1068708659 + .long 3067833783 + .long 1067899757 + .long 0 + .long 0 + .long 3822952792 + .long 1021639372 + .long 182792448 + .long 1068507836 + .long 2264213271 + .long 1019558908 + .long 649052928 + .long 1068524253 + .long 1797139609 + .long 1022295143 + .long 1243095296 + .long 1068540671 + .long 1415938756 + .long 1021439537 + .long 2033294592 + .long 1068557090 + .long 2356809978 + .long 1021777916 + .long 3088063744 + .long 1068573510 + .long 2669055318 + .long 1022124482 + .long 180888576 + .long 1068589932 + .long 3566445325 + .long 1021358712 + .long 1970196992 + .long 1068606354 + .long 896980323 + .long 1021319659 + .long 4229555456 + .long 1068622777 + .long 436049712 + .long 1021319758 + .long 2732572160 + .long 1068639202 + .long 583123209 + .long 1020797960 + .long 1842831872 + .long 1068655628 + .long 1370449804 + .long 1021429270 + .long 1628994560 + .long 1068672055 + .long 2411391464 + .long 1021057980 + .long 2159763712 + .long 1068688483 + .long 1208692749 + .long 1021943903 + .long 3503886336 + .long 1068704912 + .long 538793309 + .long 1019744063 + .long 1435187200 + .long 1068721343 + .long 4085087612 + .long 1020608419 + .long 317469952 + .long 1068737775 + .long 144386942 + .long 1021440732 + .long 219617280 + .long 1068754208 + .long 2940088361 + .long 1019981122 + .long 1210558208 + .long 1068770642 + .long 2176850347 + .long 1018373705 + .long 3359268352 + .long 1068787077 + .long 2395611454 + .long 1021889042 + .long 2439803648 + .long 1068803514 + .long 1650705253 + .long 1020227966 + .long 2816203520 + .long 1068819952 + .long 3702166386 + .long 1019379914 + .long 262620672 + .long 1068836392 + .long 1855649370 + .long 1020453124 + .long 3438159616 + .long 1068852832 + .long 923063860 + .long 1019273834 + .long 3822105856 + .long 1068869274 + .long 4289947947 + .long 1019434249 + .long 1483729920 + .long 1068885718 + .long 787455814 + .long 1020738379 + .long 787321088 + .long 1068902163 + .long 3321653337 + .long 1021842569 + .long 1802253312 + .long 1068918609 + .long 2653633526 + .long 1021821525 + .long 302985984 + .long 1068935057 + .long 161272028 + .long 1021655149 + .long 653966080 + .long 1068951506 + .long 2566098667 + .long 1020066219 + .long 2924727296 + .long 1068967956 + .long 3646493722 + .long 1014292285 + .long 2889890304 + .long 1068984408 + .long 1081009196 + .long 1022189620 + .long 619098112 + .long 1069000862 + .long 4011643355 + .long 1021773297 + .long 477017600 + .long 1069017317 + .long 4030305534 + .long 1021292252 + .long 2533403904 + .long 1069033773 + .long 2645187591 + .long 1019527099 + .long 2563102208 + .long 1069050231 + .long 3857293792 + .long 1022311697 + .long 635982336 + .long 1069066691 + .long 3625936637 + .long 1017511744 + .long 1116940800 + .long 1069083152 + .long 3653872993 + .long 1022016631 + .long 4075964160 + .long 1069099614 + .long 2468900271 + .long 1021769532 + .long 993165568 + .long 1069116079 + .long 1358104224 + .long 1021199776 + .long 528586752 + .long 1069132545 + .long 2200950332 + .long 1022024872 + .long 2752395776 + .long 1069149012 + .long 3197072454 + .long 1017751319 + .long 3439855616 + .long 1069165481 + .long 1651081806 + .long 1020809338 + .long 2661257728 + .long 1069181952 + .long 539032752 + .long 1021728805 + .long 486957312 + .long 1069198425 + .long 3136045149 + .long 1016888671 + .long 1282340352 + .long 1069214899 + .long 2593963259 + .long 1018956103 + .long 822921728 + .long 1069231375 + .long 2146032737 + .long 1022306465 + .long 3474216192 + .long 1069247852 + .long 3976811625 + .long 1021350207 + .long 716902656 + .long 1069264332 + .long 718267222 + .long 1018624727 + .long 1211594496 + .long 1069280813 + .long 1485641389 + .long 1018447451 + .long 734070272 + .long 1069297296 + .long 354455128 + .long 1021341291 + .long 3650110720 + .long 1069313780 + .long 682185947 + .long 1021651853 + .long 1440663040 + .long 1069330267 + .long 3558574550 + .long 1021615110 + .long 2766612224 + .long 1069346755 + .long 874607978 + .long 1017746872 + .long 3404011008 + .long 1069363245 + .long 4154988502 + .long 1021439906 + .long 3423949056 + .long 1069379737 + .long 2263202309 + .long 1021479615 + .long 2897587712 + .long 1069396231 + .long 2562065031 + .long 1022090363 + .long 1896159232 + .long 1069412727 + .long 3836237663 + .long 1019867288 + .long 490968576 + .long 1069429225 + .long 3322056743 + .long 1006752762 + .long 3048360192 + .long 1069445724 + .long 1152314833 + .long 1013122252 + .long 1049850624 + .long 1069462226 + .long 3601590727 + .long 1022214610 + .long 3156899584 + .long 1069478729 + .long 1855169970 + .long 1019487271 + .long 851173376 + .long 1069495235 + .long 312649594 + .long 1020868604 + .long 2794281728 + .long 1069511742 + .long 1093490181 + .long 1020777577 + .long 468042496 + .long 1069528252 + .long 1152540679 + .long 1021403732 + .long 2534219264 + .long 1069544763 + .long 2292126035 + .long 1021872430 + .long 1376146432 + .long 1069558527 + .long 3293753641 + .long 1020500454 + .long 4175442432 + .long 1069575044 + .long 3626347564 + .long 1021610969 + .long 3523113472 + .long 1069591566 + .long 339956500 + .long 1021119039 + .long 4003350528 + .long 1069608092 + .long 3429333082 + .long 1022813542 + .long 1611067392 + .long 1069624623 + .long 2298017544 + .long 1021977587 + .long 931782144 + .long 1069641158 + .long 2164684743 + .long 1021250988 + .long 2256725504 + .long 1069657697 + .long 1138762335 + .long 1021443776 + .long 1582853120 + .long 1069674241 + .long 1084010382 + .long 1022994693 + .long 3497758720 + .long 1069690789 + .long 406366244 + .long 1022713586 + .long 3999816960 + .long 1069707342 + .long 1488723042 + .long 1023381290 + .long 3383096064 + .long 1069723900 + .long 2541558953 + .long 1019137887 + .long 1942403584 + .long 1069740463 + .long 1879620343 + .long 1022653642 + .long 4268263680 + .long 1069757030 + .long 3039077047 + .long 1022252545 + .long 2067062272 + .long 1069773603 + .long 4190670677 + .long 1020725863 + .long 4225828096 + .long 1069790180 + .long 1998567321 + .long 1022014385 + .long 2452507136 + .long 1069806763 + .long 1511628873 + .long 1021900300 + .long 1340746240 + .long 1069823351 + .long 788367341 + .long 1022726208 + .long 1190035456 + .long 1069839944 + .long 3856337230 + .long 1021834118 + .long 2300688384 + .long 1069856542 + .long 3211396579 + .long 1022621365 + .long 678886400 + .long 1069873146 + .long 4001011887 + .long 1022042646 + .long 921594112 + .long 1069889755 + .long 557811968 + .long 1023065533 + .long 3331668992 + .long 1069906369 + .long 1877060679 + .long 1022419742 + .long 3917875200 + .long 1069922989 + .long 1181055171 + .long 1022752712 + .long 2984829696 + .long 1069939615 + .long 4294526932 + .long 1021499988 + .long 838049024 + .long 1069956247 + .long 3658081878 + .long 1022957952 + .long 2078928384 + .long 1069972884 + .long 820353701 + .long 1019391107 + .long 2719854336 + .long 1069989527 + .long 1644022489 + .long 1023378240 + .long 3069117696 + .long 1070006176 + .long 2771393702 + .long 1019319954 + .long 3435962368 + .long 1070022831 + .long 3876394145 + .long 1023024433 + .long 4130595328 + .long 1070039492 + .long 1630447748 + .long 1021465882 + .long 1169236224 + .long 1070056160 + .long 2828355997 + .long 1020458120 + .long 3453997312 + .long 1070072833 + .long 164091641 + .long 1020388279 + .long 2708127744 + .long 1070089513 + .long 3036550223 + .long 1023328684 + .long 3540797696 + .long 1070106199 + .long 3710949463 + .long 1022568805 + .long 1972276736 + .long 1070122892 + .long 3885277950 + .long 1019761674 + .long 2613815552 + .long 1070139591 + .long 2764165077 + .long 1022921023 + .long 1487791616 + .long 1070156297 + .long 1330644769 + .long 1023162679 + .long 3207593472 + .long 1070173009 + .long 3911007221 + .long 1022993496 + .long 3797764608 + .long 1070189728 + .long 979712598 + .long 1022554580 + .long 3578920448 + .long 1070206454 + .long 2825738223 + .long 1020223708 + .long 2872795648 + .long 1070223187 + .long 392451124 + .long 1022666279 + .long 2002258432 + .long 1070239927 + .long 3730407632 + .long 1023148291 + .long 1291326464 + .long 1070256674 + .long 3723802980 + .long 1022514089 + .long 1065180928 + .long 1070273428 + .long 2635617463 + .long 1022654470 + .long 1650181632 + .long 1070290189 + .long 2061982883 + .long 1022853411 + .long 3373882880 + .long 1070306957 + .long 319732785 + .long 1022017175 + .long 2270081280 + .long 1070323733 + .long 2237757411 + .long 1023064087 + .long 2963732736 + .long 1070340516 + .long 468839165 + .long 1023293774 + .long 1491099904 + .long 1070357307 + .long 1502657946 + .long 1021533479 + .long 2479636480 + .long 1070374105 + .long 482913562 + .long 1021986286 + .long 1968133632 + .long 1070390911 + .long 3281474337 + .long 1022646400 + .long 291639040 + .long 1070407725 + .long 2453320259 + .long 1022812423 + .long 2081472512 + .long 1070424546 + .long 2939989570 + .long 1023091888 + .long 3380340480 + .long 1070441375 + .long 2850707499 + .long 1021921109 + .long 232287488 + .long 1070458213 + .long 3674625342 + .long 1020725130 + .long 1567614208 + .long 1070475058 + .long 9347334 + .long 1022024009 + .long 3433091072 + .long 1070491911 + .long 282524999 + .long 1021433523 + .long 1876877312 + .long 1070508773 + .long 3470449440 + .long 1019309721 + .long 1538472192 + .long 1070525643 + .long 2089486825 + .long 1019698916 + .long 2763830784 + .long 1070542521 + .long 443498115 + .long 1020505194 + .long 1605381632 + .long 1070559408 + .long 3018871601 + .long 1022869913 + .long 2706946048 + .long 1070576303 + .long 3936260892 + .long 1023175875 + .long 2123887360 + .long 1070593207 + .long 2994220655 + .long 1022825948 + .long 104015104 + .long 1070603108 + .long 335054493 + .long 1023441853 + .long 2904568832 + .long 1070615800 + .long 1451215633 + .long 1023853857 + .long 3456197120 + .long 1070632739 + .long 436334733 + .long 1024026432 + .long 252452352 + .long 1070649697 + .long 34596167 + .long 1024031396 + .long 3328018432 + .long 1070666672 + .long 2644547073 + .long 1024296758 + .long 1255829248 + .long 1070683667 + .long 552832586 + .long 1023763122 + .long 4097058560 + .long 1070700680 + .long 1955640623 + .long 1021394654 + .long 451770112 + .long 1070717714 + .long 3428903777 + .long 1022941142 + .long 408920832 + .long 1070734767 + .long 165503263 + .long 1023894958 + .long 1186960640 + .long 1070751840 + .long 435826450 + .long 1024026134 + .long 19078656 + .long 1070768934 + .long 1834169749 + .long 1022899284 + .long 2743490304 + .long 1070786048 + .long 494581074 + .long 1018818479 + .long 2328961024 + .long 1070803184 + .long 2987908834 + .long 1022581110 + .long 350011392 + .long 1070820342 + .long 240771184 + .long 1024143083 + .long 2692326912 + .long 1070837521 + .long 666056837 + .long 1022394776 + .long 2373274368 + .long 1070854723 + .long 2484337770 + .long 1024228156 + .long 1017131520 + .long 1070871948 + .long 3285648279 + .long 1024025789 + .long 265558272 + .long 1070889196 + .long 392241896 + .long 1024252809 + .long 1778008064 + .long 1070906467 + .long 1536107943 + .long 1023949300 + .long 2937184768 + .long 1070923762 + .long 3541062251 + .long 1019448646 + .long 1144442880 + .long 1070941082 + .long 3691683781 + .long 1022123948 + .long 2410165504 + .long 1070958426 + .long 1804181960 + .long 1023945221 + .long 4174350848 + .long 1070975795 + .long 2016094861 + .long 1021716585 + .long 3897012480 + .long 1070993190 + .long 175294410 + .long 1023703404 + .long 3353623040 + .long 1071010611 + .long 167973242 + .long 1023240839 + .long 45671168 + .long 1071028059 + .long 2166856113 + .long 1021565413 + .long 86063872 + .long 1071045533 + .long 2676254727 + .long 1023985299 + .long 1019772672 + .long 1071063034 + .long 989043593 + .long 1021549587 + .long 414297344 + .long 1071080563 + .long 3960972046 + .long 1024307251 + .long 155173120 + .long 1071098120 + .long 1830919291 + .long 1021592251 + .long 2151562240 + .long 1071115705 + .long 405408666 + .long 1023423128 + .long 4041854720 + .long 1071133319 + .long 2043497827 + .long 1024411503 + .long 3489224192 + .long 1071150963 + .long 3072215864 + .long 1022698635 + .long 2477196288 + .long 1071168637 + .long 1812195139 + .long 1022689192 + .long 3015298816 + .long 1071186341 + .long 764841969 + .long 1021027331 + .long 2844731136 + .long 1071204076 + .long 2878117321 + .long 1019116513 + .long 4028950528 + .long 1071221842 + .long 698911452 + .long 1023265602 + .long 69441536 + .long 1071239641 + .long 3253467847 + .long 1020795075 + .long 1676209920 + .long 1071257471 + .long 4272431167 + .long 1022873982 + .long 2408752384 + .long 1071275334 + .long 648519100 + .long 1024385717 + .long 151623680 + .long 1071293231 + .long 345257017 + .long 1019561408 + .long 1410154240 + .long 1071311161 + .long 197863993 + .long 1023224207 + .long 4131351552 + .long 1071329125 + .long 2620801789 + .long 1024411169 + .long 1999664384 + .long 1071347125 + .long 3952692616 + .long 1024168086 + .long 1617668864 + .long 1071365160 + .long 3019889809 + .long 1021907692 + .long 1032074240 + .long 1071383231 + .long 59469899 + .long 1023656194 + .long 2619492096 + .long 1071401338 + .long 1417526820 + .long 1021457783 + .long 202429440 + .long 1071419483 + .long 2927667935 + .long 1019175447 + .long 525044224 + .long 1071437665 + .long 38166811 + .long 1023981879 + .long 1779258880 + .long 1071455885 + .long 481252500 + .long 1023310234 + .long 2195673600 + .long 1071474144 + .long 3962395981 + .long 1021339088 + .long 44573696 + .long 1071492443 + .long 3936281395 + .long 1023014829 + .long 2226905344 + .long 1071510781 + .long 1515320476 + .long 1024320623 + .long 2800512512 + .long 1071529160 + .long 1225403697 + .long 1021081846 + .long 161113600 + .long 1071547581 + .long 3064809733 + .long 1024173917 + .long 1338410240 + .long 1071566043 + .long 2027604973 + .long 1024362526 + .long 522433280 + .long 1071584548 + .long 2055171723 + .long 1023858825 + .long 539595776 + .long 1071603096 + .long 3868820135 + .long 1022936424 + .long 4264017664 + .long 1071621687 + .long 3228065145 + .long 1023479578 + .long 1733924096 + .long 1071640324 + .long 3511934475 + .long 1022496355 + .long 108880384 + .long 1071651839 + .long 615880967 + .long 1023519706 + .long 3517856512 + .long 1071661202 + .long 3113108559 + .long 1025190289 + .long 4043153152 + .long 1071670589 + .long 1571836218 + .long 1023106116 + .long 3251299072 + .long 1071680000 + .long 3444076102 + .long 1022187841 + .long 2736921600 + .long 1071689435 + .long 272771483 + .long 1025095280 + .long 3897698560 + .long 1071703633 + .long 2075390188 + .long 1022489022 + .long 3209485056 + .long 1071722652 + .long 1438094065 + .long 1021844944 + .long 3781432064 + .long 1071741774 + .long 1675017145 + .long 1024143828 + .long 2684184064 + .long 1071761003 + .long 2259963753 + .long 1024731393 + .long 1840489728 + .long 1071780342 + .long 3372883597 + .long 1023431408 + .long 3764087808 + .long 1071799794 + .long 3307523102 + .long 1024485788 + .long 3006232320 + .long 1071819364 + .long 3088971966 + .long 1025213251 + .long 3374881280 + .long 1071839055 + .long 834437749 + .long 1025236452 + .long 797284864 + .long 1071858872 + .long 3122663941 + .long 1025320473 + .long 545765120 + .long 1071878818 + .long 826539625 + .long 1022450955 + .long 107562240 + .long 1071898898 + .long 339584600 + .long 1022481255 + .long 2123649024 + .long 1071919116 + .long 3912959833 + .long 1024321009 + .long 1562385664 + .long 1071939478 + .long 2846067230 + .long 1023343981 + .long 2963085824 + .long 1071959988 + .long 954548627 + .long 1021475211 + .long 3325550592 + .long 1071980652 + .long 3459651155 + .long 1025305573 + .long 775752448 + .long 1072001476 + .long 3582746667 + .long 1023859460 + .long 3238590720 + .long 1072022464 + .long 634636162 + .long 1024472353 + .long 2758801920 + .long 1072043624 + .long 3078216319 + .long 1025304516 + .long 1370319104 + .long 1072064962 + .long 2570569078 + .long 1025099442 + .long 2615805184 + .long 1072086484 + .long 3729933412 + .long 1024605112 + .long 3077336576 + .long 1072108198 + .long 1948916066 + .long 1024781603 + .long 1099528192 + .long 1072130112 + .long 3139143157 + .long 1023729360 + .long 1231903232 + .long 1072152233 + .long 1349513477 + .long 1024737515 + .long 1507504128 + .long 1072174570 + .long 3484516322 + .long 1024000959 + .long 2214659840 + .long 1072197132 + .long 2563820917 + .long 1025225535 + .long 1804739840 + .long 1072219929 + .long 760038746 + .long 1024482855 + .long 1413746688 + .long 1072242971 + .long 3401734714 + .long 1025129838 + .long 821409536 + .long 1072266269 + .long 3729772551 + .long 1025484796 + .long 3031825664 + .long 1072289834 + .long 122256749 + .long 1024752594 + .long 1710784256 + .long 1072313680 + .long 1518205483 + .long 1024724809 + .long 3025265152 + .long 1072337819 + .long 409951989 + .long 1022835555 + .long 287769088 + .long 1072362267 + .long 800355594 + .long 1022484850 + .long 198179840 + .long 1072387038 + .long 3502926213 + .long 1024209373 + .long 1909130496 + .long 1072412149 + .long 3064694319 + .long 1025380823 + .long 1941732096 + .long 1072437619 + .long 4112930390 + .long 1024294679 + .long 3492010496 + .long 1072463467 + .long 2684918107 + .long 1023220233 + .long 81959680 + .long 1072489716 + .long 220021366 + .long 1020635131 + .long 2297837056 + .long 1072516387 + .long 4027683826 + .long 1021041185 + .long 270404096 + .long 1072543508 + .long 2012766065 + .long 1021780753 + .long 3667376896 + .long 1072571105 + .long 2727981522 + .long 1023009874 + .long 330400256 + .long 1072599212 + .long 2940017003 + .long 1025393439 + .long 1119293952 + .long 1072627861 + .long 1608550416 + .long 1022675612 + .long 3536155904 + .long 1072657091 + .long 349665778 + .long 1025156751 + .long 3078046720 + .long 1072686946 + .long 2016159996 + .long 1022193169 + .long 455228416 + .long 1072705361 + .long 1908539328 + .long 1026126332 + .long 1871505664 + .long 1072720988 + .long 2784700894 + .long 1025922277 + .long 1630994432 + .long 1072737010 + .long 361107678 + .long 1022887244 + .long 2084558336 + .long 1072753462 + .long 2642784509 + .long 1072689083 + .long 1514442531 + .long 1072688953 + .long 333108933 + .long 1072688821 + .long 3392112024 + .long 1072688686 + .long 2099852862 + .long 1072688550 + .long 749609004 + .long 1072688412 + .long 3634632596 + .long 1072688271 + .long 2163248461 + .long 1072688129 + .long 628657846 + .long 1072687985 + .long 3324036511 + .long 1072687838 + .long 1657632815 + .long 1072687690 + .long 4217538760 + .long 1072687539 + .long 2411951597 + .long 1072687387 + .long 533944872 + .long 1072687233 + .long 2876566508 + .long 1072687076 + .long 847936891 + .long 1072686918 + .long 3036019913 + .long 1072686757 + .long 848884575 + .long 1072686595 + .long 2874443326 + .long 1072686430 + .long 520713666 + .long 1072686264 + .long 2375556481 + .long 1072686095 + .long 4141904948 + .long 1072685924 + .long 1522666382 + .long 1072685752 + .long 3105624104 + .long 1072685577 + .long 298666327 + .long 1072685401 + .long 1689524500 + .long 1072685222 + .long 2981002200 + .long 1072685041 + .long 4170844284 + .long 1072684858 + .long 961802263 + .long 1072684674 + .long 1941503454 + .long 1072684487 + .long 2812647170 + .long 1072684298 + .long 3572873869 + .long 1072684107 + .long 4219797823 + .long 1072683914 + .long 456039788 + .long 1072683720 + .long 869096151 + .long 1072683523 + .long 1161535119 + .long 1072683324 + .long 1330865866 + .long 1072683123 + .long 1374571204 + .long 1072682920 + .long 1290107538 + .long 1072682715 + .long 1074904836 + .long 1072682508 + .long 726366587 + .long 1072682299 + .long 241869763 + .long 1072682088 + .long 3913732079 + .long 1072681874 + .long 3149342765 + .long 1072681659 + .long 2240966306 + .long 1072681442 + .long 1185873216 + .long 1072681223 + .long 4276274591 + .long 1072681001 + .long 2919452883 + .long 1072680778 + .long 1407565635 + .long 1072680553 + .long 4032743551 + .long 1072680325 + .long 2202188565 + .long 1072680096 + .long 207977577 + .long 1072679865 + .long 2342160518 + .long 1072679631 + .long 11858423 + .long 1072679396 + .long 1804034453 + .long 1072679158 + .long 3420722787 + .long 1072678918 + .long 563930456 + .long 1072678677 + .long 1820539192 + .long 1072678433 + .long 2892501606 + .long 1072678187 + .long 3776710320 + .long 1072677939 + .long 175063337 + .long 1072677690 + .long 674333171 + .long 1072677438 + .long 976363026 + .long 1072677184 + .long 1077935934 + .long 1072676928 + .long 1921075490 + .long 1072676540 + .long 881493302 + .long 1072676016 + .long 3275752439 + .long 1072675483 + .long 486855588 + .long 1072674943 + .long 1077229111 + .long 1072674394 + .long 723950308 + .long 1072673837 + .long 3693582199 + .long 1072673271 + .long 1367335316 + .long 1072672698 + .long 2305837020 + .long 1072672116 + .long 2184358641 + .long 1072671526 + .long 972682840 + .long 1072670928 + .long 2935101762 + .long 1072670321 + .long 3745513263 + .long 1072669706 + .long 3372320886 + .long 1072669083 + .long 1783464620 + .long 1072668452 + .long 3241386215 + .long 1072667812 + .long 3418125284 + .long 1072667164 + .long 2280219148 + .long 1072666508 + .long 4088700758 + .long 1072665843 + .long 219227400 + .long 1072665171 + .long 3521816918 + .long 1072664489 + .long 1076205279 + .long 1072663800 + .long 1436484616 + .long 1072663102 + .long 271362610 + .long 1072662396 + .long 1838996688 + .long 1072661681 + .long 1807122518 + .long 1072660958 + .long 137953542 + .long 1072660227 + .long 1088178584 + .long 1072659487 + .long 324057537 + .long 1072658739 + .long 2101288076 + .long 1072657982 + .long 2085133974 + .long 1072657217 + .long 235324451 + .long 1072656444 + .long 806051592 + .long 1072655662 + .long 3756033140 + .long 1072654871 + .long 453542543 + .long 1072654073 + .long 3741177327 + .long 1072653265 + .long 691216109 + .long 1072652450 + .long 4145223372 + .long 1072651625 + .long 1174439091 + .long 1072650793 + .long 324416139 + .long 1072649952 + .long 1550246310 + .long 1072649102 + .long 511524674 + .long 1072648244 + .long 1457248482 + .long 1072647377 + .long 45944955 + .long 1072646502 + .long 525537397 + .long 1072645618 + .long 2848440188 + .long 1072644725 + .long 2671555633 + .long 1072643824 + .long 4241172637 + .long 1072642914 + .long 3213094278 + .long 1072641996 + .long 3832503688 + .long 1072641069 + .long 1754091534 + .long 1072640134 + .long 1221921804 + .long 1072639190 + .long 2184526489 + .long 1072638237 + .long 294902089 + .long 1072637276 + .long 4090375270 + .long 1072636305 + .long 632860906 + .long 1072635327 + .long 2753498702 + .long 1072634339 + .long 1808009252 + .long 1072633343 + .long 2036428672 + .long 1072632338 + .long 3383235626 + .long 1072631324 + .long 1497347484 + .long 1072630302 + .long 617018317 + .long 1072629271 + .long 684933058 + .long 1072628231 + .long 1643170798 + .long 1072627182 + .long 3011066360 + .long 1072625592 + .long 957158713 + .long 1072623442 + .long 1390907941 + .long 1072621256 + .long 3819155270 + .long 1072619034 + .long 3443571196 + .long 1072616777 + .long 4045412458 + .long 1072614484 + .long 805503923 + .long 1072612156 + .long 1778922015 + .long 1072609791 + .long 2125033665 + .long 1072607390 + .long 1287203863 + .long 1072604953 + .long 2992629568 + .long 1072602479 + .long 2367267127 + .long 1072599969 + .long 3115526047 + .long 1072597422 + .long 340219539 + .long 1072594839 + .long 2017215719 + .long 1072592218 + .long 3225443424 + .long 1072589560 + .long 3326565673 + .long 1072586865 + .long 1669811211 + .long 1072584133 + .long 1886735022 + .long 1072581363 + .long 3301071171 + .long 1072578555 + .long 928514283 + .long 1072575710 + .long 2656364059 + .long 1072572826 + .long 3473490507 + .long 1072569904 + .long 2649965606 + .long 1072566944 + .long 3736819052 + .long 1072563945 + .long 1680885175 + .long 1072560908 + .long 4413771 + .long 1072557832 + .long 2214869753 + .long 1072554716 + .long 3214725184 + .long 1072551561 + .long 2186079903 + .long 1072548367 + .long 2590372131 + .long 1072545133 + .long 3578146079 + .long 1072541859 + .long 4283712755 + .long 1072538545 + .long 3824834510 + .long 1072535191 + .long 1302400298 + .long 1072531797 + .long 95058636 + .long 1072528362 + .long 3563906063 + .long 1072524885 + .long 2167230730 + .long 1072521368 + .long 3524918334 + .long 1072517809 + .long 2353304918 + .long 1072514209 + .long 1939625839 + .long 1072510567 + .long 1256714581 + .long 1072506883 + .long 3552525848 + .long 1072503156 + .long 3464809522 + .long 1072499387 + .long 4200542593 + .long 1072495575 + .long 355609124 + .long 1072491721 + .long 3684139099 + .long 1072487822 + .long 148355918 + .long 1072483881 + .long 1457689242 + .long 1072479895 + .long 2118591596 + .long 1072475865 + .long 908848089 + .long 1072471791 + .long 877032689 + .long 1072467672 + .long 752012304 + .long 1072463508 + .long 3532301749 + .long 1072459298 + .long 3600563221 + .long 1072455043 + .long 3902857084 + .long 1072450742 + .long 3063101036 + .long 1072446395 + .long 3972344374 + .long 1072442001 + .long 903183549 + .long 1072437561 + .long 983892938 + .long 1072433073 + .long 2722858568 + .long 1072428537 + .long 302790515 + .long 1072423954 + .long 759811057 + .long 1072419322 + .long 2507809922 + .long 1072414641 + .long 2388408813 + .long 1072407528 + .long 2084492942 + .long 1072397870 + .long 2435703301 + .long 1072388010 + .long 1935433360 + .long 1072377945 + .long 2742047290 + .long 1072367671 + .long 2053284205 + .long 1072357185 + .long 657783367 + .long 1072346483 + .long 2893664841 + .long 1072335560 + .long 3718906405 + .long 1072324413 + .long 1547896303 + .long 1072313038 + .long 2494058440 + .long 1072301429 + .long 3133238742 + .long 1072289582 + .long 3327000086 + .long 1072277492 + .long 1860667274 + .long 1072265154 + .long 665340747 + .long 1072252562 + .long 443347841 + .long 1072239710 + .long 581282618 + .long 1072226592 + .long 3349780465 + .long 1072213201 + .long 914217606 + .long 1072199532 + .long 989797661 + .long 1072185576 + .long 945436416 + .long 1072171326 + .long 549291300 + .long 1072156774 + .long 1814636389 + .long 1072141911 + .long 239092858 + .long 1072126729 + .long 1794680724 + .long 1072111217 + .long 1241534678 + .long 1072095366 + .long 3366566214 + .long 1072079164 + .long 1244090828 + .long 1072062601 + .long 1708448120 + .long 1072045663 + .long 3544260650 + .long 1072028337 + .long 1402741403 + .long 1072010610 + .long 2551936888 + .long 1071992465 + .long 617669739 + .long 1071973887 + .long 794002186 + .long 1071954857 + .long 2021237693 + .long 1071935356 + .long 540450384 + .long 1071915364 + .long 1920555537 + .long 1071894857 + .long 2879585206 + .long 1071873811 + .long 3000237455 + .long 1071852199 + .long 3352974346 + .long 1071829991 + .long 569629937 + .long 1071807155 + .long 2077237208 + .long 1071783653 + .long 2284891805 + .long 1071759446 + .long 1226651784 + .long 1071734489 + .long 1102047405 + .long 1071708731 + .long 2009896384 + .long 1071682115 + .long 927419082 + .long 1071654577 + .long 85010366 + .long 1071607413 + .long 696431025 + .long 1071548180 + .long 2611410541 + .long 1071486585 + .long 2612593658 + .long 1071422396 + .long 3548155306 + .long 1071355336 + .long 3887997484 + .long 1071285073 + .long 244854763 + .long 1071211202 + .long 4214445648 + .long 1071133216 + .long 2303966727 + .long 1071050478 + .long 3991040013 + .long 1070962152 + .long 3126952278 + .long 1070867118 + .long 1817448378 + .long 1070763804 + .long 1793814864 + .long 1070649884 + .long 3507224072 + .long 1070447193 + .long 4027609105 + .long 1070148772 + .long 577507993 + .long 1069779414 + .long 2310232419 + .long 1068931829 + .long 4294967295 + .long 2147483647 + .long 0 + .long 0 + .long 0 + .long 4294950912 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .long 0 + .long 2147483584 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .type static_const_table,@object + .size static_const_table,6096 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_atan2.S b/libm/x86/e_atan2.S new file mode 100644 index 0000000..a6ad390 --- /dev/null +++ b/libm/x86/e_atan2.S @@ -0,0 +1,1222 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// +//1. The method is based on the relationship of atan2(Y,X) to atan(|Y/X|) +// as follows. +// / sign(Y) atan(|Y/X|) if X > 0 +// atan2(Y,X) = +// \ sign(Y)*pi - sign(Y)*atan(|Y/X|) if X < 0 +// +// Thus, atan2(Y,X) is of the form atan2(Y,X) = PI + sgn*atan(|Y/X|) +// where PI and sgn can be determined by the four possible combinations of +// of the pair (sign(X),sign(Y)). We concentrate on the numerical method +// for atan(|Y/X|). +// +//2. For |Y/X| < 2^(-64), atan(|Y/X|) ~=~ |Y/X|. Hence, atan2(Y,X) is Y/X +// if X > 0, and sign(Y)*pi otherwise. +//3. For |Y/X| >= 2^(65), atan(|Y/X|) ~=~ pi/2. Hence atan2(Y,X) is sign(Y)pi/2. +//4. For 2^(-64) <= |Y/X| < 2^(-5), atan(|Y/X|) is approximated by a polynomial +// of the form Z + Z*E*polynomial(E), where Z = |Y/X| and E = Z*Z. +//5. For |Y/X| > 2^(5), atan(|Y/X|) = pi/2 + atan(-|X/Y|), and atan(-|X/Y|) is +// calculated using the polynomial in 4 above. +//6. For 2^(-5) <= |Y/X| <= 2^(5), we employ a table lookup method. First, +// we obtain B = 2^k * 1.b1 b2 b3 b4 = 2^k * (1+k/16) that approximate +// |Y/X| to approximately 5 significant bits. Hence, atan(|Y/X|) is +// +// atan(|Y/X|) = atan(B) + atan(Z), where Z = (|Y|-B|X|)/(|X|+B|Y|). +// ~=~ tau + Z + Z*E*polynomial(E), where E = Z*Z. +// +// B has the range from 2^(-6)*(1+14/16) to 2^5 = 2^(5)*(1+0/16), totally +// 163 possible values. These values are calculated beforehand and stored +// in a table. The polynomial is the one used in 4. +// +// Special cases: +// atan2(+-0, +0) = +-0 +// atan2(+-0, -0) = +-pi +// atan2(+-0, x) = +-0, for x > 0, and +-pi, for x < 0 +// atan2(y, +-0) = +pi/2 for y > 0, and -pi/2 for y < 0 +// atan2(+-y, +INF) = +-0, for finite y > 0 +// atan2(+-y, -INF) = +-pi, for finite y > 0 +// atan2(+-INF, x) = +-pi/2, for finite x +// atan2(+-INF, +INF) = +-pi/4 +// atan2(+-INF, -INF) = +-3*pi/4 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin atan2 +ENTRY(atan2) +# parameter 1: 8 + %ebp +# parameter 2: 16 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 64(%esp) + call static_func + movl %eax, %ebx + movsd 136(%esp), %xmm1 + movsd 128(%esp), %xmm0 + pextrw $3, %xmm0, %eax + movq %xmm0, 8(%esp) + andl $32752, %eax + movq %xmm1, 16(%esp) + subl $14448, %eax + cmpl $3840, %eax + ja .L_2TAG_PACKET_0.0.2 + pextrw $3, %xmm1, %eax + andl $32752, %eax + subl $14448, %eax + cmpl $3840, %eax + ja .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + unpcklpd %xmm1, %xmm0 + xorpd %xmm5, %xmm5 + xorpd %xmm3, %xmm3 + movl $2048, %eax + pinsrw $3, %eax, %xmm5 + paddw %xmm1, %xmm5 + psrlq $29, %xmm5 + rcpss %xmm5, %xmm3 + xorpd %xmm4, %xmm4 + movl $14336, %ecx + pinsrw $3, %ecx, %xmm4 + psllq $29, %xmm3 + paddw %xmm4, %xmm3 + mulsd %xmm0, %xmm3 + xorpd %xmm2, %xmm2 + xorpd %xmm6, %xmm6 + xorpd %xmm7, %xmm7 + movl $32768, %eax + pinsrw $2, %eax, %xmm6 + movl $32767, %ecx + pinsrw $3, %ecx, %xmm7 + paddd %xmm6, %xmm3 + andpd %xmm7, %xmm3 + movapd %xmm3, %xmm5 + pextrw $3, %xmm3, %eax + movl $16448, %ecx + pinsrw $3, %ecx, %xmm2 + minsd %xmm2, %xmm3 + movmskpd %xmm0, %edx + psllq $1, %xmm0 + psrlq $1, %xmm0 + cmpsd $2, %xmm2, %xmm5 + psllq $1, %xmm1 + psrlq $1, %xmm1 + movapd %xmm1, %xmm6 + movapd %xmm1, %xmm7 + movapd %xmm0, %xmm2 + movl $0, %ecx + pinsrw $0, %ecx, %xmm6 + subsd %xmm6, %xmm7 + movapd %xmm0, %xmm4 + mulsd %xmm3, %xmm6 + mulsd %xmm3, %xmm4 + mulsd %xmm3, %xmm7 + andpd %xmm5, %xmm0 + subsd %xmm6, %xmm0 + andpd %xmm5, %xmm1 + addsd %xmm1, %xmm4 + subsd %xmm7, %xmm0 + andl $32752, %eax + subl $16286, %eax + cmpl $1121, %eax + ja .L_2TAG_PACKET_3.0.2 + divsd %xmm4, %xmm0 + pextrw $3, %xmm3, %ecx + movsd 2944(%ebx), %xmm2 + movsd 2960(%ebx), %xmm3 + pextrw $0, %xmm5, %eax + addl %edx, %edx + movapd 2688(%ebx,%edx,8), %xmm6 + movapd 2752(%ebx,%edx,8), %xmm1 + subl $16286, %ecx + notl %eax + andl $1, %eax + addl %eax, %ecx + addl %ecx, %ecx + movapd (%ebx,%ecx,8), %xmm5 + xorpd %xmm1, %xmm5 + addpd %xmm6, %xmm5 + movapd %xmm5, %xmm6 + unpckhpd %xmm5, %xmm5 + xorpd %xmm0, %xmm1 + movapd %xmm1, %xmm4 + mulsd %xmm0, %xmm0 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm3 + addsd %xmm6, %xmm1 + subsd %xmm1, %xmm6 + addsd %xmm4, %xmm6 + addsd 2952(%ebx), %xmm2 + mulsd %xmm0, %xmm3 + mulsd %xmm0, %xmm4 + addsd %xmm5, %xmm6 + mulsd %xmm4, %xmm2 + addsd 2968(%ebx), %xmm3 + mulsd %xmm3, %xmm2 + addsd %xmm6, %xmm2 + addsd %xmm2, %xmm1 + movsd %xmm1, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_3.0.2: + addl $942, %eax + cmpl $942, %eax + ja .L_2TAG_PACKET_5.0.2 + xorpd %xmm4, %xmm4 + movl $16368, %ecx + pinsrw $3, %ecx, %xmm4 + divsd %xmm1, %xmm4 + addl %edx, %edx + movapd 2752(%ebx,%edx,8), %xmm6 + unpcklpd %xmm3, %xmm3 + xorpd %xmm6, %xmm0 + xorpd %xmm6, %xmm2 + xorpd %xmm6, %xmm3 + movapd 2816(%ebx,%edx,8), %xmm7 + movsd 2944(%ebx), %xmm1 + movsd 2960(%ebx), %xmm5 + andpd 2880(%ebx,%edx,8), %xmm3 + mulsd %xmm4, %xmm2 + mulsd %xmm4, %xmm0 + movapd %xmm2, %xmm6 + mulsd %xmm2, %xmm2 + mulsd %xmm2, %xmm1 + addsd %xmm2, %xmm5 + mulsd %xmm2, %xmm6 + addsd 2952(%ebx), %xmm1 + mulsd %xmm2, %xmm5 + addsd %xmm0, %xmm7 + addpd %xmm3, %xmm7 + mulsd %xmm6, %xmm1 + addsd 2968(%ebx), %xmm5 + mulsd %xmm1, %xmm5 + addsd %xmm7, %xmm5 + unpckhpd %xmm7, %xmm7 + addsd %xmm7, %xmm5 + movsd %xmm5, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + movsd 16(%esp), %xmm1 + movsd 8(%esp), %xmm0 + pextrw $3, %xmm1, %eax + andl $32752, %eax + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl %eax, %ecx + jg .L_2TAG_PACKET_6.0.2 + pextrw $3, %xmm1, %ecx + cmpl $32767, %ecx + jg .L_2TAG_PACKET_7.0.2 + divsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_7.0.2: + andpd 2672(%ebx), %xmm0 + movsd 2640(%ebx), %xmm2 + xorpd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_6.0.2: + andpd 2672(%ebx), %xmm0 + movsd 2624(%ebx), %xmm2 + xorpd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_0.0.2: +.L_2TAG_PACKET_1.0.2: + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $32752, %ecx + je .L_2TAG_PACKET_8.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_9.0.2 + movsd 2992(%ebx), %xmm3 + movl $1024, %edx + movsd 2976(%ebx), %xmm4 + xorpd %xmm6, %xmm6 + movsd 3008(%ebx), %xmm7 + cmpl $0, %ecx + je .L_2TAG_PACKET_10.0.2 +.L_2TAG_PACKET_11.0.2: + cmpl $0, %eax + je .L_2TAG_PACKET_12.0.2 +.L_2TAG_PACKET_13.0.2: + addl %ecx, %edx + subl %eax, %edx + cmpl $2048, %edx + ja .L_2TAG_PACKET_5.0.2 + addl $15344, %edx + pinsrw $3, %edx, %xmm6 + andpd %xmm4, %xmm0 + andpd %xmm4, %xmm1 + orpd %xmm6, %xmm0 + orpd %xmm7, %xmm1 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_10.0.2: + subl $880, %edx + mulsd %xmm3, %xmm0 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $0, %ecx + je .L_2TAG_PACKET_14.0.2 + jmp .L_2TAG_PACKET_11.0.2 +.L_2TAG_PACKET_12.0.2: + addl $880, %edx + mulsd %xmm3, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_15.0.2 + jmp .L_2TAG_PACKET_13.0.2 +.L_2TAG_PACKET_8.0.2: + movd %xmm0, %edx + movapd %xmm0, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $1048575, %ecx + orl %edx, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_16.0.2 + psrlq $63, %xmm0 + psllq $63, %xmm0 + cmpl $32752, %eax + jae .L_2TAG_PACKET_17.0.2 + movapd 2624(%ebx), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 +.L_2TAG_PACKET_18.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_16.0.2: + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_17.0.2: + movd %xmm1, %eax + movapd %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + movl $-2147483648, %edx + andl %ecx, %edx + andl $1048575, %ecx + orl %eax, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_19.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_20.0.2 + movapd 2656(%ebx), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_19.0.2: + movapd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_20.0.2: + movapd 2656(%ebx), %xmm5 + movapd 2624(%ebx), %xmm6 + addpd %xmm6, %xmm5 + pshufd $238, %xmm5, %xmm6 + addpd %xmm6, %xmm5 + orpd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_9.0.2: + movd %xmm1, %eax + movapd %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + movl $-2147483648, %edx + andl %ecx, %edx + andl $1048575, %ecx + orl %eax, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_19.0.2 + psrlq $63, %xmm0 + psllq $63, %xmm0 + cmpl $0, %edx + jne .L_2TAG_PACKET_21.0.2 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_21.0.2: + movapd 2640(%ebx), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_14.0.2: + pextrw $3, %xmm1, %edx + andl $32768, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_22.0.2 + movapd 2640(%ebx), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + comisd %xmm0, %xmm1 + orpd %xmm5, %xmm0 + jne .L_2TAG_PACKET_23.0.2 +.L_2TAG_PACKET_24.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_23.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_22.0.2: + comisd %xmm0, %xmm1 + jne .L_2TAG_PACKET_23.0.2 + je .L_2TAG_PACKET_24.0.2 +.L_2TAG_PACKET_15.0.2: + movapd 2624(%ebx), %xmm5 + psrlq $63, %xmm0 + psllq $63, %xmm0 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) +.L_2TAG_PACKET_4.0.2: + movl 64(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(atan2) +# -- End atan2 + +# Start file scope ASM +.weak atan2l +.equ atan2l, atan2 +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 3390881280 + .long 1067318733 + .long 1411116779 + .long 1018950063 + .long 2985987840 + .long 1067384211 + .long 2088903695 + .long 1018086027 + .long 3148445184 + .long 1067449685 + .long 2044163806 + .long 1017271335 + .long 3667629184 + .long 1067515494 + .long 2353092775 + .long 1019967309 + .long 1546568832 + .long 1067580954 + .long 611991315 + .long 1017602584 + .long 3815996800 + .long 1067646404 + .long 466038598 + .long 1019686426 + .long 4050241920 + .long 1067711845 + .long 3265026328 + .long 1019626952 + .long 120454912 + .long 1067777277 + .long 1542207696 + .long 1020155608 + .long 2784639744 + .long 1067842697 + .long 3883834623 + .long 1018602870 + .long 1328010624 + .long 1067908107 + .long 1791097456 + .long 1019053126 + .long 2217794048 + .long 1067973505 + .long 551619938 + .long 1018494194 + .long 3333520000 + .long 1068038891 + .long 2390331823 + .long 1019033022 + .long 2557052032 + .long 1068104265 + .long 2423976108 + .long 1019728674 + .long 2067649536 + .long 1068169626 + .long 3757397745 + .long 1018672362 + .long 4047094784 + .long 1068234973 + .long 481613184 + .long 1019275104 + .long 2089853184 + .long 1068300307 + .long 1733914374 + .long 1020124677 + .long 2678003840 + .long 1068365626 + .long 1373600282 + .long 1013935474 + .long 3706496128 + .long 1068430930 + .long 1000610902 + .long 1019673285 + .long 3073179008 + .long 1068496219 + .long 1497143008 + .long 1019900342 + .long 2803716736 + .long 1068562846 + .long 1476677416 + .long 1019444094 + .long 3204984128 + .long 1068628077 + .long 1192335905 + .long 1018748628 + .long 831146624 + .long 1068693273 + .long 2733586224 + .long 1018823295 + .long 243029376 + .long 1068758431 + .long 950106081 + .long 1019046675 + .long 1735561920 + .long 1068823549 + .long 3546440856 + .long 1020104712 + .long 1339217792 + .long 1068888626 + .long 3028812387 + .long 1019818321 + .long 3706342144 + .long 1068953659 + .long 3814564029 + .long 1017763871 + .long 637726976 + .long 1069018648 + .long 3584007699 + .long 1017976868 + .long 1148779264 + .long 1069083589 + .long 2282532133 + .long 1019483954 + .long 1406131392 + .long 1069148481 + .long 1547359113 + .long 1019786342 + .long 1908875904 + .long 1069213322 + .long 1315508410 + .long 1020009473 + .long 3194947520 + .long 1069278110 + .long 3845393201 + .long 1015803761 + .long 1547487744 + .long 1069342844 + .long 3863107865 + .long 1019810104 + .long 1881061952 + .long 1069407521 + .long 4288343548 + .long 1019687581 + .long 563086336 + .long 1069472140 + .long 2582230241 + .long 1020099350 + .long 2594975552 + .long 1069536698 + .long 2306443764 + .long 1019667244 + .long 3438545024 + .long 1069606573 + .long 957455549 + .long 1015587735 + .long 4211357472 + .long 1069670906 + .long 2611778754 + .long 1017877214 + .long 3002835424 + .long 1069735101 + .long 235580458 + .long 1020211685 + .long 3905315424 + .long 1069799150 + .long 3630647617 + .long 1018736849 + .long 2849656576 + .long 1069863047 + .long 2412165062 + .long 1019693004 + .long 507429472 + .long 1069926785 + .long 1397750723 + .long 1018412717 + .long 2307470272 + .long 1069990356 + .long 1796470904 + .long 1019796181 + .long 1271814912 + .long 1070053755 + .long 189761565 + .long 1016149115 + .long 3800538144 + .long 1070116974 + .long 2524871582 + .long 1018263353 + .long 3916203552 + .long 1070180008 + .long 127848658 + .long 1017672664 + .long 457192032 + .long 1070242851 + .long 4020400938 + .long 1019823010 + .long 1385324704 + .long 1070305495 + .long 564511179 + .long 1016079094 + .long 2322869856 + .long 1070367935 + .long 2347103319 + .long 1018927760 + .long 3743438624 + .long 1070430165 + .long 877973862 + .long 1019638162 + .long 2392255552 + .long 1070492180 + .long 2432782267 + .long 1018872629 + .long 4180443328 + .long 1070553973 + .long 3102990015 + .long 1020093101 + .long 2547540832 + .long 1070636485 + .long 3877738253 + .long 1017300424 + .long 2735468912 + .long 1070697461 + .long 2446470256 + .long 1019235378 + .long 542633792 + .long 1070757943 + .long 583606328 + .long 1018624131 + .long 923265984 + .long 1070817911 + .long 1793926708 + .long 1019714161 + .long 918728448 + .long 1070877348 + .long 3726463586 + .long 1019433296 + .long 2572275008 + .long 1070936237 + .long 1845354238 + .long 1019459238 + .long 50974688 + .long 1070994564 + .long 983808064 + .long 1016685418 + .long 1105518320 + .long 1071052313 + .long 2357496692 + .long 1015139882 + .long 1264825328 + .long 1071109472 + .long 2244129354 + .long 1019046344 + .long 961157920 + .long 1071166029 + .long 3124185339 + .long 1018541776 + .long 1162701584 + .long 1071221973 + .long 1279780948 + .long 1019268918 + .long 3284935664 + .long 1071277294 + .long 2670033472 + .long 1019833744 + .long 497441888 + .long 1071331985 + .long 1032737410 + .long 1019795212 + .long 3377383904 + .long 1071386036 + .long 2356897182 + .long 1020205553 + .long 1126962000 + .long 1071439443 + .long 3723724586 + .long 1015212418 + .long 90291008 + .long 1071492199 + .long 4178672431 + .long 1020186971 + .long 190059536 + .long 1071595741 + .long 1763589807 + .long 1019162163 + .long 2497392840 + .long 1071670654 + .long 3036997041 + .long 1020204325 + .long 2616971944 + .long 1071719773 + .long 300151069 + .long 1017041957 + .long 2883518128 + .long 1071767563 + .long 2203981414 + .long 1019190108 + .long 1496354352 + .long 1071814030 + .long 332287966 + .long 1016846435 + .long 483276728 + .long 1071859184 + .long 653845024 + .long 1018830914 + .long 3097401072 + .long 1071903039 + .long 1514746408 + .long 1019278972 + .long 2737217248 + .long 1071945615 + .long 1358845067 + .long 1017268275 + .long 2072577560 + .long 1071986933 + .long 3041024735 + .long 1019929672 + .long 2266405656 + .long 1072027017 + .long 1271261130 + .long 1012925070 + .long 958652544 + .long 1072065894 + .long 2158017058 + .long 1019955372 + .long 3312993840 + .long 1072103591 + .long 765809169 + .long 1019114443 + .long 3177001304 + .long 1072140139 + .long 144180084 + .long 1019822186 + .long 3071642184 + .long 1072175568 + .long 4004602424 + .long 1019420740 + .long 4283953648 + .long 1072209909 + .long 1511950430 + .long 1020176966 + .long 1413754136 + .long 1072243195 + .long 856972295 + .long 1015129638 + .long 4073202944 + .long 1072306725 + .long 4068194804 + .long 1019714860 + .long 946117760 + .long 1072366415 + .long 694980733 + .long 1020150135 + .long 3980632032 + .long 1072422512 + .long 1313251280 + .long 1019948709 + .long 1468297112 + .long 1072475260 + .long 330111143 + .long 1019809198 + .long 3478063816 + .long 1072524887 + .long 2930067044 + .long 1017784081 + .long 1153979856 + .long 1072571613 + .long 2225786102 + .long 1017634481 + .long 2089828808 + .long 1072615641 + .long 474621367 + .long 1017043414 + .long 3531732632 + .long 1072657163 + .long 2276396220 + .long 1018757240 + .long 775214612 + .long 1072694803 + .long 3209744818 + .long 1019963015 + .long 662307284 + .long 1072713319 + .long 1381696763 + .long 1019763781 + .long 1192776652 + .long 1072730830 + .long 3017932994 + .long 1015179769 + .long 744202396 + .long 1072747407 + .long 2073854034 + .long 1019512292 + .long 8337908 + .long 1072763115 + .long 16004448 + .long 1019599514 + .long 3589868768 + .long 1072778013 + .long 1374369804 + .long 1018019237 + .long 121647320 + .long 1072792159 + .long 128481634 + .long 1018115438 + .long 2464923204 + .long 1072805601 + .long 1787331214 + .long 1016798022 + .long 4093304372 + .long 1072830562 + .long 3306868969 + .long 1019384078 + .long 1436891684 + .long 1072853231 + .long 676347266 + .long 1017302183 + .long 1104571840 + .long 1072873890 + .long 2870400285 + .long 1019938149 + .long 2037009832 + .long 1072892781 + .long 2956702105 + .long 1016472908 + .long 3139037960 + .long 1072910111 + .long 916057147 + .long 1018364335 + .long 1826698064 + .long 1072926058 + .long 2171961098 + .long 1019669816 + .long 1353941060 + .long 1072940774 + .long 1722928782 + .long 1019926215 + .long 1803191644 + .long 1072954391 + .long 1547878639 + .long 1020259262 + .long 1092591296 + .long 1072967024 + .long 3070107923 + .long 1018320401 + .long 2205372832 + .long 1072978772 + .long 787328196 + .long 1014621351 + .long 1291577100 + .long 1072989723 + .long 2964757301 + .long 1020242528 + .long 4234512804 + .long 1072999952 + .long 3136030038 + .long 1017522144 + .long 3248069132 + .long 1073009528 + .long 1506192355 + .long 1018050472 + .long 3932628500 + .long 1073018509 + .long 1045823554 + .long 1019946655 + .long 4195697848 + .long 1073026948 + .long 233443322 + .long 1018917447 + .long 2501811452 + .long 1073034892 + .long 901427976 + .long 1017333852 + .long 866379428 + .long 1073049455 + .long 2437443742 + .long 1019678792 + .long 1376865888 + .long 1073062480 + .long 3365790232 + .long 1014547152 + .long 3290094268 + .long 1073074195 + .long 3898947415 + .long 1018683566 + .long 354764884 + .long 1073084787 + .long 3854322404 + .long 1019662058 + .long 3332975496 + .long 1073094406 + .long 3171701655 + .long 1017830922 + .long 1141460088 + .long 1073103181 + .long 3946082701 + .long 1020032019 + .long 745761284 + .long 1073111216 + .long 1347210591 + .long 1019106121 + .long 1673304508 + .long 1073118600 + .long 1760606642 + .long 1017324577 + .long 983388240 + .long 1073125409 + .long 3740651204 + .long 1019514104 + .long 3895509100 + .long 1073131706 + .long 2409629983 + .long 1020069322 + .long 2128523668 + .long 1073137548 + .long 3045605368 + .long 1018579174 + .long 2075485692 + .long 1073142981 + .long 3720571789 + .long 1017557436 + .long 121855976 + .long 1073148047 + .long 2391744767 + .long 1020160645 + .long 4181733780 + .long 1073152780 + .long 995028816 + .long 1019681295 + .long 2887813280 + .long 1073157214 + .long 218733247 + .long 1020003509 + .long 2862180896 + .long 1073161375 + .long 2043806490 + .long 1018602288 + .long 3909375184 + .long 1073168973 + .long 1559903412 + .long 1020103444 + .long 3533966292 + .long 1073175738 + .long 734884149 + .long 1018462962 + .long 3815044608 + .long 1073181799 + .long 3630523428 + .long 1017250093 + .long 739639376 + .long 1073187261 + .long 4167476661 + .long 1020008277 + .long 1068309648 + .long 1073192207 + .long 2110061437 + .long 1019295858 + .long 2350566352 + .long 1073196707 + .long 582596516 + .long 1018568821 + .long 2529520024 + .long 1073200819 + .long 745552787 + .long 1019053165 + .long 1841667508 + .long 1073204591 + .long 3982568700 + .long 1016503327 + .long 2242261080 + .long 1073208063 + .long 3433582258 + .long 1016196763 + .long 715134328 + .long 1073211270 + .long 355901358 + .long 1020087916 + .long 2700735876 + .long 1073214240 + .long 3640957736 + .long 1019780205 + .long 141607580 + .long 1073217000 + .long 2488245051 + .long 1020262395 + .long 287934404 + .long 1073219570 + .long 2392691085 + .long 1019883292 + .long 2363373988 + .long 1073221969 + .long 4194561737 + .long 1019237447 + .long 3829340424 + .long 1073224214 + .long 429455526 + .long 1019490975 + .long 1988805928 + .long 1073226320 + .long 3029848706 + .long 1018104889 + .long 1647572320 + .long 1073230161 + .long 10289938 + .long 1017394880 + .long 3988000624 + .long 1073233576 + .long 1957559169 + .long 1019434816 + .long 4263843944 + .long 1073236633 + .long 204710264 + .long 1019908761 + .long 663197724 + .long 1073239386 + .long 1921757578 + .long 1019778948 + .long 3560800700 + .long 1073241876 + .long 3994348896 + .long 1019230192 + .long 2441785656 + .long 1073244141 + .long 871468611 + .long 1014800505 + .long 3277400272 + .long 1073246209 + .long 4092218139 + .long 1020040842 + .long 3951990120 + .long 1073248105 + .long 4276546478 + .long 1019763677 + .long 2737338540 + .long 1073249850 + .long 252776012 + .long 1018794951 + .long 1511361316 + .long 1073251461 + .long 3119653999 + .long 1018514803 + .long 3969162516 + .long 1073252952 + .long 1037069016 + .long 1016792900 + .long 413985240 + .long 1073254338 + .long 4110171432 + .long 1020001345 + .long 3681283576 + .long 1073255627 + .long 1463092818 + .long 1020260354 + .long 3146455488 + .long 1073256831 + .long 1031209123 + .long 1016554799 + .long 95214512 + .long 1073257958 + .long 1373808632 + .long 1019493031 + .long 4250240828 + .long 1073259013 + .long 3891047882 + .long 1020108730 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 1072243195 + .long 856972295 + .long 1015129638 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 3221823995 + .long 856972295 + .long 3164710438 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 3164710438 + .long 1413754136 + .long 3221823995 + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .long 2006262985 + .long 1069310863 + .long 2358449471 + .long 3217342131 + .long 3845454352 + .long 1069952297 + .long 2829679149 + .long 1073771565 + .long 4294967295 + .long 2148532223 + .long 0 + .long 0 + .long 0 + .long 1130364928 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .type static_const_table,@object + .size static_const_table,3024 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_cosh.S b/libm/x86/e_cosh.S new file mode 100644 index 0000000..6942028 --- /dev/null +++ b/libm/x86/e_cosh.S @@ -0,0 +1,1350 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// cosh(x)=(exp(x)+exp(-x))/2 +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7), +// f=0.b1 b2 ... b7, k integer +// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f] +// Tp stores higher 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision +// +// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14}, +// for |x| in [1/8,3*2^8) +// e^{-|x|}=2^{-k-f}*2^{-r} +// +// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp= +// =2^k*Tp+2^k*Tp*P15+2^k*Dp +// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4) +// +// For |x| in [1/8, 3*2^7), cosh(x) is formed as +// RN(2^k*Tp+2^{-k}*Tn)+2^k*Tp*P15+2^{-k}*Tn*P`15+2^{-k}*TnL+2^{-k}*Dn+2^k*Dp +// +// For |x| in [3*2^7, 3*2^8), (e^|x|)/2 is returned, and +// the result is checked for overflow. +// +// For |x|<1/8, a Taylor polynomial expansion is used (degree 10) +// (error bound for polynomial expansion is below 0.501 ulp) +// +// Special cases: +// cosh(NaN) = quiet NaN, and raise invalid exception +// cosh(INF) = that INF +// cosh(0)=1 +// for finite argument, only cosh(0)=1 is exact +// For IEEE double +// cosh(x) overflows +// for x > 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2) +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin cosh +ENTRY(cosh) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + movsd 4240(%ebx), %xmm3 + xorpd %xmm4, %xmm4 + movsd 4192(%ebx), %xmm1 + movsd 4200(%ebx), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd 4096(%ebx), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + andl $32767, %ecx + subl $16320, %ecx + cmpl $200, %ecx + jae .L_2TAG_PACKET_0.0.2 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + movapd %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + xorpd %xmm5, %xmm5 + subsd %xmm6, %xmm3 + movapd 4112(%ebx), %xmm4 + addsd %xmm1, %xmm2 + movapd 4128(%ebx), %xmm6 + subsd %xmm3, %xmm7 + movl $32704, %edx + pinsrw $3, %edx, %xmm5 + movapd 4144(%ebx), %xmm1 + addsd %xmm7, %xmm2 + movl $127, %edx + andl %eax, %edx + addl %edx, %edx + shrl $3, %eax + andl $65520, %eax + addl $16352, %eax + xorpd %xmm0, %xmm0 + cmpl $184, %ecx + jae .L_2TAG_PACKET_1.0.2 + pshufd $68, %xmm5, %xmm5 + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + psubw %xmm0, %xmm5 + mulpd (%ebx,%edx,8), %xmm0 + mulpd 2048(%ebx,%edx,8), %xmm5 + pshufd $68, %xmm2, %xmm3 + movapd 4160(%ebx), %xmm7 + pshufd $68, %xmm2, %xmm2 + mulpd %xmm3, %xmm3 + mulpd %xmm2, %xmm4 + mulpd %xmm2, %xmm6 + mulpd 4176(%ebx), %xmm2 + mulpd %xmm3, %xmm1 + mulpd %xmm3, %xmm7 + mulpd %xmm3, %xmm4 + mulpd %xmm3, %xmm1 + addpd %xmm7, %xmm6 + movapd %xmm0, %xmm7 + addpd %xmm1, %xmm4 + shufpd $0, %xmm5, %xmm7 + addpd %xmm5, %xmm0 + mulpd %xmm7, %xmm2 + addpd %xmm6, %xmm4 + subsd %xmm0, %xmm7 + mulpd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm5, %xmm7 + addpd %xmm2, %xmm4 + addsd %xmm6, %xmm7 + pshufd $238, %xmm4, %xmm2 + addsd %xmm7, %xmm2 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + addl $16320, %ecx + cmpl $16320, %ecx + ja .L_2TAG_PACKET_3.0.2 + cmpl $15952, %ecx + jae .L_2TAG_PACKET_4.0.2 + addsd %xmm2, %xmm6 + movsd 4248(%ebx), %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_1.0.2: + subl $16352, %eax + movl %eax, %ecx + andl $32752, %eax + shrl $1, %eax + andl $65520, %eax + subl %eax, %ecx + addl $16352, %eax + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + mulpd (%ebx,%edx,8), %xmm0 + pshufd $68, %xmm2, %xmm3 + movsd 4160(%ebx), %xmm7 + mulsd %xmm3, %xmm3 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm6 + mulsd 4176(%ebx), %xmm2 + mulsd %xmm3, %xmm1 + mulsd %xmm3, %xmm7 + mulsd %xmm3, %xmm4 + addl $16368, %ecx + pinsrw $3, %ecx, %xmm5 + mulsd %xmm3, %xmm1 + addsd %xmm7, %xmm6 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + addsd %xmm6, %xmm4 + mulsd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm6, %xmm4 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm5, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + movl $64, %edx + cmpl $32752, %eax + je .L_2TAG_PACKET_5.0.2 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_4.0.2: + movapd 4208(%ebx), %xmm1 + mulpd %xmm5, %xmm5 + movapd 4224(%ebx), %xmm2 + xorpd %xmm3, %xmm3 + movapd %xmm5, %xmm0 + mulpd %xmm5, %xmm1 + movsd 4248(%ebx), %xmm6 + mulpd %xmm5, %xmm5 + movl $16352, %eax + pinsrw $3, %eax, %xmm3 + addpd %xmm2, %xmm1 + mulpd %xmm5, %xmm1 + pshufd $238, %xmm1, %xmm2 + mulsd %xmm1, %xmm5 + mulsd %xmm3, %xmm0 + addsd %xmm5, %xmm2 + addsd %xmm2, %xmm0 + addsd %xmm6, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_3.0.2: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_6.0.2 + xorpd %xmm0, %xmm0 + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + mulsd %xmm0, %xmm0 + movl $64, %edx +.L_2TAG_PACKET_5.0.2: + movsd %xmm0, (%esp) + movsd 112(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_6.0.2: + mulsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_2.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_7.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(cosh) +# -- End cosh + +# Start file scope ASM +.weak coshl +.equ coshl, cosh +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 3706687593 + .long 1073526560 + .long 3521726940 + .long 1014301643 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .long 3607404736 + .long 1044146952 + .long 3607404736 + .long 3191630600 + .long 4277811695 + .long 1063661122 + .long 4277811695 + .long 3211144770 + .long 2140175755 + .long 1033864261 + .long 2140175755 + .long 1033864261 + .long 4289495988 + .long 1054113747 + .long 4289495988 + .long 1054113747 + .long 4277811695 + .long 1064709698 + .long 4277811695 + .long 3212193346 + .long 1610612736 + .long 1080497479 + .long 4166901572 + .long 1053077003 + .long 3078135644 + .long 1049787983 + .long 381774870 + .long 1062650220 + .long 436314137 + .long 1056571808 + .long 1431655765 + .long 1067799893 + .long 4160749568 + .long 2147483647 + .long 0 + .long 1072693248 + .type static_const_table,@object + .size static_const_table,4256 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_exp.S b/libm/x86/e_exp.S new file mode 100644 index 0000000..c4fbe47 --- /dev/null +++ b/libm/x86/e_exp.S @@ -0,0 +1,577 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Description: +// Let K = 64 (table size). +// x x/log(2) n +// e = 2 = 2 * T[j] * (1 + P(y)) +// where +// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K] +// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2] +// j/K +// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]). +// +// P(y) is a minimax polynomial approximation of exp(x)-1 +// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V). +// +// To avoid problems with arithmetic overflow and underflow, +// n n1 n2 +// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2] +// where BIAS is a value of exponent bias. +// +// Special cases: +// exp(NaN) = NaN +// exp(+INF) = +INF +// exp(-INF) = 0 +// exp(x) = 1 for subnormals +// for finite argument, only exp(0)=1 is exact +// For IEEE double +// if x > 709.782712893383973096 then exp(x) overflow +// if x < -745.133219101941108420 then exp(x) underflow +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin exp +ENTRY(exp) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 64(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + unpcklpd %xmm0, %xmm0 + movapd 64(%ebx), %xmm1 + movapd 48(%ebx), %xmm6 + movapd 80(%ebx), %xmm2 + movapd 96(%ebx), %xmm3 + pextrw $3, %xmm0, %eax + andl $32767, %eax + movl $16527, %edx + subl %eax, %edx + subl $15504, %eax + orl %eax, %edx + cmpl $-2147483648, %edx + jae .L_2TAG_PACKET_0.0.2 + mulpd %xmm0, %xmm1 + addpd %xmm6, %xmm1 + movapd %xmm1, %xmm7 + subpd %xmm6, %xmm1 + mulpd %xmm1, %xmm2 + movapd 128(%ebx), %xmm4 + mulpd %xmm1, %xmm3 + movapd 144(%ebx), %xmm5 + subpd %xmm2, %xmm0 + movd %xmm7, %eax + movl %eax, %ecx + andl $63, %ecx + shll $4, %ecx + sarl $6, %eax + movl %eax, %edx + movdqa 16(%ebx), %xmm6 + pand %xmm6, %xmm7 + movdqa 32(%ebx), %xmm6 + paddq %xmm6, %xmm7 + psllq $46, %xmm7 + subpd %xmm3, %xmm0 + movapd 160(%ebx,%ecx), %xmm2 + mulpd %xmm0, %xmm4 + movapd %xmm0, %xmm6 + movapd %xmm0, %xmm1 + mulpd %xmm6, %xmm6 + mulpd %xmm6, %xmm0 + addpd %xmm4, %xmm5 + mulsd %xmm6, %xmm0 + mulpd 112(%ebx), %xmm6 + addsd %xmm2, %xmm1 + unpckhpd %xmm2, %xmm2 + mulpd %xmm5, %xmm0 + addsd %xmm0, %xmm1 + orpd %xmm7, %xmm2 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + addsd %xmm6, %xmm0 + addl $894, %edx + cmpl $1916, %edx + ja .L_2TAG_PACKET_1.0.2 + mulsd %xmm2, %xmm0 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_1.0.2: + fstcw 24(%esp) + movzwl 24(%esp), %edx + orl $768, %edx + movw %dx, 28(%esp) + fldcw 28(%esp) + movl %eax, %edx + sarl $1, %eax + subl %eax, %edx + movdqa (%ebx), %xmm6 + pandn %xmm2, %xmm6 + addl $1023, %eax + movd %eax, %xmm3 + psllq $52, %xmm3 + orpd %xmm3, %xmm6 + addl $1023, %edx + movd %edx, %xmm4 + psllq $52, %xmm4 + movsd %xmm0, 8(%esp) + fldl 8(%esp) + movsd %xmm6, 16(%esp) + fldl 16(%esp) + fmul %st, %st(1) + faddp %st, %st(1) + movsd %xmm4, 8(%esp) + fldl 8(%esp) + fmulp %st, %st(1) + fstpl 8(%esp) + movsd 8(%esp), %xmm0 + fldcw 24(%esp) + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $32752, %ecx + jae .L_2TAG_PACKET_3.0.2 + cmpl $0, %ecx + je .L_2TAG_PACKET_4.0.2 + jmp .L_2TAG_PACKET_2.0.2 + cmpl $-2147483648, %ecx + jb .L_2TAG_PACKET_3.0.2 + cmpl $-1064950997, %ecx + jb .L_2TAG_PACKET_2.0.2 + ja .L_2TAG_PACKET_4.0.2 + movl 128(%esp), %edx + cmpl $-17155601, %edx + jb .L_2TAG_PACKET_2.0.2 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_3.0.2: + movl $14, %edx + jmp .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_4.0.2: + movl $15, %edx +.L_2TAG_PACKET_5.0.2: + movsd %xmm0, (%esp) + movsd 128(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_7.0.2: + cmpl $2146435072, %eax + jae .L_2TAG_PACKET_8.0.2 + movl 132(%esp), %eax + cmpl $-2147483648, %eax + jae .L_2TAG_PACKET_9.0.2 + movsd 1208(%ebx), %xmm0 + mulsd %xmm0, %xmm0 + movl $14, %edx + jmp .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_9.0.2: + movsd 1216(%ebx), %xmm0 + mulsd %xmm0, %xmm0 + movl $15, %edx + jmp .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_8.0.2: + movl 128(%esp), %edx + cmpl $2146435072, %eax + ja .L_2TAG_PACKET_10.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_10.0.2 + movl 132(%esp), %eax + cmpl $2146435072, %eax + jne .L_2TAG_PACKET_11.0.2 + movsd 1192(%ebx), %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_11.0.2: + movsd 1200(%ebx), %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_10.0.2: + movsd 128(%esp), %xmm0 + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + movl 132(%esp), %eax + andl $2147483647, %eax + cmpl $1083179008, %eax + jae .L_2TAG_PACKET_7.0.2 + movsd 128(%esp), %xmm0 + addsd 1184(%ebx), %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_2.0.2: + movsd %xmm0, 48(%esp) + fldl 48(%esp) +.L_2TAG_PACKET_6.0.2: + movl 64(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(exp) +# -- End exp + +# Start file scope ASM +.weak expl +.equ expl, exp +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 4293918720 + .long 0 + .long 4293918720 + .long 4294967232 + .long 0 + .long 4294967232 + .long 0 + .long 65472 + .long 0 + .long 65472 + .long 0 + .long 0 + .long 1127743488 + .long 0 + .long 1127743488 + .long 1697350398 + .long 1079448903 + .long 1697350398 + .long 1079448903 + .long 4277796864 + .long 1065758274 + .long 4277796864 + .long 1065758274 + .long 3164486458 + .long 1025308570 + .long 3164486458 + .long 1025308570 + .long 4294967294 + .long 1071644671 + .long 4294967294 + .long 1071644671 + .long 3811088480 + .long 1062650204 + .long 1432067621 + .long 1067799893 + .long 3230715663 + .long 1065423125 + .long 1431604129 + .long 1069897045 + .long 0 + .long 0 + .long 0 + .long 0 + .long 235107661 + .long 1018002367 + .long 1048019040 + .long 11418 + .long 896005651 + .long 1015861842 + .long 3541402996 + .long 22960 + .long 1642514529 + .long 1012987726 + .long 410360776 + .long 34629 + .long 1568897900 + .long 1016568486 + .long 1828292879 + .long 46424 + .long 1882168529 + .long 1010744893 + .long 852742562 + .long 58348 + .long 509852888 + .long 1017336174 + .long 3490863952 + .long 70401 + .long 653277307 + .long 1017431380 + .long 2930322911 + .long 82586 + .long 1649557430 + .long 1017729363 + .long 1014845818 + .long 94904 + .long 1058231231 + .long 1015777676 + .long 3949972341 + .long 107355 + .long 1044000607 + .long 1016786167 + .long 828946858 + .long 119943 + .long 1151779725 + .long 1015705409 + .long 2288159958 + .long 132667 + .long 3819481236 + .long 1016499965 + .long 1853186616 + .long 145530 + .long 2552227826 + .long 1015039787 + .long 1709341917 + .long 158533 + .long 1829350193 + .long 1015216097 + .long 4112506593 + .long 171677 + .long 1913391795 + .long 1015756674 + .long 2799960843 + .long 184965 + .long 1303423926 + .long 1015238005 + .long 171030293 + .long 198398 + .long 1574172746 + .long 1016061241 + .long 2992903935 + .long 211976 + .long 3424156969 + .long 1017196428 + .long 926591434 + .long 225703 + .long 1938513547 + .long 1017631273 + .long 887463926 + .long 239579 + .long 2804567149 + .long 1015390024 + .long 1276261410 + .long 253606 + .long 631083525 + .long 1017690182 + .long 569847337 + .long 267786 + .long 1623370770 + .long 1011049453 + .long 1617004845 + .long 282120 + .long 3667985273 + .long 1013894369 + .long 3049340112 + .long 296610 + .long 3145379760 + .long 1014403278 + .long 3577096743 + .long 311258 + .long 2603100681 + .long 1017152460 + .long 1990012070 + .long 326066 + .long 3249202951 + .long 1017448880 + .long 1453150081 + .long 341035 + .long 419288974 + .long 1016280325 + .long 917841882 + .long 356167 + .long 3793507337 + .long 1016095713 + .long 3712504873 + .long 371463 + .long 728023093 + .long 1016345318 + .long 363667784 + .long 386927 + .long 2582678538 + .long 1017123460 + .long 2956612996 + .long 402558 + .long 7592966 + .long 1016721543 + .long 2186617380 + .long 418360 + .long 228611441 + .long 1016696141 + .long 1719614412 + .long 434334 + .long 2261665670 + .long 1017457593 + .long 1013258798 + .long 450482 + .long 544148907 + .long 1017323666 + .long 3907805043 + .long 466805 + .long 2383914918 + .long 1017143586 + .long 1447192520 + .long 483307 + .long 1176412038 + .long 1017267372 + .long 1944781190 + .long 499988 + .long 2882956373 + .long 1013312481 + .long 919555682 + .long 516851 + .long 3154077648 + .long 1016528543 + .long 2571947538 + .long 533897 + .long 348651999 + .long 1016405780 + .long 2604962540 + .long 551129 + .long 3253791412 + .long 1015920431 + .long 1110089947 + .long 568549 + .long 1509121860 + .long 1014756995 + .long 2568320822 + .long 586158 + .long 2617649212 + .long 1017340090 + .long 2966275556 + .long 603959 + .long 553214634 + .long 1016457425 + .long 2682146383 + .long 621954 + .long 730975783 + .long 1014083580 + .long 2191782032 + .long 640145 + .long 1486499517 + .long 1016818996 + .long 2069751140 + .long 658534 + .long 2595788928 + .long 1016407932 + .long 2990417244 + .long 677123 + .long 1853053619 + .long 1015310724 + .long 1434058175 + .long 695915 + .long 2462790535 + .long 1015814775 + .long 2572866477 + .long 714911 + .long 3693944214 + .long 1017259110 + .long 3092190714 + .long 734114 + .long 2979333550 + .long 1017188654 + .long 4076559942 + .long 753526 + .long 174054861 + .long 1014300631 + .long 2420883922 + .long 773150 + .long 816778419 + .long 1014197934 + .long 3716502172 + .long 792987 + .long 3507050924 + .long 1015341199 + .long 777507147 + .long 813041 + .long 1821514088 + .long 1013410604 + .long 3706687593 + .long 833312 + .long 920623539 + .long 1016295433 + .long 1242007931 + .long 853805 + .long 2789017511 + .long 1014276997 + .long 3707479175 + .long 874520 + .long 3586233004 + .long 1015962192 + .long 64696965 + .long 895462 + .long 474650514 + .long 1016642419 + .long 863738718 + .long 916631 + .long 1614448851 + .long 1014281732 + .long 3884662774 + .long 938030 + .long 2450082086 + .long 1016164135 + .long 2728693977 + .long 959663 + .long 1101668360 + .long 1015989180 + .long 3999357479 + .long 981531 + .long 835814894 + .long 1015702697 + .long 1533953344 + .long 1003638 + .long 1301400989 + .long 1014466875 + .long 2174652632 + .long 1025985 + .long 0 + .long 1072693248 + .long 0 + .long 2146435072 + .long 0 + .long 0 + .long 4294967295 + .long 2146435071 + .long 0 + .long 1048576 + .type static_const_table,@object + .size static_const_table,1224 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_hypot.S b/libm/x86/e_hypot.S new file mode 100644 index 0000000..aa6ab64 --- /dev/null +++ b/libm/x86/e_hypot.S @@ -0,0 +1,221 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// X87 version: +// Use 80-bit FPU precision fmul, fsqrt to compute square and sqrt. +// +// SSE version: +// Swap x, y if |x|<|y| +// For x=2^k*x, get y=y*2^(-k) +// Get S ~ sqrt(x^2+y^2) (leading 1 + leading 25 mantissa bits) +// +// Get D = ( RN(x^2+y^2) - S^2 ) + ( x^2 - RN(x^2) ) + +// + ( y^2 - ((RN(x^2+y^2)-RN(x^2)) ) +// +// Result is 2^k*(S + Se), where Se = S*e +// S*e is approximated as (D/2S)*( 1 - (D/2S)^2*1.0/S ) +// +// Return 2^k*(S+Se) +// +// For |y/x|<2^(-64), return x +// +// For cases where maximum biased exponent is either greater than 7fdh or +// below 32, take a special path to check for special cases (0, NaN, Inf), +// possible overflow, and more accurate computation for denormal results +// +// Special cases: +// hypot(x,y), hypot(y,x), and hypot(x,-y) are equivalent +// hypot(x,+-0) is equivalent to fabs(x) +// hypot(x,y) = y if (x==NaN or x==INF) and y==INF +// hypot(x,y) = x if (x==NaN or x==INF) and y!=INF (even if y==NaN!) +// hypot(x,y) = y if (x!=NaN and x!=INF) and (y==NaN or y==INF) +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin hypot +ENTRY(hypot) +# parameter 1: 8 + %ebp +# parameter 2: 16 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $152, %esp + movl %ebx, 96(%esp) + call static_func + movl %eax, %ebx + movapd (%ebx), %xmm3 + movsd 160(%esp), %xmm0 + movsd 168(%esp), %xmm1 + andpd %xmm3, %xmm0 + andpd %xmm3, %xmm1 + pextrw $3, %xmm0, %eax + pextrw $3, %xmm1, %edx + cmpl $24528, %eax + ja .L_2TAG_PACKET_0.0.2 + cmpl $24528, %edx + ja .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + fldl 160(%esp) + fldl 168(%esp) + fxch %st(1) + fmul %st(0), %st + fxch %st(1) + nop + fmul %st(0), %st + faddp %st, %st(1) + fsqrt + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + cmpl $32752, %eax + movl %eax, %ecx + jae .L_2TAG_PACKET_3.0.2 + subl %edx, %ecx + cmpl $32752, %edx + jae .L_2TAG_PACKET_3.0.2 + addl $928, %ecx + addl %edx, %eax + cmpl $1856, %ecx + ja .L_2TAG_PACKET_4.0.2 + cmpl $49056, %eax + jb .L_2TAG_PACKET_1.0.2 + fldl 160(%esp) + fldl 168(%esp) + fxch %st(1) + fmul %st(0), %st + fxch %st(1) + nop + fmul %st(0), %st + faddp %st, %st(1) + fsqrt +.L_2TAG_PACKET_5.0.2: + fstl (%esp) + fstpt 16(%esp) + xorl %eax, %eax + movw 24(%esp), %ax + cmpl $17407, %eax + jae .L_2TAG_PACKET_6.0.2 + fldl (%esp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_4.0.2: + movsd %xmm0, 32(%esp) + movsd %xmm1, 40(%esp) + fldl 32(%esp) + faddl 40(%esp) + jmp .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_6.0.2: + movl $46, %edx +.L_2TAG_PACKET_8.0.2: + movsd 160(%esp), %xmm0 + movsd 168(%esp), %xmm1 + fldl (%esp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_3.0.2: + shufpd $0, %xmm1, %xmm0 + movdqa %xmm0, %xmm2 + movdqa 16(%ebx), %xmm3 + movsd %xmm0, 32(%esp) + movsd %xmm1, 40(%esp) + cmppd $3, %xmm0, %xmm2 + cmppd $0, %xmm0, %xmm3 + movmskpd %xmm2, %edx + movmskpd %xmm3, %eax + testl %edx, %edx + je .L_2TAG_PACKET_9.0.2 + fldl 32(%esp) + fmull 40(%esp) + testl $1, %eax + jne .L_2TAG_PACKET_10.0.2 + testl $2, %eax + jne .L_2TAG_PACKET_11.0.2 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_9.0.2: + fldl 32(%esp) + faddl 40(%esp) + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_10.0.2: + fstpl 40(%esp) + fldl 32(%esp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_11.0.2: + fstpl 32(%esp) + fldl 40(%esp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_2.0.2: +.L_2TAG_PACKET_7.0.2: + movl 96(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(hypot) +# -- End hypot + +# Start file scope ASM +.weak hypotl +.equ hypotl, hypot +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 4294967295 + .long 2147483647 + .long 4294967295 + .long 2147483647 + .long 0 + .long 2146435072 + .long 0 + .long 2146435072 + .type static_const_table,@object + .size static_const_table,32 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_log.S b/libm/x86/e_log.S new file mode 100644 index 0000000..b5df1ea --- /dev/null +++ b/libm/x86/e_log.S @@ -0,0 +1,781 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpss instruction (B0) +// B = int((B0*2^7+0.5))/2^7 +// +// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts) +// +// Result: k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6) and +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log(NaN) = quiet NaN, and raise invalid exception +// log(+INF) = that INF +// log(0) = -INF with divide-by-zero exception raised +// log(1) = +0 +// log(x) = NaN with invalid exception raised if x < -0, including -INF +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin log +ENTRY(log) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + xorpd %xmm3, %xmm3 + movl $30704, %edx + pinsrw $3, %edx, %xmm3 + movsd 112(%esp), %xmm0 + movapd %xmm0, %xmm1 + movl $32768, %ecx + movd %ecx, %xmm4 + movsd 2128(%ebx), %xmm5 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + psllq $5, %xmm0 + movl $16352, %ecx + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + paddd %xmm4, %xmm0 + orpd %xmm3, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm1, %xmm5 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm1 + mulpd %xmm0, %xmm5 + andl $32752, %eax + subl %ecx, %eax + cvtsi2sdl %eax, %xmm7 + mulsd %xmm0, %xmm1 + movsd 2064(%ebx), %xmm6 + movapd 2080(%ebx), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd (%ebx,%edx), %xmm0 + movapd 2096(%ebx), %xmm4 + addsd %xmm5, %xmm1 + movapd 2112(%ebx), %xmm2 + mulsd %xmm7, %xmm6 + pshufd $68, %xmm1, %xmm5 + mulsd 2072(%ebx), %xmm7 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm4 + mulpd %xmm5, %xmm5 + pshufd $228, %xmm0, %xmm6 + addsd %xmm1, %xmm0 + addpd %xmm2, %xmm4 + mulpd %xmm5, %xmm3 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm4 + pshufd $238, %xmm0, %xmm2 + addsd %xmm6, %xmm1 + mulsd %xmm5, %xmm5 + addsd %xmm2, %xmm7 + addpd %xmm3, %xmm4 + addsd %xmm7, %xmm1 + mulpd %xmm5, %xmm4 + addsd %xmm4, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + movsd 112(%esp), %xmm0 + movapd %xmm0, %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_3.0.2 + cmpl $16, %eax + jb .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_6.0.2: + ja .L_2TAG_PACKET_5.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_5.0.2 + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_3.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_6.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + movl $3, %edx + mulsd %xmm1, %xmm0 +.L_2TAG_PACKET_9.0.2: + movsd %xmm0, (%esp) + movsd 112(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_10.0.2 +.L_2TAG_PACKET_8.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $2, %edx + jmp .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_4.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_8.0.2 + xorpd %xmm1, %xmm1 + movl $18416, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + movapd %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + psllq $5, %xmm0 + movl $18416, %ecx + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_10.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(log) +# -- End log + +# Start file scope ASM +.weak logl +.equ logl, log +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 4277811200 + .long 1072049730 + .long 2479318832 + .long 1026487127 + .long 2854492160 + .long 1072033410 + .long 215631550 + .long 1025638968 + .long 1547061248 + .long 1072017216 + .long 2886781435 + .long 1026423395 + .long 649825280 + .long 1072001146 + .long 4281533405 + .long 1024038923 + .long 646346752 + .long 1071985198 + .long 1562735921 + .long 1023790276 + .long 2203734016 + .long 1071969370 + .long 1838397691 + .long 3173936209 + .long 1872169984 + .long 1071953661 + .long 3981202460 + .long 1022325013 + .long 669557760 + .long 1071938069 + .long 4182597802 + .long 3173174122 + .long 4076413952 + .long 1071922591 + .long 1209029111 + .long 3170736207 + .long 556125184 + .long 1071907228 + .long 821086028 + .long 3173437049 + .long 204914688 + .long 1071891976 + .long 2097025986 + .long 3171071798 + .long 387545088 + .long 1071876834 + .long 3142936996 + .long 3173092218 + .long 2912783360 + .long 1071861800 + .long 2502420140 + .long 1024505919 + .long 1144260608 + .long 1071846874 + .long 3315658140 + .long 3173469843 + .long 1471209472 + .long 1071832053 + .long 129621009 + .long 3172443877 + .long 1829683200 + .long 1071817336 + .long 3885467693 + .long 1025535275 + .long 288676864 + .long 1071802722 + .long 86139472 + .long 3171639793 + .long 3636378624 + .long 1071788208 + .long 1850238587 + .long 1024654342 + .long 1606817792 + .long 1071773795 + .long 3388899795 + .long 3173675586 + .long 1236164608 + .long 1071759480 + .long 3983599207 + .long 1020046558 + .long 1089616896 + .long 1071745262 + .long 4171974224 + .long 1024773198 + .long 4143093760 + .long 1071731139 + .long 2727587401 + .long 3173965207 + .long 600267776 + .long 1071717112 + .long 3147685042 + .long 3173353031 + .long 2249313280 + .long 1071703177 + .long 125835074 + .long 1025255832 + .long 3805303808 + .long 1071689334 + .long 2289991207 + .long 1025460331 + .long 87278592 + .long 1071675583 + .long 1106114045 + .long 1025933602 + .long 3195405312 + .long 1071661920 + .long 3885316576 + .long 3171206239 + .long 3853649920 + .long 1071648346 + .long 2977069852 + .long 3171236771 + .long 2944026624 + .long 1071625048 + .long 1008093493 + .long 1023444474 + .long 3993180160 + .long 1071598247 + .long 1862355595 + .long 1024642533 + .long 1454641152 + .long 1071571617 + .long 1514603089 + .long 1026500596 + .long 3286085632 + .long 1071545154 + .long 1400028424 + .long 3173279056 + .long 438773760 + .long 1071518858 + .long 120727864 + .long 3172148914 + .long 1212979200 + .long 1071492725 + .long 1625055594 + .long 3172901933 + .long 1189017600 + .long 1071466754 + .long 3920062376 + .long 1025727407 + .long 403064832 + .long 1071440943 + .long 1053271728 + .long 3171391427 + .long 3343210496 + .long 1071415289 + .long 3243395502 + .long 3173627613 + .long 1765777408 + .long 1071389792 + .long 2145968512 + .long 1026354304 + .long 461430784 + .long 1071364449 + .long 4094322285 + .long 1026021467 + .long 71706624 + .long 1071339258 + .long 763632021 + .long 1024496933 + .long 1380503552 + .long 1071314217 + .long 1383547992 + .long 3173088453 + .long 1015732224 + .long 1071289325 + .long 3198646877 + .long 1025390322 + .long 35977216 + .long 1071264580 + .long 2141026805 + .long 1025754693 + .long 3927306240 + .long 1071239979 + .long 282116272 + .long 3173394334 + .long 1125341184 + .long 1071215523 + .long 2768427504 + .long 3172279059 + .long 1666971648 + .long 1071191208 + .long 786837629 + .long 3172427445 + .long 2827694080 + .long 1071167033 + .long 3857122416 + .long 3173014241 + .long 2003683328 + .long 1071142997 + .long 859010954 + .long 1026545007 + .long 1004017664 + .long 1071119098 + .long 3356644970 + .long 3173458064 + .long 1753020416 + .long 1071095334 + .long 788338552 + .long 1026157693 + .long 1992718336 + .long 1071071704 + .long 1239179443 + .long 1026394889 + .long 3870234624 + .long 1071048206 + .long 2082614663 + .long 1024926053 + .long 1050437632 + .long 1071024840 + .long 660007840 + .long 1025548499 + .long 188395520 + .long 1071001603 + .long 3878792704 + .long 3173889571 + .long 3747176448 + .long 1070978493 + .long 144991708 + .long 3171552042 + .long 1405669376 + .long 1070955511 + .long 3999088879 + .long 1025486317 + .long 121151488 + .long 1070932654 + .long 2170865497 + .long 1026473584 + .long 2652319744 + .long 1070909920 + .long 453695652 + .long 3173916809 + .long 3262236672 + .long 1070887309 + .long 157800053 + .long 3173984206 + .long 601221120 + .long 1070864820 + .long 3968917661 + .long 1023992886 + .long 1999843328 + .long 1070842450 + .long 3053895004 + .long 1024998228 + .long 1992167424 + .long 1070820199 + .long 2968614856 + .long 1024552653 + .long 3788726272 + .long 1070798065 + .long 3542170808 + .long 3173573242 + .long 2094829568 + .long 1070776048 + .long 1246758132 + .long 1026202874 + .long 288675840 + .long 1070754146 + .long 3747328950 + .long 1026331585 + .long 1829681152 + .long 1070732357 + .long 3125197546 + .long 1024100318 + .long 1666869248 + .long 1070710681 + .long 1363656119 + .long 1026336493 + .long 3417110528 + .long 1070689116 + .long 4154791553 + .long 1026267853 + .long 2183653376 + .long 1070667662 + .long 1671819292 + .long 3173785870 + .long 1734434816 + .long 1070646317 + .long 373091049 + .long 1025972363 + .long 1615681536 + .long 1070625080 + .long 384650897 + .long 1022926043 + .long 1445382144 + .long 1070603950 + .long 344320330 + .long 3172397196 + .long 1823715328 + .long 1070569756 + .long 3389841200 + .long 1025231852 + .long 3839688704 + .long 1070527917 + .long 1706790417 + .long 3167363349 + .long 4293332992 + .long 1070486286 + .long 1614935088 + .long 1019351591 + .long 2966720512 + .long 1070444861 + .long 4145393717 + .long 3173711658 + .long 4066729984 + .long 1070403639 + .long 1974925028 + .long 3171437182 + .long 3337621504 + .long 1070362619 + .long 3314953170 + .long 3169971314 + .long 943448064 + .long 1070321799 + .long 1498682038 + .long 3173862340 + .long 1465634816 + .long 1070281176 + .long 1319952810 + .long 3171693965 + .long 1015734272 + .long 1070240749 + .long 1347821929 + .long 3173544515 + .long 118001664 + .long 1070200516 + .long 1751482746 + .long 1026134093 + .long 3707174912 + .long 1070160474 + .long 1486946159 + .long 1023930920 + .long 3946381312 + .long 1070120623 + .long 2867408081 + .long 3171368276 + .long 1699848192 + .long 1070080961 + .long 2590187139 + .long 1025379803 + .long 2235846656 + .long 1070041485 + .long 1888568069 + .long 3172754960 + .long 2339729408 + .long 1070002194 + .long 3852214753 + .long 3173323149 + .long 3196850176 + .long 1069963086 + .long 742141560 + .long 1025101707 + .long 1800683520 + .long 1069924160 + .long 3949500444 + .long 3172102179 + .long 3835801600 + .long 1069885413 + .long 3848895943 + .long 1025913832 + .long 2201202688 + .long 1069846845 + .long 1425913464 + .long 1025868665 + .long 2778279936 + .long 1069808453 + .long 2120889677 + .long 3173831128 + .long 2954203136 + .long 1069770236 + .long 592147081 + .long 1019621288 + .long 210141184 + .long 1069732193 + .long 3414275233 + .long 1023647084 + .long 709476352 + .long 1069694321 + .long 2413027164 + .long 1024462115 + .long 2116284416 + .long 1069656619 + .long 1144559924 + .long 1026336654 + .long 2183651328 + .long 1069619086 + .long 3459057650 + .long 1025634168 + .long 3047047168 + .long 1069581720 + .long 1879674924 + .long 3173508573 + .long 970711040 + .long 1069541521 + .long 1335954173 + .long 3173332182 + .long 2198478848 + .long 1069467449 + .long 2951103968 + .long 3173892200 + .long 1669611520 + .long 1069393703 + .long 531044147 + .long 1025149248 + .long 29114368 + .long 1069320280 + .long 3327831251 + .long 1025918673 + .long 2376949760 + .long 1069247176 + .long 737634533 + .long 3172176000 + .long 1085390848 + .long 1069174390 + .long 3108243400 + .long 3171828406 + .long 1566130176 + .long 1069101918 + .long 985483226 + .long 1025708380 + .long 792780800 + .long 1069029758 + .long 4184866295 + .long 1024426204 + .long 183156736 + .long 1068957907 + .long 2845699378 + .long 1022107277 + .long 1301782528 + .long 1068886362 + .long 1012735262 + .long 3173804294 + .long 1562411008 + .long 1068815121 + .long 2197086703 + .long 3170187813 + .long 2815549440 + .long 1068744181 + .long 2782613207 + .long 1026345054 + .long 2756124672 + .long 1068673540 + .long 2929486205 + .long 3173037800 + .long 3511050240 + .long 1068603195 + .long 1443733147 + .long 3173331549 + .long 3047047168 + .long 1068533144 + .long 1879674924 + .long 3172459997 + .long 3221667840 + .long 1068427825 + .long 1338588027 + .long 3171815742 + .long 3453861888 + .long 1068288883 + .long 1205348359 + .long 3172624626 + .long 3506110464 + .long 1068150514 + .long 893105198 + .long 1025571866 + .long 346013696 + .long 1068012714 + .long 3495569021 + .long 3172563349 + .long 4074029056 + .long 1067875476 + .long 3961106338 + .long 3171065595 + .long 3559784448 + .long 1067738798 + .long 1975385384 + .long 3173783155 + .long 797769728 + .long 1067602675 + .long 3760305787 + .long 1026047642 + .long 2313633792 + .long 1067467101 + .long 1559353171 + .long 1023480256 + .long 3960766464 + .long 1067213778 + .long 1067365107 + .long 1025865926 + .long 684261376 + .long 1066944805 + .long 844762164 + .long 3173687482 + .long 630718464 + .long 1066676905 + .long 2458269694 + .long 1024033081 + .long 1486061568 + .long 1066410070 + .long 115537874 + .long 3173243995 + .long 2743664640 + .long 1065886792 + .long 3665098304 + .long 3173471607 + .long 1971912704 + .long 1065357333 + .long 2577214440 + .long 3171993451 + .long 1498939392 + .long 1064306693 + .long 3409036923 + .long 1025599151 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 4277811200 + .long 1067855426 + .long 2479318832 + .long 1022292823 + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1030730101 + .long 3217380702 + .long 1431655765 + .long 1070945621 + .long 2576980378 + .long 1070176665 + .long 0 + .long 3219128320 + .long 0 + .long 4294959104 + .long 0 + .long 4294959104 + .type static_const_table,@object + .size static_const_table,2144 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_log10.S b/libm/x86/e_log10.S new file mode 100644 index 0000000..d34829c --- /dev/null +++ b/libm/x86/e_log10.S @@ -0,0 +1,796 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpss instruction (B0) +// B = int((B0*LH*2^7+0.5))/2^7 +// LH is a short approximation for log10(e) +// +// Reduced argument: r=B*mx-LH (computed accurately in high and low parts) +// +// Result: k*log10(2) - log(B) + p(r) +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log10(0) = -INF with divide-by-zero exception raised +// log10(1) = +0 +// log10(x) = NaN with invalid exception raised if x < -0, including -INF +// log10(+INF) = +INF +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin log10 +ENTRY(log10) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movl $1054736384, %ecx + movd %ecx, %xmm7 + xorpd %xmm3, %xmm3 + movl $30704, %edx + pinsrw $3, %edx, %xmm3 + movsd 112(%esp), %xmm0 + movapd %xmm0, %xmm1 + movl $32768, %edx + movd %edx, %xmm4 + movapd 2128(%ebx), %xmm5 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $16352, %ecx + psllq $5, %xmm0 + movsd 2144(%ebx), %xmm2 + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $78, %xmm5, %xmm6 + psrlq $12, %xmm1 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + mulss %xmm7, %xmm0 + orpd %xmm3, %xmm1 + andpd %xmm1, %xmm5 + paddd %xmm4, %xmm0 + subsd %xmm5, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm6, %xmm0 + andl $32752, %eax + subl %ecx, %eax + cvtsi2sdl %eax, %xmm7 + mulpd %xmm0, %xmm5 + mulsd %xmm0, %xmm1 + movsd 2064(%ebx), %xmm6 + movapd 2080(%ebx), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd -1504(%ebx,%edx), %xmm0 + movapd 2096(%ebx), %xmm4 + addsd %xmm5, %xmm1 + movapd 2112(%ebx), %xmm2 + mulsd %xmm7, %xmm6 + pshufd $68, %xmm1, %xmm5 + mulsd 2072(%ebx), %xmm7 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm4 + movsd 2152(%ebx), %xmm6 + mulpd %xmm5, %xmm5 + addpd %xmm2, %xmm4 + mulpd %xmm5, %xmm3 + pshufd $228, %xmm0, %xmm2 + addsd %xmm1, %xmm0 + mulsd %xmm1, %xmm4 + subsd %xmm0, %xmm2 + mulsd %xmm1, %xmm6 + addsd %xmm2, %xmm1 + pshufd $238, %xmm0, %xmm2 + mulsd %xmm5, %xmm5 + addsd %xmm2, %xmm7 + addsd %xmm6, %xmm1 + addpd %xmm3, %xmm4 + addsd %xmm7, %xmm1 + mulpd %xmm5, %xmm4 + addsd %xmm4, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + movsd 112(%esp), %xmm0 + movapd %xmm0, %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_3.0.2 + cmpl $16, %eax + jb .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_6.0.2: + ja .L_2TAG_PACKET_5.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_5.0.2 + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_3.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_6.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + movl $9, %edx + mulsd %xmm1, %xmm0 +.L_2TAG_PACKET_9.0.2: + movsd %xmm0, (%esp) + movsd 112(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_10.0.2 +.L_2TAG_PACKET_8.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $8, %edx + jmp .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_4.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_8.0.2 + xorpd %xmm1, %xmm1 + movl $18416, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movapd %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psllq $5, %xmm0 + movsd 2144(%ebx), %xmm2 + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $78, %xmm5, %xmm6 + psrlq $12, %xmm1 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_10.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(log10) +# -- End log10 + +# Start file scope ASM +.weak log10l +.equ log10l, log10 +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 1352628224 + .long 1070810131 + .long 521319256 + .long 1025503025 + .long 2150839296 + .long 1070801944 + .long 3329350096 + .long 3170190015 + .long 1360613376 + .long 1070793794 + .long 2024059075 + .long 1024991594 + .long 1875350528 + .long 1070785680 + .long 2163882141 + .long 3163564137 + .long 2312126464 + .long 1070777602 + .long 1975711076 + .long 1023674196 + .long 1306336256 + .long 1070769560 + .long 3524899523 + .long 3170508164 + .long 1806334976 + .long 1070761553 + .long 4254777025 + .long 1025238739 + .long 2483193856 + .long 1070753581 + .long 3800671317 + .long 3172916830 + .long 2025350144 + .long 1070745644 + .long 1731514745 + .long 1025501083 + .long 3433285632 + .long 1070737741 + .long 2551857336 + .long 3169662186 + .long 1134317568 + .long 1070729873 + .long 3426297655 + .long 3172637891 + .long 2457152512 + .long 1070722038 + .long 63549415 + .long 1025415416 + .long 1861803008 + .long 1070714237 + .long 1910171636 + .long 1023977580 + .long 2414140416 + .long 1070706469 + .long 4002514337 + .long 3170841618 + .long 2900726784 + .long 1070698734 + .long 3268064083 + .long 1022459609 + .long 2123517952 + .long 1070691032 + .long 1767031218 + .long 1022448156 + .long 3194569728 + .long 1070683362 + .long 3402332618 + .long 3171671160 + .long 650882048 + .long 1070675725 + .long 4146023905 + .long 3171023038 + .long 1928988672 + .long 1070668119 + .long 1438617867 + .long 1016360491 + .long 1594908672 + .long 1070660545 + .long 971389377 + .long 1024763979 + .long 2818746368 + .long 1070653002 + .long 3555925341 + .long 3172434821 + .long 194584576 + .long 1070645491 + .long 943919215 + .long 3172950063 + .long 1215096832 + .long 1070638010 + .long 2283358588 + .long 1022335098 + .long 501519360 + .long 1070630560 + .long 480904295 + .long 1024437959 + .long 1278266368 + .long 1070623140 + .long 2755806066 + .long 3172342012 + .long 2487812096 + .long 1070615750 + .long 2489653202 + .long 3172481099 + .long 3085451264 + .long 1070608390 + .long 3759184951 + .long 3172574892 + .long 2039090176 + .long 1070601060 + .long 1361176676 + .long 3172355319 + .long 953057280 + .long 1070591423 + .long 1176587546 + .long 3166422018 + .long 3370524672 + .long 1070576879 + .long 3669570051 + .long 1025376630 + .long 749742080 + .long 1070562394 + .long 707700964 + .long 3170814058 + .long 4008353792 + .long 1070547965 + .long 3247327652 + .long 1022431400 + .long 2612455424 + .long 1070533594 + .long 2453457344 + .long 3172322969 + .long 3230920704 + .long 1070519279 + .long 1296781801 + .long 1025115335 + .long 3965253632 + .long 1070505020 + .long 373075289 + .long 1017938528 + .long 2593157120 + .long 1070476669 + .long 1068054086 + .long 1021616576 + .long 925962240 + .long 1070448537 + .long 850121213 + .long 1023928989 + .long 1732556800 + .long 1070420620 + .long 1305206740 + .long 3172665570 + .long 3815630848 + .long 1070392915 + .long 192642943 + .long 3172699907 + .long 2001758208 + .long 1070365420 + .long 2820786683 + .long 1024704867 + .long 16746496 + .long 1070338131 + .long 1399573110 + .long 3171372773 + .long 1886492672 + .long 1070311044 + .long 3621428075 + .long 3172974358 + .long 3338196992 + .long 1070284157 + .long 3793882035 + .long 1025124701 + .long 381769728 + .long 1070257468 + .long 3877933342 + .long 3170195490 + .long 2186491904 + .long 1070230972 + .long 1838687089 + .long 1017927292 + .long 1008330752 + .long 1070204668 + .long 2228321664 + .long 1025352196 + .long 2247065600 + .long 1070178552 + .long 1413900906 + .long 3170902532 + .long 2964070400 + .long 1070152622 + .long 3590454629 + .long 1025016844 + .long 465154048 + .long 1070126876 + .long 2079688550 + .long 3172268183 + .long 883615744 + .long 1070101310 + .long 989244452 + .long 3171900485 + .long 1993768960 + .long 1070075922 + .long 1124327841 + .long 3172964992 + .long 1794471936 + .long 1070050710 + .long 1140575046 + .long 1022673726 + .long 2797932544 + .long 1070025671 + .long 1894836933 + .long 3172544059 + .long 3433797632 + .long 1070000803 + .long 3221831166 + .long 3171921685 + .long 2338371584 + .long 1069976104 + .long 3732461053 + .long 3164513518 + .long 2644013056 + .long 1069951571 + .long 2519460462 + .long 3172548740 + .long 3383814144 + .long 1069927202 + .long 2290997657 + .long 1025499649 + .long 3781380096 + .long 1069902995 + .long 380479405 + .long 1025184136 + .long 3245785088 + .long 1069878948 + .long 1096398261 + .long 3169885192 + .long 1366712320 + .long 1069855059 + .long 2218343715 + .long 3170281628 + .long 2204717056 + .long 1069831325 + .long 2668334011 + .long 1025264524 + .long 1401772032 + .long 1069807745 + .long 4103993159 + .long 1022925721 + .long 3356721152 + .long 1069784316 + .long 3573790772 + .long 3172186527 + .long 4041148416 + .long 1069761037 + .long 4027691910 + .long 3171276990 + .long 3880151040 + .long 1069737906 + .long 4087118786 + .long 3172710734 + .long 3453364224 + .long 1069714921 + .long 99014299 + .long 3172003077 + .long 3491092480 + .long 1069692080 + .long 3801836701 + .long 3172989287 + .long 575580160 + .long 1069669382 + .long 1920406012 + .long 3170874125 + .long 22282240 + .long 1069646824 + .long 964193370 + .long 1019363159 + .long 2991429632 + .long 1069624404 + .long 3372589890 + .long 1023425053 + .long 2189645824 + .long 1069602122 + .long 2610503872 + .long 1023652442 + .long 3341467648 + .long 1069579975 + .long 1190292004 + .long 1022425665 + .long 3711293440 + .long 1069557962 + .long 1104795356 + .long 1023625829 + .long 1380401152 + .long 1069524644 + .long 1156998217 + .long 1025100499 + .long 765710336 + .long 1069481144 + .long 1736649113 + .long 1024999439 + .long 849412096 + .long 1069437902 + .long 2618178330 + .long 3170853629 + .long 1433104384 + .long 1069394915 + .long 43477267 + .long 3170378811 + .long 2548596736 + .long 1069352180 + .long 3967367063 + .long 1025246584 + .long 157577216 + .long 1069309695 + .long 100402533 + .long 3172825502 + .long 3326238720 + .long 1069267455 + .long 1176892909 + .long 1025464099 + .long 4155494400 + .long 1069225459 + .long 3713707617 + .long 3172630046 + .long 3545804800 + .long 1069183704 + .long 857007315 + .long 1024965777 + .long 2602520576 + .long 1069142187 + .long 2588758347 + .long 1022463131 + .long 2631196672 + .long 1069100905 + .long 2118424235 + .long 1022490989 + .long 838135808 + .long 1069059856 + .long 4117002727 + .long 1024874520 + .long 3210903552 + .long 1069019036 + .long 650070125 + .long 3172012966 + .long 3039211520 + .long 1068978444 + .long 438055812 + .long 1017743757 + .long 2385633280 + .long 1068938077 + .long 3011990369 + .long 3171312044 + .long 3491618816 + .long 1068897932 + .long 712813818 + .long 3172720400 + .long 183644160 + .long 1068858008 + .long 4287006742 + .long 1022379728 + .long 3639214080 + .long 1068818300 + .long 353762279 + .long 3172980009 + .long 3728416768 + .long 1068778808 + .long 1851367730 + .long 1025486574 + .long 3370094592 + .long 1068739529 + .long 4046594913 + .long 3172567047 + .long 1348407296 + .long 1068700461 + .long 143189675 + .long 1025397632 + .long 899403776 + .long 1068661601 + .long 3753687842 + .long 3170772772 + .long 1117708288 + .long 1068622947 + .long 1857340812 + .long 3170782678 + .long 1248276480 + .long 1068584497 + .long 1289858203 + .long 1025222289 + .long 683237376 + .long 1068546249 + .long 2356679608 + .long 3171629170 + .long 3253764096 + .long 1068508200 + .long 3267136556 + .long 1018554987 + .long 94478336 + .long 1068441756 + .long 1927868814 + .long 3169378180 + .long 3233144832 + .long 1068366445 + .long 2682188854 + .long 1023964004 + .long 2940297216 + .long 1068291522 + .long 275301289 + .long 1023944679 + .long 3677708288 + .long 1068216982 + .long 302658771 + .long 1024465567 + .long 1576968192 + .long 1068142822 + .long 3672035940 + .long 3172254610 + .long 1614069760 + .long 1068069037 + .long 480052905 + .long 3172692062 + .long 424435712 + .long 1067995624 + .long 2207869657 + .long 3170965436 + .long 3477782528 + .long 1067922578 + .long 2980661858 + .long 3164990018 + .long 3598401536 + .long 1067849897 + .long 1974393034 + .long 3171357083 + .long 2435235840 + .long 1067777577 + .long 1385289011 + .long 1024615823 + .long 1867333632 + .long 1067705614 + .long 3442236633 + .long 1025334384 + .long 3999301632 + .long 1067634004 + .long 3506472073 + .long 1025132546 + .long 2566971392 + .long 1067562745 + .long 1425757592 + .long 3172358463 + .long 112943104 + .long 1067491833 + .long 1693407156 + .long 3172426603 + .long 3079929856 + .long 1067392159 + .long 3999942455 + .long 1018549369 + .long 2443837440 + .long 1067251701 + .long 974534460 + .long 1023963412 + .long 359366656 + .long 1067111917 + .long 2204915018 + .long 1013514416 + .long 3564519424 + .long 1066972799 + .long 3977441659 + .long 3170879860 + .long 2011086848 + .long 1066834343 + .long 590145514 + .long 1025390011 + .long 3216982016 + .long 1066696541 + .long 3629120110 + .long 1024330313 + .long 2194128896 + .long 1066559388 + .long 2367098512 + .long 3172260338 + .long 2916220928 + .long 1066422877 + .long 2262431886 + .long 1021229446 + .long 2263941120 + .long 1066172214 + .long 3118507287 + .long 1021484970 + .long 3076292608 + .long 1065901726 + .long 1411737803 + .long 3172957147 + .long 1186136064 + .long 1065632488 + .long 3109349337 + .long 1025397383 + .long 3085303808 + .long 1065364487 + .long 584715031 + .long 3172596519 + .long 1821048832 + .long 1064842211 + .long 2182246895 + .long 3172536214 + .long 697368576 + .long 1064311094 + .long 3157561765 + .long 3172716357 + .long 894042112 + .long 1063260131 + .long 3237958154 + .long 3172587292 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1352628224 + .long 1066615827 + .long 521319256 + .long 1021308721 + .long 3248877870 + .long 1077250164 + .long 1691676429 + .long 3221787401 + .long 945132465 + .long 3223701783 + .long 3700831335 + .long 1073506818 + .long 2141010593 + .long 1075227551 + .long 3698831637 + .long 3220339442 + .long 4160749568 + .long 4294967295 + .long 0 + .long 4294959104 + .long 0 + .long 1071366144 + .long 3207479560 + .long 1062894188 + .type static_const_table,@object + .size static_const_table,2160 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_pow.S b/libm/x86/e_pow.S new file mode 100644 index 0000000..43e30d8 --- /dev/null +++ b/libm/x86/e_pow.S @@ -0,0 +1,4277 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// log2(x) calculation: +// +// Get B~1/mx based on the output of rcpps instruction (B0) +// B = int((B0*LH*2^9+0.5))/2^9 +// LH is a short approximation for log2(e) +// +// Reduced argument, scaled by LH: +// r=B*mx-LH (computed accurately in high and low parts) +// +// log2(x) result: k - log2(B) + p(r) +// p(r) is a degree 8 polynomial +// -log2(B) read from data table (high, low parts) +// log2(x) is formed from high and low parts +// For |x| in [1-1/32, 1+1/16), a slower but more accurate computation +// based om the same table design is performed. +// +// Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8, +// to filter out all potential OF/UF cases. +// exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5 +// polynomial +// +// Special cases: +// pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd +// integer < 0. +// pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and +// not an odd integer. +// pow(-0,y) = -0 for y an odd integer > 0. +// pow(-0,y) = +0 for y > 0 and not an odd integer. +// pow(-1,-INF) = 1. +// pow(+1,y) = 1 for any y, even a NaN. +// pow(x,-0) = 1 for any x, even a NaN. +// pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and +// finite non-integer y. +// pow(x,-INF) = +INF for |x|<1. +// pow(x,-INF) = +0 for |x|>1. +// pow(x,+INF) = +0 for |x|<1. +// pow(x,+INF) = +INF for |x|>1. +// pow(-INF,y) = -0 for y an odd integer < 0. +// pow(-INF,y) = +0 for y < 0 and not an odd integer. +// pow(-INF,y) = -INF for y an odd integer > 0. +// pow(-INF,y) = +INF for y > 0 and not an odd integer. +// pow(+INF,y) = +0 for y <0. +// pow(+INF,y) = +INF for y >0. +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin pow +ENTRY(pow) +# parameter 1: 8 + %ebp +# parameter 2: 16 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 64(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + movsd 136(%esp), %xmm1 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movl $1069088768, %ecx + movd %ecx, %xmm7 + movsd %xmm1, 16(%esp) + xorpd %xmm1, %xmm1 + movl $30704, %edx + pinsrw $3, %edx, %xmm1 + movsd %xmm0, 8(%esp) + movapd %xmm0, %xmm3 + movl $8192, %edx + movd %edx, %xmm4 + movapd 8240(%ebx), %xmm6 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + psllq $5, %xmm0 + movsd 8256(%ebx), %xmm2 + psrlq $34, %xmm0 + movl %eax, %edx + andl $32752, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + rcpss %xmm0, %xmm0 + psllq $12, %xmm3 + addl $16, %ecx + bsr %ecx, %ecx + psrlq $12, %xmm3 + movl %esi, 24(%esp) + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 + movl $0, %esi +.L_2TAG_PACKET_1.0.2: + mulss %xmm7, %xmm0 + movl $-1, %edx + subl $4, %ecx + shll %cl, %edx + movd %edx, %xmm5 + orpd %xmm1, %xmm3 + subl $16351, %eax + cmpl $1, %eax + jbe .L_2TAG_PACKET_2.0.2 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm3, %xmm5 +.L_2TAG_PACKET_3.0.2: + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + subl $1, %eax + sarl $4, %eax + cvtsi2sdl %eax, %xmm7 + mulpd %xmm0, %xmm5 +.L_2TAG_PACKET_4.0.2: + mulsd %xmm0, %xmm3 + movapd 8272(%ebx), %xmm1 + subsd %xmm2, %xmm5 + movapd 8288(%ebx), %xmm4 + movl %eax, %ecx + sarl $31, %eax + addl %eax, %ecx + xorl %ecx, %eax + addl $1, %eax + bsr %eax, %eax + unpcklpd %xmm3, %xmm5 + movapd 8304(%ebx), %xmm6 + addsd %xmm5, %xmm3 + andl $16760832, %edx + shrl $10, %edx + addpd -3616(%ebx,%edx), %xmm5 + movapd 8320(%ebx), %xmm0 + pshufd $68, %xmm3, %xmm2 + mulsd %xmm3, %xmm3 + mulpd %xmm2, %xmm1 + mulpd %xmm2, %xmm4 + addsd %xmm7, %xmm5 + mulsd %xmm3, %xmm2 + addpd %xmm1, %xmm6 + mulsd %xmm3, %xmm3 + addpd %xmm4, %xmm0 + movsd 16(%esp), %xmm1 + movzwl 22(%esp), %ecx + pshufd $238, %xmm5, %xmm7 + movsd 8368(%ebx), %xmm4 + mulpd %xmm2, %xmm6 + pshufd $68, %xmm3, %xmm3 + mulpd %xmm2, %xmm0 + shll $4, %eax + subl $15872, %eax + andl $32752, %ecx + addl %ecx, %eax + mulpd %xmm6, %xmm3 + cmpl $624, %eax + jae .L_2TAG_PACKET_5.0.2 + xorpd %xmm6, %xmm6 + movl $17080, %edx + pinsrw $3, %edx, %xmm6 + movapd %xmm1, %xmm2 + andpd %xmm1, %xmm4 + subsd %xmm4, %xmm1 + mulsd %xmm5, %xmm4 + addsd %xmm7, %xmm0 + mulsd %xmm5, %xmm1 + movapd %xmm6, %xmm7 + addsd %xmm4, %xmm6 + addpd %xmm0, %xmm3 + movd %xmm6, %edx + subsd %xmm7, %xmm6 + pshufd $238, %xmm3, %xmm0 + subsd %xmm6, %xmm4 + addsd %xmm3, %xmm0 + movl %edx, %ecx + andl $255, %edx + addl %edx, %edx + movapd 8384(%ebx,%edx,8), %xmm5 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + movapd 12480(%ebx), %xmm7 + movapd 12496(%ebx), %xmm3 + shll $12, %ecx + xorl %esi, %ecx + andl $-1048576, %ecx + movd %ecx, %xmm6 + addsd %xmm4, %xmm2 + movsd 12512(%ebx), %xmm1 + pshufd $68, %xmm2, %xmm0 + pshufd $68, %xmm2, %xmm4 + mulpd %xmm0, %xmm0 + movl 24(%esp), %esi + mulpd %xmm4, %xmm7 + pshufd $17, %xmm6, %xmm6 + mulsd %xmm2, %xmm1 + mulsd %xmm0, %xmm0 + paddd %xmm6, %xmm5 + addpd %xmm7, %xmm3 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm5, %xmm6 + mulpd %xmm3, %xmm0 + addsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm3 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm0 + addsd %xmm5, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_7.0.2: + movsd 128(%esp), %xmm0 + movsd 136(%esp), %xmm1 + mulsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_0.0.2: + addl $16, %eax + movl $32752, %edx + andl %eax, %edx + cmpl $32752, %edx + je .L_2TAG_PACKET_8.0.2 + testl $32768, %eax + jne .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_10.0.2: + movl 16(%esp), %ecx + xorl %edx, %edx + testl %ecx, %ecx + movl $1, %ecx + cmovne %ecx, %edx + orl 20(%esp), %edx + cmpl $1072693248, %edx + je .L_2TAG_PACKET_7.0.2 + movsd 8(%esp), %xmm0 + movsd 8(%esp), %xmm3 + movd %xmm3, %edx + psrlq $32, %xmm3 + movd %xmm3, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_11.0.2 + xorpd %xmm3, %xmm3 + movl $18416, %eax + pinsrw $3, %eax, %xmm3 + mulsd %xmm3, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movapd %xmm0, %xmm3 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psllq $5, %xmm0 + movsd 8256(%ebx), %xmm2 + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm3 + movapd 8240(%ebx), %xmm6 + psrlq $12, %xmm3 + mulss %xmm7, %xmm0 + movl $-1024, %edx + movd %edx, %xmm5 + orpd %xmm1, %xmm3 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm3, %xmm5 + movl $0, %esi + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + andl $32752, %eax + subl $18416, %eax + sarl $4, %eax + cvtsi2sdl %eax, %xmm7 + mulpd %xmm0, %xmm5 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_12.0.2: + movl 16(%esp), %ecx + xorl %edx, %edx + testl %ecx, %ecx + movl $1, %ecx + cmovne %ecx, %edx + orl 20(%esp), %edx + cmpl $1072693248, %edx + je .L_2TAG_PACKET_7.0.2 + movsd 8(%esp), %xmm0 + movsd 8(%esp), %xmm3 + movd %xmm3, %edx + psrlq $32, %xmm3 + movd %xmm3, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_11.0.2 + xorpd %xmm3, %xmm3 + movl $18416, %eax + pinsrw $3, %eax, %xmm3 + mulsd %xmm3, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movapd %xmm0, %xmm3 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psllq $5, %xmm0 + movsd 8256(%ebx), %xmm2 + psrlq $34, %xmm0 + rcpss %xmm0, %xmm0 + psllq $12, %xmm3 + movapd 8240(%ebx), %xmm6 + psrlq $12, %xmm3 + mulss %xmm7, %xmm0 + movl $-1024, %edx + movd %edx, %xmm5 + orpd %xmm1, %xmm3 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm3, %xmm5 + movl $-2147483648, %esi + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + andl $32752, %eax + subl $18416, %eax + sarl $4, %eax + cvtsi2sdl %eax, %xmm7 + mulpd %xmm0, %xmm5 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + cmpl $0, %eax + jl .L_2TAG_PACKET_13.0.2 + cmpl $736, %eax + jae .L_2TAG_PACKET_14.0.2 +.L_2TAG_PACKET_15.0.2: + addsd %xmm7, %xmm0 + movsd 12544(%ebx), %xmm2 + addpd %xmm0, %xmm3 + xorpd %xmm6, %xmm6 + movl $17080, %eax + pinsrw $3, %eax, %xmm6 + pshufd $238, %xmm3, %xmm0 + addsd %xmm3, %xmm0 + movapd %xmm5, %xmm3 + addsd %xmm0, %xmm5 + movapd %xmm2, %xmm4 + subsd %xmm5, %xmm3 + movapd %xmm5, %xmm7 + andpd %xmm2, %xmm5 + movapd %xmm1, %xmm2 + andpd %xmm1, %xmm4 + subsd %xmm5, %xmm7 + addsd %xmm3, %xmm0 + subsd %xmm4, %xmm1 + mulsd %xmm5, %xmm4 + addsd %xmm7, %xmm0 + mulsd %xmm0, %xmm2 + movapd %xmm6, %xmm7 + mulsd %xmm5, %xmm1 + addsd %xmm4, %xmm6 + movd %xmm6, %eax + subsd %xmm7, %xmm6 + addsd %xmm1, %xmm2 + movapd 12480(%ebx), %xmm7 + movapd 12496(%ebx), %xmm3 + subsd %xmm6, %xmm4 + pextrw $3, %xmm6, %edx + movl %eax, %ecx + andl $255, %eax + addl %eax, %eax + movapd 8384(%ebx,%eax,8), %xmm5 + addsd %xmm4, %xmm2 + sarl $8, %ecx + movl %ecx, %eax + sarl $1, %ecx + subl %ecx, %eax + shll $20, %ecx + xorl %esi, %ecx + movd %ecx, %xmm6 + movsd 12512(%ebx), %xmm1 + andl $32767, %edx + cmpl $16529, %edx + ja .L_2TAG_PACKET_14.0.2 + pshufd $68, %xmm2, %xmm0 + pshufd $68, %xmm2, %xmm4 + mulpd %xmm0, %xmm0 + mulpd %xmm4, %xmm7 + pshufd $17, %xmm6, %xmm6 + mulsd %xmm2, %xmm1 + mulsd %xmm0, %xmm0 + paddd %xmm6, %xmm5 + addpd %xmm7, %xmm3 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm5, %xmm6 + mulpd %xmm3, %xmm0 + addsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm3 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + shll $4, %eax + xorpd %xmm4, %xmm4 + addl $16368, %eax + pinsrw $3, %eax, %xmm4 + addsd %xmm1, %xmm0 + movl 24(%esp), %esi + addsd %xmm3, %xmm0 + movapd %xmm0, %xmm1 + addsd %xmm5, %xmm0 + mulsd %xmm4, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + je .L_2TAG_PACKET_16.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_18.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_8.0.2: + movsd 16(%esp), %xmm1 + movsd 8(%esp), %xmm0 + movapd %xmm0, %xmm2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + je .L_2TAG_PACKET_19.0.2 + addsd %xmm0, %xmm0 + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_20.0.2 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_20.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + movl $29, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_22.0.2: + movsd 16(%esp), %xmm0 + addpd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_19.0.2: + movd %xmm1, %eax + movapd %xmm1, %xmm2 + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_23.0.2 + pextrw $3, %xmm2, %eax + andl $32752, %eax + cmpl $32752, %eax + jne .L_2TAG_PACKET_24.0.2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + jne .L_2TAG_PACKET_22.0.2 +.L_2TAG_PACKET_24.0.2: + pextrw $3, %xmm0, %eax + testl $32768, %eax + jne .L_2TAG_PACKET_25.0.2 + testl $-2147483648, %ecx + jne .L_2TAG_PACKET_26.0.2 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_27.0.2: + movsd 16(%esp), %xmm1 + movd %xmm1, %eax + testl $1, %eax + jne .L_2TAG_PACKET_28.0.2 + testl $2, %eax + jne .L_2TAG_PACKET_29.0.2 + jmp .L_2TAG_PACKET_28.0.2 +.L_2TAG_PACKET_25.0.2: + shrl $20, %ecx + andl $2047, %ecx + cmpl $1075, %ecx + ja .L_2TAG_PACKET_28.0.2 + je .L_2TAG_PACKET_30.0.2 + cmpl $1074, %ecx + ja .L_2TAG_PACKET_27.0.2 + cmpl $1023, %ecx + jb .L_2TAG_PACKET_28.0.2 + movsd 16(%esp), %xmm1 + movl $17208, %eax + xorpd %xmm3, %xmm3 + pinsrw $3, %eax, %xmm3 + movapd %xmm3, %xmm4 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + jne .L_2TAG_PACKET_28.0.2 + movd %xmm3, %eax + andl $1, %eax + je .L_2TAG_PACKET_28.0.2 +.L_2TAG_PACKET_29.0.2: + movsd 16(%esp), %xmm1 + pextrw $3, %xmm1, %eax + andl $32768, %eax + je .L_2TAG_PACKET_18.0.2 + xorpd %xmm0, %xmm0 + movl $32768, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_28.0.2: + movsd 16(%esp), %xmm1 + pextrw $3, %xmm1, %eax + andl $32768, %eax + jne .L_2TAG_PACKET_26.0.2 +.L_2TAG_PACKET_31.0.2: + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_30.0.2: + movsd 16(%esp), %xmm1 + movd %xmm1, %eax + andl $1, %eax + je .L_2TAG_PACKET_28.0.2 + jmp .L_2TAG_PACKET_29.0.2 +.L_2TAG_PACKET_32.0.2: + movd %xmm1, %eax + psrlq $20, %xmm1 + movd %xmm1, %edx + orl %edx, %eax + je .L_2TAG_PACKET_33.0.2 + movsd 16(%esp), %xmm0 + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_33.0.2: + movsd 8(%esp), %xmm0 + pextrw $3, %xmm0, %eax + cmpl $49136, %eax + jne .L_2TAG_PACKET_34.0.2 + movd %xmm0, %ecx + psrlq $20, %xmm0 + movd %xmm0, %edx + orl %edx, %ecx + jne .L_2TAG_PACKET_34.0.2 + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_34.0.2: + movsd 16(%esp), %xmm1 + andl $32752, %eax + subl $16368, %eax + pextrw $3, %xmm1, %edx + xorpd %xmm0, %xmm0 + xorl %edx, %eax + andl $32768, %eax + jne .L_2TAG_PACKET_18.0.2 + movl $32752, %ecx + pinsrw $3, %ecx, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_35.0.2: + movd %xmm1, %eax + cmpl $17184, %edx + ja .L_2TAG_PACKET_36.0.2 + testl $1, %eax + jne .L_2TAG_PACKET_37.0.2 + testl $2, %eax + je .L_2TAG_PACKET_38.0.2 + jmp .L_2TAG_PACKET_39.0.2 +.L_2TAG_PACKET_36.0.2: + testl $1, %eax + je .L_2TAG_PACKET_38.0.2 + jmp .L_2TAG_PACKET_39.0.2 +.L_2TAG_PACKET_9.0.2: + movsd 8(%esp), %xmm2 + movd %xmm2, %eax + psrlq $31, %xmm2 + movd %xmm2, %ecx + orl %ecx, %eax + je .L_2TAG_PACKET_11.0.2 + movsd 16(%esp), %xmm1 + pextrw $3, %xmm1, %edx + movd %xmm1, %eax + movapd %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + addl %ecx, %ecx + orl %eax, %ecx + je .L_2TAG_PACKET_40.0.2 + andl $32752, %edx + cmpl $32752, %edx + je .L_2TAG_PACKET_32.0.2 + cmpl $17200, %edx + ja .L_2TAG_PACKET_38.0.2 + cmpl $17184, %edx + jae .L_2TAG_PACKET_35.0.2 + cmpl $16368, %edx + jb .L_2TAG_PACKET_37.0.2 + movl $17208, %eax + xorpd %xmm2, %xmm2 + pinsrw $3, %eax, %xmm2 + movapd %xmm2, %xmm4 + addsd %xmm1, %xmm2 + subsd %xmm2, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32767, %eax + jne .L_2TAG_PACKET_37.0.2 + movd %xmm2, %eax + andl $1, %eax + je .L_2TAG_PACKET_38.0.2 +.L_2TAG_PACKET_39.0.2: + xorpd %xmm1, %xmm1 + movl $30704, %edx + pinsrw $3, %edx, %xmm1 + movsd 8256(%ebx), %xmm2 + movsd 8(%esp), %xmm4 + pextrw $3, %xmm4, %eax + movl $8192, %edx + movd %edx, %xmm4 + andl $32767, %eax + subl $16, %eax + jl .L_2TAG_PACKET_12.0.2 + movl %eax, %edx + andl $32752, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + addl $16, %ecx + bsr %ecx, %ecx + movl $-2147483648, %esi + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_37.0.2: + xorpd %xmm1, %xmm1 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + xorpd %xmm0, %xmm0 + mulsd %xmm1, %xmm0 + movl $28, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_38.0.2: + xorpd %xmm1, %xmm1 + movl $30704, %edx + pinsrw $3, %edx, %xmm1 + movsd 8256(%ebx), %xmm2 + movsd 8(%esp), %xmm4 + pextrw $3, %xmm4, %eax + movl $8192, %edx + movd %edx, %xmm4 + andl $32767, %eax + subl $16, %eax + jl .L_2TAG_PACKET_10.0.2 + movl %eax, %edx + andl $32752, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + addl $16, %ecx + bsr %ecx, %ecx + movl $0, %esi + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_23.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_26.0.2: + xorpd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_13.0.2: + addl $384, %eax + cmpl $0, %eax + jl .L_2TAG_PACKET_41.0.2 + mulsd %xmm1, %xmm5 + addsd %xmm7, %xmm0 + shrl $31, %esi + addpd %xmm0, %xmm3 + pshufd $238, %xmm3, %xmm0 + addsd %xmm0, %xmm3 + movsd 12528(%ebx,%esi,8), %xmm4 + mulsd %xmm3, %xmm1 + xorpd %xmm0, %xmm0 + movl $16368, %eax + shll $15, %esi + orl %esi, %eax + pinsrw $3, %eax, %xmm0 + addsd %xmm1, %xmm5 + movl 24(%esp), %esi + mulsd %xmm4, %xmm5 + addsd %xmm5, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_41.0.2: + movl 24(%esp), %esi + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_40.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_42.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + movl $26, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_11.0.2: + movsd 16(%esp), %xmm1 + movapd %xmm1, %xmm2 + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $32752, %eax + jne .L_2TAG_PACKET_43.0.2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + jne .L_2TAG_PACKET_22.0.2 +.L_2TAG_PACKET_43.0.2: + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_42.0.2 + shrl $21, %edx + cmpl $1075, %edx + ja .L_2TAG_PACKET_44.0.2 + je .L_2TAG_PACKET_45.0.2 + cmpl $1023, %edx + jb .L_2TAG_PACKET_44.0.2 + movsd 16(%esp), %xmm1 + movl $17208, %eax + xorpd %xmm3, %xmm3 + pinsrw $3, %eax, %xmm3 + movapd %xmm3, %xmm4 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + jne .L_2TAG_PACKET_44.0.2 + movd %xmm3, %eax + andl $1, %eax + je .L_2TAG_PACKET_44.0.2 +.L_2TAG_PACKET_46.0.2: + movsd 8(%esp), %xmm0 + testl $-2147483648, %ecx + jne .L_2TAG_PACKET_47.0.2 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_45.0.2: + movsd 16(%esp), %xmm1 + movd %xmm1, %eax + testl $1, %eax + jne .L_2TAG_PACKET_46.0.2 +.L_2TAG_PACKET_44.0.2: + testl $-2147483648, %ecx + je .L_2TAG_PACKET_26.0.2 + xorpd %xmm0, %xmm0 +.L_2TAG_PACKET_47.0.2: + movl $16368, %eax + xorpd %xmm1, %xmm1 + pinsrw $3, %eax, %xmm1 + divsd %xmm0, %xmm1 + movapd %xmm1, %xmm0 + movl $27, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_14.0.2: + movsd 8(%esp), %xmm2 + movsd 16(%esp), %xmm6 + pextrw $3, %xmm2, %eax + pextrw $3, %xmm6, %edx + movl $32752, %ecx + andl %edx, %ecx + cmpl $32752, %ecx + je .L_2TAG_PACKET_48.0.2 + andl $32752, %eax + subl $16368, %eax + xorl %eax, %edx + testl $32768, %edx + jne .L_2TAG_PACKET_49.0.2 +.L_2TAG_PACKET_50.0.2: + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + shrl $16, %esi + orl %esi, %eax + pinsrw $3, %eax, %xmm1 + movl 24(%esp), %esi + mulsd %xmm1, %xmm0 +.L_2TAG_PACKET_17.0.2: + movl $24, %edx +.L_2TAG_PACKET_21.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_49.0.2: + movl $16, %eax + pinsrw $3, %eax, %xmm0 + mulsd %xmm0, %xmm0 + testl $-2147483648, %esi + je .L_2TAG_PACKET_51.0.2 + movsd 12560(%ebx), %xmm2 + xorpd %xmm2, %xmm0 +.L_2TAG_PACKET_51.0.2: + movl 24(%esp), %esi + movl $25, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_16.0.2: + pextrw $3, %xmm5, %ecx + pextrw $3, %xmm4, %edx + movl $-1, %eax + andl $32752, %ecx + subl $16368, %ecx + andl $32752, %edx + addl %ecx, %edx + movl $-31, %ecx + sarl $4, %edx + subl %edx, %ecx + jle .L_2TAG_PACKET_52.0.2 + cmpl $20, %ecx + ja .L_2TAG_PACKET_53.0.2 + shll %cl, %eax +.L_2TAG_PACKET_52.0.2: + movd %eax, %xmm0 + psllq $32, %xmm0 + andpd %xmm5, %xmm0 + subsd %xmm0, %xmm5 + addsd %xmm1, %xmm5 + mulsd %xmm4, %xmm0 + mulsd %xmm4, %xmm5 + addsd %xmm5, %xmm0 +.L_2TAG_PACKET_53.0.2: + movl $25, %edx + jmp .L_2TAG_PACKET_21.0.2 +.L_2TAG_PACKET_2.0.2: + movzwl 22(%esp), %ecx + movl $-2147483648, %edx + movd %edx, %xmm1 + xorpd %xmm7, %xmm7 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + paddq %xmm3, %xmm1 + andpd %xmm1, %xmm5 + andl $32752, %ecx + cmpl $16560, %ecx + jb .L_2TAG_PACKET_3.0.2 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + addl $16351, %eax + shrl $4, %eax + subl $1022, %eax + cvtsi2sdl %eax, %xmm7 + mulpd %xmm0, %xmm5 + movsd (%ebx), %xmm4 + mulsd %xmm0, %xmm3 + movsd (%ebx), %xmm6 + subsd %xmm2, %xmm5 + movsd 8(%ebx), %xmm1 + pshufd $68, %xmm3, %xmm2 + unpcklpd %xmm3, %xmm5 + addsd %xmm5, %xmm3 + movsd 8(%ebx), %xmm0 + andl $16760832, %edx + shrl $10, %edx + addpd -3616(%ebx,%edx), %xmm7 + mulsd %xmm5, %xmm4 + mulsd %xmm5, %xmm0 + mulsd %xmm2, %xmm6 + mulsd %xmm2, %xmm1 + movapd %xmm5, %xmm2 + mulsd %xmm5, %xmm4 + addsd %xmm0, %xmm5 + movapd %xmm7, %xmm0 + addsd %xmm3, %xmm2 + addsd %xmm5, %xmm7 + mulsd %xmm2, %xmm6 + subsd %xmm7, %xmm0 + movapd %xmm7, %xmm2 + addsd %xmm4, %xmm7 + addsd %xmm5, %xmm0 + subsd %xmm7, %xmm2 + addsd %xmm2, %xmm4 + pshufd $238, %xmm5, %xmm2 + movapd %xmm7, %xmm5 + addsd %xmm2, %xmm7 + addsd %xmm0, %xmm4 + movapd 8272(%ebx), %xmm0 + subsd %xmm7, %xmm5 + addsd %xmm4, %xmm6 + movapd %xmm7, %xmm4 + addsd %xmm2, %xmm5 + addsd %xmm1, %xmm7 + movapd 8336(%ebx), %xmm2 + subsd %xmm7, %xmm4 + addsd %xmm5, %xmm6 + addsd %xmm1, %xmm4 + pshufd $238, %xmm7, %xmm5 + movapd %xmm7, %xmm1 + addsd %xmm5, %xmm7 + subsd %xmm7, %xmm1 + addsd %xmm5, %xmm1 + movapd 8352(%ebx), %xmm5 + pshufd $68, %xmm3, %xmm3 + addsd %xmm4, %xmm6 + addsd %xmm1, %xmm6 + movapd 8304(%ebx), %xmm1 + mulpd %xmm3, %xmm0 + mulpd %xmm3, %xmm2 + pshufd $68, %xmm3, %xmm4 + mulpd %xmm3, %xmm3 + addpd %xmm1, %xmm0 + addpd %xmm2, %xmm5 + mulsd %xmm3, %xmm4 + movsd 16(%ebx), %xmm2 + mulpd %xmm3, %xmm3 + movsd 16(%esp), %xmm1 + movzwl 22(%esp), %ecx + mulpd %xmm4, %xmm0 + pextrw $3, %xmm7, %eax + mulpd %xmm4, %xmm5 + mulpd %xmm3, %xmm0 + movsd 8376(%ebx), %xmm4 + andpd %xmm7, %xmm2 + addsd %xmm6, %xmm5 + subsd %xmm2, %xmm7 + addpd %xmm0, %xmm5 + andl $32752, %eax + subl $16368, %eax + andl $32752, %ecx + cmpl $32752, %ecx + je .L_2TAG_PACKET_48.0.2 + addl %eax, %ecx + cmpl $16576, %ecx + jae .L_2TAG_PACKET_54.0.2 + pshufd $238, %xmm5, %xmm0 + andpd %xmm1, %xmm4 + movapd %xmm1, %xmm3 + addsd %xmm0, %xmm5 + subsd %xmm4, %xmm1 + xorpd %xmm6, %xmm6 + movl $17080, %edx + pinsrw $3, %edx, %xmm6 + addsd %xmm5, %xmm7 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm1 + movapd %xmm6, %xmm5 + mulsd %xmm7, %xmm3 + addsd %xmm4, %xmm6 + addsd %xmm3, %xmm1 + movapd 12480(%ebx), %xmm7 + movd %xmm6, %edx + subsd %xmm5, %xmm6 + movapd 12496(%ebx), %xmm3 + movsd 12512(%ebx), %xmm2 + subsd %xmm6, %xmm4 + movl %edx, %ecx + andl $255, %edx + addl %edx, %edx + movapd 8384(%ebx,%edx,8), %xmm5 + addsd %xmm1, %xmm4 + pextrw $3, %xmm6, %edx + shrl $8, %ecx + movl %ecx, %eax + shrl $1, %ecx + subl %ecx, %eax + shll $20, %ecx + movd %ecx, %xmm6 + pshufd $68, %xmm4, %xmm0 + pshufd $68, %xmm4, %xmm1 + mulpd %xmm0, %xmm0 + mulpd %xmm1, %xmm7 + pshufd $17, %xmm6, %xmm6 + mulsd %xmm4, %xmm2 + andl $32767, %edx + cmpl $16529, %edx + ja .L_2TAG_PACKET_14.0.2 + mulsd %xmm0, %xmm0 + paddd %xmm6, %xmm5 + addpd %xmm7, %xmm3 + mulsd %xmm5, %xmm2 + pshufd $238, %xmm5, %xmm6 + mulpd %xmm3, %xmm0 + addsd %xmm6, %xmm2 + pshufd $238, %xmm0, %xmm3 + addl $1023, %eax + shll $20, %eax + orl %esi, %eax + movd %eax, %xmm4 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + addsd %xmm2, %xmm0 + psllq $32, %xmm4 + addsd %xmm3, %xmm0 + movapd %xmm0, %xmm1 + addsd %xmm5, %xmm0 + movl 24(%esp), %esi + mulsd %xmm4, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + je .L_2TAG_PACKET_16.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_55.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_48.0.2: + movl 24(%esp), %esi +.L_2TAG_PACKET_56.0.2: + movsd 8(%esp), %xmm0 + movsd 16(%esp), %xmm1 + addsd %xmm1, %xmm1 + xorpd %xmm2, %xmm2 + movl $49136, %eax + pinsrw $3, %eax, %xmm2 + addsd %xmm0, %xmm2 + pextrw $3, %xmm2, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_18.0.2 + movd %xmm1, %edx + movapd %xmm1, %xmm3 + psrlq $20, %xmm3 + movd %xmm3, %ecx + orl %edx, %ecx + je .L_2TAG_PACKET_57.0.2 + addsd %xmm1, %xmm1 + movapd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_57.0.2: + pextrw $3, %xmm0, %eax + andl $32752, %eax + pextrw $3, %xmm1, %edx + xorpd %xmm0, %xmm0 + subl $16368, %eax + xorl %edx, %eax + testl $32768, %eax + jne .L_2TAG_PACKET_18.0.2 + movl $32752, %edx + pinsrw $3, %edx, %xmm0 + jmp .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_54.0.2: + pextrw $3, %xmm1, %eax + pextrw $3, %xmm2, %ecx + xorl %ecx, %eax + testl $32768, %eax + je .L_2TAG_PACKET_50.0.2 + jmp .L_2TAG_PACKET_49.0.2 +.L_2TAG_PACKET_6.0.2: + movl 64(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(pow) +# -- End pow + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 3218479616 + .long 0 + .long 3210587105 + .long 4160749568 + .long 4294967295 + .long 0 + .long 4294965248 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 536870912 + .long 1072689162 + .long 2523013013 + .long 1046157398 + .long 3758096384 + .long 1072685081 + .long 3851513758 + .long 3190968952 + .long 0 + .long 1072681007 + .long 2241466466 + .long 1046044599 + .long 3221225472 + .long 1072676937 + .long 2990928271 + .long 3193084984 + .long 3758096384 + .long 1072672873 + .long 2905112743 + .long 3192918576 + .long 1610612736 + .long 1072668815 + .long 3370591264 + .long 1046051793 + .long 2147483648 + .long 1072664762 + .long 3272361216 + .long 3193793653 + .long 3758096384 + .long 1072660714 + .long 46546755 + .long 1043206936 + .long 3221225472 + .long 1072656672 + .long 3017067724 + .long 3192177962 + .long 0 + .long 1072652636 + .long 3688436631 + .long 3192814956 + .long 2684354560 + .long 1072648604 + .long 1707461992 + .long 3193056712 + .long 2684354560 + .long 1072644578 + .long 1188114540 + .long 3193603086 + .long 3758096384 + .long 1072640557 + .long 3533180564 + .long 1045459375 + .long 2684354560 + .long 1072636542 + .long 2000337630 + .long 3193475557 + .long 2684354560 + .long 1072632532 + .long 3698062443 + .long 3193752766 + .long 3758096384 + .long 1072628527 + .long 3161606138 + .long 3190532995 + .long 2147483648 + .long 1072624528 + .long 3165265478 + .long 3193158459 + .long 1610612736 + .long 1072620534 + .long 1600940077 + .long 3193226777 + .long 2147483648 + .long 1072616545 + .long 1363272552 + .long 3192614278 + .long 3758096384 + .long 1072612561 + .long 3966209910 + .long 3191249654 + .long 2147483648 + .long 1072608583 + .long 1093672789 + .long 3190637330 + .long 1610612736 + .long 1072604610 + .long 1735239357 + .long 3192753616 + .long 1610612736 + .long 1072600642 + .long 1470665156 + .long 1045559697 + .long 2684354560 + .long 1072596679 + .long 3840624926 + .long 1045928953 + .long 536870912 + .long 1072592722 + .long 4259072556 + .long 3191035622 + .long 3221225472 + .long 1072588769 + .long 3613088753 + .long 3192165681 + .long 2147483648 + .long 1072584822 + .long 3175234446 + .long 1039486948 + .long 1610612736 + .long 1072580880 + .long 856576441 + .long 1045702812 + .long 2147483648 + .long 1072576943 + .long 2253498719 + .long 3193285334 + .long 2684354560 + .long 1072573011 + .long 1587070728 + .long 3190801577 + .long 3758096384 + .long 1072569084 + .long 159986317 + .long 1042519436 + .long 1073741824 + .long 1072565163 + .long 3999541949 + .long 3192020440 + .long 2684354560 + .long 1072561246 + .long 3281310262 + .long 1045586786 + .long 536870912 + .long 1072557335 + .long 3775179406 + .long 1045226055 + .long 3221225472 + .long 1072553428 + .long 643472356 + .long 3193681786 + .long 1073741824 + .long 1072549527 + .long 248169775 + .long 1045068977 + .long 3758096384 + .long 1072545630 + .long 307016632 + .long 1042640932 + .long 2147483648 + .long 1072541739 + .long 3872718526 + .long 3189781486 + .long 536870912 + .long 1072537853 + .long 969711630 + .long 3191724732 + .long 3221225472 + .long 1072533971 + .long 4018820394 + .long 3193189264 + .long 1073741824 + .long 1072530095 + .long 3102233092 + .long 1045510224 + .long 3758096384 + .long 1072526223 + .long 1029307912 + .long 3193812776 + .long 1073741824 + .long 1072522357 + .long 984083153 + .long 1045987403 + .long 3221225472 + .long 1072518495 + .long 4171455401 + .long 3193084080 + .long 0 + .long 1072514639 + .long 2592660757 + .long 1046121691 + .long 1073741824 + .long 1072510787 + .long 2964365712 + .long 1046054453 + .long 2147483648 + .long 1072506940 + .long 3792777877 + .long 3193704729 + .long 2147483648 + .long 1072503098 + .long 2948536104 + .long 3192467100 + .long 1610612736 + .long 1072499261 + .long 3836005619 + .long 1041873166 + .long 536870912 + .long 1072495429 + .long 3124543160 + .long 1044409168 + .long 3221225472 + .long 1072491601 + .long 286227933 + .long 1041065990 + .long 1073741824 + .long 1072487779 + .long 2111296776 + .long 3193604419 + .long 2147483648 + .long 1072483961 + .long 2606822001 + .long 3192940394 + .long 2147483648 + .long 1072480148 + .long 194696800 + .long 1046026063 + .long 1610612736 + .long 1072476340 + .long 8535452 + .long 1046200178 + .long 536870912 + .long 1072472537 + .long 950463625 + .long 3192731897 + .long 2147483648 + .long 1072468738 + .long 973831566 + .long 1045683197 + .long 3221225472 + .long 1072464944 + .long 3330435892 + .long 3190277577 + .long 3221225472 + .long 1072461155 + .long 208692097 + .long 3193517651 + .long 1610612736 + .long 1072457371 + .long 2113097415 + .long 1044781749 + .long 3758096384 + .long 1072453591 + .long 1088808936 + .long 3193716142 + .long 0 + .long 1072449817 + .long 1443002127 + .long 3193250205 + .long 3221225472 + .long 1072446046 + .long 3967357419 + .long 1046109477 + .long 1610612736 + .long 1072442281 + .long 3013517861 + .long 3193159691 + .long 2147483648 + .long 1072438520 + .long 2524586286 + .long 1046121951 + .long 1610612736 + .long 1072434764 + .long 1476892861 + .long 1046434731 + .long 0 + .long 1072431013 + .long 3089640950 + .long 3192305780 + .long 536870912 + .long 1072427266 + .long 3812255529 + .long 1045730879 + .long 0 + .long 1072423524 + .long 995354762 + .long 3191528673 + .long 1610612736 + .long 1072419786 + .long 3260567684 + .long 1046273695 + .long 2147483648 + .long 1072416053 + .long 2738210286 + .long 3191471516 + .long 536870912 + .long 1072412325 + .long 1931849805 + .long 1044560405 + .long 1610612736 + .long 1072408601 + .long 358896655 + .long 1044029237 + .long 1073741824 + .long 1072404882 + .long 2214589842 + .long 3193202126 + .long 2684354560 + .long 1072401167 + .long 3118097363 + .long 3192592906 + .long 2147483648 + .long 1072397457 + .long 1835998884 + .long 1045788247 + .long 0 + .long 1072393752 + .long 1585488319 + .long 1045289910 + .long 0 + .long 1072390051 + .long 480160949 + .long 1046030455 + .long 2684354560 + .long 1072386354 + .long 1832959667 + .long 3193013644 + .long 2684354560 + .long 1072382662 + .long 3611346555 + .long 1044544210 + .long 1073741824 + .long 1072378975 + .long 2749418734 + .long 3193712580 + .long 1073741824 + .long 1072375292 + .long 2390043472 + .long 3191710658 + .long 3221225472 + .long 1072371613 + .long 2828199902 + .long 1042265217 + .long 3221225472 + .long 1072367939 + .long 569209321 + .long 3191230982 + .long 536870912 + .long 1072364270 + .long 236159139 + .long 1046240123 + .long 536870912 + .long 1072360605 + .long 1010656270 + .long 3193813968 + .long 1610612736 + .long 1072356944 + .long 2409080597 + .long 1044025029 + .long 536870912 + .long 1072353288 + .long 598419513 + .long 1043327370 + .long 1073741824 + .long 1072349636 + .long 4105950479 + .long 1045747958 + .long 3758096384 + .long 1072345988 + .long 343243853 + .long 3192420172 + .long 3221225472 + .long 1072342345 + .long 2088439530 + .long 1046172091 + .long 536870912 + .long 1072338707 + .long 4117721107 + .long 1043882496 + .long 3758096384 + .long 1072335072 + .long 3192032958 + .long 3192998645 + .long 3758096384 + .long 1072331442 + .long 2366522518 + .long 1045401957 + .long 1610612736 + .long 1072327817 + .long 3685533141 + .long 3193701947 + .long 536870912 + .long 1072324196 + .long 1058658672 + .long 3193572492 + .long 536870912 + .long 1072320579 + .long 166346347 + .long 1045456348 + .long 2147483648 + .long 1072316966 + .long 2027889772 + .long 1046349302 + .long 1073741824 + .long 1072313358 + .long 1079497888 + .long 1044585259 + .long 1073741824 + .long 1072309754 + .long 2189851573 + .long 1045132990 + .long 2684354560 + .long 1072306154 + .long 2486629386 + .long 3193613625 + .long 536870912 + .long 1072302559 + .long 1263686579 + .long 1044789259 + .long 0 + .long 1072298968 + .long 2412061798 + .long 3191369627 + .long 536870912 + .long 1072295381 + .long 584315716 + .long 3193144135 + .long 1610612736 + .long 1072291798 + .long 449000738 + .long 1046330451 + .long 0 + .long 1072288220 + .long 3938320157 + .long 1044446220 + .long 3758096384 + .long 1072284645 + .long 2949844595 + .long 3193462371 + .long 3758096384 + .long 1072281075 + .long 2771329642 + .long 3192121593 + .long 536870912 + .long 1072277510 + .long 3971508621 + .long 3193002806 + .long 2147483648 + .long 1072273948 + .long 4071942301 + .long 1044952619 + .long 536870912 + .long 1072270391 + .long 2090502395 + .long 1044660556 + .long 0 + .long 1072266838 + .long 3657520961 + .long 3193770938 + .long 3758096384 + .long 1072263288 + .long 1608175110 + .long 1045543239 + .long 0 + .long 1072259744 + .long 2506924180 + .long 1045530501 + .long 1073741824 + .long 1072256203 + .long 18238493 + .long 1046305623 + .long 3221225472 + .long 1072252666 + .long 3862640487 + .long 3192882407 + .long 1073741824 + .long 1072249134 + .long 3850158761 + .long 1043656099 + .long 3758096384 + .long 1072245605 + .long 2356524356 + .long 1045915296 + .long 3221225472 + .long 1072242081 + .long 936497287 + .long 3193842353 + .long 2147483648 + .long 1072238561 + .long 2840845344 + .long 1046454771 + .long 2147483648 + .long 1072235045 + .long 3688100713 + .long 1044895451 + .long 2684354560 + .long 1072231533 + .long 479979913 + .long 3193842442 + .long 2684354560 + .long 1072228025 + .long 1016321898 + .long 1046251032 + .long 3758096384 + .long 1072224521 + .long 562232474 + .long 3191974558 + .long 536870912 + .long 1072221022 + .long 3870512029 + .long 3193113881 + .long 1610612736 + .long 1072217526 + .long 1239780547 + .long 3191583604 + .long 2684354560 + .long 1072214034 + .long 2815421327 + .long 1045873682 + .long 0 + .long 1072210547 + .long 2371009561 + .long 1041508792 + .long 1610612736 + .long 1072207063 + .long 1304636524 + .long 3192414284 + .long 3221225472 + .long 1072203583 + .long 210144854 + .long 3193327333 + .long 0 + .long 1072200108 + .long 1454303272 + .long 1046360024 + .long 1610612736 + .long 1072196636 + .long 2095757548 + .long 1044984677 + .long 3221225472 + .long 1072193168 + .long 2027215580 + .long 3192880933 + .long 0 + .long 1072189705 + .long 214794880 + .long 1043457954 + .long 1073741824 + .long 1072186245 + .long 884624917 + .long 1043497079 + .long 2147483648 + .long 1072182789 + .long 2792396634 + .long 3193171685 + .long 2684354560 + .long 1072179337 + .long 4128995250 + .long 3192103434 + .long 2684354560 + .long 1072175889 + .long 333866043 + .long 1046372325 + .long 3221225472 + .long 1072172445 + .long 2194445544 + .long 3193958905 + .long 2684354560 + .long 1072169005 + .long 2316082269 + .long 3192041703 + .long 1610612736 + .long 1072165569 + .long 581005057 + .long 1046322848 + .long 536870912 + .long 1072162137 + .long 3280786513 + .long 1045457251 + .long 3221225472 + .long 1072158708 + .long 2567093361 + .long 1044710359 + .long 1073741824 + .long 1072155284 + .long 3740443584 + .long 1044224237 + .long 2684354560 + .long 1072151863 + .long 3981028272 + .long 1042596351 + .long 3758096384 + .long 1072148446 + .long 3820011120 + .long 3191915623 + .long 0 + .long 1072145034 + .long 2946439484 + .long 3193831276 + .long 3758096384 + .long 1072141624 + .long 3075274422 + .long 3190132432 + .long 2684354560 + .long 1072138219 + .long 496052167 + .long 1043619760 + .long 1073741824 + .long 1072134818 + .long 271106589 + .long 3192265149 + .long 2684354560 + .long 1072131420 + .long 2091955684 + .long 1044443554 + .long 3758096384 + .long 1072128026 + .long 723240109 + .long 3191007419 + .long 3758096384 + .long 1072124636 + .long 1748629070 + .long 1044510075 + .long 3221225472 + .long 1072121250 + .long 3289522046 + .long 3193095178 + .long 1610612736 + .long 1072117868 + .long 3599052146 + .long 3193720427 + .long 3221225472 + .long 1072114489 + .long 2446758135 + .long 3193436303 + .long 3758096384 + .long 1072111114 + .long 1652171097 + .long 3192137173 + .long 3221225472 + .long 1072107743 + .long 1353007155 + .long 1044523902 + .long 1610612736 + .long 1072104376 + .long 990601105 + .long 1046296663 + .long 3758096384 + .long 1072101012 + .long 2228627618 + .long 3193041040 + .long 0 + .long 1072097653 + .long 812484756 + .long 3191950723 + .long 3758096384 + .long 1072094296 + .long 817833130 + .long 3192279242 + .long 2147483648 + .long 1072090944 + .long 3563228521 + .long 3193810951 + .long 3221225472 + .long 1072087595 + .long 2729108859 + .long 3190936185 + .long 3221225472 + .long 1072084250 + .long 2249121662 + .long 3190639690 + .long 2147483648 + .long 1072080909 + .long 4082471745 + .long 3193929368 + .long 3758096384 + .long 1072077571 + .long 2827323806 + .long 3193708561 + .long 3758096384 + .long 1072074237 + .long 735866167 + .long 1042434690 + .long 2684354560 + .long 1072070907 + .long 3240808889 + .long 3191918422 + .long 0 + .long 1072067581 + .long 466482777 + .long 3186962221 + .long 0 + .long 1072064258 + .long 1576076296 + .long 1045849056 + .long 3221225472 + .long 1072060938 + .long 2751923560 + .long 3191910703 + .long 0 + .long 1072057623 + .long 1908755527 + .long 1046437515 + .long 0 + .long 1072054311 + .long 3175841411 + .long 1044572886 + .long 2684354560 + .long 1072051002 + .long 1633258450 + .long 3192670420 + .long 3221225472 + .long 1072047697 + .long 1867746657 + .long 1045726209 + .long 2684354560 + .long 1072044396 + .long 338968864 + .long 3193084662 + .long 0 + .long 1072041099 + .long 1501742471 + .long 3191742031 + .long 0 + .long 1072037805 + .long 4266775786 + .long 3192686970 + .long 2147483648 + .long 1072034514 + .long 4249283553 + .long 1045769728 + .long 2684354560 + .long 1072031227 + .long 2758366873 + .long 1046402161 + .long 1610612736 + .long 1072027944 + .long 2161186990 + .long 1044736865 + .long 2684354560 + .long 1072024664 + .long 810300171 + .long 1045748777 + .long 2147483648 + .long 1072021388 + .long 183688927 + .long 3191515581 + .long 3758096384 + .long 1072018115 + .long 368874072 + .long 3192363575 + .long 3221225472 + .long 1072014846 + .long 2459092970 + .long 1041794640 + .long 536870912 + .long 1072011581 + .long 867488640 + .long 1046310291 + .long 536870912 + .long 1072008319 + .long 50140871 + .long 1043327329 + .long 2684354560 + .long 1072005060 + .long 1241902518 + .long 3192739252 + .long 2684354560 + .long 1072001805 + .long 1027881659 + .long 3193858388 + .long 0 + .long 1071998554 + .long 38457322 + .long 1045489179 + .long 0 + .long 1071995306 + .long 3432963337 + .long 3190969347 + .long 1610612736 + .long 1071992061 + .long 534931792 + .long 1046302734 + .long 1610612736 + .long 1071988820 + .long 1817895268 + .long 3192551860 + .long 3221225472 + .long 1071985582 + .long 357237383 + .long 3191870833 + .long 2684354560 + .long 1071982348 + .long 108262401 + .long 3193365867 + .long 3758096384 + .long 1071979117 + .long 1964729244 + .long 1042502249 + .long 2684354560 + .long 1071975890 + .long 2088446957 + .long 1038010503 + .long 3221225472 + .long 1071972666 + .long 2947239447 + .long 1046377845 + .long 1610612736 + .long 1071969446 + .long 774932072 + .long 1046064854 + .long 2147483648 + .long 1071966229 + .long 4080937590 + .long 3193041284 + .long 3758096384 + .long 1071963015 + .long 2208251454 + .long 1045945089 + .long 3221225472 + .long 1071959805 + .long 2850924475 + .long 1045650959 + .long 0 + .long 1071956599 + .long 714040997 + .long 1046275153 + .long 3221225472 + .long 1071953395 + .long 85533782 + .long 3192816920 + .long 3221225472 + .long 1071950195 + .long 1252511005 + .long 1044805706 + .long 1073741824 + .long 1071946999 + .long 2384659038 + .long 3193391602 + .long 0 + .long 1071943806 + .long 416481813 + .long 1043730233 + .long 536870912 + .long 1071940616 + .long 1675424499 + .long 1046348030 + .long 3221225472 + .long 1071937429 + .long 1175989513 + .long 3193009113 + .long 2684354560 + .long 1071934246 + .long 2400084650 + .long 3192451713 + .long 3758096384 + .long 1071931066 + .long 1467335692 + .long 3193350868 + .long 1610612736 + .long 1071927890 + .long 266493801 + .long 1044954481 + .long 1073741824 + .long 1071924717 + .long 3919093445 + .long 1046023575 + .long 2147483648 + .long 1071921547 + .long 3017408483 + .long 1044880828 + .long 536870912 + .long 1071918381 + .long 948849966 + .long 3193892224 + .long 3758096384 + .long 1071915217 + .long 1870232600 + .long 1045777228 + .long 536870912 + .long 1071912058 + .long 822381492 + .long 3193639186 + .long 2147483648 + .long 1071908901 + .long 788243705 + .long 1044966343 + .long 1073741824 + .long 1071905748 + .long 1344278809 + .long 1044428545 + .long 1073741824 + .long 1071902598 + .long 172864300 + .long 1045765608 + .long 2684354560 + .long 1071899451 + .long 211555467 + .long 3192963574 + .long 536870912 + .long 1071896308 + .long 3373438023 + .long 1045643168 + .long 0 + .long 1071893168 + .long 2867180960 + .long 3189945998 + .long 536870912 + .long 1071890031 + .long 36724362 + .long 3193240584 + .long 1610612736 + .long 1071886897 + .long 2140176984 + .long 1045945349 + .long 0 + .long 1071883767 + .long 436842360 + .long 1040712587 + .long 3758096384 + .long 1071880639 + .long 1225147329 + .long 3193814594 + .long 3758096384 + .long 1071877515 + .long 1586157348 + .long 3191614322 + .long 536870912 + .long 1071874395 + .long 3329332918 + .long 1041699791 + .long 2684354560 + .long 1071871277 + .long 1635968041 + .long 3191783756 + .long 1073741824 + .long 1071868163 + .long 2876158382 + .long 1046097093 + .long 1073741824 + .long 1071865052 + .long 4267556964 + .long 3193723000 + .long 1073741824 + .long 1071861944 + .long 195475940 + .long 1045520795 + .long 2147483648 + .long 1071858839 + .long 2239193514 + .long 1046478675 + .long 0 + .long 1071855738 + .long 4168275596 + .long 1044926285 + .long 2684354560 + .long 1071852639 + .long 142514114 + .long 1045595182 + .long 2147483648 + .long 1071849544 + .long 1943457984 + .long 3192930015 + .long 2147483648 + .long 1071846452 + .long 202659489 + .long 3193926317 + .long 2684354560 + .long 1071843363 + .long 2208408789 + .long 3193857484 + .long 3758096384 + .long 1071840277 + .long 2237297552 + .long 3192939576 + .long 1073741824 + .long 1071837195 + .long 2726920839 + .long 1044193954 + .long 3758096384 + .long 1071834115 + .long 2337732207 + .long 3193611773 + .long 2147483648 + .long 1071831039 + .long 1390088602 + .long 1044000317 + .long 1610612736 + .long 1071827966 + .long 3806188736 + .long 3193463913 + .long 1073741824 + .long 1071824896 + .long 1795276560 + .long 1043671965 + .long 1073741824 + .long 1071821829 + .long 2960792799 + .long 1046240474 + .long 2147483648 + .long 1071818765 + .long 3350591592 + .long 3193333939 + .long 3221225472 + .long 1071815704 + .long 408870754 + .long 3193322854 + .long 0 + .long 1071812647 + .long 4146717132 + .long 1046063520 + .long 2147483648 + .long 1071809592 + .long 1681114919 + .long 3192114313 + .long 0 + .long 1071806541 + .long 1098393137 + .long 3190846732 + .long 2684354560 + .long 1071803492 + .long 2437484983 + .long 3193448718 + .long 1073741824 + .long 1071800447 + .long 1036809185 + .long 3192023501 + .long 0 + .long 1071797405 + .long 659668848 + .long 3193596312 + .long 3221225472 + .long 1071794365 + .long 1112062459 + .long 3192773376 + .long 2147483648 + .long 1071791329 + .long 4082956335 + .long 1045830513 + .long 1610612736 + .long 1071788296 + .long 2387089965 + .long 1045532601 + .long 1610612736 + .long 1071785266 + .long 1522101980 + .long 3193941957 + .long 1073741824 + .long 1071782239 + .long 2157197585 + .long 3188193305 + .long 1073741824 + .long 1071779215 + .long 946810220 + .long 3193223819 + .long 1073741824 + .long 1071776194 + .long 4069942444 + .long 3193878549 + .long 536870912 + .long 1071773176 + .long 1693463440 + .long 1046360588 + .long 536870912 + .long 1071770161 + .long 1954543254 + .long 1046409381 + .long 1073741824 + .long 1071767149 + .long 1050471249 + .long 3193933095 + .long 536870912 + .long 1071764140 + .long 1256240478 + .long 1046456865 + .long 536870912 + .long 1071761134 + .long 676764254 + .long 1046055503 + .long 536870912 + .long 1071758131 + .long 1421032967 + .long 1044779786 + .long 536870912 + .long 1071755131 + .long 38735992 + .long 3192766355 + .long 0 + .long 1071752134 + .long 2960669690 + .long 1044484680 + .long 3758096384 + .long 1071749139 + .long 788707382 + .long 1045299895 + .long 3221225472 + .long 1071746148 + .long 685689300 + .long 1040778831 + .long 2147483648 + .long 1071743160 + .long 1170994182 + .long 1046159174 + .long 1073741824 + .long 1071740175 + .long 64591436 + .long 1046153849 + .long 0 + .long 1071737193 + .long 2338031659 + .long 3189997702 + .long 2684354560 + .long 1071734213 + .long 1941624568 + .long 3186752676 + .long 536870912 + .long 1071731237 + .long 1401255580 + .long 1046383990 + .long 2684354560 + .long 1071728263 + .long 376888427 + .long 1045896456 + .long 536870912 + .long 1071725293 + .long 2831424639 + .long 3193539109 + .long 1610612736 + .long 1071722325 + .long 3303123696 + .long 1044599415 + .long 2684354560 + .long 1071719360 + .long 1077295329 + .long 3189877372 + .long 3221225472 + .long 1071716398 + .long 1434061099 + .long 3184529771 + .long 3221225472 + .long 1071713439 + .long 2104991590 + .long 1045062074 + .long 3221225472 + .long 1071710483 + .long 722060869 + .long 3193788526 + .long 536870912 + .long 1071704580 + .long 3928796486 + .long 1046129020 + .long 536870912 + .long 1071698688 + .long 588844628 + .long 1045492135 + .long 2684354560 + .long 1071692807 + .long 326739366 + .long 3193004445 + .long 1610612736 + .long 1071686938 + .long 2456436042 + .long 1046278169 + .long 2684354560 + .long 1071681080 + .long 2831303512 + .long 1043670046 + .long 536870912 + .long 1071675234 + .long 607223418 + .long 1045507322 + .long 0 + .long 1071669399 + .long 4254921332 + .long 3193290483 + .long 0 + .long 1071663575 + .long 914994333 + .long 3191263853 + .long 1073741824 + .long 1071657762 + .long 4147050180 + .long 3193228552 + .long 2684354560 + .long 1071651960 + .long 594554157 + .long 3193503935 + .long 0 + .long 1071646170 + .long 1062846796 + .long 1045944331 + .long 1073741824 + .long 1071636109 + .long 2909238893 + .long 3193436884 + .long 1073741824 + .long 1071624572 + .long 1682918119 + .long 1042211899 + .long 1073741824 + .long 1071613057 + .long 2419209426 + .long 1045437062 + .long 1073741824 + .long 1071601564 + .long 2951341321 + .long 3190193214 + .long 0 + .long 1071590093 + .long 3084900875 + .long 3192394907 + .long 1073741824 + .long 1071578643 + .long 999567454 + .long 1046433447 + .long 2147483648 + .long 1071567215 + .long 1570101857 + .long 3193291160 + .long 0 + .long 1071555809 + .long 1080647881 + .long 3185154585 + .long 0 + .long 1071544424 + .long 3526309177 + .long 1044843640 + .long 2147483648 + .long 1071533060 + .long 2213463349 + .long 3191738930 + .long 1073741824 + .long 1071521718 + .long 1039925195 + .long 3192618353 + .long 1073741824 + .long 1071510397 + .long 2115757280 + .long 3193671567 + .long 1073741824 + .long 1071499097 + .long 1188751495 + .long 3191145560 + .long 2147483648 + .long 1071487818 + .long 3983461449 + .long 3193897029 + .long 2147483648 + .long 1071476560 + .long 782141500 + .long 1042879962 + .long 2147483648 + .long 1071465323 + .long 4038904626 + .long 1045063881 + .long 2147483648 + .long 1071454107 + .long 2613036921 + .long 3193217642 + .long 0 + .long 1071442912 + .long 2095723435 + .long 1044629175 + .long 1073741824 + .long 1071431737 + .long 3879795974 + .long 1045767874 + .long 1073741824 + .long 1071420583 + .long 2662198042 + .long 3191434637 + .long 3221225472 + .long 1071409449 + .long 4037605722 + .long 3193703090 + .long 2147483648 + .long 1071398336 + .long 1860331835 + .long 1040814822 + .long 3221225472 + .long 1071387243 + .long 1522972033 + .long 3190305974 + .long 1073741824 + .long 1071376171 + .long 2361534207 + .long 1043699366 + .long 0 + .long 1071365119 + .long 4180309179 + .long 1044142099 + .long 0 + .long 1071354087 + .long 1201038528 + .long 3192968772 + .long 0 + .long 1071343075 + .long 1342478171 + .long 3193251215 + .long 0 + .long 1071332083 + .long 3836883348 + .long 3193472007 + .long 3221225472 + .long 1071321110 + .long 3864874250 + .long 1045593126 + .long 2147483648 + .long 1071310158 + .long 2169494998 + .long 1046045346 + .long 1073741824 + .long 1071299226 + .long 3785165075 + .long 3193319246 + .long 2147483648 + .long 1071288313 + .long 1137692678 + .long 3192716779 + .long 1073741824 + .long 1071277420 + .long 1752107598 + .long 1046366120 + .long 3221225472 + .long 1071266546 + .long 1912656912 + .long 1046352281 + .long 3221225472 + .long 1071255692 + .long 2882676334 + .long 1046406353 + .long 1073741824 + .long 1071244858 + .long 963612460 + .long 1045282811 + .long 0 + .long 1071234043 + .long 3811255773 + .long 1046231636 + .long 1073741824 + .long 1071223247 + .long 1126055989 + .long 3192224037 + .long 2147483648 + .long 1071212470 + .long 2079145427 + .long 1044432413 + .long 0 + .long 1071201713 + .long 3611595621 + .long 1043358745 + .long 2147483648 + .long 1071190974 + .long 390522769 + .long 1045888252 + .long 1073741824 + .long 1071180255 + .long 4087939723 + .long 3192930745 + .long 3221225472 + .long 1071169554 + .long 1451494480 + .long 3190219274 + .long 1073741824 + .long 1071158873 + .long 427176194 + .long 3193042022 + .long 2147483648 + .long 1071148210 + .long 1882381948 + .long 3192727946 + .long 2147483648 + .long 1071137566 + .long 3736313771 + .long 3192087019 + .long 1073741824 + .long 1071126941 + .long 1560398816 + .long 3193185715 + .long 2147483648 + .long 1071116334 + .long 1021942441 + .long 1041526696 + .long 2147483648 + .long 1071105746 + .long 3517080249 + .long 3193576041 + .long 3221225472 + .long 1071095176 + .long 2248589878 + .long 1044527624 + .long 2147483648 + .long 1071084625 + .long 2412896695 + .long 1046112867 + .long 3221225472 + .long 1071074092 + .long 3834725738 + .long 1044562378 + .long 1073741824 + .long 1071063578 + .long 1150920407 + .long 1043768986 + .long 0 + .long 1071053082 + .long 1379393428 + .long 3188690690 + .long 0 + .long 1071042604 + .long 3058183278 + .long 3193617655 + .long 0 + .long 1071032144 + .long 421133665 + .long 3193417186 + .long 0 + .long 1071021702 + .long 2860161357 + .long 3191816125 + .long 0 + .long 1071011278 + .long 1742405964 + .long 1043580240 + .long 0 + .long 1071000872 + .long 2821215927 + .long 3188984273 + .long 3221225472 + .long 1070990483 + .long 510275597 + .long 1045813401 + .long 2147483648 + .long 1070980113 + .long 304266588 + .long 3191193536 + .long 3221225472 + .long 1070969760 + .long 1854784211 + .long 1046302073 + .long 0 + .long 1070959426 + .long 3773082854 + .long 3193008899 + .long 2147483648 + .long 1070949108 + .long 3003572392 + .long 1046404879 + .long 3221225472 + .long 1070938808 + .long 1702149204 + .long 1046407257 + .long 2147483648 + .long 1070928526 + .long 3935314439 + .long 1046438280 + .long 3221225472 + .long 1070918261 + .long 2677087609 + .long 1045501749 + .long 2147483648 + .long 1070908014 + .long 4190598039 + .long 3193640515 + .long 1073741824 + .long 1070897784 + .long 368874072 + .long 1044879927 + .long 2147483648 + .long 1070887571 + .long 3584052697 + .long 3192024662 + .long 3221225472 + .long 1070877375 + .long 3762307829 + .long 1045886918 + .long 1073741824 + .long 1070867197 + .long 495710920 + .long 1046317072 + .long 0 + .long 1070857036 + .long 2292768238 + .long 3190887508 + .long 3221225472 + .long 1070846891 + .long 1044078151 + .long 3193772914 + .long 1073741824 + .long 1070836764 + .long 3266010457 + .long 1043443755 + .long 3221225472 + .long 1070826653 + .long 3571665822 + .long 1045547823 + .long 1073741824 + .long 1070816560 + .long 393348347 + .long 3190525143 + .long 2147483648 + .long 1070806483 + .long 4241722498 + .long 3192084193 + .long 2147483648 + .long 1070796423 + .long 1693797068 + .long 3192807972 + .long 0 + .long 1070786380 + .long 2860086745 + .long 1046331646 + .long 2147483648 + .long 1070776353 + .long 1366141759 + .long 3192979363 + .long 1073741824 + .long 1070766343 + .long 737899283 + .long 1045853346 + .long 3221225472 + .long 1070756349 + .long 88734873 + .long 1043881257 + .long 3221225472 + .long 1070746372 + .long 1438003315 + .long 3192917101 + .long 0 + .long 1070736412 + .long 1066505530 + .long 1043896695 + .long 3221225472 + .long 1070726467 + .long 2706653041 + .long 3191113643 + .long 3221225472 + .long 1070716539 + .long 1321764476 + .long 1039573724 + .long 0 + .long 1070706628 + .long 1126753211 + .long 1044502976 + .long 2147483648 + .long 1070696732 + .long 773642884 + .long 1044110727 + .long 1073741824 + .long 1070686853 + .long 1263743406 + .long 3193115278 + .long 0 + .long 1070676990 + .long 3115237732 + .long 3193089176 + .long 3221225472 + .long 1070667142 + .long 3642626838 + .long 3191146032 + .long 2147483648 + .long 1070657311 + .long 2091696428 + .long 1044337177 + .long 1073741824 + .long 1070647496 + .long 3168958391 + .long 1044197568 + .long 0 + .long 1070637697 + .long 711148669 + .long 3193181047 + .long 2147483648 + .long 1070627913 + .long 4207182773 + .long 3193402092 + .long 3221225472 + .long 1070618145 + .long 918070640 + .long 3192902845 + .long 3221225472 + .long 1070608393 + .long 3135571447 + .long 3192193928 + .long 2147483648 + .long 1070598657 + .long 1043705517 + .long 3193188604 + .long 2147483648 + .long 1070581777 + .long 1886680492 + .long 1043890286 + .long 2147483648 + .long 1070562367 + .long 3373799420 + .long 3191917802 + .long 2147483648 + .long 1070542988 + .long 2919618025 + .long 3192461752 + .long 2147483648 + .long 1070523640 + .long 2926365158 + .long 3193113492 + .long 0 + .long 1070504323 + .long 519978638 + .long 1045918846 + .long 0 + .long 1070485037 + .long 3665353151 + .long 3193546248 + .long 0 + .long 1070465781 + .long 2327718958 + .long 1045050797 + .long 0 + .long 1070446556 + .long 345326861 + .long 3188224716 + .long 2147483648 + .long 1070427361 + .long 2263747488 + .long 3192871328 + .long 0 + .long 1070408197 + .long 3894192264 + .long 1045693123 + .long 0 + .long 1070389063 + .long 994321593 + .long 1046347203 + .long 2147483648 + .long 1070369959 + .long 3540366700 + .long 1042296230 + .long 0 + .long 1070350886 + .long 966420752 + .long 3192400412 + .long 2147483648 + .long 1070331842 + .long 1954511160 + .long 3193467762 + .long 2147483648 + .long 1070312828 + .long 1875003040 + .long 1045485629 + .long 0 + .long 1070293845 + .long 4003372005 + .long 3193714109 + .long 2147483648 + .long 1070274890 + .long 2216083644 + .long 1045720399 + .long 0 + .long 1070255966 + .long 1240985743 + .long 1045879414 + .long 0 + .long 1070237071 + .long 1573064162 + .long 1046427916 + .long 0 + .long 1070218206 + .long 2500166582 + .long 3193848169 + .long 2147483648 + .long 1070199369 + .long 862131539 + .long 1045606065 + .long 0 + .long 1070180563 + .long 3733427622 + .long 3193545988 + .long 0 + .long 1070161785 + .long 124515358 + .long 1045504766 + .long 2147483648 + .long 1070143036 + .long 689228007 + .long 1044238436 + .long 0 + .long 1070124317 + .long 976284835 + .long 3189879978 + .long 2147483648 + .long 1070105626 + .long 2997446224 + .long 3193394244 + .long 2147483648 + .long 1070086964 + .long 594985163 + .long 3190453447 + .long 2147483648 + .long 1070068331 + .long 3634411091 + .long 3193012662 + .long 0 + .long 1070049727 + .long 841316482 + .long 3192551604 + .long 0 + .long 1070031151 + .long 518949849 + .long 3189505693 + .long 2147483648 + .long 1070012603 + .long 207633604 + .long 1043791305 + .long 2147483648 + .long 1069994084 + .long 925415631 + .long 3189658670 + .long 2147483648 + .long 1069975593 + .long 3348775015 + .long 1046231055 + .long 0 + .long 1069957131 + .long 4137593961 + .long 1045760644 + .long 2147483648 + .long 1069938696 + .long 3081207972 + .long 1046319652 + .long 2147483648 + .long 1069920290 + .long 2912811806 + .long 3193250863 + .long 0 + .long 1069901912 + .long 1704663230 + .long 3192651171 + .long 2147483648 + .long 1069883561 + .long 1726887473 + .long 3193427817 + .long 2147483648 + .long 1069865238 + .long 516302873 + .long 1042556919 + .long 2147483648 + .long 1069846943 + .long 3737277289 + .long 3192083505 + .long 0 + .long 1069828676 + .long 2829909067 + .long 3191628520 + .long 0 + .long 1069810436 + .long 3474800299 + .long 3187384991 + .long 2147483648 + .long 1069792223 + .long 2041291754 + .long 3186735048 + .long 2147483648 + .long 1069774038 + .long 3100739290 + .long 3192991951 + .long 2147483648 + .long 1069755880 + .long 2641686866 + .long 1042449846 + .long 0 + .long 1069737750 + .long 1353612457 + .long 3192928544 + .long 2147483648 + .long 1069719646 + .long 1823398190 + .long 3193125156 + .long 0 + .long 1069701570 + .long 2629108558 + .long 3192983089 + .long 2147483648 + .long 1069683520 + .long 314889080 + .long 3193178947 + .long 2147483648 + .long 1069665497 + .long 3426846470 + .long 1046055034 + .long 0 + .long 1069647502 + .long 2451521798 + .long 3193081447 + .long 2147483648 + .long 1069629532 + .long 963200030 + .long 1046315089 + .long 0 + .long 1069611590 + .long 3644976987 + .long 1046450297 + .long 2147483648 + .long 1069593674 + .long 1514045874 + .long 3193337489 + .long 0 + .long 1069575785 + .long 2640752615 + .long 3192734715 + .long 0 + .long 1069557922 + .long 177381730 + .long 3193107348 + .long 0 + .long 1069532650 + .long 546871269 + .long 1045601847 + .long 0 + .long 1069497029 + .long 2220408187 + .long 1045964849 + .long 0 + .long 1069461461 + .long 3101209784 + .long 3192417098 + .long 0 + .long 1069425944 + .long 3768825782 + .long 1046196178 + .long 0 + .long 1069390480 + .long 737308942 + .long 1043872555 + .long 0 + .long 1069355068 + .long 1944808119 + .long 3193362317 + .long 0 + .long 1069319707 + .long 852406261 + .long 3191004250 + .long 0 + .long 1069284398 + .long 3202370743 + .long 3192549796 + .long 0 + .long 1069249140 + .long 900633975 + .long 1043862575 + .long 0 + .long 1069213934 + .long 3417168564 + .long 3193213168 + .long 0 + .long 1069178778 + .long 2513309972 + .long 1046051953 + .long 0 + .long 1069143674 + .long 1836846968 + .long 1044036653 + .long 0 + .long 1069108621 + .long 675391362 + .long 3193334972 + .long 0 + .long 1069073618 + .long 1859398086 + .long 3191668729 + .long 0 + .long 1069038666 + .long 3835994043 + .long 3193252196 + .long 0 + .long 1069003764 + .long 563337246 + .long 3192060530 + .long 0 + .long 1068968912 + .long 3715154210 + .long 1045592716 + .long 0 + .long 1068934111 + .long 51415636 + .long 3192193939 + .long 0 + .long 1068899359 + .long 822049108 + .long 1045846080 + .long 0 + .long 1068864658 + .long 3739043340 + .long 3193184949 + .long 0 + .long 1068830006 + .long 2500828997 + .long 3193115638 + .long 0 + .long 1068795403 + .long 1479335089 + .long 1045458233 + .long 0 + .long 1068760850 + .long 1914098598 + .long 1045079833 + .long 0 + .long 1068726346 + .long 1470374909 + .long 1046125471 + .long 0 + .long 1068691892 + .long 2048101185 + .long 3192960024 + .long 0 + .long 1068657486 + .long 801101802 + .long 1042523454 + .long 0 + .long 1068623129 + .long 412171467 + .long 1044799425 + .long 0 + .long 1068588821 + .long 2124566049 + .long 1040459843 + .long 0 + .long 1068554561 + .long 2087558263 + .long 1046083102 + .long 0 + .long 1068520350 + .long 290389316 + .long 1045220023 + .long 0 + .long 1068473430 + .long 393737815 + .long 1045770085 + .long 0 + .long 1068405202 + .long 3273111658 + .long 3193594336 + .long 0 + .long 1068337068 + .long 3076935419 + .long 3191993934 + .long 0 + .long 1068269030 + .long 1564279721 + .long 1040713632 + .long 0 + .long 1068201088 + .long 1950103787 + .long 3191285473 + .long 0 + .long 1068133240 + .long 111301617 + .long 1046140470 + .long 0 + .long 1068065488 + .long 2740933659 + .long 1046091898 + .long 0 + .long 1067997832 + .long 1267131462 + .long 3192947024 + .long 0 + .long 1067930268 + .long 629787343 + .long 1045599114 + .long 0 + .long 1067862800 + .long 2943029746 + .long 3191100621 + .long 0 + .long 1067795426 + .long 2538631151 + .long 3193953989 + .long 0 + .long 1067728144 + .long 3881795033 + .long 3191377363 + .long 0 + .long 1067660956 + .long 2752747058 + .long 3186250103 + .long 0 + .long 1067593862 + .long 892170014 + .long 3193330390 + .long 0 + .long 1067526860 + .long 2000985783 + .long 3192968647 + .long 0 + .long 1067459950 + .long 1954077304 + .long 1044399908 + .long 0 + .long 1067335900 + .long 4120702847 + .long 3193150730 + .long 0 + .long 1067202448 + .long 353489980 + .long 1045676744 + .long 0 + .long 1067069184 + .long 2609643324 + .long 3192108001 + .long 0 + .long 1066936100 + .long 2904433317 + .long 1044836541 + .long 0 + .long 1066803200 + .long 319656790 + .long 1044863904 + .long 0 + .long 1066670484 + .long 2407987331 + .long 3192995083 + .long 0 + .long 1066537948 + .long 2437746120 + .long 3193127733 + .long 0 + .long 1066405592 + .long 762570215 + .long 3189946997 + .long 0 + .long 1066145040 + .long 3317159694 + .long 1046060125 + .long 0 + .long 1065881056 + .long 2317845886 + .long 3191679176 + .long 0 + .long 1065617424 + .long 3665195816 + .long 1045633853 + .long 0 + .long 1065354160 + .long 2008730355 + .long 3193898211 + .long 0 + .long 1064829264 + .long 3746236192 + .long 1046121471 + .long 0 + .long 1064303680 + .long 885296753 + .long 3191852441 + .long 0 + .long 1063253696 + .long 449976495 + .long 3192682663 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 4294965248 + .long 0 + .long 4294965248 + .long 0 + .long 1073160192 + .long 370913857 + .long 3210587105 + .long 1841914130 + .long 3213059448 + .long 3995341938 + .long 3214607105 + .long 2677381210 + .long 3216320731 + .long 3011779882 + .long 3218479542 + .long 1367832035 + .long 1066403058 + .long 2894285243 + .long 1067936923 + .long 1215221452 + .long 1069835102 + .long 370913857 + .long 3210587105 + .long 2677381210 + .long 3216320731 + .long 4172642429 + .long 1056068382 + .long 1215221451 + .long 1069835102 + .long 1092638156 + .long 3184925618 + .long 0 + .long 4294967288 + .long 0 + .long 4294967295 + .long 0 + .long 1072693248 + .long 0 + .long 997195776 + .long 4200250559 + .long 1072696090 + .long 2808127345 + .long 3162830514 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 339411585 + .long 1072701800 + .long 264588982 + .long 3162685233 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 772914124 + .long 1072707540 + .long 4004372762 + .long 1013278737 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 1928746161 + .long 1072713311 + .long 983617676 + .long 1015333753 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 238821257 + .long 1072719114 + .long 1469694871 + .long 3163933563 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 728934454 + .long 1072724948 + .long 1413842688 + .long 1015227188 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 4133881824 + .long 1072730813 + .long 2148155345 + .long 3163979875 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 2602514713 + .long 1072736711 + .long 2268929336 + .long 1015402860 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 1172597893 + .long 1072742641 + .long 114433263 + .long 1016396169 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 590962156 + .long 1072748603 + .long 3829346666 + .long 3164324173 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 1608493509 + .long 1072754597 + .long 3159622171 + .long 3163856313 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 685187902 + .long 1072760624 + .long 378731989 + .long 1015891691 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 2875075254 + .long 1072766683 + .long 4144233330 + .long 3164382292 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 351405227 + .long 1072772776 + .long 3125337328 + .long 3160871055 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 2471440686 + .long 1072778901 + .long 968836267 + .long 3163263464 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1416741826 + .long 1072785060 + .long 2196380210 + .long 1012462139 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 2257959872 + .long 1072791252 + .long 3802946148 + .long 1014013503 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 1480023343 + .long 1072797478 + .long 2247196168 + .long 1016376029 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 4162030108 + .long 1072803737 + .long 2763428480 + .long 1016577925 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 2502433899 + .long 1072810031 + .long 2148595913 + .long 1016072567 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 1588871207 + .long 1072816359 + .long 143439582 + .long 3164011992 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2218315341 + .long 1072822721 + .long 2694295388 + .long 3164337444 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 897099801 + .long 1072829118 + .long 754756297 + .long 1016289581 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 2725843665 + .long 1072835549 + .long 1433917087 + .long 1015887099 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 4219606026 + .long 1072842015 + .long 2434574742 + .long 1015730124 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1897844341 + .long 1072848517 + .long 1254300460 + .long 1016324514 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 874372905 + .long 1072855054 + .long 100263788 + .long 1016989308 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 1972484976 + .long 1072861626 + .long 675290301 + .long 3162688626 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 1724976915 + .long 1072868234 + .long 420909223 + .long 3164165955 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 964107055 + .long 1072874878 + .long 2800439588 + .long 3163881797 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 526652809 + .long 1072881558 + .long 4223459736 + .long 1016927951 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 1253935211 + .long 1072888274 + .long 1395382931 + .long 3160751189 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 3991843581 + .long 1072895026 + .long 4092853457 + .long 1015634339 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 1000925746 + .long 1072901816 + .long 1018491672 + .long 3164358120 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1726216749 + .long 1072908642 + .long 2466808228 + .long 3162724981 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 2732492859 + .long 1072915505 + .long 2691479646 + .long 3163304260 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 589198666 + .long 1072922406 + .long 2664346172 + .long 3164206538 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 460407023 + .long 1072929344 + .long 4237175092 + .long 3164187045 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3219942644 + .long 1072936319 + .long 3798990616 + .long 1016417382 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1156440435 + .long 1072943333 + .long 2351451249 + .long 1015015632 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 3743175029 + .long 1072950384 + .long 2072812490 + .long 3163223651 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 3278348324 + .long 1072957474 + .long 3069497416 + .long 1015799288 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 654919306 + .long 1072964603 + .long 3232961757 + .long 3164096045 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1065662932 + .long 1072971770 + .long 2533670915 + .long 1015578814 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 1118294578 + .long 1072978976 + .long 2197495694 + .long 3160957977 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 1720398391 + .long 1072986221 + .long 3980678963 + .long 3164348656 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 3784486610 + .long 1072993505 + .long 1581883040 + .long 3162747529 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3933059031 + .long 1073000829 + .long 2133366768 + .long 3162580408 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 3088564500 + .long 1073008193 + .long 1762311517 + .long 1016094249 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 2178460671 + .long 1073015597 + .long 777878098 + .long 3163891069 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2135241198 + .long 1073023041 + .long 1236747871 + .long 1014637723 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 3896463087 + .long 1073030525 + .long 1139797873 + .long 3162282381 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 4109806887 + .long 1073038050 + .long 422403966 + .long 1015517805 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 3723038930 + .long 1073045616 + .long 378465264 + .long 3163618158 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3689071823 + .long 1073053223 + .long 2321004996 + .long 3163601292 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 671025100 + .long 1073060872 + .long 3832014351 + .long 3164070606 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 4222122499 + .long 1073068561 + .long 1277378074 + .long 3164305313 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 2425981843 + .long 1073076293 + .long 2830390851 + .long 3164395175 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 551349105 + .long 1073084067 + .long 3821916050 + .long 3163155165 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 3872257780 + .long 1073091882 + .long 1253592103 + .long 1017006910 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 488188413 + .long 1073099741 + .long 3199821029 + .long 1016612624 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 4273770423 + .long 1073107641 + .long 3383180809 + .long 3164267477 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3339203574 + .long 1073115585 + .long 1483497780 + .long 3163457330 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 2979960120 + .long 1073123572 + .long 2599109725 + .long 1015547069 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 4201977662 + .long 1073131602 + .long 748330254 + .long 1014642933 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 3721688645 + .long 1073139676 + .long 3069276937 + .long 1016887977 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 2555984613 + .long 1073147794 + .long 2652555442 + .long 3163601268 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 1727278727 + .long 1073155956 + .long 3562710623 + .long 1012520516 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 2263535754 + .long 1073164162 + .long 752233586 + .long 3163687584 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 903334909 + .long 1073172413 + .long 1636462108 + .long 1016088573 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 2980802057 + .long 1073180708 + .long 378619896 + .long 1016821879 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 950803702 + .long 1073189049 + .long 1655364926 + .long 1016285608 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 158781403 + .long 1073197435 + .long 2221464712 + .long 3164335029 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 1660913392 + .long 1073205866 + .long 4218599604 + .long 1016184283 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 2224145553 + .long 1073214343 + .long 3482522030 + .long 3162537745 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2916157145 + .long 1073222866 + .long 219487565 + .long 1016357943 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 515457527 + .long 1073231436 + .long 836709333 + .long 1016699802 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 396319521 + .long 1073240052 + .long 4172420816 + .long 3160123208 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3643909174 + .long 1073248714 + .long 3537586109 + .long 1015403223 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 2759350287 + .long 1073257424 + .long 1148526634 + .long 1016943509 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 3134592888 + .long 1073266181 + .long 4232266862 + .long 1017039710 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 1577608921 + .long 1073274986 + .long 1875489510 + .long 3164016970 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 3492293770 + .long 1073283838 + .long 2248032210 + .long 1016435402 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 1403662306 + .long 1073292739 + .long 2788809599 + .long 3162719583 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 727685349 + .long 1073301688 + .long 2038246809 + .long 3163407318 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2591453363 + .long 1073310685 + .long 2132396182 + .long 3160122774 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 3833209506 + .long 1073319731 + .long 2722920684 + .long 1014803418 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 1297350157 + .long 1073328827 + .long 1308022040 + .long 3164461134 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 424392917 + .long 1073337972 + .long 2749202995 + .long 3163887294 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2366108318 + .long 1073347166 + .long 2867985102 + .long 3162810830 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3985553595 + .long 1073356410 + .long 4002146062 + .long 1016882712 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2152073944 + .long 1073365705 + .long 1486860576 + .long 3164252032 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 2331271250 + .long 1073375050 + .long 812057446 + .long 1013256022 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1405169241 + .long 1073384446 + .long 2998539689 + .long 3163879527 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 557149882 + .long 1073393893 + .long 3672720709 + .long 1015585841 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 977020788 + .long 1073403391 + .long 3065100517 + .long 1016590139 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 3861050111 + .long 1073412940 + .long 254893773 + .long 3163861756 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 1822067026 + .long 1073422542 + .long 1241994956 + .long 1016388866 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 364333489 + .long 1073432196 + .long 3923737744 + .long 3162469949 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 703710506 + .long 1073441902 + .long 1384660846 + .long 1016244467 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 4062661092 + .long 1073451660 + .long 1422616006 + .long 3164303894 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 3080351519 + .long 1073461472 + .long 3379126789 + .long 3158266577 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 3287523847 + .long 1073471337 + .long 1625971539 + .long 3158058531 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 1631695677 + .long 1073481256 + .long 2717633076 + .long 3163392602 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 3657065772 + .long 1073491228 + .long 399025623 + .long 3164005654 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 2029714210 + .long 1073501255 + .long 613660079 + .long 1016147719 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2307442995 + .long 1073511336 + .long 3190117721 + .long 3163453115 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 1464976603 + .long 1073521472 + .long 3507292405 + .long 3163026110 + .long 3706687593 + .long 1073526560 + .long 3521726939 + .long 1014301643 + .long 778901109 + .long 1073531663 + .long 2248183954 + .long 3162317327 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1532734324 + .long 1073541909 + .long 3094216535 + .long 3164211433 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 721996136 + .long 1073552211 + .long 563754734 + .long 1016419894 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3939148246 + .long 1073562568 + .long 3210352148 + .long 1016322899 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 3898795731 + .long 1073572982 + .long 1249994144 + .long 1012918394 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 1912561781 + .long 1073583453 + .long 3147495102 + .long 1016726829 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 3594158869 + .long 1073593980 + .long 2456521700 + .long 3164305137 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 1679558232 + .long 1073604565 + .long 2390342287 + .long 3164382546 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 1796832535 + .long 1073615207 + .long 3176955716 + .long 3161634089 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 991358482 + .long 1073625907 + .long 838715019 + .long 3164206244 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 610758006 + .long 1073636665 + .long 1965209397 + .long 3162914808 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2009970496 + .long 1073647481 + .long 2159039665 + .long 3163621524 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 2256325230 + .long 1073658356 + .long 580117746 + .long 1016365871 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 2719515920 + .long 1073669290 + .long 2760332941 + .long 1016186509 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 481706282 + .long 1073680284 + .long 1696079173 + .long 3163759104 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1222472308 + .long 1073691337 + .long 1054357470 + .long 3162069594 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2038973688 + .long 1073702450 + .long 892941374 + .long 1017095035 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 35929225 + .long 1073713624 + .long 2809788041 + .long 3160485544 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 915592468 + .long 1073724858 + .long 352947894 + .long 3162072947 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .long 1797923801 + .long 1073736153 + .long 1950547427 + .long 1014277635 + .long 3884607281 + .long 1062590591 + .long 3607404736 + .long 1068264200 + .long 1874480759 + .long 1065595563 + .long 4286760335 + .long 1070514109 + .long 4277811695 + .long 1072049730 + .long 0 + .long 0 + .long 4277811695 + .long 1072049730 + .long 4277811695 + .long 3219533378 + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .type static_const_table,@object + .size static_const_table,12576 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/e_sinh.S b/libm/x86/e_sinh.S new file mode 100644 index 0000000..9d28a31 --- /dev/null +++ b/libm/x86/e_sinh.S @@ -0,0 +1,1408 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// sinh(x)=(exp(x)-exp(-x))/2 +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7), +// f=0.b1 b2 ... b7, k integer +// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f] +// Tp stores the high 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision +// +// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14}, +// for |x| in [23/64,3*2^7) +// e^{-|x|}=2^{-k-f}*2^{-r} +// +// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp= +// =2^k*Tp+2^k*Tp*P15+2^k*Dp +// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)+2^{-k}*Dn +// +// For |x| in [1/8, 3*2^7), sinh(x) is formed as +// RN(2^k*Tp-2^{-k}*Tn)+2^k*Tp*P15-2^{-k}*Tn*P`15-2^{-k}*TnL-2^{-k}*Dn+2^k*Dp +// +// For x in (3*2^7, 3*2^8), sign(x)*(e^|x|)/2 is returned, and +// the result is checked for overflow. +// +// For |x|<23/64, a Taylor polynomial expansion is used (degree 13) +// To reduce rounding errors, the p3*x^3 term is computed as +// (p3*xh^3)_high+[(p3*xl*(3*x*xh+xl^2))+(p3*xh^3)_low], +// where x=xh+xl, (xh are the leading 17 bits of x), and +// (p3*xh^3)_high=RN(x+p3*xh^3)-x +// (error bound for polynomial expansion is below 0.51 ulp) +// +// Special cases: +// sinh(NaN) = quiet NaN, and raise invalid exception +// sinh(+/-INF) = +/-INF +// sinh(x) = x for subnormals +// for finite argument, only sinh(0)=0 is exact +// For IEEE double +// sinh(x) overflows for x > +// 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2) +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin sinh +ENTRY(sinh) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + movsd 4272(%ebx), %xmm3 + xorpd %xmm4, %xmm4 + movsd 4192(%ebx), %xmm1 + movsd 4200(%ebx), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd 4096(%ebx), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + movl $32768, %edx + andl %ecx, %edx + andl $32767, %ecx + subl $16343, %ecx + cmpl $177, %ecx + jae .L_2TAG_PACKET_0.0.2 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + shll $3, %edx + orl %edx, %eax + movapd %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + xorpd %xmm5, %xmm5 + subsd %xmm6, %xmm3 + movapd 4112(%ebx), %xmm4 + addsd %xmm1, %xmm2 + movapd 4128(%ebx), %xmm6 + subsd %xmm3, %xmm7 + movl $32704, %edx + pinsrw $3, %edx, %xmm5 + movapd 4144(%ebx), %xmm1 + addsd %xmm7, %xmm2 + movl $127, %edx + andl %eax, %edx + addl %edx, %edx + shrl $3, %eax + andl $65520, %eax + addl $16352, %eax + xorpd %xmm0, %xmm0 + cmpl $161, %ecx + jae .L_2TAG_PACKET_1.0.2 + pshufd $68, %xmm5, %xmm5 + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + psubw %xmm0, %xmm5 + mulpd (%ebx,%edx,8), %xmm0 + mulpd 2048(%ebx,%edx,8), %xmm5 + pshufd $68, %xmm2, %xmm3 + movapd 4160(%ebx), %xmm7 + pshufd $68, %xmm2, %xmm2 + mulpd %xmm3, %xmm3 + mulpd %xmm2, %xmm4 + mulpd %xmm2, %xmm6 + mulpd 4176(%ebx), %xmm2 + mulpd %xmm3, %xmm1 + mulpd %xmm3, %xmm7 + mulpd %xmm3, %xmm4 + mulpd %xmm3, %xmm1 + addpd %xmm7, %xmm6 + movapd %xmm0, %xmm7 + addpd %xmm1, %xmm4 + shufpd $0, %xmm5, %xmm7 + subpd %xmm5, %xmm0 + mulpd %xmm7, %xmm2 + addpd %xmm6, %xmm4 + subsd %xmm0, %xmm7 + mulpd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + subsd %xmm5, %xmm7 + addpd %xmm2, %xmm4 + addsd %xmm6, %xmm7 + pshufd $238, %xmm4, %xmm2 + addsd %xmm7, %xmm2 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_1.0.2: + subl $16352, %eax + movl %eax, %ecx + andl $32752, %eax + shrl $1, %eax + andl $65520, %eax + subl %eax, %ecx + addl $16352, %eax + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + mulpd (%ebx,%edx,8), %xmm0 + pshufd $68, %xmm2, %xmm3 + movsd 4160(%ebx), %xmm7 + mulsd %xmm3, %xmm3 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm6 + mulsd 4176(%ebx), %xmm2 + mulsd %xmm3, %xmm1 + mulsd %xmm3, %xmm7 + mulsd %xmm3, %xmm4 + addl $16368, %ecx + pinsrw $3, %ecx, %xmm5 + mulsd %xmm3, %xmm1 + addsd %xmm7, %xmm6 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + addsd %xmm6, %xmm4 + mulsd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm6, %xmm4 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm5, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + movl $127, %edx + cmpl $32752, %eax + je .L_2TAG_PACKET_3.0.2 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_0.0.2: + addl $16343, %ecx + cmpl $16343, %ecx + ja .L_2TAG_PACKET_4.0.2 + cmpl $15856, %ecx + jb .L_2TAG_PACKET_5.0.2 + movapd 4208(%ebx), %xmm1 + pshufd $68, %xmm0, %xmm6 + mulpd %xmm5, %xmm5 + movapd 4224(%ebx), %xmm2 + pshufd $68, %xmm0, %xmm7 + movapd 4240(%ebx), %xmm3 + pshufd $68, %xmm0, %xmm4 + andpd 4256(%ebx), %xmm6 + mulpd %xmm5, %xmm1 + mulsd %xmm5, %xmm2 + subpd %xmm6, %xmm4 + mulpd %xmm5, %xmm7 + addpd %xmm3, %xmm1 + pshufd $68, %xmm6, %xmm3 + mulpd %xmm5, %xmm5 + mulsd %xmm7, %xmm2 + mulpd %xmm7, %xmm1 + pshufd $68, %xmm0, %xmm7 + mulsd %xmm6, %xmm6 + addsd %xmm7, %xmm7 + mulsd %xmm4, %xmm4 + mulpd %xmm5, %xmm1 + addsd %xmm0, %xmm7 + mulsd %xmm3, %xmm6 + mulsd %xmm3, %xmm7 + pshufd $238, %xmm1, %xmm3 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm2, %xmm3 + pshufd $238, %xmm2, %xmm2 + addsd %xmm4, %xmm7 + movapd %xmm0, %xmm4 + mulsd %xmm2, %xmm6 + mulsd %xmm5, %xmm7 + addsd %xmm6, %xmm0 + mulsd %xmm2, %xmm7 + subsd %xmm0, %xmm4 + addsd %xmm7, %xmm1 + addsd %xmm4, %xmm6 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_5.0.2: + cmpl $16, %ecx + jae .L_2TAG_PACKET_6.0.2 + movapd %xmm0, %xmm1 + mulsd %xmm1, %xmm1 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm2, %xmm2 + movl $17392, %ecx + pinsrw $3, %ecx, %xmm2 + xorpd %xmm3, %xmm3 + movl $15344, %edx + pinsrw $3, %edx, %xmm3 + mulsd %xmm0, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm3, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_4.0.2: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_7.0.2 + xorpd %xmm0, %xmm0 + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + orl %edx, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + movl $127, %edx +.L_2TAG_PACKET_3.0.2: + movsd %xmm0, (%esp) + movsd 112(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + movl $32768, %eax + pinsrw $3, %eax, %xmm1 + andnpd %xmm0, %xmm1 + mulsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_2.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_8.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(sinh) +# -- End sinh + +# Start file scope ASM +.weak sinhl +.equ sinhl, sinh +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 3706687593 + .long 1073526560 + .long 3521726940 + .long 1014301643 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .long 3607404736 + .long 1044146952 + .long 3607404736 + .long 3191630600 + .long 4277811695 + .long 1063661122 + .long 4277811695 + .long 3211144770 + .long 2140175755 + .long 1033864261 + .long 2140175755 + .long 1033864261 + .long 4289495988 + .long 1054113747 + .long 4289495988 + .long 1054113747 + .long 4277811695 + .long 1064709698 + .long 4277811695 + .long 1064709698 + .long 1610612736 + .long 1080497479 + .long 4166901572 + .long 1053077003 + .long 329805064 + .long 1038488134 + .long 2773927730 + .long 1053236707 + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1069897045 + .long 1744127201 + .long 1046144581 + .long 436314137 + .long 1059717536 + .long 0 + .long 4294967280 + .long 0 + .long 4294967280 + .long 4160749568 + .long 2147483647 + .type static_const_table,@object + .size static_const_table,4280 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/libm_reduce_pi04l.S b/libm/x86/libm_reduce_pi04l.S new file mode 100644 index 0000000..af6a7d0 --- /dev/null +++ b/libm/x86/libm_reduce_pi04l.S @@ -0,0 +1,3718 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +# -- Begin __libm_reduce_pi04l + .text + .align 16,0x90 + .hidden __libm_reduce_pi04l + .globl __libm_reduce_pi04l +__libm_reduce_pi04l: +# parameter 1: 8 + %ebp +# parameter 2: 20 + %ebp +# parameter 3: 24 + %ebp +..B1.1: + pushl %ebp + movl %esp, %ebp + andl $-16, %esp + pushl %esi + pushl %edi + pushl %ebx + subl $20, %esp + movzwl 16(%ebp), %ebx + andl $32767, %ebx + movl 20(%ebp), %eax + cmpl $16413, %ebx + movl 24(%ebp), %esi + call ..L2 +..L2: + popl %edi + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi + movl %eax, 4(%esp) + jge ..B1.8 +..B1.2: + fldt 8(%ebp) + fldl __4onpi_d@GOTOFF(%edi) + fmul %st(1), %st + fstpt 8(%esp) + movzwl 16(%esp), %ecx + negl %ecx + addl $30, %ecx + movl 12(%esp), %eax + shrl %cl, %eax + cmpl $0, 4(%esp) + jne ..B1.4 +..B1.3: + lea 1(%eax), %ecx + andl $-2, %ecx + jmp ..B1.5 +..B1.4: + movl %eax, %ecx + addl 4(%esp), %eax + movl %eax, %edx + andl $1, %edx + addl %edx, %ecx +..B1.5: + fldl _TWO_32H@GOTOFF(%edi) + cmpl $16400, %ebx + movl %ecx, (%esp) + fildl (%esp) + jge ..B1.7 +..B1.6: + fldl _pi04_3d@GOTOFF(%edi) + fmul %st(1), %st + fsubrp %st, %st(3) + fxch %st(1) + fmul %st(2), %st + fld %st(2) + fadd %st(1), %st + fsubp %st, %st(1) + fld %st(0) + fxch %st(1) + fsubr %st, %st(3) + fldl 8+_pi04_3d@GOTOFF(%edi) + fmul %st(3), %st + fsubr %st, %st(2) + fxch %st(1) + fsub %st(2), %st + fsubp %st, %st(1) + faddp %st, %st(3) + fldl 16+_pi04_3d@GOTOFF(%edi) + fmulp %st, %st(2) + fld %st(1) + fsubr %st(1), %st + fsubr %st, %st(1) + fxch %st(2) + fsubrp %st, %st(1) + faddp %st, %st(2) + fxch %st(1) + jmp ..B1.15 +..B1.7: + fldl _pi04_5d@GOTOFF(%edi) + fmul %st(1), %st + fsubrp %st, %st(3) + fxch %st(1) + fmul %st(2), %st + fld %st(2) + fadd %st(1), %st + fsubp %st, %st(1) + fld %st(0) + fxch %st(1) + fsubr %st, %st(3) + fldl 8+_pi04_5d@GOTOFF(%edi) + fmul %st(3), %st + fsubr %st, %st(2) + fxch %st(1) + fsub %st(2), %st + fsubp %st, %st(1) + faddp %st, %st(3) + fldl 16+_pi04_5d@GOTOFF(%edi) + fmul %st(2), %st + fld %st(0) + fsubr %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + fsubrp %st, %st(2) + fxch %st(1) + faddp %st, %st(3) + fldl 24+_pi04_5d@GOTOFF(%edi) + fmul %st(2), %st + fld %st(0) + fsubr %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + fsubrp %st, %st(2) + fxch %st(1) + faddp %st, %st(3) + fldl 32+_pi04_5d@GOTOFF(%edi) + fmulp %st, %st(2) + fld %st(1) + fsubr %st(1), %st + fsubr %st, %st(1) + fxch %st(2) + fsubrp %st, %st(1) + faddp %st, %st(2) + fxch %st(1) + jmp ..B1.15 +..B1.8: + fldt 8(%ebp) + addl $-16417, %ebx + fmull _SCALE@GOTOFF(%edi) + movl $-2078209981, %eax + imull %ebx + addl %ebx, %edx + movl %ebx, %ecx + sarl $4, %edx + sarl $31, %ecx + subl %ecx, %edx + movl %edx, %eax + shll $5, %eax + fstpt 8(%ebp) + fldt 8(%ebp) + subl %edx, %eax + movl $0, 8(%ebp) + subl %eax, %ebx + fldt 8(%ebp) + cmpl $17, %ebx + fsubr %st, %st(1) + jl ..B1.10 +..B1.9: + lea (,%edx,8), %eax + lea (%eax,%edx,4), %ecx + incl %edx + fldt __4onpi_31l@GOTOFF(%ecx,%edi) + fmul %st(2), %st + fldt 12+__4onpi_31l@GOTOFF(%edi,%ecx) + fmul %st(2), %st + fld %st(0) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fld %st(1) + fadd %st(1), %st + fstpt 8(%esp) + andl $-16777216, 8(%esp) + fldt 8(%esp) + fsubrp %st, %st(1) + jmp ..B1.11 +..B1.10: + fldl _zeros@GOTOFF(%edi) + fld %st(0) +..B1.11: + fld %st(0) + lea (,%edx,8), %eax + fld %st(3) + lea (%eax,%edx,4), %edx + fldt __4onpi_31l@GOTOFF(%edx,%edi) + fmul %st(6), %st + movl %edx, (%esp) + fadd %st, %st(2) + fxch %st(2) + fsubr %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fldt 12+__4onpi_31l@GOTOFF(%edx,%edi) + fmul %st, %st(2) + fld %st(2) + fadd %st(2), %st + fld %st(0) + fxch %st(1) + fsub %st, %st(3) + fxch %st(3) + fchs + faddp %st, %st(4) + fxch %st(3) + faddp %st, %st(4) + fxch %st(2) + fadd %st(3), %st + fxch %st(2) + fmul %st(5), %st + fadd %st, %st(2) + fld %st(4) + fldt 24+__4onpi_31l@GOTOFF(%edx,%edi) + fmul %st, %st(1) + fxch %st(1) + fadd %st, %st(4) + fxch %st(4) + fstpt 8(%esp) + movzwl 16(%esp), %ebx + andl $32767, %ebx + cmpl $16415, %ebx + jge ..B1.13 +..B1.12: + negl %ebx + addl $30, %ebx + movl %ebx, %ecx + movl 12(%esp), %eax + shrl %cl, %eax + shll %cl, %eax + movl %eax, 12(%esp) + movl $0, 8(%esp) + shrl %cl, %eax + jmp ..B1.14 +..B1.13: + negl %ebx + addl $30, %ebx + movl %ebx, %ecx + movl 8(%esp), %edx + shrl %cl, %edx + shll %cl, %edx + negl %ecx + movl 12(%esp), %eax + shll %cl, %eax + movl %ebx, %ecx + movl %edx, 8(%esp) + shrl %cl, %edx + orl %edx, %eax +..B1.14: + fldt 8(%esp) + addl 4(%esp), %eax + fsubrp %st, %st(3) + fmul %st(6), %st + fld %st(4) + movl %eax, %edx + andl $1, %edx + fadd %st(3), %st + movl (%esp), %ecx + fsubr %st, %st(3) + fxch %st(3) + faddp %st, %st(5) + fld %st(1) + fxch %st(3) + faddl zero_none@GOTOFF(%edi,%edx,8) + fadd %st, %st(3) + fsub %st(3), %st + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(4) + fld %st(2) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(3) + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(3) + fld %st(0) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fld %st(2) + fldt 36+__4onpi_31l@GOTOFF(%ecx,%edi) + fmul %st, %st(1) + fld %st(1) + fadd %st(3), %st + fsubr %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fxch %st(1) + fmul %st(4), %st + fld %st(0) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fld %st(2) + fldt 48+__4onpi_31l@GOTOFF(%ecx,%edi) + fmul %st, %st(1) + fld %st(1) + fadd %st(3), %st + fsubr %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fld %st(3) + fxch %st(2) + fmul %st(5), %st + fldt 60+__4onpi_31l@GOTOFF(%ecx,%edi) + fmul %st, %st(3) + fxch %st(3) + faddp %st, %st(1) + fld %st(0) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(3) + fld %st(3) + fxch %st(2) + fmul %st(5), %st + fldt 72+__4onpi_31l@GOTOFF(%ecx,%edi) + fmul %st, %st(3) + fxch %st(3) + faddp %st, %st(1) + fld %st(0) + fadd %st(2), %st + fsubr %st, %st(2) + fxch %st(1) + faddp %st, %st(2) + fxch %st(1) + faddp %st, %st(3) + fxch %st(1) + fmulp %st, %st(4) + fldt 84+__4onpi_31l@GOTOFF(%edi,%ecx) + fmulp %st, %st(3) + fxch %st(2) + faddp %st, %st(3) + fld %st(2) + fadd %st(2), %st + fldl _TWO_32H@GOTOFF(%edi) + fmul %st(1), %st + fadd %st, %st(1) + fsubrp %st, %st(1) + fsubr %st, %st(2) + fxch %st(3) + faddp %st, %st(2) + faddp %st, %st(1) + fldl _pi04_2d@GOTOFF(%edi) + fld %st(0) + fmul %st(2), %st + fxch %st(2) + fadd %st(3), %st + fxch %st(1) + fmulp %st, %st(3) + fmull 8+_pi04_2d@GOTOFF(%edi) + faddp %st, %st(1) +..B1.15: + fldl _TWO_12H@GOTOFF(%edi) + fld %st(2) + fadd %st(2), %st + fmul %st, %st(1) + fstpt 8(%esp) + fldt 8(%esp) + fadd %st(1), %st + fsubp %st, %st(1) + fstl (%esi) + fsubrp %st, %st(2) + faddp %st, %st(1) + fstpl 8(%esi) + addl $20, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret + .align 16,0x90 + .type __libm_reduce_pi04l,@function + .size __libm_reduce_pi04l,.-__libm_reduce_pi04l + .data +# -- End __libm_reduce_pi04l + .section .rodata, "a" + .align 8 + .align 8 +zero_none: + .long 0x00000000,0x00000000 + .long 0x00000000,0xbff00000 + .type zero_none,@object + .size zero_none,16 + .align 4 +__4onpi_d: + .long 1841940611 + .long 1072979760 + .type __4onpi_d,@object + .size __4onpi_d,8 + .align 4 +_TWO_32H: + .long 0 + .long 1106771968 + .type _TWO_32H,@object + .size _TWO_32H,8 + .align 4 +_pi04_3d: + .long 1413754112 + .long 1072243195 + .long 2563527040 + .long 1021855384 + .long 3417685868 + .long 3118450936 + .type _pi04_3d,@object + .size _pi04_3d,24 + .align 4 +_pi04_5d: + .long 1413480448 + .long 1072243195 + .long 442499072 + .long 1036039265 + .long 771751936 + .long 999496074 + .long 622854144 + .long 963347354 + .long 1396597664 + .long 922906692 + .type _pi04_5d,@object + .size _pi04_5d,40 + .align 4 +_SCALE: + .long 0 + .long 845152256 + .type _SCALE,@object + .size _SCALE,8 + .align 4 +_zeros: + .long 0 + .long 0 + .long 0 + .long 2147483648 + .type _zeros,@object + .size _zeros,16 + .align 4 +_pi04_2d: + .long 1413480448 + .long 1072243195 + .long 442655537 + .long 1036039265 + .type _pi04_2d,@object + .size _pi04_2d,16 + .align 4 +_TWO_12H: + .long 0 + .long 1085800448 + .type _TWO_12H,@object + .size _TWO_12H,8 + .align 2 +__4onpi_31l: + .word 0 + .word 0 + .word 0 + .word 0 + .word 0 + .word 0 + .word 0 + .word 0 + .word 33646 + .word 41721 + .word 16600 + .word 0 + .word 0 + .word 0 + .word 10832 + .word 40072 + .word 16567 + .word 0 + .word 0 + .word 0 + .word 44008 + .word 65043 + .word 16537 + .word 0 + .word 0 + .word 0 + .word 28384 + .word 64154 + .word 16505 + .word 0 + .word 0 + .word 0 + .word 38272 + .word 56162 + .word 16472 + .word 0 + .word 0 + .word 0 + .word 7298 + .word 51682 + .word 16445 + .word 0 + .word 0 + .word 0 + .word 45504 + .word 65320 + .word 16409 + .word 0 + .word 0 + .word 0 + .word 61204 + .word 44922 + .word 16382 + .word 0 + .word 0 + .word 0 + .word 18652 + .word 50030 + .word 16351 + .word 0 + .word 0 + .word 0 + .word 14144 + .word 59657 + .word 16318 + .word 0 + .word 0 + .word 0 + .word 37450 + .word 47105 + .word 16290 + .word 0 + .word 0 + .word 0 + .word 14898 + .word 56641 + .word 16259 + .word 0 + .word 0 + .word 0 + .word 34680 + .word 34623 + .word 16226 + .word 0 + .word 0 + .word 0 + .word 4760 + .word 45515 + .word 16196 + .word 0 + .word 0 + .word 0 + .word 41480 + .word 40187 + .word 16166 + .word 0 + .word 0 + .word 0 + .word 47852 + .word 55252 + .word 16134 + .word 0 + .word 0 + .word 0 + .word 54072 + .word 35081 + .word 16103 + .word 0 + .word 0 + .word 0 + .word 26808 + .word 57421 + .word 16071 + .word 0 + .word 0 + .word 0 + .word 20068 + .word 57232 + .word 16042 + .word 0 + .word 0 + .word 0 + .word 49576 + .word 60188 + .word 16009 + .word 0 + .word 0 + .word 0 + .word 10016 + .word 52861 + .word 15978 + .word 0 + .word 0 + .word 0 + .word 30648 + .word 35825 + .word 15947 + .word 0 + .word 0 + .word 0 + .word 60542 + .word 58528 + .word 15918 + .word 0 + .word 0 + .word 0 + .word 65468 + .word 61743 + .word 15887 + .word 0 + .word 0 + .word 0 + .word 64960 + .word 45825 + .word 15851 + .word 0 + .word 0 + .word 0 + .word 50604 + .word 38792 + .word 15825 + .word 0 + .word 0 + .word 0 + .word 18394 + .word 33435 + .word 15794 + .word 0 + .word 0 + .word 0 + .word 55780 + .word 42703 + .word 15763 + .word 0 + .word 0 + .word 0 + .word 14056 + .word 63841 + .word 15731 + .word 0 + .word 0 + .word 0 + .word 63080 + .word 62563 + .word 15700 + .word 0 + .word 0 + .word 0 + .word 20840 + .word 62207 + .word 15669 + .word 0 + .word 0 + .word 0 + .word 30094 + .word 59983 + .word 15639 + .word 0 + .word 0 + .word 0 + .word 61818 + .word 60389 + .word 15608 + .word 0 + .word 0 + .word 0 + .word 40186 + .word 40579 + .word 15577 + .word 0 + .word 0 + .word 0 + .word 42170 + .word 58004 + .word 15546 + .word 0 + .word 0 + .word 0 + .word 55276 + .word 39678 + .word 15514 + .word 0 + .word 0 + .word 0 + .word 44672 + .word 36806 + .word 15481 + .word 0 + .word 0 + .word 0 + .word 13060 + .word 34144 + .word 15452 + .word 0 + .word 0 + .word 0 + .word 28016 + .word 57231 + .word 15419 + .word 0 + .word 0 + .word 0 + .word 16112 + .word 44995 + .word 15390 + .word 0 + .word 0 + .word 0 + .word 53464 + .word 33387 + .word 15358 + .word 0 + .word 0 + .word 0 + .word 7296 + .word 60751 + .word 15325 + .word 0 + .word 0 + .word 0 + .word 29452 + .word 45231 + .word 15297 + .word 0 + .word 0 + .word 0 + .word 26208 + .word 49689 + .word 15266 + .word 0 + .word 0 + .word 0 + .word 37900 + .word 44002 + .word 15235 + .word 0 + .word 0 + .word 0 + .word 57340 + .word 33800 + .word 15204 + .word 0 + .word 0 + .word 0 + .word 27544 + .word 50178 + .word 15173 + .word 0 + .word 0 + .word 0 + .word 6168 + .word 40132 + .word 15142 + .word 0 + .word 0 + .word 0 + .word 21392 + .word 43702 + .word 15109 + .word 0 + .word 0 + .word 0 + .word 45168 + .word 54372 + .word 15081 + .word 0 + .word 0 + .word 0 + .word 8986 + .word 40688 + .word 15050 + .word 0 + .word 0 + .word 0 + .word 1648 + .word 53745 + .word 15018 + .word 0 + .word 0 + .word 0 + .word 30520 + .word 55795 + .word 14986 + .word 0 + .word 0 + .word 0 + .word 43060 + .word 32914 + .word 14956 + .word 0 + .word 0 + .word 0 + .word 46172 + .word 52771 + .word 14925 + .word 0 + .word 0 + .word 0 + .word 14056 + .word 45285 + .word 14893 + .word 0 + .word 0 + .word 0 + .word 53590 + .word 44868 + .word 14864 + .word 0 + .word 0 + .word 0 + .word 40786 + .word 35970 + .word 14833 + .word 0 + .word 0 + .word 0 + .word 33436 + .word 65411 + .word 14801 + .word 0 + .word 0 + .word 0 + .word 32006 + .word 61382 + .word 14771 + .word 0 + .word 0 + .word 0 + .word 37856 + .word 45239 + .word 14738 + .word 0 + .word 0 + .word 0 + .word 60894 + .word 49555 + .word 14709 + .word 0 + .word 0 + .word 0 + .word 48064 + .word 53065 + .word 14674 + .word 0 + .word 0 + .word 0 + .word 48624 + .word 54844 + .word 14647 + .word 0 + .word 0 + .word 0 + .word 7988 + .word 40762 + .word 14616 + .word 0 + .word 0 + .word 0 + .word 16270 + .word 58745 + .word 14585 + .word 0 + .word 0 + .word 0 + .word 37064 + .word 50168 + .word 14553 + .word 0 + .word 0 + .word 0 + .word 18624 + .word 63736 + .word 14519 + .word 0 + .word 0 + .word 0 + .word 60758 + .word 44966 + .word 14492 + .word 0 + .word 0 + .word 0 + .word 33304 + .word 47465 + .word 14461 + .word 0 + .word 0 + .word 0 + .word 6226 + .word 60503 + .word 14430 + .word 0 + .word 0 + .word 0 + .word 26380 + .word 54900 + .word 14398 + .word 0 + .word 0 + .word 0 + .word 44352 + .word 49860 + .word 14368 + .word 0 + .word 0 + .word 0 + .word 11904 + .word 42646 + .word 14337 + .word 0 + .word 0 + .word 0 + .word 55296 + .word 50279 + .word 14300 + .word 0 + .word 0 + .word 0 + .word 15474 + .word 50606 + .word 14275 + .word 0 + .word 0 + .word 0 + .word 45062 + .word 44137 + .word 14244 + .word 0 + .word 0 + .word 0 + .word 13472 + .word 36063 + .word 14210 + .word 0 + .word 0 + .word 0 + .word 40658 + .word 53854 + .word 14182 + .word 0 + .word 0 + .word 0 + .word 28652 + .word 43690 + .word 14151 + .word 0 + .word 0 + .word 0 + .word 24640 + .word 64348 + .word 14118 + .word 0 + .word 0 + .word 0 + .word 30284 + .word 41980 + .word 14088 + .word 0 + .word 0 + .word 0 + .word 45652 + .word 38222 + .word 14057 + .word 0 + .word 0 + .word 0 + .word 15900 + .word 62940 + .word 14026 + .word 0 + .word 0 + .word 0 + .word 31494 + .word 50741 + .word 13996 + .word 0 + .word 0 + .word 0 + .word 43194 + .word 55096 + .word 13965 + .word 0 + .word 0 + .word 0 + .word 1740 + .word 45646 + .word 13933 + .word 0 + .word 0 + .word 0 + .word 28936 + .word 44150 + .word 13903 + .word 0 + .word 0 + .word 0 + .word 8996 + .word 42955 + .word 13872 + .word 0 + .word 0 + .word 0 + .word 44096 + .word 61205 + .word 13839 + .word 0 + .word 0 + .word 0 + .word 44614 + .word 54550 + .word 13810 + .word 0 + .word 0 + .word 0 + .word 24926 + .word 57347 + .word 13779 + .word 0 + .word 0 + .word 0 + .word 3312 + .word 61415 + .word 13745 + .word 0 + .word 0 + .word 0 + .word 64336 + .word 63884 + .word 13717 + .word 0 + .word 0 + .word 0 + .word 2748 + .word 62259 + .word 13685 + .word 0 + .word 0 + .word 0 + .word 56672 + .word 51775 + .word 13653 + .word 0 + .word 0 + .word 0 + .word 32438 + .word 55423 + .word 13624 + .word 0 + .word 0 + .word 0 + .word 17652 + .word 45713 + .word 13593 + .word 0 + .word 0 + .word 0 + .word 65408 + .word 51586 + .word 13558 + .word 0 + .word 0 + .word 0 + .word 40416 + .word 55736 + .word 13531 + .word 0 + .word 0 + .word 0 + .word 52546 + .word 37734 + .word 13500 + .word 0 + .word 0 + .word 0 + .word 48880 + .word 64238 + .word 13469 + .word 0 + .word 0 + .word 0 + .word 56004 + .word 46833 + .word 13437 + .word 0 + .word 0 + .word 0 + .word 61760 + .word 38110 + .word 13405 + .word 0 + .word 0 + .word 0 + .word 41496 + .word 35659 + .word 13374 + .word 0 + .word 0 + .word 0 + .word 25472 + .word 41269 + .word 13342 + .word 0 + .word 0 + .word 0 + .word 45444 + .word 36018 + .word 13314 + .word 0 + .word 0 + .word 0 + .word 6510 + .word 56417 + .word 13283 + .word 0 + .word 0 + .word 0 + .word 3072 + .word 56837 + .word 13252 + .word 0 + .word 0 + .word 0 + .word 61338 + .word 48440 + .word 13221 + .word 0 + .word 0 + .word 0 + .word 49568 + .word 57088 + .word 13189 + .word 0 + .word 0 + .word 0 + .word 4240 + .word 39283 + .word 13157 + .word 0 + .word 0 + .word 0 + .word 18562 + .word 33537 + .word 13128 + .word 0 + .word 0 + .word 0 + .word 31422 + .word 44487 + .word 13097 + .word 0 + .word 0 + .word 0 + .word 31930 + .word 60459 + .word 13066 + .word 0 + .word 0 + .word 0 + .word 42272 + .word 36641 + .word 13033 + .word 0 + .word 0 + .word 0 + .word 28940 + .word 36150 + .word 13004 + .word 0 + .word 0 + .word 0 + .word 21010 + .word 50925 + .word 12973 + .word 0 + .word 0 + .word 0 + .word 29448 + .word 64886 + .word 12941 + .word 0 + .word 0 + .word 0 + .word 20500 + .word 54600 + .word 12911 + .word 0 + .word 0 + .word 0 + .word 54258 + .word 46233 + .word 12880 + .word 0 + .word 0 + .word 0 + .word 32628 + .word 42502 + .word 12848 + .word 0 + .word 0 + .word 0 + .word 61608 + .word 55072 + .word 12818 + .word 0 + .word 0 + .word 0 + .word 6236 + .word 57871 + .word 12786 + .word 0 + .word 0 + .word 0 + .word 42408 + .word 34616 + .word 12756 + .word 0 + .word 0 + .word 0 + .word 56692 + .word 51963 + .word 12724 + .word 0 + .word 0 + .word 0 + .word 39094 + .word 48526 + .word 12694 + .word 0 + .word 0 + .word 0 + .word 59870 + .word 38783 + .word 12663 + .word 0 + .word 0 + .word 0 + .word 26560 + .word 33165 + .word 12632 + .word 0 + .word 0 + .word 0 + .word 58666 + .word 37666 + .word 12601 + .word 0 + .word 0 + .word 0 + .word 58728 + .word 39788 + .word 12569 + .word 0 + .word 0 + .word 0 + .word 9048 + .word 43530 + .word 12538 + .word 0 + .word 0 + .word 0 + .word 58496 + .word 57659 + .word 12505 + .word 0 + .word 0 + .word 0 + .word 12324 + .word 37025 + .word 12477 + .word 0 + .word 0 + .word 0 + .word 38432 + .word 55856 + .word 12445 + .word 0 + .word 0 + .word 0 + .word 35210 + .word 45960 + .word 12415 + .word 0 + .word 0 + .word 0 + .word 45644 + .word 51345 + .word 12384 + .word 0 + .word 0 + .word 0 + .word 32854 + .word 63883 + .word 12353 + .word 0 + .word 0 + .word 0 + .word 29348 + .word 41450 + .word 12321 + .word 0 + .word 0 + .word 0 + .word 27384 + .word 38024 + .word 12289 + .word 0 + .word 0 + .word 0 + .word 57356 + .word 57291 + .word 12260 + .word 0 + .word 0 + .word 0 + .word 61164 + .word 51521 + .word 12228 + .word 0 + .word 0 + .word 0 + .word 21472 + .word 59151 + .word 12196 + .word 0 + .word 0 + .word 0 + .word 36704 + .word 39943 + .word 12165 + .word 0 + .word 0 + .word 0 + .word 45864 + .word 50151 + .word 12136 + .word 0 + .word 0 + .word 0 + .word 37892 + .word 63687 + .word 12104 + .word 0 + .word 0 + .word 0 + .word 14560 + .word 51615 + .word 12073 + .word 0 + .word 0 + .word 0 + .word 38776 + .word 55684 + .word 12041 + .word 0 + .word 0 + .word 0 + .word 59136 + .word 53570 + .word 12010 + .word 0 + .word 0 + .word 0 + .word 55556 + .word 37955 + .word 11981 + .word 0 + .word 0 + .word 0 + .word 54458 + .word 44670 + .word 11950 + .word 0 + .word 0 + .word 0 + .word 36446 + .word 34084 + .word 11919 + .word 0 + .word 0 + .word 0 + .word 46416 + .word 51693 + .word 11886 + .word 0 + .word 0 + .word 0 + .word 21432 + .word 34376 + .word 11857 + .word 0 + .word 0 + .word 0 + .word 56036 + .word 34809 + .word 11826 + .word 0 + .word 0 + .word 0 + .word 10562 + .word 55654 + .word 11795 + .word 0 + .word 0 + .word 0 + .word 20264 + .word 53052 + .word 11763 + .word 0 + .word 0 + .word 0 + .word 64064 + .word 50415 + .word 11729 + .word 0 + .word 0 + .word 0 + .word 17444 + .word 48295 + .word 11701 + .word 0 + .word 0 + .word 0 + .word 11874 + .word 52677 + .word 11671 + .word 0 + .word 0 + .word 0 + .word 60808 + .word 39275 + .word 11640 + .word 0 + .word 0 + .word 0 + .word 31792 + .word 55677 + .word 11606 + .word 0 + .word 0 + .word 0 + .word 60710 + .word 49006 + .word 11578 + .word 0 + .word 0 + .word 0 + .word 10520 + .word 37403 + .word 11546 + .word 0 + .word 0 + .word 0 + .word 20004 + .word 59470 + .word 11515 + .word 0 + .word 0 + .word 0 + .word 28096 + .word 37612 + .word 11485 + .word 0 + .word 0 + .word 0 + .word 20268 + .word 44280 + .word 11453 + .word 0 + .word 0 + .word 0 + .word 50740 + .word 61588 + .word 11422 + .word 0 + .word 0 + .word 0 + .word 56432 + .word 58835 + .word 11390 + .word 0 + .word 0 + .word 0 + .word 8576 + .word 42496 + .word 11355 + .word 0 + .word 0 + .word 0 + .word 33920 + .word 54912 + .word 11324 + .word 0 + .word 0 + .word 0 + .word 35620 + .word 54843 + .word 11298 + .word 0 + .word 0 + .word 0 + .word 736 + .word 43591 + .word 11264 + .word 0 + .word 0 + .word 0 + .word 39632 + .word 61060 + .word 11235 + .word 0 + .word 0 + .word 0 + .word 63452 + .word 63129 + .word 11206 + .word 0 + .word 0 + .word 0 + .word 56798 + .word 58512 + .word 11175 + .word 0 + .word 0 + .word 0 + .word 13472 + .word 46333 + .word 11141 + .word 0 + .word 0 + .word 0 + .word 37300 + .word 36598 + .word 11112 + .word 0 + .word 0 + .word 0 + .word 41952 + .word 41639 + .word 11079 + .word 0 + .word 0 + .word 0 + .word 52452 + .word 33459 + .word 11050 + .word 0 + .word 0 + .word 0 + .word 58558 + .word 33287 + .word 11020 + .word 0 + .word 0 + .word 0 + .word 7570 + .word 43843 + .word 10989 + .word 0 + .word 0 + .word 0 + .word 59416 + .word 63990 + .word 10957 + .word 0 + .word 0 + .word 0 + .word 65298 + .word 47744 + .word 10927 + .word 0 + .word 0 + .word 0 + .word 21076 + .word 34089 + .word 10896 + .word 0 + .word 0 + .word 0 + .word 7048 + .word 57394 + .word 10865 + .word 0 + .word 0 + .word 0 + .word 12872 + .word 55405 + .word 10832 + .word 0 + .word 0 + .word 0 + .word 12608 + .word 51669 + .word 10798 + .word 0 + .word 0 + .word 0 + .word 5350 + .word 48455 + .word 10772 + .word 0 + .word 0 + .word 0 + .word 23568 + .word 58692 + .word 10740 + .word 0 + .word 0 + .word 0 + .word 40784 + .word 37046 + .word 10708 + .word 0 + .word 0 + .word 0 + .word 38992 + .word 43861 + .word 10678 + .word 0 + .word 0 + .word 0 + .word 10064 + .word 40199 + .word 10648 + .word 0 + .word 0 + .word 0 + .word 26368 + .word 35771 + .word 10611 + .word 0 + .word 0 + .word 0 + .word 23994 + .word 60721 + .word 10586 + .word 0 + .word 0 + .word 0 + .word 25052 + .word 34302 + .word 10554 + .word 0 + .word 0 + .word 0 + .word 39842 + .word 54964 + .word 10524 + .word 0 + .word 0 + .word 0 + .word 11568 + .word 58277 + .word 10491 + .word 0 + .word 0 + .word 0 + .word 26160 + .word 46438 + .word 10461 + .word 0 + .word 0 + .word 0 + .word 23252 + .word 43049 + .word 10431 + .word 0 + .word 0 + .word 0 + .word 35288 + .word 58000 + .word 10400 + .word 0 + .word 0 + .word 0 + .word 14614 + .word 50216 + .word 10369 + .word 0 + .word 0 + .word 0 + .word 1168 + .word 48804 + .word 10336 + .word 0 + .word 0 + .word 0 + .word 60934 + .word 33006 + .word 10307 + .word 0 + .word 0 + .word 0 + .word 64512 + .word 62247 + .word 10272 + .word 0 + .word 0 + .word 0 + .word 59968 + .word 43121 + .word 10240 + .word 0 + .word 0 + .word 0 + .word 25560 + .word 39974 + .word 10212 + .word 0 + .word 0 + .word 0 + .word 1978 + .word 49353 + .word 10183 + .word 0 + .word 0 + .word 0 + .word 16290 + .word 38807 + .word 10152 + .word 0 + .word 0 + .word 0 + .word 8646 + .word 65226 + .word 10121 + .word 0 + .word 0 + .word 0 + .word 56896 + .word 34317 + .word 10088 + .word 0 + .word 0 + .word 0 + .word 40136 + .word 39118 + .word 10057 + .word 0 + .word 0 + .word 0 + .word 14200 + .word 41756 + .word 10026 + .word 0 + .word 0 + .word 0 + .word 59256 + .word 63202 + .word 9995 + .word 0 + .word 0 + .word 0 + .word 22968 + .word 63553 + .word 9965 + .word 0 + .word 0 + .word 0 + .word 736 + .word 44292 + .word 9933 + .word 0 + .word 0 + .word 0 + .word 23186 + .word 37760 + .word 9904 + .word 0 + .word 0 + .word 0 + .word 51008 + .word 34950 + .word 9869 + .word 0 + .word 0 + .word 0 + .word 1664 + .word 64248 + .word 9836 + .word 0 + .word 0 + .word 0 + .word 64352 + .word 35199 + .word 9811 + .word 0 + .word 0 + .word 0 + .word 34656 + .word 63747 + .word 9780 + .word 0 + .word 0 + .word 0 + .word 44330 + .word 49864 + .word 9749 + .word 0 + .word 0 + .word 0 + .word 11654 + .word 35567 + .word 9718 + .word 0 + .word 0 + .word 0 + .word 7924 + .word 58919 + .word 9686 + .word 0 + .word 0 + .word 0 + .word 2532 + .word 32800 + .word 9655 + .word 0 + .word 0 + .word 0 + .word 30024 + .word 53799 + .word 9624 + .word 0 + .word 0 + .word 0 + .word 30172 + .word 64347 + .word 9593 + .word 0 + .word 0 + .word 0 + .word 60036 + .word 51382 + .word 9562 + .word 0 + .word 0 + .word 0 + .word 58576 + .word 33093 + .word 9531 + .word 0 + .word 0 + .word 0 + .word 13888 + .word 38760 + .word 9500 + .word 0 + .word 0 + .word 0 + .word 9322 + .word 52460 + .word 9470 + .word 0 + .word 0 + .word 0 + .word 20944 + .word 41077 + .word 9437 + .word 0 + .word 0 + .word 0 + .word 17976 + .word 41861 + .word 9407 + .word 0 + .word 0 + .word 0 + .word 55176 + .word 55158 + .word 9377 + .word 0 + .word 0 + .word 0 + .word 4976 + .word 35223 + .word 9346 + .word 0 + .word 0 + .word 0 + .word 7816 + .word 39783 + .word 9314 + .word 0 + .word 0 + .word 0 + .word 27656 + .word 55669 + .word 9284 + .word 0 + .word 0 + .word 0 + .word 64944 + .word 53184 + .word 9250 + .word 0 + .word 0 + .word 0 + .word 12544 + .word 49190 + .word 9222 + .word 0 + .word 0 + .word 0 + .word 50612 + .word 44644 + .word 9190 + .word 0 + .word 0 + .word 0 + .word 8832 + .word 63111 + .word 9155 + .word 0 + .word 0 + .word 0 + .word 11744 + .word 36870 + .word 9129 + .word 0 + .word 0 + .word 0 + .word 9404 + .word 63025 + .word 9098 + .word 0 + .word 0 + .word 0 + .word 47316 + .word 43381 + .word 9067 + .word 0 + .word 0 + .word 0 + .word 55716 + .word 47433 + .word 9035 + .word 0 + .word 0 + .word 0 + .word 46414 + .word 48441 + .word 9005 + .word 0 + .word 0 + .word 0 + .word 19116 + .word 39506 + .word 8974 + .word 0 + .word 0 + .word 0 + .word 48060 + .word 53381 + .word 8943 + .word 0 + .word 0 + .word 0 + .word 57112 + .word 50739 + .word 8911 + .word 0 + .word 0 + .word 0 + .word 5840 + .word 60581 + .word 8879 + .word 0 + .word 0 + .word 0 + .word 62112 + .word 57199 + .word 8846 + .word 0 + .word 0 + .word 0 + .word 35908 + .word 59499 + .word 8818 + .word 0 + .word 0 + .word 0 + .word 13760 + .word 48116 + .word 8787 + .word 0 + .word 0 + .word 0 + .word 3136 + .word 56059 + .word 8752 + .word 0 + .word 0 + .word 0 + .word 37596 + .word 39221 + .word 8726 + .word 0 + .word 0 + .word 0 + .word 3232 + .word 48550 + .word 8691 + .word 0 + .word 0 + .word 0 + .word 22872 + .word 42749 + .word 8662 + .word 0 + .word 0 + .word 0 + .word 41948 + .word 40319 + .word 8633 + .word 0 + .word 0 + .word 0 + .word 31196 + .word 64693 + .word 8601 + .word 0 + .word 0 + .word 0 + .word 62052 + .word 52923 + .word 8571 + .word 0 + .word 0 + .word 0 + .word 2750 + .word 33544 + .word 8540 + .word 0 + .word 0 + .word 0 + .word 12462 + .word 46179 + .word 8509 + .word 0 + .word 0 + .word 0 + .word 25128 + .word 45120 + .word 8476 + .word 0 + .word 0 + .word 0 + .word 51634 + .word 62523 + .word 8447 + .word 0 + .word 0 + .word 0 + .word 15758 + .word 42163 + .word 8416 + .word 0 + .word 0 + .word 0 + .word 34022 + .word 36267 + .word 8385 + .word 0 + .word 0 + .word 0 + .word 41252 + .word 39796 + .word 8353 + .word 0 + .word 0 + .word 0 + .word 49782 + .word 54423 + .word 8323 + .word 0 + .word 0 + .word 0 + .word 25428 + .word 42086 + .word 8291 + .word 0 + .word 0 + .word 0 + .word 34388 + .word 44810 + .word 8260 + .word 0 + .word 0 + .word 0 + .word 7456 + .word 64092 + .word 8228 + .word 0 + .word 0 + .word 0 + .word 48336 + .word 62448 + .word 8196 + .word 0 + .word 0 + .word 0 + .word 60912 + .word 61622 + .word 8167 + .word 0 + .word 0 + .word 0 + .word 17852 + .word 37250 + .word 8137 + .word 0 + .word 0 + .word 0 + .word 57940 + .word 56453 + .word 8106 + .word 0 + .word 0 + .word 0 + .word 47256 + .word 59825 + .word 8074 + .word 0 + .word 0 + .word 0 + .word 3774 + .word 59120 + .word 8044 + .word 0 + .word 0 + .word 0 + .word 43448 + .word 62852 + .word 8012 + .word 0 + .word 0 + .word 0 + .word 4840 + .word 57195 + .word 7982 + .word 0 + .word 0 + .word 0 + .word 40862 + .word 52565 + .word 7951 + .word 0 + .word 0 + .word 0 + .word 1440 + .word 60474 + .word 7919 + .word 0 + .word 0 + .word 0 + .word 55520 + .word 38648 + .word 7889 + .word 0 + .word 0 + .word 0 + .word 15316 + .word 52422 + .word 7857 + .word 0 + .word 0 + .word 0 + .word 18704 + .word 47227 + .word 7827 + .word 0 + .word 0 + .word 0 + .word 48892 + .word 54283 + .word 7795 + .word 0 + .word 0 + .word 0 + .word 12670 + .word 41990 + .word 7765 + .word 0 + .word 0 + .word 0 + .word 27570 + .word 49842 + .word 7734 + .word 0 + .word 0 + .word 0 + .word 47230 + .word 47992 + .word 7703 + .word 0 + .word 0 + .word 0 + .word 41020 + .word 56253 + .word 7671 + .word 0 + .word 0 + .word 0 + .word 23404 + .word 58312 + .word 7641 + .word 0 + .word 0 + .word 0 + .word 35176 + .word 51854 + .word 7610 + .word 0 + .word 0 + .word 0 + .word 49188 + .word 59051 + .word 7578 + .word 0 + .word 0 + .word 0 + .word 16656 + .word 54507 + .word 7546 + .word 0 + .word 0 + .word 0 + .word 41320 + .word 48565 + .word 7517 + .word 0 + .word 0 + .word 0 + .word 302 + .word 42490 + .word 7486 + .word 0 + .word 0 + .word 0 + .word 26680 + .word 39967 + .word 7454 + .word 0 + .word 0 + .word 0 + .word 41304 + .word 43638 + .word 7424 + .word 0 + .word 0 + .word 0 + .word 2314 + .word 48533 + .word 7393 + .word 0 + .word 0 + .word 0 + .word 63294 + .word 35693 + .word 7362 + .word 0 + .word 0 + .word 0 + .word 24538 + .word 48319 + .word 7331 + .word 0 + .word 0 + .word 0 + .word 56296 + .word 47263 + .word 7300 + .word 0 + .word 0 + .word 0 + .word 28236 + .word 38599 + .word 7268 + .word 0 + .word 0 + .word 0 + .word 6594 + .word 62116 + .word 7238 + .word 0 + .word 0 + .word 0 + .word 47104 + .word 63573 + .word 7198 + .word 0 + .word 0 + .word 0 + .word 34812 + .word 34303 + .word 7176 + .word 0 + .word 0 + .word 0 + .word 5144 + .word 33695 + .word 7145 + .word 0 + .word 0 + .word 0 + .word 24966 + .word 55768 + .word 7114 + .word 0 + .word 0 + .word 0 + .word 62720 + .word 43946 + .word 7078 + .word 0 + .word 0 + .word 0 + .word 31542 + .word 56062 + .word 7052 + .word 0 + .word 0 + .word 0 + .word 62356 + .word 59096 + .word 7020 + .word 0 + .word 0 + .word 0 + .word 28412 + .word 40533 + .word 6990 + .word 0 + .word 0 + .word 0 + .word 24080 + .word 50467 + .word 6958 + .word 0 + .word 0 + .word 0 + .word 33296 + .word 46841 + .word 6925 + .word 0 + .word 0 + .word 0 + .word 39600 + .word 38627 + .word 6897 + .word 0 + .word 0 + .word 0 + .word 14436 + .word 37607 + .word 6865 + .word 0 + .word 0 + .word 0 + .word 39032 + .word 56421 + .word 6833 + .word 0 + .word 0 + .word 0 + .word 64032 + .word 54987 + .word 6804 + .word 0 + .word 0 + .word 0 + .word 27648 + .word 42212 + .word 6768 + .word 0 + .word 0 + .word 0 + .word 43840 + .word 46107 + .word 6739 + .word 0 + .word 0 + .word 0 + .word 17316 + .word 36574 + .word 6711 + .word 0 + .word 0 + .word 0 + .word 8928 + .word 37652 + .word 6677 + .word 0 + .word 0 + .word 0 + .word 24944 + .word 47433 + .word 6648 + .word 0 + .word 0 + .word 0 + .word 27392 + .word 57430 + .word 6616 + .word 0 + .word 0 + .word 0 + .word 39848 + .word 43340 + .word 6585 + .word 0 + .word 0 + .word 0 + .word 64160 + .word 43542 + .word 6555 + .word 0 + .word 0 + .word 0 + .word 35226 + .word 63015 + .word 6525 + .word 0 + .word 0 + .word 0 + .word 40736 + .word 64368 + .word 6493 + .word 0 + .word 0 + .word 0 + .word 42168 + .word 49526 + .word 6462 + .word 0 + .word 0 + .word 0 + .word 45596 + .word 34243 + .word 6432 + .word 0 + .word 0 + .word 0 + .word 20690 + .word 39705 + .word 6401 + .word 0 + .word 0 + .word 0 + .word 54448 + .word 46856 + .word 6368 + .word 0 + .word 0 + .word 0 + .word 64392 + .word 62736 + .word 6337 + .word 0 + .word 0 + .word 0 + .word 12780 + .word 56461 + .word 6307 + .word 0 + .word 0 + .word 0 + .word 15360 + .word 49145 + .word 6277 + .word 0 + .word 0 + .word 0 + .word 20512 + .word 49931 + .word 6242 + .word 0 + .word 0 + .word 0 + .word 54512 + .word 55820 + .word 6212 + .word 0 + .word 0 + .word 0 + .word 8402 + .word 39333 + .word 6184 + .word 0 + .word 0 + .word 0 + .word 34094 + .word 53593 + .word 6153 + .word 0 + .word 0 + .word 0 + .word 31960 + .word 38817 + .word 6121 + .word 0 + .word 0 + .word 0 + .word 16954 + .word 39291 + .word 6091 + .word 0 + .word 0 + .word 0 + .word 49600 + .word 48765 + .word 6056 + .word 0 + .word 0 + .word 0 + .word 59580 + .word 56541 + .word 6029 + .word 0 + .word 0 + .word 0 + .word 35624 + .word 44550 + .word 5998 + .word 0 + .word 0 + .word 0 + .word 4142 + .word 47316 + .word 5967 + .word 0 + .word 0 + .word 0 + .word 43520 + .word 43612 + .word 5935 + .word 0 + .word 0 + .word 0 + .word 20976 + .word 40896 + .word 5902 + .word 0 + .word 0 + .word 0 + .word 63576 + .word 57729 + .word 5874 + .word 0 + .word 0 + .word 0 + .word 37288 + .word 33122 + .word 5843 + .word 0 + .word 0 + .word 0 + .word 24384 + .word 52079 + .word 5809 + .word 0 + .word 0 + .word 0 + .word 47952 + .word 58719 + .word 5779 + .word 0 + .word 0 + .word 0 + .word 44242 + .word 55445 + .word 5750 + .word 0 + .word 0 + .word 0 + .word 61232 + .word 38847 + .word 5716 + .word 0 + .word 0 + .word 0 + .word 63232 + .word 46039 + .word 5683 + .word 0 + .word 0 + .word 0 + .word 13396 + .word 42933 + .word 5657 + .word 0 + .word 0 + .word 0 + .word 27392 + .word 43305 + .word 5622 + .word 0 + .word 0 + .word 0 + .word 40708 + .word 35319 + .word 5595 + .word 0 + .word 0 + .word 0 + .word 44408 + .word 55685 + .word 5564 + .word 0 + .word 0 + .word 0 + .word 42090 + .word 44607 + .word 5533 + .word 0 + .word 0 + .word 0 + .word 25504 + .word 53466 + .word 5500 + .word 0 + .word 0 + .word 0 + .word 24208 + .word 33149 + .word 5470 + .word 0 + .word 0 + .word 0 + .word 5268 + .word 45375 + .word 5440 + .word 0 + .word 0 + .word 0 + .word 144 + .word 40000 + .word 5409 + .word 0 + .word 0 + .word 0 + .word 56688 + .word 52358 + .word 5376 + .word 0 + .word 0 + .word 0 + .word 25848 + .word 56175 + .word 5345 + .word 0 + .word 0 + .word 0 + .word 57900 + .word 44055 + .word 5315 + .word 0 + .word 0 + .word 0 + .word 24800 + .word 43437 + .word 5283 + .word 0 + .word 0 + .word 0 + .word 17984 + .word 54872 + .word 5249 + .word 0 + .word 0 + .word 0 + .word 25744 + .word 41345 + .word 5223 + .word 0 + .word 0 + .word 0 + .word 7668 + .word 43682 + .word 5191 + .word 0 + .word 0 + .word 0 + .word 47434 + .word 36705 + .word 5161 + .word 0 + .word 0 + .word 0 + .word 20888 + .word 40323 + .word 5129 + .word 0 + .word 0 + .word 0 + .word 3962 + .word 43032 + .word 5099 + .word 0 + .word 0 + .word 0 + .word 50270 + .word 49260 + .word 5068 + .word 0 + .word 0 + .word 0 + .word 20160 + .word 64041 + .word 5032 + .word 0 + .word 0 + .word 0 + .word 25624 + .word 36013 + .word 5004 + .word 0 + .word 0 + .word 0 + .word 48328 + .word 59345 + .word 4975 + .word 0 + .word 0 + .word 0 + .word 51508 + .word 63920 + .word 4943 + .word 0 + .word 0 + .word 0 + .word 27872 + .word 39135 + .word 4913 + .word 0 + .word 0 + .word 0 + .word 13590 + .word 58857 + .word 4882 + .word 0 + .word 0 + .word 0 + .word 50880 + .word 61323 + .word 4847 + .word 0 + .word 0 + .word 0 + .word 44802 + .word 37181 + .word 4820 + .word 0 + .word 0 + .word 0 + .word 53808 + .word 57813 + .word 4789 + .word 0 + .word 0 + .word 0 + .word 64424 + .word 49714 + .word 4757 + .word 0 + .word 0 + .word 0 + .word 31652 + .word 44011 + .word 4727 + .word 0 + .word 0 + .word 0 + .word 28252 + .word 50834 + .word 4696 + .word 0 + .word 0 + .word 0 + .word 30370 + .word 38742 + .word 4665 + .word 0 + .word 0 + .word 0 + .word 57728 + .word 58403 + .word 4628 + .word 0 + .word 0 + .word 0 + .word 35900 + .word 37112 + .word 4603 + .word 0 + .word 0 + .word 0 + .word 40764 + .word 40914 + .word 4572 + .word 0 + .word 0 + .word 0 + .word 21472 + .word 46910 + .word 4541 + .word 0 + .word 0 + .word 0 + .word 17854 + .word 35030 + .word 4510 + .word 0 + .word 0 + .word 0 + .word 4378 + .word 35776 + .word 4479 + .word 0 + .word 0 + .word 0 + .word 57962 + .word 55295 + .word 4448 + .word 0 + .word 0 + .word 0 + .word 64352 + .word 56717 + .word 4415 + .word 0 + .word 0 + .word 0 + .word 37744 + .word 49416 + .word 4384 + .word 0 + .word 0 + .word 0 + .word 38484 + .word 35759 + .word 4355 + .word 0 + .word 0 + .word 0 + .word 55020 + .word 54969 + .word 4324 + .word 0 + .word 0 + .word 0 + .word 9188 + .word 55223 + .word 4292 + .word 0 + .word 0 + .word 0 + .word 6822 + .word 43079 + .word 4262 + .word 0 + .word 0 + .word 0 + .word 48870 + .word 40943 + .word 4231 + .word 0 + .word 0 + .word 0 + .word 9936 + .word 42731 + .word 4198 + .word 0 + .word 0 + .word 0 + .word 23430 + .word 43136 + .word 4169 + .word 0 + .word 0 + .word 0 + .word 4700 + .word 55665 + .word 4137 + .word 0 + .word 0 + .word 0 + .word 8056 + .word 40216 + .word 4106 + .word 0 + .word 0 + .word 0 + .word 3716 + .word 45403 + .word 4075 + .word 0 + .word 0 + .word 0 + .word 53440 + .word 49488 + .word 4044 + .word 0 + .word 0 + .word 0 + .word 41776 + .word 50188 + .word 4013 + .word 0 + .word 0 + .word 0 + .word 20994 + .word 64556 + .word 3983 + .word 0 + .word 0 + .word 0 + .word 16252 + .word 60661 + .word 3951 + .word 0 + .word 0 + .word 0 + .word 61252 + .word 65021 + .word 3920 + .word 0 + .word 0 + .word 0 + .word 16236 + .word 43803 + .word 3889 + .word 0 + .word 0 + .word 0 + .word 63064 + .word 35308 + .word 3857 + .word 0 + .word 0 + .word 0 + .word 49096 + .word 39848 + .word 3828 + .word 0 + .word 0 + .word 0 + .word 15680 + .word 48673 + .word 3797 + .word 0 + .word 0 + .word 0 + .word 48068 + .word 50957 + .word 3766 + .word 0 + .word 0 + .word 0 + .word 20824 + .word 56086 + .word 3734 + .word 0 + .word 0 + .word 0 + .word 46504 + .word 43224 + .word 3704 + .word 0 + .word 0 + .word 0 + .word 52428 + .word 46094 + .word 3672 + .word 0 + .word 0 + .word 0 + .word 17548 + .word 52066 + .word 3642 + .word 0 + .word 0 + .word 0 + .word 61738 + .word 35565 + .word 3611 + .word 0 + .word 0 + .word 0 + .word 31184 + .word 50588 + .word 3579 + .word 0 + .word 0 + .word 0 + .word 1716 + .word 52681 + .word 3549 + .word 0 + .word 0 + .word 0 + .word 44656 + .word 43385 + .word 3518 + .word 0 + .word 0 + .word 0 + .word 12668 + .word 43259 + .word 3486 + .word 0 + .word 0 + .word 0 + .word 24544 + .word 35408 + .word 3453 + .word 0 + .word 0 + .word 0 + .word 28854 + .word 65018 + .word 3425 + .word 0 + .word 0 + .word 0 + .word 5696 + .word 40391 + .word 3393 + .word 0 + .word 0 + .word 0 + .word 39580 + .word 56400 + .word 3363 + .word 0 + .word 0 + .word 0 + .word 20428 + .word 39579 + .word 3332 + .word 0 + .word 0 + .word 0 + .word 32328 + .word 36727 + .word 3301 + .word 0 + .word 0 + .word 0 + .word 34020 + .word 54457 + .word 3270 + .word 0 + .word 0 + .word 0 + .word 34016 + .word 48400 + .word 3238 + .word 0 + .word 0 + .word 0 + .word 6922 + .word 51417 + .word 3208 + .word 0 + .word 0 + .word 0 + .word 27208 + .word 64641 + .word 3176 + .word 0 + .word 0 + .word 0 + .word 1802 + .word 48886 + .word 3146 + .word 0 + .word 0 + .word 0 + .word 35440 + .word 61590 + .word 3115 + .word 0 + .word 0 + .word 0 + .word 60610 + .word 51604 + .word 3084 + .word 0 + .word 0 + .word 0 + .word 5440 + .word 38199 + .word 3050 + .word 0 + .word 0 + .word 0 + .word 6914 + .word 43867 + .word 3022 + .word 0 + .word 0 + .word 0 + .word 24000 + .word 45256 + .word 2989 + .word 0 + .word 0 + .word 0 + .word 51496 + .word 57396 + .word 2959 + .word 0 + .word 0 + .word 0 + .word 11538 + .word 46256 + .word 2929 + .word 0 + .word 0 + .word 0 + .word 36802 + .word 48020 + .word 2898 + .word 0 + .word 0 + .word 0 + .word 57910 + .word 57903 + .word 2867 + .word 0 + .word 0 + .word 0 + .word 47484 + .word 48798 + .word 2835 + .word 0 + .word 0 + .word 0 + .word 57766 + .word 57709 + .word 2805 + .word 0 + .word 0 + .word 0 + .word 54064 + .word 47856 + .word 2774 + .word 0 + .word 0 + .word 0 + .word 49340 + .word 48080 + .word 2743 + .word 0 + .word 0 + .word 0 + .word 36454 + .word 56731 + .word 2712 + .word 0 + .word 0 + .word 0 + .word 51548 + .word 63385 + .word 2681 + .word 0 + .word 0 + .word 0 + .word 56000 + .word 48716 + .word 2645 + .word 0 + .word 0 + .word 0 + .word 44992 + .word 50040 + .word 2615 + .word 0 + .word 0 + .word 0 + .word 43136 + .word 58177 + .word 2585 + .word 0 + .word 0 + .word 0 + .word 49730 + .word 33270 + .word 2557 + .word 0 + .word 0 + .word 0 + .word 29808 + .word 51063 + .word 2526 + .word 0 + .word 0 + .word 0 + .word 25276 + .word 46724 + .word 2494 + .word 0 + .word 0 + .word 0 + .word 17324 + .word 35928 + .word 2463 + .word 0 + .word 0 + .word 0 + .word 52284 + .word 63916 + .word 2433 + .word 0 + .word 0 + .word 0 + .word 5414 + .word 46704 + .word 2402 + .word 0 + .word 0 + .word 0 + .word 51710 + .word 57168 + .word 2371 + .word 0 + .word 0 + .word 0 + .word 27366 + .word 49253 + .word 2340 + .word 0 + .word 0 + .word 0 + .word 45332 + .word 53033 + .word 2309 + .word 0 + .word 0 + .word 0 + .word 54152 + .word 37418 + .word 2276 + .word 0 + .word 0 + .word 0 + .word 53076 + .word 47398 + .word 2247 + .word 0 + .word 0 + .word 0 + .word 14374 + .word 59477 + .word 2216 + .word 0 + .word 0 + .word 0 + .word 59336 + .word 33435 + .word 2184 + .word 0 + .word 0 + .word 0 + .word 21612 + .word 43267 + .word 2154 + .word 0 + .word 0 + .word 0 + .word 34664 + .word 39372 + .word 2121 + .word 0 + .word 0 + .word 0 + .word 172 + .word 62761 + .word 2091 + .word 0 + .word 0 + .word 0 + .word 9816 + .word 40715 + .word 2060 + .word 0 + .word 0 + .word 0 + .word 65116 + .word 40481 + .word 2030 + .word 0 + .word 0 + .word 0 + .word 28066 + .word 39184 + .word 1999 + .word 0 + .word 0 + .word 0 + .word 37408 + .word 63923 + .word 1968 + .word 0 + .word 0 + .word 0 + .word 15760 + .word 42305 + .word 1937 + .word 0 + .word 0 + .word 0 + .word 28236 + .word 59340 + .word 1905 + .word 0 + .word 0 + .word 0 + .word 43258 + .word 59402 + .word 1875 + .word 0 + .word 0 + .word 0 + .word 19988 + .word 50087 + .word 1844 + .word 0 + .word 0 + .word 0 + .word 63456 + .word 47833 + .word 1810 + .word 0 + .word 0 + .word 0 + .word 65184 + .word 61426 + .word 1781 + .word 0 + .word 0 + .word 0 + .word 52982 + .word 48456 + .word 1751 + .word 0 + .word 0 + .word 0 + .word 30020 + .word 62809 + .word 1719 + .word 0 + .word 0 + .word 0 + .word 9096 + .word 63061 + .word 1688 + .word 0 + .word 0 + .word 0 + .word 59648 + .word 44374 + .word 1654 + .word 0 + .word 0 + .word 0 + .word 11456 + .word 33847 + .word 1625 + .word 0 + .word 0 + .word 0 + .word 12392 + .word 50500 + .word 1595 + .word 0 + .word 0 + .word 0 + .word 56432 + .word 59196 + .word 1563 + .word 0 + .word 0 + .word 0 + .word 61008 + .word 40265 + .word 1532 + .word 0 + .word 0 + .word 0 + .word 37842 + .word 33270 + .word 1503 + .word 0 + .word 0 + .word 0 + .word 37916 + .word 44543 + .word 1471 + .word 0 + .word 0 + .word 0 + .word 11490 + .word 36421 + .word 1441 + .word 0 + .word 0 + .word 0 + .word 19040 + .word 38397 + .word 1409 + .word 0 + .word 0 + .word 0 + .word 31224 + .word 47162 + .word 1379 + .word 0 + .word 0 + .word 0 + .word 52056 + .word 41461 + .word 1347 + .word 0 + .word 0 + .word 0 + .word 10810 + .word 56374 + .word 1317 + .word 0 + .word 0 + .word 0 + .word 5358 + .word 35086 + .word 1286 + .word 0 + .word 0 + .word 0 + .word 36640 + .word 50226 + .word 1251 + .word 0 + .word 0 + .word 0 + .word 33856 + .word 45597 + .word 1222 + .word 0 + .word 0 + .word 0 + .word 21552 + .word 63128 + .word 1191 + .word 0 + .word 0 + .word 0 + .word 1198 + .word 35616 + .word 1162 + .word 0 + .word 0 + .word 0 + .word 1232 + .word 59506 + .word 1131 + .word 0 + .word 0 + .word 0 + .word 51086 + .word 34963 + .word 1100 + .word 0 + .word 0 + .word 0 + .word 3960 + .word 39061 + .word 1067 + .word 0 + .word 0 + .word 0 + .word 4564 + .word 57134 + .word 1037 + .word 0 + .word 0 + .word 0 + .word 59468 + .word 35285 + .word 1007 + .word 0 + .word 0 + .word 0 + .word 63422 + .word 35431 + .word 976 + .word 0 + .word 0 + .word 0 + .word 38352 + .word 51462 + .word 945 + .word 0 + .word 0 + .word 0 + .word 25806 + .word 55660 + .word 914 + .word 0 + .word 0 + .word 0 + .word 38842 + .word 41327 + .word 883 + .word 0 + .word 0 + .word 0 + .word 17980 + .word 50458 + .word 852 + .word 0 + .word 0 + .word 0 + .word 61194 + .word 59710 + .word 821 + .word 0 + .word 0 + .word 0 + .word 21098 + .word 42086 + .word 790 + .word 0 + .word 0 + .word 0 + .word 16704 + .word 43341 + .word 757 + .word 0 + .word 0 + .word 0 + .word 46316 + .word 52840 + .word 728 + .word 0 + .word 0 + .word 0 + .word 20386 + .word 33936 + .word 697 + .word 0 + .word 0 + .word 0 + .word 20064 + .word 51864 + .word 664 + .word 0 + .word 0 + .word 0 + .word 2268 + .word 57500 + .word 634 + .word 0 + .word 0 + .word 0 + .word 11152 + .word 51171 + .word 604 + .word 0 + .word 0 + .word 0 + .word 23164 + .word 63727 + .word 572 + .word 0 + .word 0 + .word 0 + .word 20514 + .word 40280 + .word 542 + .word 0 + .word 0 + .word 0 + .word 21818 + .word 57922 + .word 511 + .word 0 + .word 0 + .word 0 + .word 32366 + .word 46413 + .word 480 + .word 0 + .word 0 + .word 0 + .word 53972 + .word 43148 + .word 449 + .word 0 + .word 0 + .word 0 + .word 30134 + .word 65133 + .word 418 + .word 0 + .word 0 + .word 0 + .word 15282 + .word 61516 + .word 387 + .word 0 + .word 0 + .word 0 + .word 49872 + .word 49222 + .word 355 + .word 0 + .word 0 + .word 0 + .word 9484 + .word 63958 + .word 325 + .word 0 + .word 0 + .word 0 + .word 47028 + .word 35341 + .word 294 + .word 0 + .word 0 + .word 0 + .word 6770 + .word 58613 + .word 263 + .word 0 + .word 0 + .word 0 + .word 33372 + .word 43448 + .word 232 + .word 0 + .word 0 + .word 0 + .word 27792 + .word 51629 + .word 198 + .word 0 + .word 0 + .word 0 + .word 19712 + .word 53691 + .word 170 + .word 0 + .word 0 + .word 0 + .word 42144 + .word 60929 + .word 135 + .word 0 + .word 0 + .word 0 + .word 35240 + .word 48799 + .word 107 + .word 0 + .word 0 + .word 0 + .word 910 + .word 51212 + .word 77 + .word 0 + .word 0 + .word 0 + .word 65062 + .word 33668 + .word 46 + .word 0 + .word 0 + .word 0 + .word 52624 + .word 51799 + .word 14 + .word 0 + .type __4onpi_31l,@object + .size __4onpi_31l,6444 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/libm_sincos_huge.S b/libm/x86/libm_sincos_huge.S new file mode 100644 index 0000000..b43d193 --- /dev/null +++ b/libm/x86/libm_sincos_huge.S @@ -0,0 +1,668 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +# -- Begin __libm_sincos_huge + .text + .align 16,0x90 + .hidden __libm_sincos_huge + .globl __libm_sincos_huge +__libm_sincos_huge: +# parameter 1: 8 + %ebp +# parameter 2: 16 + %ebp +# parameter 3: 20 + %ebp +..B1.1: + pushl %ebp + movl %esp, %ebp + andl $-64, %esp + pushl %esi + pushl %edi + pushl %ebx + subl $52, %esp + movl 16(%ebp), %eax + movl 20(%ebp), %edx + movl %eax, 32(%esp) + movl %edx, 36(%esp) +..B1.2: + fnstcw 30(%esp) +..B1.3: + call ..L2 +..L2: + popl %edi + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi + movsd 8(%ebp), %xmm1 + movl 12(%ebp), %esi + movl %esi, %eax + andl $2147483647, %eax + andps .L_2il0floatpacket.0@GOTOFF(%edi), %xmm1 + shrl $31, %esi + movl %eax, 40(%esp) + cmpl $1104150528, %eax + movsd %xmm1, 8(%ebp) + jae ..B1.11 +..B1.4: + movsd _Pi4Inv@GOTOFF(%edi), %xmm0 + mulsd %xmm1, %xmm0 + movzwl 30(%esp), %edx + movl %edx, %eax + andl $768, %eax + movsd %xmm0, (%esp) + cmpl $768, %eax + je ..B1.42 +..B1.5: + orl $-64768, %edx + movw %dx, 28(%esp) +..B1.6: + fldcw 28(%esp) +..B1.7: + movsd 8(%ebp), %xmm1 + movl $1, %ebx +..B1.8: + movl %ebx, 12(%esp) + movl 4(%esp), %ebx + movl %ebx, %eax + movl %esi, 8(%esp) + movl %ebx, %esi + shrl $20, %esi + andl $1048575, %eax + movl %esi, %ecx + orl $1048576, %eax + negl %ecx + movl %eax, %edx + addl $19, %ecx + addl $13, %esi + movl %ecx, 24(%esp) + shrl %cl, %edx + movl %esi, %ecx + shll %cl, %eax + movl 24(%esp), %ecx + movl (%esp), %esi + shrl %cl, %esi + orl %esi, %eax + cmpl $1094713344, %ebx + movsd %xmm1, 16(%esp) + fldl 16(%esp) + cmovb %edx, %eax + movl 8(%esp), %esi + lea 1(%eax), %edx + movl %edx, %ebx + andl $-2, %ebx + movl %ebx, 16(%esp) + fildl 16(%esp) + movl 12(%esp), %ebx + cmpl $1094713344, 40(%esp) + jae ..B1.10 +..B1.9: + fldl _Pi4x3@GOTOFF(%edi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 8+_Pi4x3@GOTOFF(%edi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 16+_Pi4x3@GOTOFF(%edi) + fmulp %st, %st(1) + faddp %st, %st(1) + jmp ..B1.17 +..B1.10: + fldl _Pi4x4@GOTOFF(%edi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 8+_Pi4x4@GOTOFF(%edi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 16+_Pi4x4@GOTOFF(%edi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 24+_Pi4x4@GOTOFF(%edi) + fmulp %st, %st(1) + faddp %st, %st(1) + jmp ..B1.17 +..B1.11: + movzwl 30(%esp), %edx + movl %edx, %eax + andl $768, %eax + cmpl $768, %eax + je ..B1.43 +..B1.12: + orl $-64768, %edx + movw %dx, 28(%esp) +..B1.13: + fldcw 28(%esp) +..B1.14: + movsd 8(%ebp), %xmm1 + movl $1, %ebx +..B1.15: + movsd %xmm1, 16(%esp) + fldl 16(%esp) + addl $-32, %esp + lea 32(%esp), %eax + fstpt (%esp) + movl $0, 12(%esp) + movl %eax, 16(%esp) + call __libm_reduce_pi04l +..B1.46: + addl $32, %esp +..B1.16: + fldl (%esp) + lea 1(%eax), %edx + fldl 8(%esp) + faddp %st, %st(1) +..B1.17: + movl %edx, %ecx + addl $3, %eax + shrl $2, %ecx + andl $1, %ecx + shrl $2, %eax + xorl %ecx, %esi + movl 36(%esp), %ecx + andl $1, %eax + andl $3, %ecx + cmpl $3, %ecx + jne ..B1.25 +..B1.18: + fldt 84+_SP@GOTOFF(%edi) + fld %st(1) + fmul %st(2), %st + testb $2, %dl + fmul %st, %st(1) + fldt 72+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 60+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 48+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 36+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 24+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 12+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt _SP@GOTOFF(%edi) + faddp %st, %st(2) + fmul %st, %st(1) + fldt 84+_CP@GOTOFF(%edi) + fmul %st(1), %st + fldt 72+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt 60+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt 48+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt 36+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt 24+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt 12+_CP@GOTOFF(%edi) + faddp %st, %st(1) + fmul %st(1), %st + fldt _CP@GOTOFF(%edi) + faddp %st, %st(1) + fmulp %st, %st(1) + fldl _ones@GOTOFF(%edi,%esi,8) + fldl _ones@GOTOFF(%edi,%eax,8) + je ..B1.22 +..B1.19: + fmulp %st, %st(4) + testl %ebx, %ebx + fxch %st(2) + fmul %st(3), %st + movl 32(%esp), %eax + faddp %st, %st(3) + fxch %st(2) + fstpl (%eax) + fmul %st, %st(1) + faddp %st, %st(1) + fstpl 8(%eax) + je ..B1.21 +..B1.20: + fldcw 30(%esp) +..B1.21: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.22: + fxch %st(1) + fmulp %st, %st(4) + testl %ebx, %ebx + fxch %st(2) + fmul %st(3), %st + movl 32(%esp), %eax + faddp %st, %st(3) + fxch %st(2) + fstpl 8(%eax) + fmul %st, %st(1) + faddp %st, %st(1) + fstpl (%eax) + je ..B1.24 +..B1.23: + fldcw 30(%esp) +..B1.24: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.25: + testb $2, 36(%esp) + je ..B1.33 +..B1.26: + fld %st(0) + testb $2, %dl + fmul %st(1), %st + fld %st(0) + fmul %st(1), %st + je ..B1.30 +..B1.27: + fstp %st(2) + fldt 84+_CP@GOTOFF(%edi) + testl %ebx, %ebx + fmul %st(2), %st + fldt 72+_CP@GOTOFF(%edi) + fmul %st(3), %st + fldt 60+_CP@GOTOFF(%edi) + movl 32(%esp), %eax + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 48+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 36+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 24+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 12+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(3) + fldt _CP@GOTOFF(%edi) + faddp %st, %st(1) + fmulp %st, %st(1) + faddp %st, %st(1) + fldl _ones@GOTOFF(%edi,%esi,8) + fmul %st, %st(1) + faddp %st, %st(1) + fstpl 8(%eax) + je ..B1.29 +..B1.28: + fldcw 30(%esp) +..B1.29: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.30: + fldt 84+_SP@GOTOFF(%edi) + testl %ebx, %ebx + fmul %st(1), %st + fldt 72+_SP@GOTOFF(%edi) + fmul %st(2), %st + fldt 60+_SP@GOTOFF(%edi) + movl 32(%esp), %eax + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 48+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 36+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 24+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 12+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(2) + fldt _SP@GOTOFF(%edi) + faddp %st, %st(1) + fmulp %st, %st(2) + faddp %st, %st(1) + fldl _ones@GOTOFF(%edi,%esi,8) + fmulp %st, %st(2) + fmul %st(1), %st + faddp %st, %st(1) + fstpl 8(%eax) + je ..B1.32 +..B1.31: + fldcw 30(%esp) +..B1.32: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.33: + testb $1, 36(%esp) + je ..B1.41 +..B1.34: + fld %st(0) + testb $2, %dl + fmul %st(1), %st + fld %st(0) + fmul %st(1), %st + je ..B1.38 +..B1.35: + fldt 84+_SP@GOTOFF(%edi) + testl %ebx, %ebx + fmul %st(1), %st + fldt 72+_SP@GOTOFF(%edi) + fmul %st(2), %st + fldt 60+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 48+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 36+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 24+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 12+_SP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(2) + fldt _SP@GOTOFF(%edi) + faddp %st, %st(1) + fmulp %st, %st(2) + faddp %st, %st(1) + fldl _ones@GOTOFF(%edi,%eax,8) + fmulp %st, %st(2) + fmul %st(1), %st + movl 32(%esp), %eax + faddp %st, %st(1) + fstpl (%eax) + je ..B1.37 +..B1.36: + fldcw 30(%esp) +..B1.37: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.38: + fstp %st(2) + fldt 84+_CP@GOTOFF(%edi) + testl %ebx, %ebx + fmul %st(2), %st + fldt 72+_CP@GOTOFF(%edi) + fmul %st(3), %st + fldt 60+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 48+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 36+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 24+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(3), %st + fldt 12+_CP@GOTOFF(%edi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(3) + fldt _CP@GOTOFF(%edi) + faddp %st, %st(1) + fmulp %st, %st(1) + faddp %st, %st(1) + fldl _ones@GOTOFF(%edi,%eax,8) + fmul %st, %st(1) + movl 32(%esp), %eax + faddp %st, %st(1) + fstpl (%eax) + je ..B1.40 +..B1.39: + fldcw 30(%esp) +..B1.40: + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.41: + fstp %st(0) + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.42: + xorl %ebx, %ebx + jmp ..B1.8 +..B1.43: + xorl %ebx, %ebx + jmp ..B1.15 + .align 16,0x90 + .type __libm_sincos_huge,@function + .size __libm_sincos_huge,.-__libm_sincos_huge + .data +# -- End __libm_sincos_huge + .section .rodata, "a" + .align 16 + .align 16 +.L_2il0floatpacket.0: + .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 + .type .L_2il0floatpacket.0,@object + .size .L_2il0floatpacket.0,16 + .align 16 +_Pi4Inv: + .long 1841940611 + .long 1072979760 + .type _Pi4Inv,@object + .size _Pi4Inv,8 + .space 8, 0x00 # pad + .align 16 +_Pi4x3: + .long 1413754880 + .long 3219726843 + .long 993632256 + .long 1027030475 + .long 3773204808 + .long 3129236486 + .type _Pi4x3,@object + .size _Pi4x3,24 + .space 8, 0x00 # pad + .align 16 +_Pi4x4: + .long 1413480448 + .long 3219726843 + .long 442499072 + .long 3183522913 + .long 771751936 + .long 3146979722 + .long 622873025 + .long 3110831002 + .type _Pi4x4,@object + .size _Pi4x4,32 + .align 16 +_SP: + .word 43691 + .word 43690 + .word 43690 + .word 43690 + .word 49148 + .word 0 + .word 34951 + .word 34952 + .word 34952 + .word 34952 + .word 16376 + .word 0 + .word 50471 + .word 3328 + .word 208 + .word 53261 + .word 49138 + .word 0 + .word 17910 + .word 46614 + .word 7466 + .word 47343 + .word 16364 + .word 0 + .word 33371 + .word 14743 + .word 11071 + .word 55090 + .word 49125 + .word 0 + .word 48947 + .word 35764 + .word 12250 + .word 45202 + .word 16350 + .word 0 + .word 17574 + .word 60698 + .word 10735 + .word 55102 + .word 49110 + .word 0 + .word 34320 + .word 12415 + .word 25249 + .word 51489 + .word 16334 + .word 0 + .type _SP,@object + .size _SP,96 + .align 16 +_CP: + .word 0 + .word 0 + .word 0 + .word 32768 + .word 49150 + .word 0 + .word 43685 + .word 43690 + .word 43690 + .word 43690 + .word 16378 + .word 0 + .word 39983 + .word 2912 + .word 24758 + .word 46603 + .word 49141 + .word 0 + .word 61476 + .word 3244 + .word 208 + .word 53261 + .word 16367 + .word 0 + .word 1022 + .word 16229 + .word 32187 + .word 37874 + .word 49129 + .word 0 + .word 55373 + .word 44526 + .word 50840 + .word 36726 + .word 16354 + .word 0 + .word 55994 + .word 65145 + .word 59958 + .word 51657 + .word 49114 + .word 0 + .word 15046 + .word 2976 + .word 1998 + .word 54661 + .word 16338 + .word 0 + .type _CP,@object + .size _CP,96 + .align 16 +_ones: + .long 0 + .long 1072693248 + .long 0 + .long 3220176896 + .type _ones,@object + .size _ones,16 + .data + .hidden __libm_reduce_pi04l + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/libm_tancot_huge.S b/libm/x86/libm_tancot_huge.S new file mode 100644 index 0000000..80f16d5 --- /dev/null +++ b/libm/x86/libm_tancot_huge.S @@ -0,0 +1,750 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +# -- Begin __libm_tancot_huge + .text + .align 16,0x90 + .hidden __libm_tancot_huge + .globl __libm_tancot_huge +__libm_tancot_huge: +# parameter 1: 8 + %ebp +# parameter 2: 16 + %ebp +# parameter 3: 20 + %ebp +..B1.1: + pushl %ebp + movl %esp, %ebp + andl $-64, %esp + pushl %esi + pushl %edi + pushl %ebx + subl $52, %esp + movl 16(%ebp), %eax + movl 20(%ebp), %ebx + movl %eax, 40(%esp) +..B1.2: + fnstcw 38(%esp) +..B1.3: + movl 12(%ebp), %edx + movl %edx, %eax + andl $2147483647, %eax + shrl $31, %edx + movl %edx, 44(%esp) + cmpl $1104150528, %eax + call ..L2 +..L2: + popl %esi + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi + jae ..B1.11 +..B1.4: + movsd 8(%ebp), %xmm1 + movzwl 38(%esp), %ecx + movl %ecx, %edx + andl $768, %edx + andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm1 + cmpl $768, %edx + movsd _Pi4Inv@GOTOFF(%esi), %xmm0 + mulsd %xmm1, %xmm0 + movsd %xmm1, 8(%ebp) + movsd %xmm0, (%esp) + je ..B1.39 +..B1.5: + orl $-64768, %ecx + movw %cx, 36(%esp) +..B1.6: + fldcw 36(%esp) +..B1.7: + movsd 8(%ebp), %xmm1 + movl $1, %edi +..B1.8: + movl %esi, 12(%esp) + movl 4(%esp), %esi + movl %esi, %edx + movl %edi, 24(%esp) + movl %esi, %edi + shrl $20, %edi + andl $1048575, %edx + movl %edi, %ecx + orl $1048576, %edx + negl %ecx + addl $13, %edi + movl %ebx, 8(%esp) + addl $19, %ecx + movl %edx, %ebx + movl %ecx, 28(%esp) + shrl %cl, %ebx + movl %edi, %ecx + shll %cl, %edx + movl 28(%esp), %ecx + movl (%esp), %edi + shrl %cl, %edi + orl %edi, %edx + cmpl $1094713344, %esi + movsd %xmm1, 16(%esp) + fldl 16(%esp) + cmovb %ebx, %edx + movl 24(%esp), %edi + movl 12(%esp), %esi + lea 1(%edx), %ebx + andl $-2, %ebx + movl %ebx, 16(%esp) + cmpl $1094713344, %eax + fildl 16(%esp) + movl 8(%esp), %ebx + jae ..B1.10 +..B1.9: + fldl _Pi4x3@GOTOFF(%esi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 8+_Pi4x3@GOTOFF(%esi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 16+_Pi4x3@GOTOFF(%esi) + fmulp %st, %st(1) + faddp %st, %st(1) + jmp ..B1.17 +..B1.10: + fldl _Pi4x4@GOTOFF(%esi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 8+_Pi4x4@GOTOFF(%esi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 16+_Pi4x4@GOTOFF(%esi) + fmul %st(1), %st + faddp %st, %st(2) + fldl 24+_Pi4x4@GOTOFF(%esi) + fmulp %st, %st(1) + faddp %st, %st(1) + jmp ..B1.17 +..B1.11: + movzwl 38(%esp), %edx + movl %edx, %eax + andl $768, %eax + cmpl $768, %eax + je ..B1.40 +..B1.12: + orl $-64768, %edx + movw %dx, 36(%esp) +..B1.13: + fldcw 36(%esp) +..B1.14: + movl $1, %edi +..B1.15: + movsd 8(%ebp), %xmm0 + addl $-32, %esp + andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm0 + lea 32(%esp), %eax + movsd %xmm0, 16(%eax) + fldl 16(%eax) + fstpt (%esp) + movl $0, 12(%esp) + movl %eax, 16(%esp) + call __libm_reduce_pi04l +..B1.43: + movl %eax, %edx + addl $32, %esp +..B1.16: + fldl (%esp) + fldl 8(%esp) + faddp %st, %st(1) +..B1.17: + movl %ebx, %eax + andl $3, %eax + cmpl $3, %eax + jne ..B1.24 +..B1.18: + fldl _ones@GOTOFF(%esi) + incl %edx + fdiv %st(1), %st + testb $2, %dl + fstpt 24(%esp) + fld %st(0) + fmul %st(1), %st + fld %st(0) + fmul %st(1), %st + fldt 36+_TP@GOTOFF(%esi) + fmul %st(2), %st + fldt 24+_TP@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt 12+_TP@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt 36+_TQ@GOTOFF(%esi) + fmul %st(3), %st + fldt 24+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(3), %st + fldt 12+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(3), %st + fldt _TQ@GOTOFF(%esi) + faddp %st, %st(1) + fldt _TP@GOTOFF(%esi) + faddp %st, %st(2) + fldt 132+_GP@GOTOFF(%esi) + fmul %st(3), %st + fldt 120+_GP@GOTOFF(%esi) + fmul %st(4), %st + fldt 108+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 96+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 84+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 72+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 60+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 48+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 36+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(4), %st + fldt 24+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(4) + fldt 12+_GP@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(4), %st + fmul %st(5), %st + fldt _GP@GOTOFF(%esi) + faddp %st, %st(4) + fxch %st(3) + fmul %st(5), %st + faddp %st, %st(3) + je ..B1.20 +..B1.19: + fldt 24(%esp) + fxch %st(1) + fdivrp %st, %st(2) + fxch %st(1) + fmulp %st, %st(3) + movl 44(%esp), %eax + xorl $1, %eax + fxch %st(2) + fmul %st(3), %st + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(2) + fmul %st, %st(3) + fxch %st(3) + faddp %st, %st(2) + fxch %st(1) + fstpl 16(%esp) + fmul %st(1), %st + fxch %st(1) + fmulp %st, %st(2) + movsd 16(%esp), %xmm0 + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm1 + jmp ..B1.21 +..B1.20: + fdivrp %st, %st(1) + fmulp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + movl 44(%esp), %eax + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(1) + fmul %st, %st(3) + fxch %st(3) + faddp %st, %st(1) + fstpl 16(%esp) + fmul %st(1), %st + fldt 24(%esp) + fmulp %st, %st(2) + movsd 16(%esp), %xmm0 + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm1 +..B1.21: + testl %edi, %edi + je ..B1.23 +..B1.22: + fldcw 38(%esp) +..B1.23: + movl 40(%esp), %eax + movsd %xmm0, (%eax) + movsd %xmm1, 8(%eax) + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.24: + testb $2, %bl + je ..B1.31 +..B1.25: + incl %edx + fld %st(0) + fmul %st(1), %st + testb $2, %dl + je ..B1.27 +..B1.26: + fldl _ones@GOTOFF(%esi) + fdiv %st(2), %st + fld %st(1) + fmul %st(2), %st + fldt 132+_GP@GOTOFF(%esi) + fmul %st(1), %st + fldt 120+_GP@GOTOFF(%esi) + fmul %st(2), %st + fldt 108+_GP@GOTOFF(%esi) + movl 44(%esp), %eax + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + xorl $1, %eax + fldt 96+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 84+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 72+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 60+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 48+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 36+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 24+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(2) + fldt 12+_GP@GOTOFF(%esi) + faddp %st, %st(1) + fmulp %st, %st(3) + fldt _GP@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(3), %st + fxch %st(2) + fmulp %st, %st(3) + fxch %st(1) + faddp %st, %st(2) + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(2) + fmulp %st, %st(1) + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm0 + jmp ..B1.28 +..B1.27: + fldt 36+_TP@GOTOFF(%esi) + fmul %st(1), %st + fldt 24+_TP@GOTOFF(%esi) + movl 44(%esp), %eax + faddp %st, %st(1) + fmul %st(1), %st + fldt 36+_TQ@GOTOFF(%esi) + fmul %st(2), %st + fldt 24+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt 12+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt _TQ@GOTOFF(%esi) + faddp %st, %st(1) + fldt 12+_TP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt _TP@GOTOFF(%esi) + faddp %st, %st(1) + fdivp %st, %st(1) + fmulp %st, %st(1) + fmul %st(1), %st + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(1) + fmulp %st, %st(2) + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm0 +..B1.28: + testl %edi, %edi + je ..B1.30 +..B1.29: + fldcw 38(%esp) +..B1.30: + movl 40(%esp), %eax + movsd %xmm0, (%eax) + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.31: + testb $1, %bl + je ..B1.38 +..B1.32: + incl %edx + fld %st(0) + fmul %st(1), %st + testb $2, %dl + je ..B1.34 +..B1.33: + fldt 36+_TP@GOTOFF(%esi) + fmul %st(1), %st + fldt 24+_TP@GOTOFF(%esi) + movl 44(%esp), %eax + faddp %st, %st(1) + fmul %st(1), %st + xorl $1, %eax + fldt 36+_TQ@GOTOFF(%esi) + fmul %st(2), %st + fldt 24+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt 12+_TQ@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(2), %st + fldt _TQ@GOTOFF(%esi) + faddp %st, %st(1) + fldt 12+_TP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt _TP@GOTOFF(%esi) + faddp %st, %st(1) + fdivp %st, %st(1) + fmulp %st, %st(1) + fmul %st(1), %st + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(1) + fmulp %st, %st(2) + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm0 + jmp ..B1.35 +..B1.34: + fldl _ones@GOTOFF(%esi) + fdiv %st(2), %st + fld %st(1) + fmul %st(2), %st + fldt 132+_GP@GOTOFF(%esi) + fmul %st(1), %st + fldt 120+_GP@GOTOFF(%esi) + fmul %st(2), %st + fldt 108+_GP@GOTOFF(%esi) + movl 44(%esp), %eax + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 96+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 84+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 72+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 60+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 48+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 36+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmul %st(2), %st + fldt 24+_GP@GOTOFF(%esi) + faddp %st, %st(2) + fxch %st(1) + fmulp %st, %st(2) + fldt 12+_GP@GOTOFF(%esi) + faddp %st, %st(1) + fmulp %st, %st(3) + fldt _GP@GOTOFF(%esi) + faddp %st, %st(1) + fmul %st(3), %st + fxch %st(2) + fmulp %st, %st(3) + fxch %st(1) + faddp %st, %st(2) + fldl _ones@GOTOFF(%esi,%eax,8) + fmul %st, %st(2) + fmulp %st, %st(1) + faddp %st, %st(1) + fstpl 16(%esp) + movsd 16(%esp), %xmm0 +..B1.35: + testl %edi, %edi + je ..B1.37 +..B1.36: + fldcw 38(%esp) +..B1.37: + movl 40(%esp), %eax + movsd %xmm0, 8(%eax) + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.38: + fstp %st(0) + addl $52, %esp + popl %ebx + popl %edi + popl %esi + movl %ebp, %esp + popl %ebp + ret +..B1.39: + xorl %edi, %edi + jmp ..B1.8 +..B1.40: + xorl %edi, %edi + jmp ..B1.15 + .align 16,0x90 + .type __libm_tancot_huge,@function + .size __libm_tancot_huge,.-__libm_tancot_huge + .data +# -- End __libm_tancot_huge + .section .rodata, "a" + .align 16 + .align 16 +.L_2il0floatpacket.0: + .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 + .type .L_2il0floatpacket.0,@object + .size .L_2il0floatpacket.0,16 + .align 16 +_Pi4Inv: + .long 1841940611 + .long 1072979760 + .type _Pi4Inv,@object + .size _Pi4Inv,8 + .space 8, 0x00 # pad + .align 16 +_Pi4x3: + .long 1413754880 + .long 3219726843 + .long 993632256 + .long 1027030475 + .long 3773204808 + .long 3129236486 + .type _Pi4x3,@object + .size _Pi4x3,24 + .space 8, 0x00 # pad + .align 16 +_Pi4x4: + .long 1413480448 + .long 3219726843 + .long 442499072 + .long 3183522913 + .long 771751936 + .long 3146979722 + .long 622873025 + .long 3110831002 + .type _Pi4x4,@object + .size _Pi4x4,32 + .align 16 +_ones: + .long 0 + .long 1072693248 + .long 0 + .long 3220176896 + .type _ones,@object + .size _ones,16 + .align 16 +_TP: + .word 19670 + .word 44908 + .word 50960 + .word 50786 + .word 49149 + .word 0 + .word 19206 + .word 45228 + .word 54194 + .word 52268 + .word 16377 + .word 0 + .word 227 + .word 51280 + .word 43560 + .word 38195 + .word 49139 + .word 0 + .word 12272 + .word 18029 + .word 6715 + .word 45670 + .word 16357 + .word 0 + .type _TP,@object + .size _TP,48 + .align 16 +_TQ: + .word 14748 + .word 33681 + .word 5452 + .word 38090 + .word 49151 + .word 0 + .word 46755 + .word 50026 + .word 17634 + .word 35372 + .word 16382 + .word 0 + .word 46863 + .word 53352 + .word 42702 + .word 59869 + .word 49145 + .word 0 + .word 33295 + .word 20942 + .word 32118 + .word 39935 + .word 16371 + .word 0 + .type _TQ,@object + .size _TQ,48 + .align 16 +_GP: + .word 43691 + .word 43690 + .word 43690 + .word 43690 + .word 49149 + .word 0 + .word 46639 + .word 2912 + .word 24758 + .word 46603 + .word 49145 + .word 0 + .word 57255 + .word 2218 + .word 21984 + .word 35507 + .word 49142 + .word 0 + .word 34208 + .word 43033 + .word 48281 + .word 56811 + .word 49138 + .word 0 + .word 28773 + .word 27191 + .word 31071 + .word 45908 + .word 49135 + .word 0 + .word 43257 + .word 33777 + .word 11976 + .word 37184 + .word 49132 + .word 0 + .word 62410 + .word 35990 + .word 36363 + .word 60269 + .word 49128 + .word 0 + .word 13659 + .word 55568 + .word 26569 + .word 48851 + .word 49125 + .word 0 + .word 10347 + .word 46238 + .word 47188 + .word 39576 + .word 49122 + .word 0 + .word 2161 + .word 6703 + .word 25719 + .word 64708 + .word 49118 + .word 0 + .word 42329 + .word 7593 + .word 44754 + .word 47734 + .word 49115 + .word 0 + .word 163 + .word 32746 + .word 39875 + .word 61957 + .word 49112 + .word 0 + .type _GP,@object + .size _GP,144 + .data + .hidden __libm_reduce_pi04l + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_atan.S b/libm/x86/s_atan.S new file mode 100644 index 0000000..67d8c02 --- /dev/null +++ b/libm/x86/s_atan.S @@ -0,0 +1,935 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// This implementation uses the main path for |x| in [2^{-5},2^65). +// For |x| in [2^{-64},2^{-5}), a secondary path is used. +// For the biased exponent of X within 3FFH-64 and 3FF+64, we use one branch. +// We use the following definition of B and X` so that the formula +// atan(X) = Tau + atan( (X`-B) / (One + BX) ) is correct +// +// X = (-1)^s * 2^k * 1. x1 x2 ... x52 +// +// Define X` = 0 if k >= 5; and X` = |X| otherwise +// Define One = 0 if k >= 5; and One = 1 otherwise +// Define B = 0 if k <= -6; B = 2^k * 1.x1 x2 x3 x4 1 if -5 <= k <= 4 +// Define B = 2^5 * 1.0 0 ... 0 if k >= 5 +// +// Tau is 0 if k <= -6; +// Tau is atan( B ) if -5 <= k <= 4 +// Tau is pi/2 if k >= 5 +// +// Special cases: +// atan(NaN) = quiet NaN +// atan(+/-INF) = +/-Pi/2 +// atan(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin atan +ENTRY(atan) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 48(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + movsd 2640(%ebx), %xmm3 + movsd 2624(%ebx), %xmm5 + movsd 2656(%ebx), %xmm4 + movsd %xmm0, 8(%esp) + pextrw $3, %xmm0, %edx + andpd %xmm0, %xmm3 + pshufd $68, %xmm0, %xmm1 + orpd %xmm4, %xmm3 + movl %edx, %eax + andl $32767, %edx + subl $16288, %edx + cmpl $159, %edx + ja .L_2TAG_PACKET_0.0.2 + mulsd %xmm3, %xmm1 + subsd %xmm3, %xmm0 + addsd %xmm5, %xmm1 + divsd %xmm1, %xmm0 + addl $1, %edx + movsd 2672(%ebx), %xmm2 + movsd 2688(%ebx), %xmm4 + andl $32768, %eax + xorpd %xmm7, %xmm7 + pinsrw $3, %eax, %xmm7 + addl %edx, %edx + movsd (%ebx,%edx,8), %xmm6 + movsd 8(%ebx,%edx,8), %xmm5 + xorpd %xmm7, %xmm5 + xorpd %xmm7, %xmm6 + movsd 2680(%ebx), %xmm7 + pshufd $68, %xmm0, %xmm1 + mulsd %xmm0, %xmm0 + pshufd $68, %xmm1, %xmm3 + addsd %xmm6, %xmm1 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm4 + subsd %xmm1, %xmm6 + mulsd %xmm0, %xmm4 + addsd %xmm7, %xmm2 + mulsd %xmm3, %xmm0 + addsd %xmm3, %xmm6 + mulsd %xmm2, %xmm0 + addsd 2696(%ebx), %xmm4 + addsd %xmm5, %xmm6 + mulsd %xmm4, %xmm0 + addsd %xmm6, %xmm0 + addsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + addl $944, %edx + cmpl $1103, %edx + ja .L_2TAG_PACKET_2.0.2 + movsd 2672(%ebx), %xmm4 + movsd 2688(%ebx), %xmm7 + movsd 8(%esp), %xmm0 + mulsd %xmm1, %xmm1 + movsd 2680(%ebx), %xmm2 + movsd 2696(%ebx), %xmm5 + mulsd %xmm1, %xmm4 + addsd %xmm1, %xmm7 + movapd %xmm1, %xmm6 + mulsd %xmm0, %xmm1 + addsd %xmm4, %xmm2 + mulsd %xmm6, %xmm7 + mulsd %xmm1, %xmm2 + addsd %xmm5, %xmm7 + mulsd %xmm7, %xmm2 + addsd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + addl $15344, %edx + cmpl $16368, %edx + ja .L_2TAG_PACKET_3.0.2 + movsd 8(%esp), %xmm0 + movsd 8(%esp), %xmm1 + cmpl $16, %edx + jae .L_2TAG_PACKET_4.0.2 + mulsd %xmm0, %xmm1 +.L_2TAG_PACKET_4.0.2: + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_3.0.2: + cmpl $17392, %edx + jae .L_2TAG_PACKET_5.0.2 + xorpd %xmm1, %xmm1 + movl $49136, %ecx + pinsrw $3, %ecx, %xmm1 + divsd %xmm0, %xmm1 + movsd 2672(%ebx), %xmm2 + movsd 2688(%ebx), %xmm4 + andl $32768, %eax + xorpd %xmm7, %xmm7 + pinsrw $3, %eax, %xmm7 + addl %edx, %edx + movsd 2592(%ebx), %xmm6 + movsd 2600(%ebx), %xmm5 + xorpd %xmm7, %xmm5 + xorpd %xmm7, %xmm6 + movsd 2680(%ebx), %xmm7 + pshufd $68, %xmm1, %xmm0 + mulsd %xmm1, %xmm1 + pshufd $68, %xmm0, %xmm3 + addsd %xmm6, %xmm0 + mulsd %xmm1, %xmm2 + addsd %xmm1, %xmm4 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm4 + addsd %xmm7, %xmm2 + mulsd %xmm3, %xmm1 + addsd %xmm3, %xmm6 + mulsd %xmm2, %xmm1 + addsd 2696(%ebx), %xmm4 + addsd %xmm5, %xmm6 + mulsd %xmm4, %xmm1 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_5.0.2: + movsd 8(%esp), %xmm4 + movsd 2608(%ebx), %xmm0 + movsd 2592(%ebx), %xmm2 + movsd 2600(%ebx), %xmm3 + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + andl $2147483647, %edx + cmpl $2146435072, %edx + jae .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_7.0.2: + andnpd %xmm4, %xmm0 + orpd %xmm0, %xmm2 + orpd %xmm3, %xmm0 + addsd %xmm2, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_6.0.2: + subl $2146435072, %edx + orl %edx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_7.0.2 + movapd %xmm4, %xmm0 + addsd %xmm0, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) +.L_2TAG_PACKET_1.0.2: + movl 48(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(atan) +# -- End atan + +# Start file scope ASM +.weak atanl +.equ atanl, atan +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 0 + .long 0 + .long 0 + .long 3819695742 + .long 1067482761 + .long 2398680355 + .long 3155462074 + .long 2998791009 + .long 1067548225 + .long 3868465248 + .long 3157182472 + .long 3339424991 + .long 1067613680 + .long 3296670360 + .long 1010752543 + .long 2710002256 + .long 1067679126 + .long 3403896007 + .long 1010910768 + .long 3275701428 + .long 1067744562 + .long 119959933 + .long 1011482843 + .long 2908636881 + .long 1067809988 + .long 2464489612 + .long 1011545526 + .long 3777889398 + .long 1067875403 + .long 3262682165 + .long 1009703919 + .long 3759667419 + .long 1067940807 + .long 1838130851 + .long 3157373556 + .long 732369940 + .long 1068006200 + .long 1203428313 + .long 1010055371 + .long 1166616461 + .long 1068071580 + .long 2901274051 + .long 3158549977 + .long 2945472892 + .long 1068136947 + .long 3726120658 + .long 1009762715 + .long 3954480976 + .long 1068202301 + .long 1289173457 + .long 1009429861 + .long 2081752829 + .long 1068267642 + .long 1836909874 + .long 1006212095 + .long 3807999788 + .long 1068332968 + .long 2172459940 + .long 3156162078 + .long 2731789884 + .long 1068398280 + .long 3450718392 + .long 3159216547 + .long 1044477961 + .long 1068463577 + .long 2230553229 + .long 1011424339 + .long 1486930287 + .long 1068530218 + .long 2861547474 + .long 1012041376 + .long 2293016881 + .long 1068595466 + .long 136843272 + .long 1012684797 + .long 201518157 + .long 1068660680 + .long 63231984 + .long 1012427198 + .long 4054234584 + .long 1068725856 + .long 3927006960 + .long 1011878955 + .long 1246477213 + .long 1068790995 + .long 1494265652 + .long 3155219350 + .long 678186699 + .long 1068856093 + .long 1264361424 + .long 3159256693 + .long 2690594995 + .long 1068921148 + .long 3906996379 + .long 1009288267 + .long 3362611517 + .long 1068986159 + .long 1650970041 + .long 3158331771 + .long 3102162111 + .long 1069051124 + .long 365917035 + .long 3160264153 + .long 2352611067 + .long 1069116041 + .long 4008970190 + .long 3159478182 + .long 1594134794 + .long 1069180908 + .long 466690178 + .long 1012526501 + .long 1345079306 + .long 1069245723 + .long 2268273568 + .long 3160164092 + .long 2163300970 + .long 1069310484 + .long 2750834800 + .long 3158113482 + .long 352522716 + .long 1069375190 + .long 1750411372 + .long 1011790845 + .long 848541647 + .long 1069439838 + .long 2164207573 + .long 1011698350 + .long 40647312 + .long 1069504427 + .long 2949165434 + .long 3159107267 + .long 2216766270 + .long 1069574357 + .long 2197920765 + .long 3161055954 + .long 1090914384 + .long 1069638757 + .long 2330454674 + .long 1013365998 + .long 387601244 + .long 1069703022 + .long 3185681168 + .long 1013434071 + .long 3991640484 + .long 1069767144 + .long 1313211590 + .long 3161087959 + .long 3322489502 + .long 1069831118 + .long 3013977995 + .long 1013053011 + .long 3121698570 + .long 1069894936 + .long 4069015667 + .long 1013023362 + .long 4289964660 + .long 1069958591 + .long 1736191156 + .long 3158266731 + .long 3903312386 + .long 1070022077 + .long 1833592413 + .long 3159731471 + .long 3818449864 + .long 1070085387 + .long 851036429 + .long 3159730451 + .long 2097480306 + .long 1070148515 + .long 3506390884 + .long 3160462302 + .long 1611694502 + .long 1070211454 + .long 2785735540 + .long 3160465144 + .long 1464694796 + .long 1070274198 + .long 4229277299 + .long 3159907000 + .long 1299612775 + .long 1070336741 + .long 4116653788 + .long 3160427739 + .long 1310544789 + .long 1070399077 + .long 1064430331 + .long 1013218202 + .long 2253168030 + .long 1070461200 + .long 1405044609 + .long 3157623179 + .long 1159567373 + .long 1070523105 + .long 2353445521 + .long 3159992176 + .long 1359373750 + .long 1070605818 + .long 1748171336 + .long 3161879263 + .long 908341706 + .long 1070667034 + .long 3372710815 + .long 3161775245 + .long 1743027350 + .long 1070727765 + .long 687089934 + .long 3160507171 + .long 2055355646 + .long 1070787992 + .long 2392855242 + .long 1013682469 + .long 690426164 + .long 1070847697 + .long 1103926666 + .long 1014052810 + .long 1483247847 + .long 1070906862 + .long 2082645847 + .long 3161345479 + .long 392040270 + .long 1070965472 + .long 2407720023 + .long 1014053754 + .long 2673846014 + .long 1071023511 + .long 1293605532 + .long 3158464385 + .long 1384215810 + .long 1071080967 + .long 2446095872 + .long 3159216407 + .long 3101660631 + .long 1071137826 + .long 698040758 + .long 1014855328 + .long 2094057058 + .long 1071194078 + .long 2282048339 + .long 1014040385 + .long 1712750594 + .long 1071249712 + .long 1204372378 + .long 3162276464 + .long 1411515787 + .long 1071304719 + .long 949080808 + .long 1015006403 + .long 931538085 + .long 1071359091 + .long 3027127039 + .long 1014307233 + .long 179139065 + .long 1071412821 + .long 4285547492 + .long 3161934731 + .long 3387721259 + .long 1071465902 + .long 373225773 + .long 1013486625 + .long 2132236852 + .long 1071544299 + .long 3250533429 + .long 1014031677 + .long 1942070284 + .long 1071645596 + .long 1237964179 + .long 3163239113 + .long 1532707802 + .long 1071695380 + .long 330645583 + .long 1012495610 + .long 2294184979 + .long 1071743834 + .long 3959472897 + .long 1015833116 + .long 3805060714 + .long 1071790961 + .long 2671256142 + .long 1013727772 + .long 2215037898 + .long 1071836770 + .long 2683359117 + .long 1015831902 + .long 483661594 + .long 1071881273 + .long 836288326 + .long 3162648643 + .long 1534679894 + .long 1071924486 + .long 373258696 + .long 3162470096 + .long 1538714628 + .long 1071966430 + .long 3199433068 + .long 1015325501 + .long 527642555 + .long 1072007128 + .long 3636832592 + .long 3161843145 + .long 291339150 + .long 1072046605 + .long 890169537 + .long 3160586117 + .long 2450210201 + .long 1072084888 + .long 1636353294 + .long 3163193400 + .long 2411367951 + .long 1072122007 + .long 374899873 + .long 1011331750 + .long 681549971 + .long 1072157992 + .long 506411689 + .long 1015373954 + .long 1466745541 + .long 1072192873 + .long 2143860931 + .long 1013364334 + .long 2845622366 + .long 1072226682 + .long 2869178209 + .long 3162423682 + .long 2838871438 + .long 1072275456 + .long 3742223599 + .long 1014338577 + .long 4200275274 + .long 1072337034 + .long 1566539915 + .long 3161839550 + .long 3034733530 + .long 1072394897 + .long 652621408 + .long 3162261964 + .long 3207412993 + .long 1072449290 + .long 3206124665 + .long 1014408733 + .long 624461478 + .long 1072500450 + .long 932437485 + .long 1015204343 + .long 767665908 + .long 1072548600 + .long 1037911952 + .long 3163527627 + .long 1110773639 + .long 1072593952 + .long 2371517912 + .long 3160465741 + .long 1940828530 + .long 1072636704 + .long 2731408428 + .long 3162895795 + .long 1911329388 + .long 1072677041 + .long 1773089615 + .long 3159569267 + .long 1764715788 + .long 1072704191 + .long 691346949 + .long 3164069946 + .long 3332979233 + .long 1072722195 + .long 3550733983 + .long 1014770628 + .long 1321870254 + .long 1072739231 + .long 1415315820 + .long 1016224052 + .long 3657429030 + .long 1072755365 + .long 3910539033 + .long 1015966402 + .long 4197624557 + .long 1072770661 + .long 2333399254 + .long 3164546480 + .long 1512059493 + .long 1072785177 + .long 2701510318 + .long 1016178092 + .long 453379037 + .long 1072798965 + .long 4046344253 + .long 3162814364 + .long 1942345162 + .long 1072818388 + .long 621134147 + .long 1016335195 + .long 4210176273 + .long 1072842164 + .long 2701013387 + .long 3164326619 + .long 4185644010 + .long 1072863795 + .long 4163699341 + .long 1016203112 + .long 679688788 + .long 1072883543 + .long 4147276762 + .long 1014066750 + .long 29432865 + .long 1072901630 + .long 970415797 + .long 1016902063 + .long 4070721092 + .long 1072918247 + .long 2539004411 + .long 3163736096 + .long 2252468843 + .long 1072933561 + .long 3424082887 + .long 3163407177 + .long 2929724825 + .long 1072947712 + .long 3661482235 + .long 3163846989 + .long 1377513368 + .long 1072960824 + .long 3987926680 + .long 1013647908 + .long 1031632908 + .long 1072973003 + .long 3672217151 + .long 1016614619 + .long 2516508130 + .long 1072984342 + .long 545855020 + .long 3162728930 + .long 3792452178 + .long 1072994923 + .long 3420119467 + .long 1016471430 + .long 3147791459 + .long 1073004818 + .long 1342204979 + .long 1013937254 + .long 999189752 + .long 1073014090 + .long 1006335472 + .long 3162850919 + .long 711011011 + .long 1073022794 + .long 4633488 + .long 3162966895 + .long 15640363 + .long 1073030980 + .long 1686389560 + .long 3164376226 + .long 1218463589 + .long 1073042382 + .long 1526837110 + .long 3163533985 + .long 2538470555 + .long 1073056144 + .long 2273304406 + .long 3163784996 + .long 1229720947 + .long 1073068489 + .long 2971628206 + .long 3162356540 + .long 3115427016 + .long 1073079621 + .long 4215132957 + .long 3164282762 + .long 4030612557 + .long 1073089709 + .long 1913251691 + .long 3163671292 + .long 2728521257 + .long 1073098892 + .long 2861089500 + .long 1015454459 + .long 1118696283 + .long 1073107285 + .long 1628948053 + .long 1016179658 + .long 2682711255 + .long 1073114984 + .long 2906306266 + .long 1014142643 + .long 2073898081 + .long 1073122072 + .long 1322740454 + .long 3164497217 + .long 1403700297 + .long 1073128618 + .long 416137895 + .long 3162781466 + .long 2502685617 + .long 1073134681 + .long 3242008732 + .long 1014593495 + .long 1531926851 + .long 1073140313 + .long 1362708094 + .long 1016517604 + .long 3572814411 + .long 1073145557 + .long 3709790527 + .long 1012646874 + .long 1695536111 + .long 1073150453 + .long 3980346340 + .long 1016705136 + .long 2363057203 + .long 1073155033 + .long 2551194792 + .long 1012569695 + .long 2873365682 + .long 1073159327 + .long 3181154748 + .long 1017041450 + .long 1053384691 + .long 1073165288 + .long 3074536879 + .long 1016965660 + .long 3270542712 + .long 1073172451 + .long 2535319415 + .long 3163051778 + .long 1353631484 + .long 1073178850 + .long 1173833755 + .long 1015534537 + .long 3511218460 + .long 1073184599 + .long 1243608109 + .long 3161592122 + .long 4121259284 + .long 1073189793 + .long 398584912 + .long 3163829923 + .long 1193862106 + .long 1073194509 + .long 1873745539 + .long 3163802819 + .long 3861949790 + .long 1073198808 + .long 3841261147 + .long 1015587248 + .long 1486904578 + .long 1073202745 + .long 1634726776 + .long 3163847886 + .long 2879153715 + .long 1073206362 + .long 200456242 + .long 3164138657 + .long 385353253 + .long 1073209698 + .long 1186355517 + .long 1014887155 + .long 1125865839 + .long 1073212783 + .long 203561262 + .long 3161244927 + .long 1221361475 + .long 1073215645 + .long 3382476563 + .long 1014936138 + .long 2077323573 + .long 1073218307 + .long 1005121005 + .long 3164430752 + .long 215611373 + .long 1073220790 + .long 353198764 + .long 3164485137 + .long 2347419265 + .long 1073223110 + .long 1103143360 + .long 1016542137 + .long 1379112765 + .long 1073225284 + .long 381583533 + .long 3162870833 + .long 3891198463 + .long 1073228298 + .long 1771275754 + .long 1014654681 + .long 3395914051 + .long 1073231917 + .long 2350900914 + .long 3164013978 + .long 2799919478 + .long 1073235146 + .long 2893950164 + .long 3163260901 + .long 1138673476 + .long 1073238045 + .long 2622204785 + .long 3164174388 + .long 3408855940 + .long 1073240661 + .long 2800881650 + .long 1016008624 + .long 2044858738 + .long 1073243035 + .long 604544785 + .long 1017022901 + .long 2578795176 + .long 1073245198 + .long 2557332925 + .long 1016135165 + .long 4196285314 + .long 1073247177 + .long 2032365307 + .long 1016194735 + .long 224877747 + .long 1073248996 + .long 497926916 + .long 1016947111 + .long 3271386490 + .long 1073250671 + .long 2689994846 + .long 1016631513 + .long 813635989 + .long 1073252221 + .long 747035277 + .long 3164530136 + .long 369829519 + .long 1073253658 + .long 2182033858 + .long 3163190340 + .long 1187679052 + .long 1073254994 + .long 673954443 + .long 1016149821 + .long 4232586098 + .long 1073256239 + .long 497775200 + .long 3162179015 + .long 426690558 + .long 1073257404 + .long 3063343247 + .long 1016865578 + .long 1624065902 + .long 1073258494 + .long 1354224996 + .long 3163503778 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .long 4294967295 + .long 2147483647 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 4294901760 + .long 0 + .long 0 + .long 0 + .long 32768 + .long 0 + .long 0 + .long 2006262985 + .long 1069310863 + .long 2358449471 + .long 3217342131 + .long 3845454352 + .long 1069952297 + .long 2829679149 + .long 1073771565 + .type static_const_table,@object + .size static_const_table,2704 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_cbrt.S b/libm/x86/s_cbrt.S new file mode 100644 index 0000000..d065de2 --- /dev/null +++ b/libm/x86/s_cbrt.S @@ -0,0 +1,739 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Assume x=2^{3*k+j} * 1.b1 b2 ... b5 b6 ... b52, where j = 0,1,2. +// Let r=(x*2^{-3k-j} - 1.b1 b2 ... b5 1)* rcp[b1 b2 ..b5], +// where rcp[b1 b2 .. b5]=1/(1.b1 b2 b3 b4 b5 1) in double precision +// cbrt(2^j * 1. b1 b2 .. b5 1) is approximated as T[j][b1..b5]+D[j][b1..b5] +// (T stores the high 53 bits, D stores the low order bits) +// Result=2^k*T+(2^k*T*r)*P+2^k*D +// where P=p1+p2*r+..+p8*r^7 +// +// Special cases: +// cbrt(NaN) = quiet NaN, and raise invalid exception +// cbrt(INF) = that INF +// cbrt(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin cbrt +ENTRY(cbrt) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %esi, 52(%esp) + call static_func + movl %eax, %esi + movsd 128(%esp), %xmm0 + movapd %xmm0, %xmm7 + movsd %xmm0, 8(%esp) + movl $524032, %edx + movsd 64(%esi), %xmm5 + movsd 80(%esi), %xmm3 + psrlq $44, %xmm7 + pextrw $0, %xmm7, %ecx + movd %xmm7, %eax + movsd 96(%esi), %xmm1 + movsd 112(%esi), %xmm2 + movl %ebx, 16(%esp) + andl $248, %ecx + movsd 128(%ecx,%esi), %xmm4 + movl %eax, %ebx + andl %eax, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_0.0.2 + cmpl $524032, %edx + je .L_2TAG_PACKET_1.0.2 + shrl $8, %edx + shrl $8, %ebx + andpd %xmm0, %xmm2 + andpd %xmm5, %xmm0 + orpd %xmm2, %xmm3 + orpd %xmm0, %xmm1 + movapd (%esi), %xmm5 + movl $5462, %eax + movapd 16(%esi), %xmm6 + mull %edx + movl %ebx, %edx + andl $2047, %ebx + shrl $14, %eax + andl $2048, %edx + subl %eax, %ebx + subl %eax, %ebx + subl %eax, %ebx + shll $8, %ebx + addl $682, %eax + orl %edx, %eax + movd %eax, %xmm7 + addl %ebx, %ecx + psllq $52, %xmm7 +.L_2TAG_PACKET_2.0.2: + movapd 32(%esi), %xmm2 + movapd 48(%esi), %xmm0 + subsd %xmm3, %xmm1 + movq %xmm7, %xmm3 + mulsd 384(%ecx,%esi), %xmm7 + mulsd %xmm4, %xmm1 + mulsd 1152(%ecx,%esi), %xmm3 + movapd %xmm1, %xmm4 + unpcklpd %xmm1, %xmm1 + mulpd %xmm1, %xmm5 + mulpd %xmm1, %xmm6 + mulpd %xmm1, %xmm1 + addpd %xmm5, %xmm2 + addpd %xmm6, %xmm0 + mulpd %xmm1, %xmm2 + mulpd %xmm1, %xmm1 + mulsd %xmm7, %xmm4 + addpd %xmm2, %xmm0 + movl 16(%esp), %ebx + mulsd %xmm0, %xmm1 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + mulsd %xmm4, %xmm0 + addsd %xmm3, %xmm0 + addsd %xmm7, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_0.0.2: + mulsd 1984(%esi), %xmm0 + movq %xmm0, %xmm7 + movl $524032, %edx + psrlq $44, %xmm7 + pextrw $0, %xmm7, %ecx + movd %xmm7, %eax + andl $248, %ecx + movsd 128(%ecx,%esi), %xmm4 + movl %eax, %ebx + andl %eax, %edx + shrl $8, %edx + shrl $8, %ebx + cmpl $0, %edx + je .L_2TAG_PACKET_4.0.2 + andpd %xmm0, %xmm2 + andpd %xmm5, %xmm0 + orpd %xmm2, %xmm3 + orpd %xmm0, %xmm1 + movapd (%esi), %xmm5 + movl $5462, %eax + movapd 16(%esi), %xmm6 + mull %edx + movl %ebx, %edx + andl $2047, %ebx + shrl $14, %eax + andl $2048, %edx + subl %eax, %ebx + subl %eax, %ebx + subl %eax, %ebx + shll $8, %ebx + addl $661, %eax + orl %edx, %eax + movd %eax, %xmm7 + addl %ebx, %ecx + psllq $52, %xmm7 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_4.0.2: + cmpl $0, %ebx + jne .L_2TAG_PACKET_5.0.2 + movl 16(%esp), %ebx + fldl 1952(%esi) + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_5.0.2: + movl 16(%esp), %ebx + fldl 1968(%esi) + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_1.0.2: + movl 16(%esp), %ebx + movl 132(%esp), %eax + movl 128(%esp), %edx + movl %eax, %ecx + andl $2147483647, %ecx + cmpl $2146435072, %ecx + ja .L_2TAG_PACKET_6.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_6.0.2 + cmpl $2146435072, %eax + jne .L_2TAG_PACKET_7.0.2 + fldl 1920(%esi) + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_7.0.2: + fldl 1936(%esi) + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_6.0.2: + movsd 8(%esp), %xmm0 + addsd %xmm0, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) +.L_2TAG_PACKET_3.0.2: + movl 52(%esp), %esi + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(cbrt) +# -- End cbrt + +# Start file scope ASM +.weak cbrtl +.equ cbrtl, cbrt +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 1553778919 + .long 3213899486 + .long 3534952507 + .long 3215266280 + .long 1646371399 + .long 3214412045 + .long 477218588 + .long 3216798151 + .long 3582521621 + .long 1066628362 + .long 1007461464 + .long 1068473053 + .long 889629714 + .long 1067378449 + .long 1431655765 + .long 1070945621 + .long 4294967295 + .long 1048575 + .long 0 + .long 0 + .long 0 + .long 3220193280 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 1032192 + .long 0 + .long 0 + .long 528611360 + .long 3220144632 + .long 2884679527 + .long 3220082993 + .long 1991868891 + .long 3220024928 + .long 2298714891 + .long 3219970134 + .long 58835168 + .long 3219918343 + .long 3035110223 + .long 3219869313 + .long 1617585086 + .long 3219822831 + .long 2500867033 + .long 3219778702 + .long 4241943008 + .long 3219736752 + .long 258732970 + .long 3219696825 + .long 404232216 + .long 3219658776 + .long 2172167368 + .long 3219622476 + .long 1544257904 + .long 3219587808 + .long 377579543 + .long 3219554664 + .long 1616385542 + .long 3219522945 + .long 813783277 + .long 3219492562 + .long 3940743189 + .long 3219463431 + .long 2689777499 + .long 3219435478 + .long 1700977147 + .long 3219408632 + .long 3169102082 + .long 3219382828 + .long 327235604 + .long 3219358008 + .long 1244336319 + .long 3219334115 + .long 1300311200 + .long 3219311099 + .long 3095471925 + .long 3219288912 + .long 2166487928 + .long 3219267511 + .long 2913108253 + .long 3219246854 + .long 293672978 + .long 3219226904 + .long 288737297 + .long 3219207624 + .long 1810275472 + .long 3219188981 + .long 174592167 + .long 3219170945 + .long 3539053052 + .long 3219153485 + .long 2164392968 + .long 3219136576 + .long 572345495 + .long 1072698681 + .long 1998204467 + .long 1072709382 + .long 3861501553 + .long 1072719872 + .long 2268192434 + .long 1072730162 + .long 2981979308 + .long 1072740260 + .long 270859143 + .long 1072750176 + .long 2958651392 + .long 1072759916 + .long 313113243 + .long 1072769490 + .long 919449400 + .long 1072778903 + .long 2809328903 + .long 1072788162 + .long 2222981587 + .long 1072797274 + .long 2352530781 + .long 1072806244 + .long 594152517 + .long 1072815078 + .long 1555767199 + .long 1072823780 + .long 4282421314 + .long 1072832355 + .long 2355578597 + .long 1072840809 + .long 1162590619 + .long 1072849145 + .long 797864051 + .long 1072857367 + .long 431273680 + .long 1072865479 + .long 2669831148 + .long 1072873484 + .long 733477752 + .long 1072881387 + .long 4280220604 + .long 1072889189 + .long 801961634 + .long 1072896896 + .long 2915370760 + .long 1072904508 + .long 1159613482 + .long 1072912030 + .long 2689944798 + .long 1072919463 + .long 1248687822 + .long 1072926811 + .long 2967951030 + .long 1072934075 + .long 630170432 + .long 1072941259 + .long 3760898254 + .long 1072948363 + .long 0 + .long 1072955392 + .long 2370273294 + .long 1072962345 + .long 1261754802 + .long 1072972640 + .long 546334065 + .long 1072986123 + .long 1054893830 + .long 1072999340 + .long 1571187597 + .long 1073012304 + .long 1107975175 + .long 1073025027 + .long 3606909377 + .long 1073037519 + .long 1113616747 + .long 1073049792 + .long 4154744632 + .long 1073061853 + .long 3358931423 + .long 1073073713 + .long 4060702372 + .long 1073085379 + .long 747576176 + .long 1073096860 + .long 3023138255 + .long 1073108161 + .long 1419988548 + .long 1073119291 + .long 1914185305 + .long 1073130255 + .long 294389948 + .long 1073141060 + .long 3761802570 + .long 1073151710 + .long 978281566 + .long 1073162213 + .long 823148820 + .long 1073172572 + .long 2420954441 + .long 1073182792 + .long 3815449908 + .long 1073192878 + .long 2046058587 + .long 1073202835 + .long 1807524753 + .long 1073212666 + .long 2628681401 + .long 1073222375 + .long 3225667357 + .long 1073231966 + .long 1555307421 + .long 1073241443 + .long 3454043099 + .long 1073250808 + .long 1208137896 + .long 1073260066 + .long 3659916772 + .long 1073269218 + .long 1886261264 + .long 1073278269 + .long 3593647839 + .long 1073287220 + .long 3086012205 + .long 1073296075 + .long 2769796922 + .long 1073304836 + .long 888716057 + .long 1073317807 + .long 2201465623 + .long 1073334794 + .long 164369365 + .long 1073351447 + .long 3462666733 + .long 1073367780 + .long 2773905457 + .long 1073383810 + .long 1342879088 + .long 1073399550 + .long 2543933975 + .long 1073415012 + .long 1684477781 + .long 1073430209 + .long 3532178543 + .long 1073445151 + .long 1147747300 + .long 1073459850 + .long 1928031793 + .long 1073474314 + .long 2079717015 + .long 1073488553 + .long 4016765315 + .long 1073502575 + .long 3670431139 + .long 1073516389 + .long 3549227225 + .long 1073530002 + .long 11637607 + .long 1073543422 + .long 588220169 + .long 1073556654 + .long 2635407503 + .long 1073569705 + .long 2042029317 + .long 1073582582 + .long 1925128962 + .long 1073595290 + .long 4136375664 + .long 1073607834 + .long 759964600 + .long 1073620221 + .long 4257606771 + .long 1073632453 + .long 297278907 + .long 1073644538 + .long 3655053093 + .long 1073656477 + .long 2442253172 + .long 1073668277 + .long 1111876799 + .long 1073679941 + .long 3330973139 + .long 1073691472 + .long 3438879452 + .long 1073702875 + .long 3671565478 + .long 1073714153 + .long 1317849547 + .long 1073725310 + .long 1642364115 + .long 1073736348 + .long 4050900474 + .long 1014427190 + .long 1157977860 + .long 1016444461 + .long 1374568199 + .long 1017271387 + .long 2809163288 + .long 1016882676 + .long 3742377377 + .long 1013168191 + .long 3101606597 + .long 1017541672 + .long 65224358 + .long 1017217597 + .long 2691591250 + .long 1017266643 + .long 4020758549 + .long 1017689313 + .long 1316310992 + .long 1018030788 + .long 1031537856 + .long 1014090882 + .long 3261395239 + .long 1016413641 + .long 886424999 + .long 1016313335 + .long 3114776834 + .long 1014195875 + .long 1681120620 + .long 1017825416 + .long 1329600273 + .long 1016625740 + .long 465474623 + .long 1017097119 + .long 4251633980 + .long 1017169077 + .long 1986990133 + .long 1017710645 + .long 752958613 + .long 1017159641 + .long 2216216792 + .long 1018020163 + .long 4282860129 + .long 1015924861 + .long 1557627859 + .long 1016039538 + .long 3889219754 + .long 1018086237 + .long 3684996408 + .long 1017353275 + .long 723532103 + .long 1017717141 + .long 2951149676 + .long 1012528470 + .long 831890937 + .long 1017830553 + .long 1031212645 + .long 1017387331 + .long 2741737450 + .long 1017604974 + .long 2863311531 + .long 1003776682 + .long 4276736099 + .long 1013153088 + .long 4111778382 + .long 1015673686 + .long 1728065769 + .long 1016413986 + .long 2708718031 + .long 1018078833 + .long 1069335005 + .long 1015291224 + .long 700037144 + .long 1016482032 + .long 2904566452 + .long 1017226861 + .long 4074156649 + .long 1017622651 + .long 25019565 + .long 1015245366 + .long 3601952608 + .long 1015771755 + .long 3267129373 + .long 1017904664 + .long 503203103 + .long 1014921629 + .long 2122011730 + .long 1018027866 + .long 3927295461 + .long 1014189456 + .long 2790625147 + .long 1016024251 + .long 1330460186 + .long 1016940346 + .long 4033568463 + .long 1015538390 + .long 3695818227 + .long 1017509621 + .long 257573361 + .long 1017208868 + .long 3227697852 + .long 1017337964 + .long 234118548 + .long 1017169577 + .long 4009025803 + .long 1017278524 + .long 1948343394 + .long 1017749310 + .long 678398162 + .long 1018144239 + .long 3083864863 + .long 1016669086 + .long 2415453452 + .long 1017890370 + .long 175467344 + .long 1017330033 + .long 3197359580 + .long 1010339928 + .long 2071276951 + .long 1015941358 + .long 268372543 + .long 1016737773 + .long 938132959 + .long 1017389108 + .long 1816750559 + .long 1017337448 + .long 4119203749 + .long 1017152174 + .long 2578653878 + .long 1013108497 + .long 2470331096 + .long 1014678606 + .long 123855735 + .long 1016553320 + .long 1265650889 + .long 1014782687 + .long 3414398172 + .long 1017182638 + .long 1040773369 + .long 1016158401 + .long 3483628886 + .long 1016886550 + .long 4140499405 + .long 1016191425 + .long 3893477850 + .long 1016964495 + .long 3935319771 + .long 1009634717 + .long 2978982660 + .long 1015027112 + .long 2452709923 + .long 1017990229 + .long 3190365712 + .long 1015835149 + .long 4237588139 + .long 1015832925 + .long 2610678389 + .long 1017962711 + .long 2127316774 + .long 1017405770 + .long 824267502 + .long 1017959463 + .long 2165924042 + .long 1017912225 + .long 2774007076 + .long 1013257418 + .long 4123916326 + .long 1017582284 + .long 1976417958 + .long 1016959909 + .long 4092806412 + .long 1017711279 + .long 119251817 + .long 1015363631 + .long 3475418768 + .long 1017675415 + .long 1972580503 + .long 1015470684 + .long 815541017 + .long 1017517969 + .long 2429917451 + .long 1017397776 + .long 4062888482 + .long 1016749897 + .long 68284153 + .long 1017925678 + .long 2207779246 + .long 1016320298 + .long 1183466520 + .long 1017408657 + .long 143326427 + .long 1017060403 + .long 0 + .long 2146435072 + .long 0 + .long 0 + .long 0 + .long 4293918720 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 1138753536 + .long 0 + .long 0 + .type static_const_table,@object + .size static_const_table,2000 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_cos.S b/libm/x86/s_cos.S new file mode 100644 index 0000000..0f5d570 --- /dev/null +++ b/libm/x86/s_cos.S @@ -0,0 +1,893 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// 1. RANGE REDUCTION +// +// We perform an initial range reduction from X to r with +// +// X =~= N * pi/32 + r +// +// so that |r| <= pi/64 + epsilon. We restrict inputs to those +// where |N| <= 932560. Beyond this, the range reduction is +// insufficiently accurate. For extremely small inputs, +// denormalization can occur internally, impacting performance. +// This means that the main path is actually only taken for +// 2^-252 <= |X| < 90112. +// +// To avoid branches, we perform the range reduction to full +// accuracy each time. +// +// X - N * (P_1 + P_2 + P_3) +// +// where P_1 and P_2 are 32-bit numbers (so multiplication by N +// is exact) and P_3 is a 53-bit number. Together, these +// approximate pi well enough for all cases in the restricted +// range. +// +// The main reduction sequence is: +// +// y = 32/pi * x +// N = integer(y) +// (computed by adding and subtracting off SHIFTER) +// +// m_1 = N * P_1 +// m_2 = N * P_2 +// r_1 = x - m_1 +// r = r_1 - m_2 +// (this r can be used for most of the calculation) +// +// c_1 = r_1 - r +// m_3 = N * P_3 +// c_2 = c_1 - m_2 +// c = c_2 - m_3 +// +// 2. MAIN ALGORITHM +// +// The algorithm uses a table lookup based on B = M * pi / 32 +// where M = N mod 64. The stored values are: +// sigma closest power of 2 to cos(B) +// C_hl 53-bit cos(B) - sigma +// S_hi + S_lo 2 * 53-bit sin(B) +// +// The computation is organized as follows: +// +// sin(B + r + c) = [sin(B) + sigma * r] + +// r * (cos(B) - sigma) + +// sin(B) * [cos(r + c) - 1] + +// cos(B) * [sin(r + c) - r] +// +// which is approximately: +// +// [S_hi + sigma * r] + +// C_hl * r + +// S_lo + S_hi * [(cos(r) - 1) - r * c] + +// (C_hl + sigma) * [(sin(r) - r) + c] +// +// and this is what is actually computed. We separate this sum +// into four parts: +// +// hi + med + pols + corr +// +// where +// +// hi = S_hi + sigma r +// med = C_hl * r +// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r) +// corr = S_lo + c * ((C_hl + sigma) - S_hi * r) +// +// 3. POLYNOMIAL +// +// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) * +// (sin(r) - r) can be rearranged freely, since it is quite +// small, so we exploit parallelism to the fullest. +// +// psc4 = SC_4 * r_1 +// msc4 = psc4 * r +// r2 = r * r +// msc2 = SC_2 * r2 +// r4 = r2 * r2 +// psc3 = SC_3 + msc4 +// psc1 = SC_1 + msc2 +// msc3 = r4 * psc3 +// sincospols = psc1 + msc3 +// pols = sincospols * +// +// +// 4. CORRECTION TERM +// +// This is where the "c" component of the range reduction is +// taken into account; recall that just "r" is used for most of +// the calculation. +// +// -c = m_3 - c_2 +// -d = S_hi * r - (C_hl + sigma) +// corr = -c * -d + S_lo +// +// 5. COMPENSATED SUMMATIONS +// +// The two successive compensated summations add up the high +// and medium parts, leaving just the low parts to add up at +// the end. +// +// rs = sigma * r +// res_int = S_hi + rs +// k_0 = S_hi - res_int +// k_2 = k_0 + rs +// med = C_hl * r +// res_hi = res_int + med +// k_1 = res_int - res_hi +// k_3 = k_1 + med +// +// 6. FINAL SUMMATION +// +// We now add up all the small parts: +// +// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3 +// +// Now the overall result is just: +// +// res_hi + res_lo +// +// 7. SMALL ARGUMENTS +// +// Inputs with |X| < 2^-252 are treated specially as +// 1 - |x|. +// +// Special cases: +// cos(NaN) = quiet NaN, and raise invalid exception +// cos(INF) = NaN and raise invalid exception +// cos(0) = 1 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin cos +ENTRY(cos) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 56(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + pextrw $3, %xmm0, %eax + andl $32767, %eax + subl $12336, %eax + cmpl $4293, %eax + ja .L_2TAG_PACKET_0.0.2 + movsd 2160(%ebx), %xmm1 + mulsd %xmm0, %xmm1 + movapd 2240(%ebx), %xmm5 + movsd 2224(%ebx), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + movsd 2128(%ebx), %xmm3 + movapd 2112(%ebx), %xmm2 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %edx + cvtsi2sdl %edx, %xmm1 + mulsd %xmm1, %xmm3 + unpcklpd %xmm1, %xmm1 + addl $1865232, %edx + movapd %xmm0, %xmm4 + andl $63, %edx + movapd 2096(%ebx), %xmm5 + lea (%ebx), %eax + shll $5, %edx + addl %edx, %eax + mulpd %xmm1, %xmm2 + subsd %xmm3, %xmm0 + mulsd 2144(%ebx), %xmm1 + subsd %xmm3, %xmm4 + movsd 8(%eax), %xmm7 + unpcklpd %xmm0, %xmm0 + movapd %xmm4, %xmm3 + subsd %xmm2, %xmm4 + mulpd %xmm0, %xmm5 + subpd %xmm2, %xmm0 + movapd 2064(%ebx), %xmm6 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm2, %xmm3 + movapd (%eax), %xmm2 + subsd %xmm3, %xmm1 + movsd 24(%eax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd 2080(%ebx), %xmm5 + mulsd (%eax), %xmm4 + addpd 2048(%ebx), %xmm6 + mulpd %xmm0, %xmm5 + movapd %xmm3, %xmm0 + addsd 8(%eax), %xmm3 + mulpd %xmm7, %xmm1 + movapd %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movsd 8(%eax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%eax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm0, %xmm5 + addsd %xmm7, %xmm3 + addsd %xmm5, %xmm1 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + unpckhpd %xmm6, %xmm6 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm4 + movsd %xmm4, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + jg .L_2TAG_PACKET_2.0.2 + pextrw $3, %xmm0, %eax + andl $32767, %eax + pinsrw $3, %eax, %xmm0 + movsd 2192(%ebx), %xmm1 + subsd %xmm0, %xmm1 + movsd %xmm1, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movl 132(%esp), %eax + andl $2146435072, %eax + cmpl $2146435072, %eax + je .L_2TAG_PACKET_3.0.2 + subl $32, %esp + movsd %xmm0, (%esp) + lea 40(%esp), %eax + movl %eax, 8(%esp) + movl $1, %eax + movl %eax, 12(%esp) + call __libm_sincos_huge + addl $32, %esp + fldl 8(%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_3.0.2: + fldl 128(%esp) + fmull 2208(%ebx) +.L_2TAG_PACKET_1.0.2: + movl 56(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(cos) +# -- End cos + +# Start file scope ASM +.weak cosl +.equ cosl, cos +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 1072693248 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 1072693248 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 1071644672 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 1071644672 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 1070596096 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 1070596096 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 1069547520 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 3217031168 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 3218079744 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 3218079744 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 3219128320 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 3219128320 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 3220176896 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 3220176896 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 3219128320 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 3219128320 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 3218079744 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 3218079744 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 3217031168 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 1069547520 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 1070596096 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 1070596096 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 1071644672 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 1071644672 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 1072693248 + .long 1431655765 + .long 3217380693 + .long 0 + .long 3219128320 + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1067799893 + .long 436314138 + .long 3207201184 + .long 381774871 + .long 3210133868 + .long 2773927732 + .long 1053236707 + .long 436314138 + .long 1056571808 + .long 442499072 + .long 1032893537 + .long 442499072 + .long 1032893537 + .long 1413480448 + .long 1069097467 + .long 0 + .long 0 + .long 771977331 + .long 996350346 + .long 0 + .long 0 + .long 1841940611 + .long 1076125488 + .long 0 + .long 0 + .long 0 + .long 1127743488 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .type static_const_table,@object + .size static_const_table,2256 + .data + .hidden __libm_sincos_huge + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_expm1.S b/libm/x86/s_expm1.S new file mode 100644 index 0000000..58819ef --- /dev/null +++ b/libm/x86/s_expm1.S @@ -0,0 +1,703 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Description: +// Let K = 64 (table size). +// +// Four sub-domains: +// 1. |x| < 1/(2*K) +// expm1(x) ~ P(x) +// 2. 1/(2*K) <= |x| <= 56*log(2) +// x x/log(2) n +// e - 1 = 2 = 2 * T[j] * (1 + P(y)) - 1 +// 3. 56*log(2) < x < MAX_LOG +// x x x/log(2) n +// e - 1 ~ e = 2 = 2 * T[j] * (1 + P(y)) +// 4. x < -56*log(2) +// x x +// e - 1 = -1 + e ~ -1 +// where +// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K] +// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2] +// j/K +// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]). +// +// P(y) is a minimax polynomial approximation of exp(x)-1 +// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V). +// +// In case 3, to avoid problems with arithmetic overflow and underflow, +// n n1 n2 +// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2] +// and BIAS is a value of exponent bias. +// +// Special cases: +// expm1(NaN) is NaN +// expm1(+INF) is +INF +// expm1(-INF) is -1 +// expm1(x) is x for subnormals +// for finite argument, only expm1(0)=0 is exact. +// For IEEE double +// if x > 709.782712893383973096 then expm1(x) overflow +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin expm1 +ENTRY(expm1) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 64(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + unpcklpd %xmm0, %xmm0 + movapd 64(%ebx), %xmm1 + movapd 48(%ebx), %xmm6 + movapd 80(%ebx), %xmm2 + movapd 96(%ebx), %xmm3 + pextrw $3, %xmm0, %eax + andl $32767, %eax + movl $16527, %edx + subl %eax, %edx + subl $16304, %eax + orl %eax, %edx + cmpl $-2147483648, %edx + jae .L_2TAG_PACKET_0.0.2 + mulpd %xmm0, %xmm1 + addpd %xmm6, %xmm1 + movapd %xmm1, %xmm7 + subpd %xmm6, %xmm1 + mulpd %xmm1, %xmm2 + movapd 112(%ebx), %xmm4 + mulpd %xmm1, %xmm3 + movapd 128(%ebx), %xmm5 + subpd %xmm2, %xmm0 + movd %xmm7, %eax + movl %eax, %ecx + andl $63, %ecx + shll $4, %ecx + sarl $6, %eax + movl %eax, %edx + subpd %xmm3, %xmm0 + movapd 160(%ebx,%ecx), %xmm2 + movsd 144(%ebx), %xmm3 + mulpd %xmm0, %xmm4 + movapd %xmm0, %xmm1 + mulpd %xmm0, %xmm0 + mulsd %xmm0, %xmm3 + addpd %xmm4, %xmm5 + mulsd %xmm0, %xmm0 + movapd %xmm2, %xmm4 + unpckhpd %xmm2, %xmm2 + movdqa 16(%ebx), %xmm6 + pand %xmm6, %xmm7 + movdqa 32(%ebx), %xmm6 + paddq %xmm6, %xmm7 + psllq $46, %xmm7 + mulsd %xmm0, %xmm3 + mulpd %xmm5, %xmm0 + addl $894, %edx + cmpl $1916, %edx + ja .L_2TAG_PACKET_1.0.2 + addsd %xmm3, %xmm0 + xorpd %xmm3, %xmm3 + movl $16368, %eax + pinsrw $3, %eax, %xmm3 + orpd %xmm7, %xmm2 + mulsd %xmm4, %xmm7 + movapd %xmm3, %xmm6 + addsd %xmm1, %xmm3 + pextrw $3, %xmm2, %edx + pshufd $238, %xmm0, %xmm5 + psrlq $38, %xmm3 + psllq $38, %xmm3 + movapd %xmm2, %xmm4 + subsd %xmm3, %xmm6 + addsd %xmm5, %xmm0 + addsd %xmm6, %xmm1 + addsd %xmm7, %xmm4 + mulsd %xmm3, %xmm7 + mulsd %xmm2, %xmm3 + xorpd %xmm5, %xmm5 + movl $16368, %eax + pinsrw $3, %eax, %xmm5 + addsd %xmm1, %xmm0 + movl $17184, %ecx + subl %edx, %ecx + subl $16256, %edx + orl %edx, %ecx + jl .L_2TAG_PACKET_2.0.2 + mulsd %xmm4, %xmm0 + subsd %xmm5, %xmm3 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 +.L_2TAG_PACKET_3.0.2: + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_2.0.2: + cmpl $0, %edx + jl .L_2TAG_PACKET_5.0.2 + mulsd %xmm4, %xmm0 + subsd %xmm5, %xmm7 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_5.0.2: + mulsd %xmm4, %xmm0 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + subsd %xmm5, %xmm0 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_1.0.2: + movl 132(%esp), %ecx + addsd %xmm0, %xmm1 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + cmpl $0, %ecx + jl .L_2TAG_PACKET_6.0.2 + fstcw 24(%esp) + movzwl 24(%esp), %edx + orl $768, %edx + movw %dx, 28(%esp) + fldcw 28(%esp) + movl %eax, %edx + sarl $1, %eax + subl %eax, %edx + movdqa (%ebx), %xmm6 + pandn %xmm2, %xmm6 + addl $1023, %eax + movd %eax, %xmm3 + psllq $52, %xmm3 + orpd %xmm3, %xmm6 + mulsd %xmm3, %xmm4 + movsd %xmm0, 8(%esp) + fldl 8(%esp) + movsd %xmm6, 16(%esp) + fldl 16(%esp) + movsd %xmm4, 16(%esp) + fldl 16(%esp) + addl $1023, %edx + movd %edx, %xmm4 + psllq $52, %xmm4 + faddp %st, %st(1) + fmul %st, %st(1) + faddp %st, %st(1) + movsd %xmm4, 8(%esp) + fldl 8(%esp) + fmulp %st, %st(1) + fstpl 8(%esp) + movsd 8(%esp), %xmm0 + fldcw 24(%esp) + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $32752, %ecx + jae .L_2TAG_PACKET_7.0.2 + jmp .L_2TAG_PACKET_4.0.2 + cmpl $-2147483648, %ecx + jb .L_2TAG_PACKET_7.0.2 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_7.0.2: + movl $41, %edx +.L_2TAG_PACKET_8.0.2: + movsd %xmm0, (%esp) + movsd 128(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_10.0.2: + cmpl $2146435072, %eax + jae .L_2TAG_PACKET_11.0.2 + movsd 1272(%ebx), %xmm0 + mulsd %xmm0, %xmm0 + movl $41, %edx + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_11.0.2: + movl 132(%esp), %eax + movl 128(%esp), %edx + movl %eax, %ecx + andl $2147483647, %eax + cmpl $2146435072, %eax + ja .L_2TAG_PACKET_12.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_12.0.2 + cmpl $0, %ecx + jl .L_2TAG_PACKET_13.0.2 + movsd 1256(%ebx), %xmm0 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_13.0.2: + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_12.0.2: + movsd 128(%esp), %xmm0 + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_14.0.2: + addl $16304, %eax + cmpl $15504, %eax + jb .L_2TAG_PACKET_15.0.2 + movapd 1184(%ebx), %xmm2 + pshufd $68, %xmm0, %xmm1 + movapd 1200(%ebx), %xmm3 + movapd 1216(%ebx), %xmm4 + movsd 1232(%ebx), %xmm5 + mulsd %xmm1, %xmm1 + xorpd %xmm6, %xmm6 + movl $16352, %eax + pinsrw $3, %eax, %xmm6 + mulpd %xmm0, %xmm2 + xorpd %xmm7, %xmm7 + movl $16368, %edx + pinsrw $3, %edx, %xmm7 + addpd %xmm3, %xmm2 + mulsd %xmm1, %xmm5 + pshufd $228, %xmm1, %xmm3 + mulpd %xmm1, %xmm1 + mulsd %xmm0, %xmm6 + mulpd %xmm0, %xmm2 + addpd %xmm4, %xmm2 + movapd %xmm7, %xmm4 + addsd %xmm6, %xmm7 + mulpd %xmm3, %xmm1 + psrlq $27, %xmm7 + psllq $27, %xmm7 + movsd 1288(%ebx), %xmm3 + subsd %xmm7, %xmm4 + mulpd %xmm1, %xmm2 + addsd %xmm4, %xmm6 + pshufd $238, %xmm2, %xmm1 + addsd %xmm2, %xmm6 + andpd %xmm0, %xmm3 + movapd %xmm0, %xmm4 + addsd %xmm6, %xmm1 + subsd %xmm3, %xmm0 + addsd %xmm5, %xmm1 + mulsd %xmm7, %xmm3 + mulsd %xmm7, %xmm0 + mulsd %xmm1, %xmm4 + addsd %xmm4, %xmm0 + addsd %xmm3, %xmm0 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_15.0.2: + cmpl $16, %eax + jae .L_2TAG_PACKET_3.0.2 + movapd %xmm0, %xmm2 + movd %xmm0, %eax + psrlq $31, %xmm2 + movd %xmm2, %ecx + orl %ecx, %eax + je .L_2TAG_PACKET_3.0.2 + movl $16, %edx + xorpd %xmm1, %xmm1 + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm1 + movl $42, %edx + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_0.0.2: + cmpl $0, %eax + jl .L_2TAG_PACKET_14.0.2 + movl 132(%esp), %eax + cmpl $1083179008, %eax + jge .L_2TAG_PACKET_10.0.2 + cmpl $-1048576, %eax + jae .L_2TAG_PACKET_11.0.2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_4.0.2: + movsd %xmm0, 48(%esp) + fldl 48(%esp) +.L_2TAG_PACKET_9.0.2: + movl 64(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(expm1) +# -- End expm1 + +# Start file scope ASM +.weak expm1l +.equ expm1l, expm1 +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 4293918720 + .long 0 + .long 4293918720 + .long 4294967232 + .long 0 + .long 4294967232 + .long 0 + .long 65472 + .long 0 + .long 65472 + .long 0 + .long 0 + .long 1127743488 + .long 0 + .long 1127743488 + .long 1697350398 + .long 1079448903 + .long 1697350398 + .long 1079448903 + .long 4277796864 + .long 1065758274 + .long 4277796864 + .long 1065758274 + .long 3164486458 + .long 1025308570 + .long 3164486458 + .long 1025308570 + .long 1963358694 + .long 1065423121 + .long 1431655765 + .long 1069897045 + .long 1431655765 + .long 1067799893 + .long 0 + .long 1071644672 + .long 381774871 + .long 1062650220 + .long 381774871 + .long 1062650220 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1000070955 + .long 1042145304 + .long 1040187392 + .long 11418 + .long 988267849 + .long 1039500660 + .long 3539992576 + .long 22960 + .long 36755401 + .long 1042114290 + .long 402653184 + .long 34629 + .long 3634769483 + .long 1042178627 + .long 1820327936 + .long 46424 + .long 2155991225 + .long 1041560680 + .long 847249408 + .long 58348 + .long 2766913307 + .long 1039293264 + .long 3489660928 + .long 70401 + .long 3651174602 + .long 1040488175 + .long 2927624192 + .long 82586 + .long 3073892131 + .long 1042240606 + .long 1006632960 + .long 94904 + .long 1328391742 + .long 1042019037 + .long 3942645760 + .long 107355 + .long 2650893825 + .long 1041903210 + .long 822083584 + .long 119943 + .long 2397289153 + .long 1041802037 + .long 2281701376 + .long 132667 + .long 430997175 + .long 1042110606 + .long 1845493760 + .long 145530 + .long 1230936525 + .long 1041801015 + .long 1702887424 + .long 158533 + .long 740675935 + .long 1040178913 + .long 4110417920 + .long 171677 + .long 3489810261 + .long 1041825986 + .long 2793406464 + .long 184965 + .long 2532600530 + .long 1040767882 + .long 167772160 + .long 198398 + .long 3542557060 + .long 1041827263 + .long 2986344448 + .long 211976 + .long 1401563777 + .long 1041061093 + .long 922746880 + .long 225703 + .long 3129406026 + .long 1041852413 + .long 880803840 + .long 239579 + .long 900993572 + .long 1039283234 + .long 1275068416 + .long 253606 + .long 2115029358 + .long 1042140042 + .long 562036736 + .long 267786 + .long 1086643152 + .long 1041785419 + .long 1610612736 + .long 282120 + .long 82864366 + .long 1041256244 + .long 3045064704 + .long 296610 + .long 2392968152 + .long 1040913683 + .long 3573547008 + .long 311258 + .long 2905856183 + .long 1040002214 + .long 1988100096 + .long 326066 + .long 3742008261 + .long 1040011137 + .long 1451229184 + .long 341035 + .long 863393794 + .long 1040880621 + .long 914358272 + .long 356167 + .long 1446136837 + .long 1041372426 + .long 3707764736 + .long 371463 + .long 927855201 + .long 1040617636 + .long 360710144 + .long 386927 + .long 1492679939 + .long 1041050306 + .long 2952790016 + .long 402558 + .long 608827001 + .long 1041582217 + .long 2181038080 + .long 418360 + .long 606260204 + .long 1042271987 + .long 1711276032 + .long 434334 + .long 3163044019 + .long 1041843851 + .long 1006632960 + .long 450482 + .long 4148747325 + .long 1041962972 + .long 3900702720 + .long 466805 + .long 802924201 + .long 1041275378 + .long 1442840576 + .long 483307 + .long 3052749833 + .long 1041940577 + .long 1937768448 + .long 499988 + .long 2216116399 + .long 1041486744 + .long 914358272 + .long 516851 + .long 2729697836 + .long 1041445764 + .long 2566914048 + .long 533897 + .long 540608356 + .long 1041310907 + .long 2600468480 + .long 551129 + .long 2916344493 + .long 1040535661 + .long 1107296256 + .long 568549 + .long 731391814 + .long 1039497014 + .long 2566914048 + .long 586158 + .long 1024722704 + .long 1041461625 + .long 2961178624 + .long 603959 + .long 3806831748 + .long 1041732499 + .long 2675965952 + .long 621954 + .long 238953304 + .long 1040316488 + .long 2189426688 + .long 640145 + .long 749123235 + .long 1041725785 + .long 2063597568 + .long 658534 + .long 1168187977 + .long 1041175214 + .long 2986344448 + .long 677123 + .long 3506096399 + .long 1042186095 + .long 1426063360 + .long 695915 + .long 1470221620 + .long 1041675499 + .long 2566914048 + .long 714911 + .long 3182425146 + .long 1041483134 + .long 3087007744 + .long 734114 + .long 3131698208 + .long 1042208657 + .long 4068474880 + .long 753526 + .long 2300504125 + .long 1041428596 + .long 2415919104 + .long 773150 + .long 2290297931 + .long 1037388400 + .long 3716153344 + .long 792987 + .long 3532148223 + .long 1041626194 + .long 771751936 + .long 813041 + .long 1161884404 + .long 1042015258 + .long 3699376128 + .long 833312 + .long 876383176 + .long 1037968878 + .long 1241513984 + .long 853805 + .long 3379986796 + .long 1042213153 + .long 3699376128 + .long 874520 + .long 1545797737 + .long 1041681569 + .long 58720256 + .long 895462 + .long 2925146801 + .long 1042212567 + .long 855638016 + .long 916631 + .long 1316627971 + .long 1038516204 + .long 3883925504 + .long 938030 + .long 3267869137 + .long 1040337004 + .long 2726297600 + .long 959663 + .long 3720868999 + .long 1041782409 + .long 3992977408 + .long 981531 + .long 433316142 + .long 1041994064 + .long 1526726656 + .long 1003638 + .long 781232103 + .long 1040093400 + .long 2172649472 + .long 1025985 + .long 2773927732 + .long 1053236707 + .long 381774871 + .long 1062650220 + .long 379653899 + .long 1056571845 + .long 286331153 + .long 1065423121 + .long 436314138 + .long 1059717536 + .long 1431655765 + .long 1067799893 + .long 1431655765 + .long 1069897045 + .long 0 + .long 1071644672 + .long 0 + .long 1072693248 + .long 0 + .long 2146435072 + .long 0 + .long 0 + .long 4294967295 + .long 2146435071 + .long 0 + .long 1048576 + .long 4227858432 + .long 4294967295 + .type static_const_table,@object + .size static_const_table,1296 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_log1p.S b/libm/x86/s_log1p.S new file mode 100644 index 0000000..76fb826 --- /dev/null +++ b/libm/x86/s_log1p.S @@ -0,0 +1,828 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpps instruction (B0) +// B = int((B0*2^7+0.5))/2^7 +// +// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts) +// +// Result: k*log(2) - log(B) + p(r) +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log1p(NaN) = quiet NaN, and raise invalid exception +// log1p(+INF) = that INF +// log1p(x) = NaN if x < -1 or x = -INF, and raises invalid exception +// log1p(-1) = -INF, and raises divide-by-zero exception +// log1p(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin log1p +ENTRY(log1p) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + xorpd %xmm3, %xmm3 + movl $32768, %ecx + movd %ecx, %xmm4 + movsd 2128(%ebx), %xmm5 + pshufd $68, %xmm0, %xmm7 + movapd %xmm2, %xmm6 + pextrw $3, %xmm0, %ecx + addsd %xmm2, %xmm0 + movapd %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + subsd %xmm0, %xmm6 + orpd %xmm2, %xmm0 + psllq $5, %xmm0 + psrlq $34, %xmm0 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 + addsd %xmm6, %xmm7 + rcpss %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + andl $32752, %ecx + cmpl $16256, %ecx + jb .L_2TAG_PACKET_1.0.2 + andl $32752, %eax + movl $32720, %ecx + subl %eax, %ecx + pinsrw $3, %ecx, %xmm3 +.L_2TAG_PACKET_2.0.2: + mulsd %xmm3, %xmm7 + paddd %xmm4, %xmm0 + xorpd %xmm4, %xmm4 + movl $14336, %ecx + pinsrw $3, %ecx, %xmm4 + orpd %xmm2, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm1, %xmm5 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm1 + paddd %xmm4, %xmm0 + mulsd %xmm0, %xmm5 + movl $16352, %ecx + subl %ecx, %eax + cvtsi2sdl %eax, %xmm4 + mulsd %xmm0, %xmm7 + mulsd %xmm0, %xmm1 + movsd 2064(%ebx), %xmm6 + movapd 2080(%ebx), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd (%ebx,%edx), %xmm0 + movapd 2096(%ebx), %xmm2 + addsd %xmm5, %xmm1 + movapd %xmm1, %xmm5 + addsd %xmm7, %xmm1 + subsd %xmm1, %xmm5 + addsd %xmm5, %xmm7 + mulsd %xmm4, %xmm6 + mulsd 2072(%ebx), %xmm4 + mulsd %xmm1, %xmm3 + pshufd $68, %xmm1, %xmm5 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm2 + mulpd %xmm5, %xmm5 + pshufd $228, %xmm0, %xmm6 + addsd %xmm1, %xmm0 + addpd 2112(%ebx), %xmm2 + mulpd %xmm5, %xmm3 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm2 + addsd %xmm7, %xmm4 + mulsd %xmm1, %xmm7 + addsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm6 + mulsd %xmm5, %xmm5 + addsd %xmm6, %xmm4 + subsd %xmm7, %xmm1 + addpd %xmm3, %xmm2 + addsd %xmm4, %xmm1 + mulpd %xmm5, %xmm2 + addsd %xmm2, %xmm1 + pshufd $238, %xmm2, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_0.0.2: + movsd 112(%esp), %xmm0 + movapd %xmm0, %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_4.0.2 + cmpl $0, %eax + je .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_6.0.2: + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_7.0.2: + ja .L_2TAG_PACKET_6.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_6.0.2 + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_4.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_7.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_8.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + movl $141, %edx + mulsd %xmm1, %xmm0 +.L_2TAG_PACKET_9.0.2: + movsd %xmm0, (%esp) + movsd 112(%esp), %xmm0 + fldl (%esp) + jmp .L_2TAG_PACKET_10.0.2 +.L_2TAG_PACKET_5.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $140, %edx + jmp .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_1.0.2: + movsd 112(%esp), %xmm0 + cmpl $15504, %ecx + jb .L_2TAG_PACKET_11.0.2 + movapd 2144(%ebx), %xmm1 + pshufd $68, %xmm0, %xmm0 + movapd 2160(%ebx), %xmm2 + pshufd $68, %xmm0, %xmm4 + movapd 2176(%ebx), %xmm3 + mulpd %xmm0, %xmm1 + xorpd %xmm6, %xmm6 + mulpd %xmm4, %xmm4 + addpd %xmm2, %xmm1 + pshufd $68, %xmm4, %xmm5 + mulpd %xmm0, %xmm4 + movl $49120, %eax + pinsrw $3, %eax, %xmm6 + mulpd %xmm0, %xmm1 + mulsd %xmm4, %xmm4 + addpd %xmm3, %xmm1 + mulsd %xmm6, %xmm5 + mulpd %xmm4, %xmm1 + pshufd $238, %xmm1, %xmm7 + addsd %xmm7, %xmm1 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_11.0.2: + cmpl $16, %ecx + jb .L_2TAG_PACKET_12.0.2 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_12.0.2: + movapd %xmm0, %xmm1 + mulsd %xmm1, %xmm1 + jmp .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_3.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_10.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(log1p) +# -- End log1p + +# Start file scope ASM +.weak log1pl +.equ log1pl, log1p +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 4277811200 + .long 1072049730 + .long 2479318832 + .long 1026487127 + .long 2854492160 + .long 1072033410 + .long 215631550 + .long 1025638968 + .long 1547061248 + .long 1072017216 + .long 2886781435 + .long 1026423395 + .long 649825280 + .long 1072001146 + .long 4281533405 + .long 1024038923 + .long 646346752 + .long 1071985198 + .long 1562735921 + .long 1023790276 + .long 2203734016 + .long 1071969370 + .long 1838397691 + .long 3173936209 + .long 1872169984 + .long 1071953661 + .long 3981202460 + .long 1022325013 + .long 669557760 + .long 1071938069 + .long 4182597802 + .long 3173174122 + .long 4076413952 + .long 1071922591 + .long 1209029111 + .long 3170736207 + .long 556125184 + .long 1071907228 + .long 821086028 + .long 3173437049 + .long 204914688 + .long 1071891976 + .long 2097025986 + .long 3171071798 + .long 387545088 + .long 1071876834 + .long 3142936996 + .long 3173092218 + .long 2912783360 + .long 1071861800 + .long 2502420140 + .long 1024505919 + .long 1144260608 + .long 1071846874 + .long 3315658140 + .long 3173469843 + .long 1471209472 + .long 1071832053 + .long 129621009 + .long 3172443877 + .long 1829683200 + .long 1071817336 + .long 3885467693 + .long 1025535275 + .long 288676864 + .long 1071802722 + .long 86139472 + .long 3171639793 + .long 3636378624 + .long 1071788208 + .long 1850238587 + .long 1024654342 + .long 1606817792 + .long 1071773795 + .long 3388899795 + .long 3173675586 + .long 1236164608 + .long 1071759480 + .long 3983599207 + .long 1020046558 + .long 1089616896 + .long 1071745262 + .long 4171974224 + .long 1024773198 + .long 4143093760 + .long 1071731139 + .long 2727587401 + .long 3173965207 + .long 600267776 + .long 1071717112 + .long 3147685042 + .long 3173353031 + .long 2249313280 + .long 1071703177 + .long 125835074 + .long 1025255832 + .long 3805303808 + .long 1071689334 + .long 2289991207 + .long 1025460331 + .long 87278592 + .long 1071675583 + .long 1106114045 + .long 1025933602 + .long 3195405312 + .long 1071661920 + .long 3885316576 + .long 3171206239 + .long 3853649920 + .long 1071648346 + .long 2977069852 + .long 3171236771 + .long 2944026624 + .long 1071625048 + .long 1008093493 + .long 1023444474 + .long 3993180160 + .long 1071598247 + .long 1862355595 + .long 1024642533 + .long 1454641152 + .long 1071571617 + .long 1514603089 + .long 1026500596 + .long 3286085632 + .long 1071545154 + .long 1400028424 + .long 3173279056 + .long 438773760 + .long 1071518858 + .long 120727864 + .long 3172148914 + .long 1212979200 + .long 1071492725 + .long 1625055594 + .long 3172901933 + .long 1189017600 + .long 1071466754 + .long 3920062376 + .long 1025727407 + .long 403064832 + .long 1071440943 + .long 1053271728 + .long 3171391427 + .long 3343210496 + .long 1071415289 + .long 3243395502 + .long 3173627613 + .long 1765777408 + .long 1071389792 + .long 2145968512 + .long 1026354304 + .long 461430784 + .long 1071364449 + .long 4094322285 + .long 1026021467 + .long 71706624 + .long 1071339258 + .long 763632021 + .long 1024496933 + .long 1380503552 + .long 1071314217 + .long 1383547992 + .long 3173088453 + .long 1015732224 + .long 1071289325 + .long 3198646877 + .long 1025390322 + .long 35977216 + .long 1071264580 + .long 2141026805 + .long 1025754693 + .long 3927306240 + .long 1071239979 + .long 282116272 + .long 3173394334 + .long 1125341184 + .long 1071215523 + .long 2768427504 + .long 3172279059 + .long 1666971648 + .long 1071191208 + .long 786837629 + .long 3172427445 + .long 2827694080 + .long 1071167033 + .long 3857122416 + .long 3173014241 + .long 2003683328 + .long 1071142997 + .long 859010954 + .long 1026545007 + .long 1004017664 + .long 1071119098 + .long 3356644970 + .long 3173458064 + .long 1753020416 + .long 1071095334 + .long 788338552 + .long 1026157693 + .long 1992718336 + .long 1071071704 + .long 1239179443 + .long 1026394889 + .long 3870234624 + .long 1071048206 + .long 2082614663 + .long 1024926053 + .long 1050437632 + .long 1071024840 + .long 660007840 + .long 1025548499 + .long 188395520 + .long 1071001603 + .long 3878792704 + .long 3173889571 + .long 3747176448 + .long 1070978493 + .long 144991708 + .long 3171552042 + .long 1405669376 + .long 1070955511 + .long 3999088879 + .long 1025486317 + .long 121151488 + .long 1070932654 + .long 2170865497 + .long 1026473584 + .long 2652319744 + .long 1070909920 + .long 453695652 + .long 3173916809 + .long 3262236672 + .long 1070887309 + .long 157800053 + .long 3173984206 + .long 601221120 + .long 1070864820 + .long 3968917661 + .long 1023992886 + .long 1999843328 + .long 1070842450 + .long 3053895004 + .long 1024998228 + .long 1992167424 + .long 1070820199 + .long 2968614856 + .long 1024552653 + .long 3788726272 + .long 1070798065 + .long 3542170808 + .long 3173573242 + .long 2094829568 + .long 1070776048 + .long 1246758132 + .long 1026202874 + .long 288675840 + .long 1070754146 + .long 3747328950 + .long 1026331585 + .long 1829681152 + .long 1070732357 + .long 3125197546 + .long 1024100318 + .long 1666869248 + .long 1070710681 + .long 1363656119 + .long 1026336493 + .long 3417110528 + .long 1070689116 + .long 4154791553 + .long 1026267853 + .long 2183653376 + .long 1070667662 + .long 1671819292 + .long 3173785870 + .long 1734434816 + .long 1070646317 + .long 373091049 + .long 1025972363 + .long 1615681536 + .long 1070625080 + .long 384650897 + .long 1022926043 + .long 1445382144 + .long 1070603950 + .long 344320330 + .long 3172397196 + .long 1823715328 + .long 1070569756 + .long 3389841200 + .long 1025231852 + .long 3839688704 + .long 1070527917 + .long 1706790417 + .long 3167363349 + .long 4293332992 + .long 1070486286 + .long 1614935088 + .long 1019351591 + .long 2966720512 + .long 1070444861 + .long 4145393717 + .long 3173711658 + .long 4066729984 + .long 1070403639 + .long 1974925028 + .long 3171437182 + .long 3337621504 + .long 1070362619 + .long 3314953170 + .long 3169971314 + .long 943448064 + .long 1070321799 + .long 1498682038 + .long 3173862340 + .long 1465634816 + .long 1070281176 + .long 1319952810 + .long 3171693965 + .long 1015734272 + .long 1070240749 + .long 1347821929 + .long 3173544515 + .long 118001664 + .long 1070200516 + .long 1751482746 + .long 1026134093 + .long 3707174912 + .long 1070160474 + .long 1486946159 + .long 1023930920 + .long 3946381312 + .long 1070120623 + .long 2867408081 + .long 3171368276 + .long 1699848192 + .long 1070080961 + .long 2590187139 + .long 1025379803 + .long 2235846656 + .long 1070041485 + .long 1888568069 + .long 3172754960 + .long 2339729408 + .long 1070002194 + .long 3852214753 + .long 3173323149 + .long 3196850176 + .long 1069963086 + .long 742141560 + .long 1025101707 + .long 1800683520 + .long 1069924160 + .long 3949500444 + .long 3172102179 + .long 3835801600 + .long 1069885413 + .long 3848895943 + .long 1025913832 + .long 2201202688 + .long 1069846845 + .long 1425913464 + .long 1025868665 + .long 2778279936 + .long 1069808453 + .long 2120889677 + .long 3173831128 + .long 2954203136 + .long 1069770236 + .long 592147081 + .long 1019621288 + .long 210141184 + .long 1069732193 + .long 3414275233 + .long 1023647084 + .long 709476352 + .long 1069694321 + .long 2413027164 + .long 1024462115 + .long 2116284416 + .long 1069656619 + .long 1144559924 + .long 1026336654 + .long 2183651328 + .long 1069619086 + .long 3459057650 + .long 1025634168 + .long 3047047168 + .long 1069581720 + .long 1879674924 + .long 3173508573 + .long 970711040 + .long 1069541521 + .long 1335954173 + .long 3173332182 + .long 2198478848 + .long 1069467449 + .long 2951103968 + .long 3173892200 + .long 1669611520 + .long 1069393703 + .long 531044147 + .long 1025149248 + .long 29114368 + .long 1069320280 + .long 3327831251 + .long 1025918673 + .long 2376949760 + .long 1069247176 + .long 737634533 + .long 3172176000 + .long 1085390848 + .long 1069174390 + .long 3108243400 + .long 3171828406 + .long 1566130176 + .long 1069101918 + .long 985483226 + .long 1025708380 + .long 792780800 + .long 1069029758 + .long 4184866295 + .long 1024426204 + .long 183156736 + .long 1068957907 + .long 2845699378 + .long 1022107277 + .long 1301782528 + .long 1068886362 + .long 1012735262 + .long 3173804294 + .long 1562411008 + .long 1068815121 + .long 2197086703 + .long 3170187813 + .long 2815549440 + .long 1068744181 + .long 2782613207 + .long 1026345054 + .long 2756124672 + .long 1068673540 + .long 2929486205 + .long 3173037800 + .long 3511050240 + .long 1068603195 + .long 1443733147 + .long 3173331549 + .long 3047047168 + .long 1068533144 + .long 1879674924 + .long 3172459997 + .long 3221667840 + .long 1068427825 + .long 1338588027 + .long 3171815742 + .long 3453861888 + .long 1068288883 + .long 1205348359 + .long 3172624626 + .long 3506110464 + .long 1068150514 + .long 893105198 + .long 1025571866 + .long 346013696 + .long 1068012714 + .long 3495569021 + .long 3172563349 + .long 4074029056 + .long 1067875476 + .long 3961106338 + .long 3171065595 + .long 3559784448 + .long 1067738798 + .long 1975385384 + .long 3173783155 + .long 797769728 + .long 1067602675 + .long 3760305787 + .long 1026047642 + .long 2313633792 + .long 1067467101 + .long 1559353171 + .long 1023480256 + .long 3960766464 + .long 1067213778 + .long 1067365107 + .long 1025865926 + .long 684261376 + .long 1066944805 + .long 844762164 + .long 3173687482 + .long 630718464 + .long 1066676905 + .long 2458269694 + .long 1024033081 + .long 1486061568 + .long 1066410070 + .long 115537874 + .long 3173243995 + .long 2743664640 + .long 1065886792 + .long 3665098304 + .long 3173471607 + .long 1971912704 + .long 1065357333 + .long 2577214440 + .long 3171993451 + .long 1498939392 + .long 1064306693 + .long 3409036923 + .long 1025599151 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 4277811200 + .long 1067855426 + .long 2479318832 + .long 1022292823 + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1030730101 + .long 3217380702 + .long 1431655765 + .long 1070945621 + .long 2576980378 + .long 1070176665 + .long 0 + .long 3219128320 + .long 0 + .long 4294959104 + .long 0 + .long 4294959104 + .long 0 + .long 3217031168 + .long 2576980378 + .long 1070176665 + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1431655765 + .long 3217380693 + .long 1431655765 + .long 1070945621 + .type static_const_table,@object + .size static_const_table,2192 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_sin.S b/libm/x86/s_sin.S new file mode 100644 index 0000000..a0578be --- /dev/null +++ b/libm/x86/s_sin.S @@ -0,0 +1,908 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// 1. RANGE REDUCTION +// +// We perform an initial range reduction from X to r with +// +// X =~= N * pi/32 + r +// +// so that |r| <= pi/64 + epsilon. We restrict inputs to those +// where |N| <= 932560. Beyond this, the range reduction is +// insufficiently accurate. For extremely small inputs, +// denormalization can occur internally, impacting performance. +// This means that the main path is actually only taken for +// 2^-252 <= |X| < 90112. +// +// To avoid branches, we perform the range reduction to full +// accuracy each time. +// +// X - N * (P_1 + P_2 + P_3) +// +// where P_1 and P_2 are 32-bit numbers (so multiplication by N +// is exact) and P_3 is a 53-bit number. Together, these +// approximate pi well enough for all cases in the restricted +// range. +// +// The main reduction sequence is: +// +// y = 32/pi * x +// N = integer(y) +// (computed by adding and subtracting off SHIFTER) +// +// m_1 = N * P_1 +// m_2 = N * P_2 +// r_1 = x - m_1 +// r = r_1 - m_2 +// (this r can be used for most of the calculation) +// +// c_1 = r_1 - r +// m_3 = N * P_3 +// c_2 = c_1 - m_2 +// c = c_2 - m_3 +// +// 2. MAIN ALGORITHM +// +// The algorithm uses a table lookup based on B = M * pi / 32 +// where M = N mod 64. The stored values are: +// sigma closest power of 2 to cos(B) +// C_hl 53-bit cos(B) - sigma +// S_hi + S_lo 2 * 53-bit sin(B) +// +// The computation is organized as follows: +// +// sin(B + r + c) = [sin(B) + sigma * r] + +// r * (cos(B) - sigma) + +// sin(B) * [cos(r + c) - 1] + +// cos(B) * [sin(r + c) - r] +// +// which is approximately: +// +// [S_hi + sigma * r] + +// C_hl * r + +// S_lo + S_hi * [(cos(r) - 1) - r * c] + +// (C_hl + sigma) * [(sin(r) - r) + c] +// +// and this is what is actually computed. We separate this sum +// into four parts: +// +// hi + med + pols + corr +// +// where +// +// hi = S_hi + sigma r +// med = C_hl * r +// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r) +// corr = S_lo + c * ((C_hl + sigma) - S_hi * r) +// +// 3. POLYNOMIAL +// +// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) * +// (sin(r) - r) can be rearranged freely, since it is quite +// small, so we exploit parallelism to the fullest. +// +// psc4 = SC_4 * r_1 +// msc4 = psc4 * r +// r2 = r * r +// msc2 = SC_2 * r2 +// r4 = r2 * r2 +// psc3 = SC_3 + msc4 +// psc1 = SC_1 + msc2 +// msc3 = r4 * psc3 +// sincospols = psc1 + msc3 +// pols = sincospols * +// +// +// 4. CORRECTION TERM +// +// This is where the "c" component of the range reduction is +// taken into account; recall that just "r" is used for most of +// the calculation. +// +// -c = m_3 - c_2 +// -d = S_hi * r - (C_hl + sigma) +// corr = -c * -d + S_lo +// +// 5. COMPENSATED SUMMATIONS +// +// The two successive compensated summations add up the high +// and medium parts, leaving just the low parts to add up at +// the end. +// +// rs = sigma * r +// res_int = S_hi + rs +// k_0 = S_hi - res_int +// k_2 = k_0 + rs +// med = C_hl * r +// res_hi = res_int + med +// k_1 = res_int - res_hi +// k_3 = k_1 + med +// +// 6. FINAL SUMMATION +// +// We now add up all the small parts: +// +// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3 +// +// Now the overall result is just: +// +// res_hi + res_lo +// +// 7. SMALL ARGUMENTS +// +// If |x| < SNN (SNN meaning the smallest normal number), we +// simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we +// do 2^-55 * (2^55 * x - x). +// +// Special cases: +// sin(NaN) = quiet NaN, and raise invalid exception +// sin(INF) = NaN and raise invalid exception +// sin(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin sin +ENTRY(sin) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 56(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + pextrw $3, %xmm0, %eax + andl $32767, %eax + subl $12336, %eax + cmpl $4293, %eax + ja .L_2TAG_PACKET_0.0.2 + movsd 2160(%ebx), %xmm1 + mulsd %xmm0, %xmm1 + movsd 2272(%ebx), %xmm5 + movapd 2256(%ebx), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + movsd 2128(%ebx), %xmm3 + movapd 2112(%ebx), %xmm2 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %edx + cvtsi2sdl %edx, %xmm1 + mulsd %xmm1, %xmm3 + unpcklpd %xmm1, %xmm1 + addl $1865216, %edx + movapd %xmm0, %xmm4 + andl $63, %edx + movapd 2096(%ebx), %xmm5 + lea (%ebx), %eax + shll $5, %edx + addl %edx, %eax + mulpd %xmm1, %xmm2 + subsd %xmm3, %xmm0 + mulsd 2144(%ebx), %xmm1 + subsd %xmm3, %xmm4 + movsd 8(%eax), %xmm7 + unpcklpd %xmm0, %xmm0 + movapd %xmm4, %xmm3 + subsd %xmm2, %xmm4 + mulpd %xmm0, %xmm5 + subpd %xmm2, %xmm0 + movapd 2064(%ebx), %xmm6 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm2, %xmm3 + movapd (%eax), %xmm2 + subsd %xmm3, %xmm1 + movsd 24(%eax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd 2080(%ebx), %xmm5 + mulsd (%eax), %xmm4 + addpd 2048(%ebx), %xmm6 + mulpd %xmm0, %xmm5 + movapd %xmm3, %xmm0 + addsd 8(%eax), %xmm3 + mulpd %xmm7, %xmm1 + movapd %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movsd 8(%eax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%eax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm0, %xmm5 + addsd %xmm7, %xmm3 + addsd %xmm5, %xmm1 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + unpckhpd %xmm6, %xmm6 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm4 + movsd %xmm4, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + jg .L_2TAG_PACKET_2.0.2 + shrl $4, %eax + cmpl $268434685, %eax + jne .L_2TAG_PACKET_3.0.2 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_3.0.2: + movsd 2192(%ebx), %xmm3 + mulsd %xmm0, %xmm3 + subsd %xmm0, %xmm3 + mulsd 2208(%ebx), %xmm3 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movl 132(%esp), %eax + andl $2146435072, %eax + cmpl $2146435072, %eax + je .L_2TAG_PACKET_4.0.2 + subl $32, %esp + movsd %xmm0, (%esp) + lea 40(%esp), %eax + movl %eax, 8(%esp) + movl $2, %eax + movl %eax, 12(%esp) + call __libm_sincos_huge + addl $32, %esp + fldl 16(%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_4.0.2: + fldl 128(%esp) + fmull 2240(%ebx) +.L_2TAG_PACKET_1.0.2: + movl 56(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(sin) +# -- End sin + +# Start file scope ASM +.weak sinl +.equ sinl, sin +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 1072693248 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 1072693248 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 1071644672 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 1071644672 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 1070596096 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 1070596096 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 1069547520 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 3217031168 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 3218079744 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 3218079744 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 3219128320 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 3219128320 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 3220176896 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 3220176896 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 3219128320 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 3219128320 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 3218079744 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 3218079744 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 3217031168 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 1069547520 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 1070596096 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 1070596096 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 1071644672 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 1071644672 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 1072693248 + .long 1431655765 + .long 3217380693 + .long 0 + .long 3219128320 + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1067799893 + .long 436314138 + .long 3207201184 + .long 381774871 + .long 3210133868 + .long 2773927732 + .long 1053236707 + .long 436314138 + .long 1056571808 + .long 442499072 + .long 1032893537 + .long 442499072 + .long 1032893537 + .long 1413480448 + .long 1069097467 + .long 0 + .long 0 + .long 771977331 + .long 996350346 + .long 0 + .long 0 + .long 1841940611 + .long 1076125488 + .long 0 + .long 0 + .long 0 + .long 1127743488 + .long 0 + .long 0 + .long 0 + .long 1130364928 + .long 0 + .long 0 + .long 0 + .long 1015021568 + .long 0 + .long 0 + .long 4294967295 + .long 1072693247 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .type static_const_table,@object + .size static_const_table,2288 + .data + .hidden __libm_sincos_huge + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_tan.S b/libm/x86/s_tan.S new file mode 100644 index 0000000..621c94a --- /dev/null +++ b/libm/x86/s_tan.S @@ -0,0 +1,1767 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Polynomials coefficients and other constants. +// +// Note that in this algorithm, there is a different polynomial for +// each breakpoint, so there are 32 sets of polynomial coefficients +// as well as 32 instances of the other constants. +// +// The polynomial coefficients and constants are offset from the start +// of the main block as follows: +// +// 0: c8 | c0 +// 16: c9 | c1 +// 32: c10 | c2 +// 48: c11 | c3 +// 64: c12 | c4 +// 80: c13 | c5 +// 96: c14 | c6 +// 112: c15 | c7 +// 128: T_hi +// 136: T_lo +// 144: Sigma +// 152: T_hl +// 160: Tau +// 168: Mask +// 176: (end of block) +// +// The total table size is therefore 5632 bytes. +// +// Note that c0 and c1 are always zero. We could try storing +// other constants here, and just loading the low part of the +// SIMD register in these cases, after ensuring the high part +// is zero. +// +// The higher terms of the polynomial are computed in the *low* +// part of the SIMD register. This is so we can overlap the +// multiplication by r^8 and the unpacking of the other part. +// +// The constants are: +// T_hi + T_lo = accurate constant term in power series +// Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit) +// Tau = multiplier for the reciprocal, always -1 or 0 +// +// The basic reconstruction formula using these constants is: +// +// High = tau * recip_hi + t_hi +// Med = (sgn * r + t_hl * r)_hi +// Low = (sgn * r + t_hl * r)_lo + +// tau * recip_lo + T_lo + (T_hl + sigma) * c + pol +// +// where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15 +// +// (c0 = c1 = 0, but using them keeps SIMD regularity) +// +// We then do a compensated sum High + Med, add the low parts together +// and then do the final sum. +// +// Here recip_hi + recip_lo is an accurate reciprocal of the remainder +// modulo pi/2 +// +// Special cases: +// tan(NaN) = quiet NaN, and raise invalid exception +// tan(INF) = NaN and raise invalid exception +// tan(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin tan +ENTRY(tan) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $120, %esp + movl %ebx, 56(%esp) + call static_func + movl %eax, %ebx + movsd 128(%esp), %xmm0 + pextrw $3, %xmm0, %eax + andl $32767, %eax + subl $14368, %eax + cmpl $2216, %eax + ja .L_2TAG_PACKET_0.0.2 + movapd 5840(%ebx), %xmm5 + movapd 5856(%ebx), %xmm6 + unpcklpd %xmm0, %xmm0 + movapd 5712(%ebx), %xmm4 + andpd %xmm0, %xmm4 + movapd 5632(%ebx), %xmm1 + mulpd %xmm0, %xmm1 + orpd %xmm4, %xmm5 + addpd %xmm5, %xmm1 + movapd %xmm1, %xmm7 + unpckhpd %xmm7, %xmm7 + cvttsd2si %xmm7, %edx + cvttpd2dq %xmm1, %xmm1 + cvtdq2pd %xmm1, %xmm1 + mulpd %xmm6, %xmm1 + movapd 5664(%ebx), %xmm3 + movsd 5728(%ebx), %xmm5 + addl $469248, %edx + movapd 5680(%ebx), %xmm4 + mulpd %xmm1, %xmm3 + andl $31, %edx + mulsd %xmm1, %xmm5 + movl %edx, %ecx + mulpd %xmm1, %xmm4 + shll $1, %ecx + subpd %xmm3, %xmm0 + mulpd 5696(%ebx), %xmm1 + addl %ecx, %edx + shll $2, %ecx + addl %ecx, %edx + addsd %xmm0, %xmm5 + movapd %xmm0, %xmm2 + subpd %xmm4, %xmm0 + movsd 5744(%ebx), %xmm6 + shll $4, %edx + lea (%ebx), %eax + andpd 5776(%ebx), %xmm5 + movapd %xmm0, %xmm3 + addl %edx, %eax + subpd %xmm0, %xmm2 + unpckhpd %xmm0, %xmm0 + divsd %xmm5, %xmm6 + subpd %xmm4, %xmm2 + movapd 16(%eax), %xmm7 + subsd %xmm5, %xmm3 + mulpd %xmm0, %xmm7 + subpd %xmm1, %xmm2 + movapd 48(%eax), %xmm1 + mulpd %xmm0, %xmm1 + movapd 96(%eax), %xmm4 + mulpd %xmm0, %xmm4 + addsd %xmm3, %xmm2 + movapd %xmm0, %xmm3 + mulpd %xmm0, %xmm0 + addpd (%eax), %xmm7 + addpd 32(%eax), %xmm1 + mulpd %xmm0, %xmm1 + addpd 80(%eax), %xmm4 + addpd %xmm1, %xmm7 + movapd 112(%eax), %xmm1 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm0 + addpd %xmm1, %xmm4 + movapd 64(%eax), %xmm1 + mulpd %xmm0, %xmm1 + addpd %xmm1, %xmm7 + movapd %xmm3, %xmm1 + mulpd %xmm0, %xmm3 + mulsd %xmm0, %xmm0 + mulpd 144(%eax), %xmm1 + mulpd %xmm3, %xmm4 + movapd %xmm1, %xmm3 + addpd %xmm4, %xmm7 + movapd %xmm1, %xmm4 + mulsd %xmm7, %xmm0 + unpckhpd %xmm7, %xmm7 + addsd %xmm7, %xmm0 + unpckhpd %xmm1, %xmm1 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + movapd %xmm2, %xmm4 + movsd 144(%eax), %xmm7 + unpckhpd %xmm2, %xmm2 + addsd 152(%eax), %xmm7 + mulsd %xmm2, %xmm7 + addsd 136(%eax), %xmm7 + addsd %xmm1, %xmm7 + addsd %xmm7, %xmm0 + movsd 5744(%ebx), %xmm7 + mulsd %xmm6, %xmm4 + movsd 168(%eax), %xmm2 + andpd %xmm6, %xmm2 + mulsd %xmm2, %xmm5 + mulsd 160(%eax), %xmm6 + subsd %xmm5, %xmm7 + subsd 128(%eax), %xmm2 + subsd %xmm4, %xmm7 + mulsd %xmm6, %xmm7 + movapd %xmm3, %xmm4 + subsd %xmm2, %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm4 + addsd %xmm4, %xmm0 + subsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + movsd %xmm0, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + jg .L_2TAG_PACKET_2.0.2 + shrl $4, %eax + cmpl $268434558, %eax + jne .L_2TAG_PACKET_3.0.2 + movapd %xmm0, %xmm3 + mulsd 5808(%ebx), %xmm3 +.L_2TAG_PACKET_3.0.2: + movsd 5792(%ebx), %xmm3 + mulsd %xmm0, %xmm3 + addsd %xmm0, %xmm3 + mulsd 5808(%ebx), %xmm3 + movsd %xmm3, (%esp) + fldl (%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movq 5712(%ebx), %xmm7 + andpd %xmm0, %xmm7 + xorpd %xmm0, %xmm7 + ucomisd 5760(%ebx), %xmm7 + je .L_2TAG_PACKET_4.0.2 + subl $32, %esp + movsd %xmm0, (%esp) + lea 40(%esp), %eax + movl %eax, 8(%esp) + movl $2, %eax + movl %eax, 12(%esp) + call __libm_tancot_huge + addl $32, %esp + fldl 8(%esp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_4.0.2: + movq %xmm0, (%esp) + fldl (%esp) + fsubl (%esp) +.L_2TAG_PACKET_1.0.2: + movl 56(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(tan) +# -- End tan + +# Start file scope ASM +.weak tanl +.equ tanl, tan +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 0 + .long 0 + .long 0 + .long 2284589306 + .long 1066820852 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1441186365 + .long 1065494243 + .long 1431655765 + .long 1070945621 + .long 0 + .long 0 + .long 0 + .long 0 + .long 236289504 + .long 1064135997 + .long 286331153 + .long 1069617425 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1160476131 + .long 1062722102 + .long 463583772 + .long 1068212666 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1313038235 + .long 1066745731 + .long 0 + .long 0 + .long 1013878342 + .long 1067152618 + .long 0 + .long 0 + .long 3663426833 + .long 1065725283 + .long 3693284251 + .long 1069118808 + .long 650852232 + .long 1065882376 + .long 1996245381 + .long 1071000265 + .long 2008746170 + .long 1064664197 + .long 3055842593 + .long 1068578846 + .long 1495406348 + .long 1064652437 + .long 2269530157 + .long 1069711235 + .long 285563696 + .long 1063576465 + .long 1046897440 + .long 1067705865 + .long 233429731 + .long 1063453151 + .long 522045958 + .long 1068476590 + .long 2354785698 + .long 1069102779 + .long 1317599141 + .long 1012432133 + .long 0 + .long 1072693248 + .long 2828230105 + .long 1065606626 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1512545955 + .long 1068119047 + .long 0 + .long 0 + .long 1127048698 + .long 1067909459 + .long 0 + .long 0 + .long 2300200450 + .long 1067254767 + .long 3593250296 + .long 1070233561 + .long 3009365544 + .long 1066902117 + .long 1127373050 + .long 1071173457 + .long 3046103305 + .long 1066371299 + .long 24583402 + .long 1069723988 + .long 4082511758 + .long 1065914199 + .long 3223889699 + .long 1070020367 + .long 548927984 + .long 1065415756 + .long 558065897 + .long 1068949418 + .long 680073315 + .long 1064940726 + .long 388873200 + .long 1068944270 + .long 3763679576 + .long 1070167541 + .long 1497360404 + .long 1009710547 + .long 0 + .long 1072693248 + .long 64931152 + .long 1067729411 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2467582782 + .long 1069256389 + .long 0 + .long 0 + .long 162150096 + .long 1068946420 + .long 0 + .long 0 + .long 3702794237 + .long 1068579152 + .long 3631919291 + .long 1070936926 + .long 3456821413 + .long 1068217218 + .long 2031366438 + .long 1071495745 + .long 1596664020 + .long 1067799281 + .long 1509038701 + .long 1070601643 + .long 583171477 + .long 1067510148 + .long 3785344682 + .long 1070618476 + .long 2402036048 + .long 1067075736 + .long 3233018412 + .long 1069913186 + .long 411280568 + .long 1066710556 + .long 1065584192 + .long 1069747896 + .long 895247324 + .long 1070819848 + .long 500078909 + .long 3161288781 + .long 0 + .long 1072693248 + .long 729983843 + .long 1068994194 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1458794562 + .long 1070398550 + .long 0 + .long 0 + .long 2857777489 + .long 1070137637 + .long 0 + .long 0 + .long 1024359517 + .long 1069876531 + .long 2616040238 + .long 1071582937 + .long 1609024636 + .long 1069675088 + .long 2529240549 + .long 1071836633 + .long 1510128600 + .long 1069440113 + .long 2251697184 + .long 1071253687 + .long 1262761453 + .long 1069142850 + .long 1263091857 + .long 1071190461 + .long 3043383486 + .long 1068885191 + .long 2476932470 + .long 1070842002 + .long 3659995028 + .long 1068669200 + .long 855891755 + .long 1070696894 + .long 2583490354 + .long 1071284857 + .long 3062633575 + .long 1014008623 + .long 0 + .long 1072693248 + .long 2550940471 + .long 1069938201 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3422807297 + .long 1071640847 + .long 0 + .long 0 + .long 1151658053 + .long 1071494715 + .long 0 + .long 0 + .long 929607071 + .long 1071346340 + .long 1037049034 + .long 1072037305 + .long 2786928657 + .long 1071215282 + .long 1447406859 + .long 1072265209 + .long 3490952107 + .long 1071090851 + .long 3205232916 + .long 1071968658 + .long 1297344304 + .long 1070977120 + .long 1066110976 + .long 1071946035 + .long 3803721480 + .long 1070871082 + .long 1496754229 + .long 1071807201 + .long 2982550683 + .long 1070773243 + .long 4014441989 + .long 1071736222 + .long 419968236 + .long 1071717047 + .long 3451266538 + .long 3163444811 + .long 0 + .long 1072693248 + .long 2960267235 + .long 1070745841 + .long 0 + .long 0 + .long 0 + .long 0 + .long 724322768 + .long 1072881308 + .long 0 + .long 0 + .long 643153048 + .long 1072905816 + .long 0 + .long 0 + .long 4285079458 + .long 1072928558 + .long 3912524733 + .long 1072622983 + .long 118362272 + .long 1072952754 + .long 4107767972 + .long 1072827408 + .long 2689502883 + .long 1072976922 + .long 946523347 + .long 1072772766 + .long 573204189 + .long 1073001761 + .long 581531518 + .long 1072826391 + .long 1386236526 + .long 1073026959 + .long 3718905905 + .long 1072832823 + .long 1145558140 + .long 1073052673 + .long 513572637 + .long 1072861969 + .long 716700048 + .long 1071997368 + .long 547126769 + .long 1015523525 + .long 0 + .long 1072693248 + .long 1097907398 + .long 1071420120 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3349892442 + .long 1074290212 + .long 0 + .long 0 + .long 3913197405 + .long 1074501181 + .long 0 + .long 0 + .long 2494034522 + .long 1074739170 + .long 1264738763 + .long 1073084804 + .long 1520293906 + .long 1074899632 + .long 1958936600 + .long 1073411493 + .long 2133649635 + .long 1075052171 + .long 4270740730 + .long 1073574708 + .long 1728930189 + .long 1075224844 + .long 1303998552 + .long 1073799186 + .long 618611933 + .long 1075420255 + .long 1769828046 + .long 1073938542 + .long 2200537986 + .long 1075641421 + .long 433361110 + .long 1074105369 + .long 719595600 + .long 1072317184 + .long 294527206 + .long 3162140088 + .long 0 + .long 1073741824 + .long 3811788216 + .long 3218400550 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1704352102 + .long 1075943001 + .long 0 + .long 0 + .long 2284589306 + .long 1076258036 + .long 0 + .long 0 + .long 2211264291 + .long 1076659010 + .long 0 + .long 1073741824 + .long 1441186365 + .long 1077028579 + .long 1431655765 + .long 1074091349 + .long 876943673 + .long 1077353622 + .long 2863311531 + .long 1074440874 + .long 236289504 + .long 1077767485 + .long 286331153 + .long 1074860305 + .long 2805473311 + .long 1078115278 + .long 95443718 + .long 1075163227 + .long 1160476131 + .long 1078450742 + .long 463583772 + .long 1075552698 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 1073741824 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1330165971 + .long 3207850745 + .long 0 + .long 0 + .long 217536623 + .long 1059109098 + .long 0 + .long 0 + .long 3492120849 + .long 3205151475 + .long 602185705 + .long 3215678092 + .long 760422958 + .long 1056312597 + .long 555127889 + .long 1067545266 + .long 3139784124 + .long 3202470837 + .long 3690544014 + .long 3213150171 + .long 95707915 + .long 1053635428 + .long 4003114407 + .long 1064581412 + .long 2034926231 + .long 3199711161 + .long 3759536023 + .long 3210559989 + .long 3826928214 + .long 1050893819 + .long 3837960785 + .long 1061790379 + .long 1526325248 + .long 3217967566 + .long 2356426521 + .long 1025423456 + .long 0 + .long 0 + .long 457728975 + .long 1071088276 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1398462608 + .long 3207303968 + .long 0 + .long 0 + .long 26205983 + .long 1058461213 + .long 0 + .long 0 + .long 56226238 + .long 3204528612 + .long 2754706541 + .long 3215359511 + .long 2187799823 + .long 1055634437 + .long 790323742 + .long 1067402587 + .long 1372385848 + .long 3201651479 + .long 4097292716 + .long 3212856302 + .long 3348210357 + .long 1052830099 + .long 2442796466 + .long 1064337602 + .long 862608142 + .long 3198830754 + .long 170296152 + .long 3210060867 + .long 3755571428 + .long 1049933343 + .long 3614866008 + .long 1061361670 + .long 719978496 + .long 3217669096 + .long 1998842465 + .long 3174703977 + .long 0 + .long 0 + .long 3749156607 + .long 1071048258 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3120498638 + .long 3206749304 + .long 0 + .long 0 + .long 2773578114 + .long 1058009312 + .long 0 + .long 0 + .long 2030783676 + .long 3203817873 + .long 2223654598 + .long 3215071936 + .long 2976134650 + .long 1054987244 + .long 706390066 + .long 1067217386 + .long 4258437615 + .long 3200900378 + .long 1066252975 + .long 3212391267 + .long 815777514 + .long 1051989462 + .long 3202745457 + .long 1064010682 + .long 2493556375 + .long 3198004753 + .long 1046243251 + .long 3209678971 + .long 2593078846 + .long 1049017717 + .long 2763962276 + .long 1060970161 + .long 701480960 + .long 3217377742 + .long 3205862232 + .long 3174660915 + .long 0 + .long 0 + .long 2267016812 + .long 1071015664 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 2107155798 + .long 3206166872 + .long 0 + .long 0 + .long 2642992129 + .long 1057424578 + .long 0 + .long 0 + .long 1936992811 + .long 3203204426 + .long 1485063559 + .long 3214682643 + .long 1432914553 + .long 1054319398 + .long 3996381654 + .long 1067075828 + .long 2833029256 + .long 3200223545 + .long 2866066872 + .long 3211982662 + .long 2432888737 + .long 1051234178 + .long 3669764559 + .long 1063748136 + .long 2458496952 + .long 3197170774 + .long 1948234989 + .long 3209098147 + .long 2843698787 + .long 1048163519 + .long 3398041407 + .long 1060559728 + .long 2829230080 + .long 3217092115 + .long 1034046433 + .long 3174271903 + .long 0 + .long 0 + .long 298675305 + .long 1070989821 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 437603223 + .long 3205589761 + .long 0 + .long 0 + .long 759330352 + .long 1057048511 + .long 0 + .long 0 + .long 3107463368 + .long 3202507988 + .long 3144465176 + .long 3214191500 + .long 2290961810 + .long 1053841035 + .long 1618153340 + .long 1066971547 + .long 3836869393 + .long 3199400272 + .long 584032116 + .long 3211469261 + .long 1245704358 + .long 1050626462 + .long 4247487438 + .long 1063561943 + .long 1669034927 + .long 3196274812 + .long 3844233498 + .long 3208626322 + .long 2706958524 + .long 1047411374 + .long 3857199098 + .long 1060281647 + .long 3593904128 + .long 3216590719 + .long 3267547836 + .long 3172163321 + .long 0 + .long 0 + .long 4076712227 + .long 1070970214 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3290090340 + .long 3204793485 + .long 0 + .long 0 + .long 3685760367 + .long 1056668370 + .long 0 + .long 0 + .long 2655163949 + .long 3201674917 + .long 628750575 + .long 3213566872 + .long 680140505 + .long 1053299777 + .long 2954464709 + .long 1066900026 + .long 803201619 + .long 3198516435 + .long 1466315631 + .long 3210837162 + .long 1611220163 + .long 1049972438 + .long 2766187256 + .long 1063437894 + .long 1804579484 + .long 3195331491 + .long 3695969289 + .long 3207854418 + .long 2617238373 + .long 1046675948 + .long 3095830084 + .long 1060095334 + .long 3789570048 + .long 3216034914 + .long 23826559 + .long 3172048060 + .long 0 + .long 0 + .long 3870939386 + .long 1070956467 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1571758758 + .long 3203672535 + .long 0 + .long 0 + .long 113026373 + .long 1056416381 + .long 0 + .long 0 + .long 1913766298 + .long 3200523326 + .long 2507068734 + .long 3212502004 + .long 4000648818 + .long 1053003803 + .long 2446607349 + .long 1066858259 + .long 912662124 + .long 3197333001 + .long 1349489537 + .long 3209765608 + .long 3412972607 + .long 1049641401 + .long 1721283327 + .long 1063366855 + .long 1466691883 + .long 3194116746 + .long 3852528092 + .long 3206760861 + .long 285443293 + .long 1046158380 + .long 1758739894 + .long 1059895449 + .long 1858781184 + .long 3214984212 + .long 3447575948 + .long 1024675855 + .long 0 + .long 0 + .long 2242038011 + .long 1070948320 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 0 + .long 0 + .long 0 + .long 0 + .long 737611454 + .long 1056336527 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3594790527 + .long 1052911621 + .long 381774871 + .long 1066844524 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3303051618 + .long 1049456050 + .long 3154187623 + .long 1063343722 + .long 0 + .long 0 + .long 0 + .long 0 + .long 528061788 + .long 1045944910 + .long 2469719819 + .long 1059831159 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1431655765 + .long 1070945621 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1571758758 + .long 1056188887 + .long 0 + .long 0 + .long 113026373 + .long 1056416381 + .long 0 + .long 0 + .long 1913766298 + .long 1053039678 + .long 2507068734 + .long 1065018356 + .long 4000648818 + .long 1053003803 + .long 2446607349 + .long 1066858259 + .long 912662124 + .long 1049849353 + .long 1349489537 + .long 1062281960 + .long 3412972607 + .long 1049641401 + .long 1721283327 + .long 1063366855 + .long 1466691883 + .long 1046633098 + .long 3852528092 + .long 1059277213 + .long 285443293 + .long 1046158380 + .long 1758739894 + .long 1059895449 + .long 1858781184 + .long 1067500564 + .long 3447575948 + .long 3172159503 + .long 0 + .long 0 + .long 2242038011 + .long 1070948320 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3290090340 + .long 1057309837 + .long 0 + .long 0 + .long 3685760367 + .long 1056668370 + .long 0 + .long 0 + .long 2655163949 + .long 1054191269 + .long 628750575 + .long 1066083224 + .long 680140505 + .long 1053299777 + .long 2954464709 + .long 1066900026 + .long 803201619 + .long 1051032787 + .long 1466315631 + .long 1063353514 + .long 1611220163 + .long 1049972438 + .long 2766187256 + .long 1063437894 + .long 1804579484 + .long 1047847843 + .long 3695969289 + .long 1060370770 + .long 2617238373 + .long 1046675948 + .long 3095830084 + .long 1060095334 + .long 3789570048 + .long 1068551266 + .long 23826559 + .long 1024564412 + .long 0 + .long 0 + .long 3870939386 + .long 1070956467 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 437603223 + .long 1058106113 + .long 0 + .long 0 + .long 759330352 + .long 1057048511 + .long 0 + .long 0 + .long 3107463368 + .long 1055024340 + .long 3144465176 + .long 1066707852 + .long 2290961810 + .long 1053841035 + .long 1618153340 + .long 1066971547 + .long 3836869393 + .long 1051916624 + .long 584032116 + .long 1063985613 + .long 1245704358 + .long 1050626462 + .long 4247487438 + .long 1063561943 + .long 1669034927 + .long 1048791164 + .long 3844233498 + .long 1061142674 + .long 2706958524 + .long 1047411374 + .long 3857199098 + .long 1060281647 + .long 3593904128 + .long 1069107071 + .long 3267547836 + .long 1024679673 + .long 0 + .long 0 + .long 4076712227 + .long 1070970214 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 2107155798 + .long 1058683224 + .long 0 + .long 0 + .long 2642992129 + .long 1057424578 + .long 0 + .long 0 + .long 1936992811 + .long 1055720778 + .long 1485063559 + .long 1067198995 + .long 1432914553 + .long 1054319398 + .long 3996381654 + .long 1067075828 + .long 2833029256 + .long 1052739897 + .long 2866066872 + .long 1064499014 + .long 2432888737 + .long 1051234178 + .long 3669764559 + .long 1063748136 + .long 2458496952 + .long 1049687126 + .long 1948234989 + .long 1061614499 + .long 2843698787 + .long 1048163519 + .long 3398041407 + .long 1060559728 + .long 2829230080 + .long 1069608467 + .long 1034046433 + .long 1026788255 + .long 0 + .long 0 + .long 298675305 + .long 1070989821 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3120498638 + .long 1059265656 + .long 0 + .long 0 + .long 2773578114 + .long 1058009312 + .long 0 + .long 0 + .long 2030783676 + .long 1056334225 + .long 2223654598 + .long 1067588288 + .long 2976134650 + .long 1054987244 + .long 706390066 + .long 1067217386 + .long 4258437615 + .long 1053416730 + .long 1066252975 + .long 1064907619 + .long 815777514 + .long 1051989462 + .long 3202745457 + .long 1064010682 + .long 2493556375 + .long 1050521105 + .long 1046243251 + .long 1062195323 + .long 2593078846 + .long 1049017717 + .long 2763962276 + .long 1060970161 + .long 701480960 + .long 1069894094 + .long 3205862232 + .long 1027177267 + .long 0 + .long 0 + .long 2267016812 + .long 1071015664 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1398462608 + .long 1059820320 + .long 0 + .long 0 + .long 26205983 + .long 1058461213 + .long 0 + .long 0 + .long 56226238 + .long 1057044964 + .long 2754706541 + .long 1067875863 + .long 2187799823 + .long 1055634437 + .long 790323742 + .long 1067402587 + .long 1372385848 + .long 1054167831 + .long 4097292716 + .long 1065372654 + .long 3348210357 + .long 1052830099 + .long 2442796466 + .long 1064337602 + .long 862608142 + .long 1051347106 + .long 170296152 + .long 1062577219 + .long 3755571428 + .long 1049933343 + .long 3614866008 + .long 1061361670 + .long 719978496 + .long 1070185448 + .long 1998842465 + .long 1027220329 + .long 0 + .long 0 + .long 3749156607 + .long 1071048258 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1330165971 + .long 1060367097 + .long 0 + .long 0 + .long 217536623 + .long 1059109098 + .long 0 + .long 0 + .long 3492120849 + .long 1057667827 + .long 602185705 + .long 1068194444 + .long 760422958 + .long 1056312597 + .long 555127889 + .long 1067545266 + .long 3139784124 + .long 1054987189 + .long 3690544014 + .long 1065666523 + .long 95707915 + .long 1053635428 + .long 4003114407 + .long 1064581412 + .long 2034926231 + .long 1052227513 + .long 3759536023 + .long 1063076341 + .long 3826928214 + .long 1050893819 + .long 3837960785 + .long 1061790379 + .long 1526325248 + .long 1070483918 + .long 2356426521 + .long 3172907104 + .long 0 + .long 0 + .long 457728975 + .long 1071088276 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1704352102 + .long 3223426649 + .long 0 + .long 0 + .long 2284589306 + .long 1076258036 + .long 0 + .long 0 + .long 2211264291 + .long 3224142658 + .long 0 + .long 3221225472 + .long 1441186365 + .long 1077028579 + .long 1431655765 + .long 1074091349 + .long 876943673 + .long 3224837270 + .long 2863311531 + .long 3221924522 + .long 236289504 + .long 1077767485 + .long 286331153 + .long 1074860305 + .long 2805473311 + .long 3225598926 + .long 95443718 + .long 3222646875 + .long 1160476131 + .long 1078450742 + .long 463583772 + .long 1075552698 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 1073741824 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3349892442 + .long 3221773860 + .long 0 + .long 0 + .long 3913197405 + .long 1074501181 + .long 0 + .long 0 + .long 2494034522 + .long 3222222818 + .long 1264738763 + .long 3220568452 + .long 1520293906 + .long 1074899632 + .long 1958936600 + .long 1073411493 + .long 2133649635 + .long 3222535819 + .long 4270740730 + .long 3221058356 + .long 1728930189 + .long 1075224844 + .long 1303998552 + .long 1073799186 + .long 618611933 + .long 3222903903 + .long 1769828046 + .long 3221422190 + .long 2200537986 + .long 1075641421 + .long 433361110 + .long 1074105369 + .long 719595600 + .long 3219800832 + .long 294527206 + .long 1014656440 + .long 0 + .long 1073741824 + .long 3811788216 + .long 3218400550 + .long 0 + .long 0 + .long 0 + .long 0 + .long 724322768 + .long 3220364956 + .long 0 + .long 0 + .long 643153048 + .long 1072905816 + .long 0 + .long 0 + .long 4285079458 + .long 3220412206 + .long 3912524733 + .long 3220106631 + .long 118362272 + .long 1072952754 + .long 4107767972 + .long 1072827408 + .long 2689502883 + .long 3220460570 + .long 946523347 + .long 3220256414 + .long 573204189 + .long 1073001761 + .long 581531518 + .long 1072826391 + .long 1386236526 + .long 3220510607 + .long 3718905905 + .long 3220316471 + .long 1145558140 + .long 1073052673 + .long 513572637 + .long 1072861969 + .long 716700048 + .long 3219481016 + .long 547126769 + .long 3163007173 + .long 0 + .long 1072693248 + .long 1097907398 + .long 1071420120 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3422807297 + .long 3219124495 + .long 0 + .long 0 + .long 1151658053 + .long 1071494715 + .long 0 + .long 0 + .long 929607071 + .long 3218829988 + .long 1037049034 + .long 3219520953 + .long 2786928657 + .long 1071215282 + .long 1447406859 + .long 1072265209 + .long 3490952107 + .long 3218574499 + .long 3205232916 + .long 3219452306 + .long 1297344304 + .long 1070977120 + .long 1066110976 + .long 1071946035 + .long 3803721480 + .long 3218354730 + .long 1496754229 + .long 3219290849 + .long 2982550683 + .long 1070773243 + .long 4014441989 + .long 1071736222 + .long 419968236 + .long 3219200695 + .long 3451266538 + .long 1015961163 + .long 0 + .long 1072693248 + .long 2960267235 + .long 1070745841 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1458794562 + .long 3217882198 + .long 0 + .long 0 + .long 2857777489 + .long 1070137637 + .long 0 + .long 0 + .long 1024359517 + .long 3217360179 + .long 2616040238 + .long 3219066585 + .long 1609024636 + .long 1069675088 + .long 2529240549 + .long 1071836633 + .long 1510128600 + .long 3216923761 + .long 2251697184 + .long 3218737335 + .long 1262761453 + .long 1069142850 + .long 1263091857 + .long 1071190461 + .long 3043383486 + .long 3216368839 + .long 2476932470 + .long 3218325650 + .long 3659995028 + .long 1068669200 + .long 855891755 + .long 1070696894 + .long 2583490354 + .long 3218768505 + .long 3062633575 + .long 3161492271 + .long 0 + .long 1072693248 + .long 2550940471 + .long 1069938201 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2467582782 + .long 3216740037 + .long 0 + .long 0 + .long 162150096 + .long 1068946420 + .long 0 + .long 0 + .long 3702794237 + .long 3216062800 + .long 3631919291 + .long 3218420574 + .long 3456821413 + .long 1068217218 + .long 2031366438 + .long 1071495745 + .long 1596664020 + .long 3215282929 + .long 1509038701 + .long 3218085291 + .long 583171477 + .long 1067510148 + .long 3785344682 + .long 1070618476 + .long 2402036048 + .long 3214559384 + .long 3233018412 + .long 3217396834 + .long 411280568 + .long 1066710556 + .long 1065584192 + .long 1069747896 + .long 895247324 + .long 3218303496 + .long 500078909 + .long 1013805133 + .long 0 + .long 1072693248 + .long 729983843 + .long 1068994194 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1512545955 + .long 3215602695 + .long 0 + .long 0 + .long 1127048698 + .long 1067909459 + .long 0 + .long 0 + .long 2300200450 + .long 3214738415 + .long 3593250296 + .long 3217717209 + .long 3009365544 + .long 1066902117 + .long 1127373050 + .long 1071173457 + .long 3046103305 + .long 3213854947 + .long 24583402 + .long 3217207636 + .long 4082511758 + .long 1065914199 + .long 3223889699 + .long 1070020367 + .long 548927984 + .long 3212899404 + .long 558065897 + .long 3216433066 + .long 680073315 + .long 1064940726 + .long 388873200 + .long 1068944270 + .long 3763679576 + .long 3217651189 + .long 1497360404 + .long 3157194195 + .long 0 + .long 1072693248 + .long 64931152 + .long 1067729411 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1313038235 + .long 3214229379 + .long 0 + .long 0 + .long 1013878342 + .long 1067152618 + .long 0 + .long 0 + .long 3663426833 + .long 3213208931 + .long 3693284251 + .long 3216602456 + .long 650852232 + .long 1065882376 + .long 1996245381 + .long 1071000265 + .long 2008746170 + .long 3212147845 + .long 3055842593 + .long 3216062494 + .long 1495406348 + .long 1064652437 + .long 2269530157 + .long 1069711235 + .long 285563696 + .long 3211060113 + .long 1046897440 + .long 3215189513 + .long 233429731 + .long 1063453151 + .long 522045958 + .long 1068476590 + .long 2354785698 + .long 3216586427 + .long 1317599141 + .long 3159915781 + .long 0 + .long 1072693248 + .long 2828230105 + .long 1065606626 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1841940611 + .long 1071931184 + .long 1841940611 + .long 1076125488 + .long 0 + .long 1131937792 + .long 0 + .long 1127743488 + .long 1413758976 + .long 1069097467 + .long 1413742592 + .long 1069097467 + .long 1734819840 + .long 3174229945 + .long 1280049152 + .long 1028033571 + .long 923219018 + .long 984130272 + .long 57701189 + .long 988383790 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 1734816687 + .long 1026746297 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 2146435072 + .long 0 + .long 0 + .long 4294705152 + .long 4294967295 + .long 0 + .long 0 + .long 0 + .long 1130364928 + .long 0 + .long 0 + .long 0 + .long 1015021568 + .long 0 + .long 0 + .long 0 + .long 1017118720 + .long 0 + .long 0 + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .long 0 + .long 1076887552 + .long 0 + .long 1072693248 + .type static_const_table,@object + .size static_const_table,5872 + .data + .hidden __libm_tancot_huge + .section .note.GNU-stack, "" +# End diff --git a/libm/x86/s_tanh.S b/libm/x86/s_tanh.S new file mode 100644 index 0000000..3975fa9 --- /dev/null +++ b/libm/x86/s_tanh.S @@ -0,0 +1,1362 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x))=(1-exp(-2*x))/(1+exp(-2*x)) +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^8*2=int(xH*L2EH*2^9), +// f=0.b1 b2 ... b8, k integer +// 2^{-f} is approximated as Tn[f]+Dn[f] +// Tn stores the high 53 bits, Dn stores (2^{-f}-Tn[f]) rounded to double precision +// +// r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-9}+2^{-14}, +// for |x| in [23/64,3*2^7) +// e^{-2*|x|}=2^{-k-f}*2^{-r} ~ 2^{-k}*(Tn+Dn)*(1+p)=(T0+D0)*(1+p) +// +// For |x| in [2^{-4},2^5): +// 2^{-r}-1 ~ p=c1*r+c2*r^2+..+c5*r^5 +// Let R=1/(1+T0+p*T0), truncated to 35 significant bits +// R=1/(1+T0+D0+p*(T0+D0))*(1+eps), |eps|<2^{-33} +// 1+T0+D0+p*(T0+D0)=KH+KL, where +// KH=(1+T0+c1*r*T0)_high (leading 17 bits) +// KL=T0_low+D0+(c1*r*T0)_low+c1*r*D0+(c2*r^2+..c5*r^5)*T0 +// eps ~ (R*KH-1)+R*KL +// 1/(1+T0+D0+p*(T0+D0)) ~ R-R*eps +// The result is approximated as (1-T0-D0-(T0+D0)*p)*(R-R*eps) +// 1-T0-D0-(T0+D0)*p=-((KH-2)+KL) +// The result is formed as +// (KH-2)*R+(-(KH-2)*R*eps+(KL*R-KL*R*eps)), with the correct sign +// set at the end +// +// For |x| in [2^{-64},2^{-4}): +// A Taylor series expansion is used (x+p3*x^3+..+p13*x^{13}) +// +// For |x|<2^{-64}: x is returned +// +// For |x|>=2^32: return +/-1 +// +// Special cases: +// tanh(NaN) = quiet NaN, and raise invalid exception +// tanh(INF) = that INF +// tanh(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin static_func + .text + .align __bionic_asm_align + .type static_func, @function +static_func: +..B1.1: + call ..L2 +..L2: + popl %eax + lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax + lea static_const_table@GOTOFF(%eax), %eax + ret + .size static_func,.-static_func +# -- End static_func + +# -- Begin tanh +ENTRY(tanh) +# parameter 1: 8 + %ebp +..B2.1: +..B2.2: + pushl %ebp + movl %esp, %ebp + subl $104, %esp + movl %ebx, 40(%esp) + call static_func + movl %eax, %ebx + movsd 112(%esp), %xmm0 + movsd 4256(%ebx), %xmm3 + xorpd %xmm4, %xmm4 + movsd 4112(%ebx), %xmm1 + movsd 4120(%ebx), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd 4096(%ebx), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + movl $32768, %edx + andl %ecx, %edx + andl $32767, %ecx + subl $16304, %ecx + cmpl $144, %ecx + jae .L_2TAG_PACKET_0.0.2 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + movapd %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + movsd 4264(%ebx), %xmm4 + subsd %xmm6, %xmm3 + xorpd %xmm0, %xmm0 + addsd %xmm1, %xmm2 + subsd %xmm3, %xmm7 + movapd 4128(%ebx), %xmm6 + addsd %xmm7, %xmm2 + movl $255, %ecx + andl %eax, %ecx + addl %ecx, %ecx + movapd (%ebx,%ecx,8), %xmm5 + shrl $4, %eax + andl $65520, %eax + subl $16368, %eax + negl %eax + pinsrw $3, %eax, %xmm0 + movapd 4144(%ebx), %xmm1 + pshufd $68, %xmm0, %xmm0 + mulpd %xmm5, %xmm0 + movsd 4160(%ebx), %xmm7 + pshufd $68, %xmm2, %xmm2 + movapd %xmm4, %xmm5 + addsd %xmm0, %xmm4 + mulpd %xmm2, %xmm6 + mulsd %xmm2, %xmm7 + mulpd %xmm2, %xmm2 + addpd %xmm6, %xmm1 + mulsd %xmm2, %xmm2 + movsd 4264(%ebx), %xmm3 + mulpd %xmm2, %xmm1 + pshufd $78, %xmm1, %xmm6 + addsd %xmm6, %xmm1 + movapd %xmm1, %xmm6 + addsd %xmm7, %xmm1 + mulsd %xmm0, %xmm1 + addsd %xmm4, %xmm1 + andpd 4224(%ebx), %xmm4 + divsd %xmm1, %xmm5 + subsd %xmm4, %xmm3 + pshufd $238, %xmm0, %xmm1 + addsd %xmm0, %xmm3 + movapd %xmm4, %xmm2 + addsd %xmm1, %xmm3 + mulsd %xmm7, %xmm1 + mulsd %xmm0, %xmm7 + addsd %xmm1, %xmm3 + addsd %xmm7, %xmm4 + movsd 4240(%ebx), %xmm1 + mulsd %xmm0, %xmm6 + andpd 4224(%ebx), %xmm4 + addsd %xmm6, %xmm3 + movapd %xmm4, %xmm6 + subsd %xmm4, %xmm2 + addsd %xmm7, %xmm2 + movsd 4264(%ebx), %xmm7 + andpd %xmm1, %xmm5 + addsd %xmm2, %xmm3 + mulsd %xmm5, %xmm4 + xorpd %xmm2, %xmm2 + mulsd %xmm5, %xmm3 + subsd 4272(%ebx), %xmm6 + subsd %xmm7, %xmm4 + xorl $32768, %edx + pinsrw $3, %edx, %xmm2 + addsd %xmm3, %xmm4 + mulsd %xmm5, %xmm6 + movapd %xmm3, %xmm1 + mulsd %xmm4, %xmm3 + movapd %xmm6, %xmm0 + mulsd %xmm4, %xmm6 + subsd %xmm3, %xmm1 + subsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + xorpd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_0.0.2: + addl $960, %ecx + cmpl $1104, %ecx + jae .L_2TAG_PACKET_2.0.2 + movapd 4176(%ebx), %xmm2 + pshufd $68, %xmm0, %xmm1 + movapd 4192(%ebx), %xmm3 + mulpd %xmm1, %xmm1 + movapd 4208(%ebx), %xmm4 + mulpd %xmm1, %xmm2 + pshufd $68, %xmm1, %xmm5 + addpd %xmm3, %xmm2 + mulsd %xmm5, %xmm5 + mulpd %xmm1, %xmm2 + mulsd %xmm5, %xmm5 + addpd %xmm4, %xmm2 + mulpd %xmm5, %xmm2 + pshufd $238, %xmm2, %xmm5 + addsd %xmm5, %xmm2 + mulsd %xmm0, %xmm2 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + addl $15344, %ecx + cmpl $16448, %ecx + jae .L_2TAG_PACKET_3.0.2 + cmpl $16, %ecx + jb .L_2TAG_PACKET_4.0.2 + xorpd %xmm2, %xmm2 + movl $17392, %eax + pinsrw $3, %eax, %xmm2 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm2 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_4.0.2: + movapd %xmm0, %xmm2 + mulsd %xmm2, %xmm2 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_3.0.2: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_5.0.2 + xorpd %xmm2, %xmm2 + movl $15344, %ecx + pinsrw $3, %ecx, %xmm2 + movapd %xmm2, %xmm3 + mulsd %xmm2, %xmm2 + addsd %xmm3, %xmm2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm0, %xmm0 + orl $16368, %edx + pinsrw $3, %edx, %xmm0 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_5.0.2: + movapd %xmm0, %xmm2 + movd %xmm0, %eax + psrlq $20, %xmm2 + movd %xmm2, %ecx + orl %eax, %ecx + cmpl $0, %ecx + je .L_2TAG_PACKET_6.0.2 + addsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_1.0.2: + movsd %xmm0, 24(%esp) + fldl 24(%esp) +.L_2TAG_PACKET_7.0.2: + movl 40(%esp), %ebx + movl %ebp, %esp + popl %ebp + ret +..B2.3: +END(tanh) +# -- End tanh + +# Start file scope ASM +.weak tanhl +.equ tanhl, tanh +# End file scope ASM + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 1797923801 + .long 1072687577 + .long 1950547427 + .long 1013229059 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 915592468 + .long 1072676282 + .long 352947894 + .long 3161024371 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 35929225 + .long 1072665048 + .long 2809788041 + .long 3159436968 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 2038973688 + .long 1072653874 + .long 892941374 + .long 1016046459 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 1222472308 + .long 1072642761 + .long 1054357470 + .long 3161021018 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 481706282 + .long 1072631708 + .long 1696079173 + .long 3162710528 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 2719515920 + .long 1072620714 + .long 2760332941 + .long 1015137933 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2256325230 + .long 1072609780 + .long 580117746 + .long 1015317295 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 2009970496 + .long 1072598905 + .long 2159039665 + .long 3162572948 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 610758006 + .long 1072588089 + .long 1965209397 + .long 3161866232 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 991358482 + .long 1072577331 + .long 838715019 + .long 3163157668 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 1796832535 + .long 1072566631 + .long 3176955716 + .long 3160585513 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 1679558232 + .long 1072555989 + .long 2390342287 + .long 3163333970 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 3594158869 + .long 1072545404 + .long 2456521700 + .long 3163256561 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 1912561781 + .long 1072534877 + .long 3147495102 + .long 1015678253 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3898795731 + .long 1072524406 + .long 1249994144 + .long 1011869818 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 3939148246 + .long 1072513992 + .long 3210352148 + .long 1015274323 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 721996136 + .long 1072503635 + .long 563754734 + .long 1015371318 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1532734324 + .long 1072493333 + .long 3094216535 + .long 3163162857 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 778901109 + .long 1072483087 + .long 2248183955 + .long 3161268751 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 1464976603 + .long 1072472896 + .long 3507292405 + .long 3161977534 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 2307442995 + .long 1072462760 + .long 3190117721 + .long 3162404539 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 2029714210 + .long 1072452679 + .long 613660079 + .long 1015099143 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3657065772 + .long 1072442652 + .long 399025623 + .long 3162957078 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1631695677 + .long 1072432680 + .long 2717633076 + .long 3162344026 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 3287523847 + .long 1072422761 + .long 1625971539 + .long 3157009955 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 3080351519 + .long 1072412896 + .long 3379126788 + .long 3157218001 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4062661092 + .long 1072403084 + .long 1422616006 + .long 3163255318 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 703710506 + .long 1072393326 + .long 1384660846 + .long 1015195891 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 364333489 + .long 1072383620 + .long 3923737744 + .long 3161421373 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 1822067026 + .long 1072373966 + .long 1241994956 + .long 1015340290 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 3861050111 + .long 1072364364 + .long 254893773 + .long 3162813180 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 977020788 + .long 1072354815 + .long 3065100517 + .long 1015541563 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 557149882 + .long 1072345317 + .long 3672720709 + .long 1014537265 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 1405169241 + .long 1072335870 + .long 2998539689 + .long 3162830951 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2331271250 + .long 1072326474 + .long 812057446 + .long 1012207446 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 2152073944 + .long 1072317129 + .long 1486860576 + .long 3163203456 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 3985553595 + .long 1072307834 + .long 4002146062 + .long 1015834136 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 2366108318 + .long 1072298590 + .long 2867985102 + .long 3161762254 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 424392917 + .long 1072289396 + .long 2749202995 + .long 3162838718 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1297350157 + .long 1072280251 + .long 1308022040 + .long 3163412558 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 3833209506 + .long 1072271155 + .long 2722920684 + .long 1013754842 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 2591453363 + .long 1072262109 + .long 2132396182 + .long 3159074198 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 727685349 + .long 1072253112 + .long 2038246809 + .long 3162358742 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 1403662306 + .long 1072244163 + .long 2788809599 + .long 3161671007 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 3492293770 + .long 1072235262 + .long 2248032210 + .long 1015386826 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 1577608921 + .long 1072226410 + .long 1875489510 + .long 3162968394 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 3134592888 + .long 1072217605 + .long 4232266862 + .long 1015991134 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 2759350287 + .long 1072208848 + .long 1148526634 + .long 1015894933 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 3643909174 + .long 1072200138 + .long 3537586109 + .long 1014354647 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 396319521 + .long 1072191476 + .long 4172420816 + .long 3159074632 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 515457527 + .long 1072182860 + .long 836709333 + .long 1015651226 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 2916157145 + .long 1072174290 + .long 219487565 + .long 1015309367 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 2224145553 + .long 1072165767 + .long 3482522030 + .long 3161489169 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 1660913392 + .long 1072157290 + .long 4218599604 + .long 1015135707 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 158781403 + .long 1072148859 + .long 2221464712 + .long 3163286453 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 950803702 + .long 1072140473 + .long 1655364926 + .long 1015237032 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 2980802057 + .long 1072132132 + .long 378619896 + .long 1015773303 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 903334909 + .long 1072123837 + .long 1636462108 + .long 1015039997 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 2263535754 + .long 1072115586 + .long 752233586 + .long 3162639008 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 1727278727 + .long 1072107380 + .long 3562710623 + .long 1011471940 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 2555984613 + .long 1072099218 + .long 2652555442 + .long 3162552692 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 3721688645 + .long 1072091100 + .long 3069276937 + .long 1015839401 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 4201977662 + .long 1072083026 + .long 748330254 + .long 1013594357 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 2979960120 + .long 1072074996 + .long 2599109725 + .long 1014498493 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 3339203574 + .long 1072067009 + .long 1483497780 + .long 3162408754 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 4273770423 + .long 1072059065 + .long 3383180809 + .long 3163218901 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 488188413 + .long 1072051165 + .long 3199821029 + .long 1015564048 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3872257780 + .long 1072043306 + .long 1253592103 + .long 1015958334 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 551349105 + .long 1072035491 + .long 3821916050 + .long 3162106589 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2425981843 + .long 1072027717 + .long 2830390851 + .long 3163346599 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 4222122499 + .long 1072019985 + .long 1277378074 + .long 3163256737 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 671025100 + .long 1072012296 + .long 3832014351 + .long 3163022030 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 3689071823 + .long 1072004647 + .long 2321004996 + .long 3162552716 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3723038930 + .long 1071997040 + .long 378465264 + .long 3162569582 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 4109806887 + .long 1071989474 + .long 422403966 + .long 1014469229 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 3896463087 + .long 1071981949 + .long 1139797873 + .long 3161233805 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 2135241198 + .long 1071974465 + .long 1236747871 + .long 1013589147 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2178460671 + .long 1071967021 + .long 777878098 + .long 3162842493 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3088564500 + .long 1071959617 + .long 1762311517 + .long 1015045673 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 3933059031 + .long 1071952253 + .long 2133366768 + .long 3161531832 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3784486610 + .long 1071944929 + .long 1581883040 + .long 3161698953 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 1720398391 + .long 1071937645 + .long 3980678963 + .long 3163300080 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1118294578 + .long 1071930400 + .long 2197495694 + .long 3159909401 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 1065662932 + .long 1071923194 + .long 2533670915 + .long 1014530238 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 654919306 + .long 1071916027 + .long 3232961757 + .long 3163047469 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 3278348324 + .long 1071908898 + .long 3069497416 + .long 1014750712 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 3743175029 + .long 1071901808 + .long 2072812490 + .long 3162175075 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 1156440435 + .long 1071894757 + .long 2351451249 + .long 1013967056 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 3219942644 + .long 1071887743 + .long 3798990616 + .long 1015368806 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 460407023 + .long 1071880768 + .long 4237175092 + .long 3163138469 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 589198666 + .long 1071873830 + .long 2664346172 + .long 3163157962 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 2732492859 + .long 1071866929 + .long 2691479646 + .long 3162255684 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 1726216749 + .long 1071860066 + .long 2466808228 + .long 3161676405 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 1000925746 + .long 1071853240 + .long 1018491672 + .long 3163309544 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 3991843581 + .long 1071846450 + .long 4092853457 + .long 1014585763 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 1253935211 + .long 1071839698 + .long 1395382931 + .long 3159702613 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 526652809 + .long 1071832982 + .long 4223459736 + .long 1015879375 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 964107055 + .long 1071826302 + .long 2800439588 + .long 3162833221 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 1724976915 + .long 1071819658 + .long 420909223 + .long 3163117379 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 1972484976 + .long 1071813050 + .long 675290301 + .long 3161640050 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 874372905 + .long 1071806478 + .long 100263788 + .long 1015940732 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1897844341 + .long 1071799941 + .long 1254300460 + .long 1015275938 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 4219606026 + .long 1071793439 + .long 2434574742 + .long 1014681548 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2725843665 + .long 1071786973 + .long 1433917087 + .long 1014838523 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 897099801 + .long 1071780542 + .long 754756297 + .long 1015241005 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 2218315341 + .long 1071774145 + .long 2694295388 + .long 3163288868 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 1588871207 + .long 1071767783 + .long 143439582 + .long 3162963416 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2502433899 + .long 1071761455 + .long 2148595913 + .long 1015023991 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 4162030108 + .long 1071755161 + .long 2763428480 + .long 1015529349 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 1480023343 + .long 1071748902 + .long 2247196168 + .long 1015327453 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 2257959872 + .long 1071742676 + .long 3802946148 + .long 1012964927 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 1416741826 + .long 1071736484 + .long 2196380210 + .long 1011413563 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2471440686 + .long 1071730325 + .long 968836267 + .long 3162214888 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 351405227 + .long 1071724200 + .long 3125337328 + .long 3159822479 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 2875075254 + .long 1071718107 + .long 4144233330 + .long 3163333716 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 685187902 + .long 1071712048 + .long 378731989 + .long 1014843115 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 1608493509 + .long 1071706021 + .long 3159622171 + .long 3162807737 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 590962156 + .long 1071700027 + .long 3829346666 + .long 3163275597 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1172597893 + .long 1071694065 + .long 114433263 + .long 1015347593 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 2602514713 + .long 1071688135 + .long 2268929336 + .long 1014354284 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 4133881824 + .long 1071682237 + .long 2148155345 + .long 3162931299 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 728934454 + .long 1071676372 + .long 1413842688 + .long 1014178612 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 238821257 + .long 1071670538 + .long 1469694871 + .long 3162884987 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 1928746161 + .long 1071664735 + .long 983617676 + .long 1014285177 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 772914124 + .long 1071658964 + .long 4004372762 + .long 1012230161 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 339411585 + .long 1071653224 + .long 264588982 + .long 3161636657 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .long 4200250559 + .long 1071647514 + .long 2808127345 + .long 3161781938 + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .long 1610612736 + .long 1082594631 + .long 4166901572 + .long 1055174155 + .long 3884607281 + .long 3168131199 + .long 3607404735 + .long 3190582024 + .long 1874480759 + .long 1032041131 + .long 4286760334 + .long 1053736893 + .long 4277811695 + .long 3211144770 + .long 0 + .long 0 + .long 236289503 + .long 1064135997 + .long 463583772 + .long 3215696314 + .long 1441186365 + .long 3212977891 + .long 286331153 + .long 1069617425 + .long 2284589306 + .long 1066820852 + .long 1431655765 + .long 3218429269 + .long 0 + .long 4294967280 + .long 0 + .long 4294967280 + .long 4294705152 + .long 4294967295 + .long 4294705152 + .long 4294967295 + .long 4160749568 + .long 2147483647 + .long 0 + .long 1072693248 + .long 0 + .long 1073741824 + .type static_const_table,@object + .size static_const_table,4280 + .data + .section .note.GNU-stack, "" +# End diff --git a/libm/x86_64/e_acos.S b/libm/x86_64/e_acos.S new file mode 100644 index 0000000..d83c66b --- /dev/null +++ b/libm/x86_64/e_acos.S @@ -0,0 +1,1957 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// To compute acos(s), separate schemes are used when s is in different +// intervals. +// +// |s| in [2^{-4}, sqrt(3)/2): +// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52 +// acos(s)=pi/2-asin(t)-asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2) +// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7) +// For the first degree term, r is evaluated as +// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t) +// (sqrt(1-t^2) read from table) +// The main source of error is still R (may still be affected by up to 3 ulps +// of rounding error). The table size must be sufficiently large, to minimize +// this effect. +// +// |s| in [sqrt(3)/2, 255/256): +// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded) +// acos(|s|)=asin(t)-asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2) +// acos(-|s|)=pi-acos(|s|) +// (The -PI constant, or 0, is added to the result. The sign is set at +// the end) +// asin(r) evaluated as a polynomial (same as above) +// The first degree term is evaluated as +// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2)) +// +// |s|<2^{-4}: acos(s)=pi/2-asin(s) +// evaluate asin(s) as 13-degree polynomial +// +// |s| in [255/256,1): acos(|s|)=2*asin(q), where q=sqrt((1-|s|)/2) +// asin(q) is evaluated as 13-degree polynomial +// q^2=(1-|s|)/2 is obtained in advance +// 2*q*eps ~ ((1-|s|)/2-q^2)/q used for first term +// acos(-|s|)=pi-acos(|s|) +// (The -PI constant, or 0, is added to the result. The sign is set at +// the end) +// +// Special cases: +// acos(NaN) = quiet NaN, and raise invalid exception +// acos(INF) = QNaN and raise invalid exception +// acos(x) = QNaN and raise invalid exception, for |x|>1.0 +// acos(1) = +0 +// +/******************************************************************************/ + +#include +# -- Begin acos +ENTRY(acos) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_acos.1: + subq $24, %rsp +..___tag_value_acos.3: + movsd %xmm0, (%rsp) +..B1.2: + movsd ABSVALMASK(%rip), %xmm4 + movsd ONEMASK(%rip), %xmm3 + xorpd %xmm5, %xmm5 + movsd TMASK(%rip), %xmm2 + movq %xmm0, %xmm1 + psrlq $44, %xmm0 + movd %xmm0, %edx + movq %xmm1, %xmm7 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movq %xmm1, %xmm0 + movl $524287, %eax + andl %edx, %eax + subl $260864, %eax + cmpl $955, %eax + jae .L_2TAG_PACKET_0.0.2 + mulsd %xmm1, %xmm1 + andl $65535, %edx + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + andpd %xmm7, %xmm2 + andl $-4, %edx + subl $64256, %edx + lea T_table(%rip), %r8 + movsd (%r8,%rdx,2), %xmm1 + orpd %xmm5, %xmm2 + lea Tbl_addr(%rip), %r8 + movapd (%r8,%rdx,4), %xmm4 + movq %xmm7, %xmm6 + addsd %xmm2, %xmm7 + subsd %xmm2, %xmm0 + mulsd %xmm0, %xmm7 + mulsd %xmm1, %xmm6 + mulsd %xmm2, %xmm3 + movq %xmm6, %xmm1 + addsd %xmm3, %xmm6 + divsd %xmm6, %xmm7 + movsd 24+cv(%rip), %xmm0 + movsd 8+cv(%rip), %xmm5 + subsd %xmm3, %xmm1 + psrlq $63, %xmm2 + movq %xmm1, %xmm3 + psllq $63, %xmm2 + mulsd %xmm1, %xmm1 + pshufd $68, %xmm2, %xmm2 + movsd 16+cv(%rip), %xmm6 + mulsd %xmm1, %xmm3 + mulsd %xmm1, %xmm0 + xorpd %xmm2, %xmm4 + mulsd %xmm3, %xmm5 + subpd PI_BY_2(%rip), %xmm4 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulsd %xmm3, %xmm0 + subsd %xmm4, %xmm5 + pshufd $238, %xmm4, %xmm4 + addsd %xmm5, %xmm0 + subsd %xmm7, %xmm0 + subsd %xmm4, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + subl $955, %eax + cmpl $65, %eax + jae .L_2TAG_PACKET_1.0.2 + psrlq $38, %xmm7 + psllq $38, %xmm7 + pmovmskb %xmm0, %eax + andnpd %xmm0, %xmm4 + subsd %xmm7, %xmm1 + movq %xmm7, %xmm6 + mulsd %xmm7, %xmm7 + addsd %xmm6, %xmm0 + orpd %xmm4, %xmm5 + subsd %xmm7, %xmm3 + mulsd %xmm1, %xmm0 + movq %xmm3, %xmm4 + subsd %xmm0, %xmm3 + sqrtsd %xmm3, %xmm3 + andl $128, %eax + shrl $7, %eax + negl %eax + movq %xmm3, %xmm7 + andpd %xmm3, %xmm2 + psllq $2, %xmm3 + pextrw $3, %xmm3, %edx + orpd %xmm5, %xmm2 + movd %eax, %xmm3 + pshufd $0, %xmm3, %xmm3 + subl $65216, %edx + addl %edx, %edx + lea T_table(%rip), %r8 + mulsd (%r8,%rdx,4), %xmm7 + mulsd %xmm2, %xmm6 + mulsd %xmm2, %xmm1 + mulsd %xmm2, %xmm2 + subsd %xmm7, %xmm6 + andpd NEG_PI(%rip), %xmm3 + addsd %xmm1, %xmm6 + subsd %xmm2, %xmm4 + addsd %xmm7, %xmm7 + movsd 8+cv(%rip), %xmm5 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm7 + movsd 24+cv(%rip), %xmm0 + divsd %xmm7, %xmm4 + movsd 16+cv(%rip), %xmm2 + lea Tbl_addr(%rip), %r8 + addpd (%r8,%rdx,8), %xmm3 + movq %xmm6, %xmm1 + mulsd %xmm6, %xmm6 + mulsd %xmm6, %xmm0 + mulsd %xmm6, %xmm1 + mulsd %xmm1, %xmm5 + mulsd %xmm6, %xmm1 + addsd %xmm2, %xmm0 + pxor %xmm6, %xmm6 + mulsd %xmm1, %xmm0 + addsd %xmm3, %xmm5 + addsd %xmm5, %xmm0 + andl $32768, %eax + pinsrw $3, %eax, %xmm6 + movq %xmm4, %xmm5 + pshufd $238, %xmm3, %xmm3 + addsd %xmm3, %xmm4 + subsd %xmm4, %xmm3 + addsd %xmm3, %xmm5 + addsd %xmm5, %xmm0 + addsd %xmm4, %xmm0 + xorpd %xmm6, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_1.0.2: + addl $15291, %eax + cmpl $14336, %eax + jae .L_2TAG_PACKET_2.0.2 + unpcklpd %xmm0, %xmm0 + movapd cv2(%rip), %xmm6 + unpcklpd %xmm0, %xmm1 + movapd 16+cv2(%rip), %xmm2 + movapd 32+cv2(%rip), %xmm4 + mulpd %xmm0, %xmm0 + movapd PI_BY_2(%rip), %xmm5 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm6 + mulpd %xmm0, %xmm0 + movq %xmm1, %xmm3 + mulsd %xmm1, %xmm1 + addpd %xmm2, %xmm6 + mulpd %xmm0, %xmm4 + mulsd %xmm3, %xmm1 + addpd %xmm4, %xmm6 + pshufd $238, %xmm5, %xmm0 + mulpd %xmm6, %xmm1 + pshufd $238, %xmm5, %xmm6 + subsd %xmm7, %xmm0 + pshufd $238, %xmm1, %xmm2 + subsd %xmm1, %xmm5 + subsd %xmm0, %xmm6 + subsd %xmm2, %xmm5 + subsd %xmm6, %xmm7 + subsd %xmm7, %xmm5 + addsd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + subl $15356, %eax + cmpl $4, %eax + jae .L_2TAG_PACKET_3.0.2 + xorpd %xmm6, %xmm6 + andpd ABSVALMASK(%rip), %xmm7 + movsd ONE_BY_2(%rip), %xmm4 + movapd cv2(%rip), %xmm1 + mulsd %xmm4, %xmm7 + movapd 16+cv2(%rip), %xmm2 + subsd %xmm7, %xmm4 + movapd 32+cv2(%rip), %xmm3 + pshufd $68, %xmm4, %xmm7 + sqrtsd %xmm4, %xmm4 + mulpd %xmm7, %xmm1 + pshufd $68, %xmm7, %xmm5 + pextrw $3, %xmm0, %eax + mulpd %xmm7, %xmm7 + addpd %xmm1, %xmm2 + movsd HALFMASK(%rip), %xmm1 + mulpd %xmm7, %xmm3 + cmpsd $1, %xmm6, %xmm0 + mulsd %xmm5, %xmm7 + addpd %xmm3, %xmm2 + pshufd $68, %xmm0, %xmm0 + mulsd %xmm7, %xmm2 + andpd NEG_PI(%rip), %xmm0 + mulpd %xmm5, %xmm2 + andpd %xmm4, %xmm1 + pshufd $68, %xmm4, %xmm3 + subsd %xmm1, %xmm4 + addsd %xmm3, %xmm3 + mulsd %xmm1, %xmm1 + subsd %xmm4, %xmm3 + subsd %xmm1, %xmm5 + mulsd %xmm3, %xmm4 + pshufd $238, %xmm3, %xmm3 + subsd %xmm4, %xmm5 + divsd %xmm3, %xmm5 + addpd %xmm3, %xmm3 + mulpd %xmm3, %xmm2 + pshufd $238, %xmm2, %xmm4 + addsd %xmm0, %xmm2 + andl $32768, %eax + pinsrw $3, %eax, %xmm6 + pshufd $238, %xmm0, %xmm0 + addsd %xmm4, %xmm2 + addsd %xmm5, %xmm2 + addsd %xmm3, %xmm2 + addsd %xmm2, %xmm0 + xorpd %xmm6, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_3.0.2: + addl $261884, %eax + cmpl $261888, %eax + jb .L_2TAG_PACKET_4.0.2 + movd %xmm7, %ecx + psrlq $32, %xmm7 + movd %xmm7, %edx + andl $2147483647, %edx + movl $1072693248, %eax + subl %edx, %eax + orl %ecx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_5.0.2 + movsd (%rsp), %xmm2 + movd %xmm2, %edx + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $2147483647, %ecx + subl $1, %edx + sbbl $2146435072, %ecx + cmpl $0, %ecx + jge .L_2TAG_PACKET_6.0.2 + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %edx + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_5.0.2: + pextrw $1, %xmm7, %edx + shrl $15, %edx + negl %edx + movd %edx, %xmm7 + pshufd $0, %xmm7, %xmm7 + movsd PI(%rip), %xmm2 + movsd 8+PI(%rip), %xmm0 + andpd %xmm7, %xmm2 + andpd %xmm7, %xmm0 + addsd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + movsd PI_BY_2(%rip), %xmm2 + movsd 8+PI_BY_2(%rip), %xmm0 + addsd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm6, %xmm6 + addsd %xmm6, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_7.0.2: + movq %xmm0, 8(%rsp) +..B1.3: + movq 8(%rsp), %xmm0 +.L_2TAG_PACKET_8.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_acos.4: + ret +..___tag_value_acos.5: +END(acos) +# -- End acos + .section .rodata, "a" + .align 16 + .align 16 +ABSVALMASK: + .long 4294967295 + .long 2147483647 + .long 0 + .long 0 + .type ABSVALMASK,@object + .size ABSVALMASK,16 + .align 16 +T_table: + .long 2642784509 + .long 1072689083 + .long 1514442531 + .long 1072688953 + .long 333108933 + .long 1072688821 + .long 3392112024 + .long 1072688686 + .long 2099852862 + .long 1072688550 + .long 749609004 + .long 1072688412 + .long 3634632596 + .long 1072688271 + .long 2163248461 + .long 1072688129 + .long 628657846 + .long 1072687985 + .long 3324036511 + .long 1072687838 + .long 1657632815 + .long 1072687690 + .long 4217538760 + .long 1072687539 + .long 2411951597 + .long 1072687387 + .long 533944872 + .long 1072687233 + .long 2876566508 + .long 1072687076 + .long 847936891 + .long 1072686918 + .long 3036019913 + .long 1072686757 + .long 848884575 + .long 1072686595 + .long 2874443326 + .long 1072686430 + .long 520713666 + .long 1072686264 + .long 2375556481 + .long 1072686095 + .long 4141904948 + .long 1072685924 + .long 1522666382 + .long 1072685752 + .long 3105624104 + .long 1072685577 + .long 298666327 + .long 1072685401 + .long 1689524500 + .long 1072685222 + .long 2981002200 + .long 1072685041 + .long 4170844284 + .long 1072684858 + .long 961802263 + .long 1072684674 + .long 1941503454 + .long 1072684487 + .long 2812647170 + .long 1072684298 + .long 3572873869 + .long 1072684107 + .long 4219797823 + .long 1072683914 + .long 456039788 + .long 1072683720 + .long 869096151 + .long 1072683523 + .long 1161535119 + .long 1072683324 + .long 1330865866 + .long 1072683123 + .long 1374571204 + .long 1072682920 + .long 1290107538 + .long 1072682715 + .long 1074904836 + .long 1072682508 + .long 726366587 + .long 1072682299 + .long 241869763 + .long 1072682088 + .long 3913732079 + .long 1072681874 + .long 3149342765 + .long 1072681659 + .long 2240966306 + .long 1072681442 + .long 1185873216 + .long 1072681223 + .long 4276274591 + .long 1072681001 + .long 2919452883 + .long 1072680778 + .long 1407565635 + .long 1072680553 + .long 4032743551 + .long 1072680325 + .long 2202188565 + .long 1072680096 + .long 207977577 + .long 1072679865 + .long 2342160518 + .long 1072679631 + .long 11858423 + .long 1072679396 + .long 1804034453 + .long 1072679158 + .long 3420722787 + .long 1072678918 + .long 563930456 + .long 1072678677 + .long 1820539192 + .long 1072678433 + .long 2892501606 + .long 1072678187 + .long 3776710320 + .long 1072677939 + .long 175063337 + .long 1072677690 + .long 674333171 + .long 1072677438 + .long 976363026 + .long 1072677184 + .long 1077935934 + .long 1072676928 + .long 1921075490 + .long 1072676540 + .long 881493302 + .long 1072676016 + .long 3275752439 + .long 1072675483 + .long 486855588 + .long 1072674943 + .long 1077229111 + .long 1072674394 + .long 723950308 + .long 1072673837 + .long 3693582199 + .long 1072673271 + .long 1367335316 + .long 1072672698 + .long 2305837020 + .long 1072672116 + .long 2184358641 + .long 1072671526 + .long 972682840 + .long 1072670928 + .long 2935101762 + .long 1072670321 + .long 3745513263 + .long 1072669706 + .long 3372320886 + .long 1072669083 + .long 1783464620 + .long 1072668452 + .long 3241386215 + .long 1072667812 + .long 3418125284 + .long 1072667164 + .long 2280219148 + .long 1072666508 + .long 4088700758 + .long 1072665843 + .long 219227400 + .long 1072665171 + .long 3521816918 + .long 1072664489 + .long 1076205279 + .long 1072663800 + .long 1436484616 + .long 1072663102 + .long 271362610 + .long 1072662396 + .long 1838996688 + .long 1072661681 + .long 1807122518 + .long 1072660958 + .long 137953542 + .long 1072660227 + .long 1088178584 + .long 1072659487 + .long 324057537 + .long 1072658739 + .long 2101288076 + .long 1072657982 + .long 2085133974 + .long 1072657217 + .long 235324451 + .long 1072656444 + .long 806051592 + .long 1072655662 + .long 3756033140 + .long 1072654871 + .long 453542543 + .long 1072654073 + .long 3741177327 + .long 1072653265 + .long 691216109 + .long 1072652450 + .long 4145223372 + .long 1072651625 + .long 1174439091 + .long 1072650793 + .long 324416139 + .long 1072649952 + .long 1550246310 + .long 1072649102 + .long 511524674 + .long 1072648244 + .long 1457248482 + .long 1072647377 + .long 45944955 + .long 1072646502 + .long 525537397 + .long 1072645618 + .long 2848440188 + .long 1072644725 + .long 2671555633 + .long 1072643824 + .long 4241172637 + .long 1072642914 + .long 3213094278 + .long 1072641996 + .long 3832503688 + .long 1072641069 + .long 1754091534 + .long 1072640134 + .long 1221921804 + .long 1072639190 + .long 2184526489 + .long 1072638237 + .long 294902089 + .long 1072637276 + .long 4090375270 + .long 1072636305 + .long 632860906 + .long 1072635327 + .long 2753498702 + .long 1072634339 + .long 1808009252 + .long 1072633343 + .long 2036428672 + .long 1072632338 + .long 3383235626 + .long 1072631324 + .long 1497347484 + .long 1072630302 + .long 617018317 + .long 1072629271 + .long 684933058 + .long 1072628231 + .long 1643170798 + .long 1072627182 + .long 3011066360 + .long 1072625592 + .long 957158713 + .long 1072623442 + .long 1390907941 + .long 1072621256 + .long 3819155270 + .long 1072619034 + .long 3443571196 + .long 1072616777 + .long 4045412458 + .long 1072614484 + .long 805503923 + .long 1072612156 + .long 1778922015 + .long 1072609791 + .long 2125033665 + .long 1072607390 + .long 1287203863 + .long 1072604953 + .long 2992629568 + .long 1072602479 + .long 2367267127 + .long 1072599969 + .long 3115526047 + .long 1072597422 + .long 340219539 + .long 1072594839 + .long 2017215719 + .long 1072592218 + .long 3225443424 + .long 1072589560 + .long 3326565673 + .long 1072586865 + .long 1669811211 + .long 1072584133 + .long 1886735022 + .long 1072581363 + .long 3301071171 + .long 1072578555 + .long 928514283 + .long 1072575710 + .long 2656364059 + .long 1072572826 + .long 3473490507 + .long 1072569904 + .long 2649965606 + .long 1072566944 + .long 3736819052 + .long 1072563945 + .long 1680885175 + .long 1072560908 + .long 4413771 + .long 1072557832 + .long 2214869753 + .long 1072554716 + .long 3214725184 + .long 1072551561 + .long 2186079903 + .long 1072548367 + .long 2590372131 + .long 1072545133 + .long 3578146079 + .long 1072541859 + .long 4283712755 + .long 1072538545 + .long 3824834510 + .long 1072535191 + .long 1302400298 + .long 1072531797 + .long 95058636 + .long 1072528362 + .long 3563906063 + .long 1072524885 + .long 2167230730 + .long 1072521368 + .long 3524918334 + .long 1072517809 + .long 2353304918 + .long 1072514209 + .long 1939625839 + .long 1072510567 + .long 1256714581 + .long 1072506883 + .long 3552525848 + .long 1072503156 + .long 3464809522 + .long 1072499387 + .long 4200542593 + .long 1072495575 + .long 355609124 + .long 1072491721 + .long 3684139099 + .long 1072487822 + .long 148355918 + .long 1072483881 + .long 1457689242 + .long 1072479895 + .long 2118591596 + .long 1072475865 + .long 908848089 + .long 1072471791 + .long 877032689 + .long 1072467672 + .long 752012304 + .long 1072463508 + .long 3532301749 + .long 1072459298 + .long 3600563221 + .long 1072455043 + .long 3902857084 + .long 1072450742 + .long 3063101036 + .long 1072446395 + .long 3972344374 + .long 1072442001 + .long 903183549 + .long 1072437561 + .long 983892938 + .long 1072433073 + .long 2722858568 + .long 1072428537 + .long 302790515 + .long 1072423954 + .long 759811057 + .long 1072419322 + .long 2507809922 + .long 1072414641 + .long 2388408813 + .long 1072407528 + .long 2084492942 + .long 1072397870 + .long 2435703301 + .long 1072388010 + .long 1935433360 + .long 1072377945 + .long 2742047290 + .long 1072367671 + .long 2053284205 + .long 1072357185 + .long 657783367 + .long 1072346483 + .long 2893664841 + .long 1072335560 + .long 3718906405 + .long 1072324413 + .long 1547896303 + .long 1072313038 + .long 2494058440 + .long 1072301429 + .long 3133238742 + .long 1072289582 + .long 3327000086 + .long 1072277492 + .long 1860667274 + .long 1072265154 + .long 665340747 + .long 1072252562 + .long 443347841 + .long 1072239710 + .long 581282618 + .long 1072226592 + .long 3349780465 + .long 1072213201 + .long 914217606 + .long 1072199532 + .long 989797661 + .long 1072185576 + .long 945436416 + .long 1072171326 + .long 549291300 + .long 1072156774 + .long 1814636389 + .long 1072141911 + .long 239092858 + .long 1072126729 + .long 1794680724 + .long 1072111217 + .long 1241534678 + .long 1072095366 + .long 3366566214 + .long 1072079164 + .long 1244090828 + .long 1072062601 + .long 1708448120 + .long 1072045663 + .long 3544260650 + .long 1072028337 + .long 1402741403 + .long 1072010610 + .long 2551936888 + .long 1071992465 + .long 617669739 + .long 1071973887 + .long 794002186 + .long 1071954857 + .long 2021237693 + .long 1071935356 + .long 540450384 + .long 1071915364 + .long 1920555537 + .long 1071894857 + .long 2879585206 + .long 1071873811 + .long 3000237455 + .long 1071852199 + .long 3352974346 + .long 1071829991 + .long 569629937 + .long 1071807155 + .long 2077237208 + .long 1071783653 + .long 2284891805 + .long 1071759446 + .long 1226651784 + .long 1071734489 + .long 1102047405 + .long 1071708731 + .long 2009896384 + .long 1071682115 + .long 927419082 + .long 1071654577 + .long 85010366 + .long 1071607413 + .long 696431025 + .long 1071548180 + .long 2611410541 + .long 1071486585 + .long 2612593658 + .long 1071422396 + .long 3548155306 + .long 1071355336 + .long 3887997484 + .long 1071285073 + .long 244854763 + .long 1071211202 + .long 4214445648 + .long 1071133216 + .long 2303966727 + .long 1071050478 + .long 3991040013 + .long 1070962152 + .long 3126952278 + .long 1070867118 + .long 1817448378 + .long 1070763804 + .long 1793814864 + .long 1070649884 + .long 3507224072 + .long 1070447193 + .long 4027609105 + .long 1070148772 + .long 577507993 + .long 1069779414 + .long 2310232419 + .long 1068931829 + .type T_table,@object + .size T_table,2048 + .align 16 +Tbl_addr: + .long 3822952792 + .long 1021639372 + .long 182792448 + .long 1068507836 + .long 2264213271 + .long 1019558908 + .long 649052928 + .long 1068524253 + .long 1797139609 + .long 1022295143 + .long 1243095296 + .long 1068540671 + .long 1415938756 + .long 1021439537 + .long 2033294592 + .long 1068557090 + .long 2356809978 + .long 1021777916 + .long 3088063744 + .long 1068573510 + .long 2669055318 + .long 1022124482 + .long 180888576 + .long 1068589932 + .long 3566445325 + .long 1021358712 + .long 1970196992 + .long 1068606354 + .long 896980323 + .long 1021319659 + .long 4229555456 + .long 1068622777 + .long 436049712 + .long 1021319758 + .long 2732572160 + .long 1068639202 + .long 583123209 + .long 1020797960 + .long 1842831872 + .long 1068655628 + .long 1370449804 + .long 1021429270 + .long 1628994560 + .long 1068672055 + .long 2411391464 + .long 1021057980 + .long 2159763712 + .long 1068688483 + .long 1208692749 + .long 1021943903 + .long 3503886336 + .long 1068704912 + .long 538793309 + .long 1019744063 + .long 1435187200 + .long 1068721343 + .long 4085087612 + .long 1020608419 + .long 317469952 + .long 1068737775 + .long 144386942 + .long 1021440732 + .long 219617280 + .long 1068754208 + .long 2940088361 + .long 1019981122 + .long 1210558208 + .long 1068770642 + .long 2176850347 + .long 1018373705 + .long 3359268352 + .long 1068787077 + .long 2395611454 + .long 1021889042 + .long 2439803648 + .long 1068803514 + .long 1650705253 + .long 1020227966 + .long 2816203520 + .long 1068819952 + .long 3702166386 + .long 1019379914 + .long 262620672 + .long 1068836392 + .long 1855649370 + .long 1020453124 + .long 3438159616 + .long 1068852832 + .long 923063860 + .long 1019273834 + .long 3822105856 + .long 1068869274 + .long 4289947947 + .long 1019434249 + .long 1483729920 + .long 1068885718 + .long 787455814 + .long 1020738379 + .long 787321088 + .long 1068902163 + .long 3321653337 + .long 1021842569 + .long 1802253312 + .long 1068918609 + .long 2653633526 + .long 1021821525 + .long 302985984 + .long 1068935057 + .long 161272028 + .long 1021655149 + .long 653966080 + .long 1068951506 + .long 2566098667 + .long 1020066219 + .long 2924727296 + .long 1068967956 + .long 3646493722 + .long 1014292285 + .long 2889890304 + .long 1068984408 + .long 1081009196 + .long 1022189620 + .long 619098112 + .long 1069000862 + .long 4011643355 + .long 1021773297 + .long 477017600 + .long 1069017317 + .long 4030305534 + .long 1021292252 + .long 2533403904 + .long 1069033773 + .long 2645187591 + .long 1019527099 + .long 2563102208 + .long 1069050231 + .long 3857293792 + .long 1022311697 + .long 635982336 + .long 1069066691 + .long 3625936637 + .long 1017511744 + .long 1116940800 + .long 1069083152 + .long 3653872993 + .long 1022016631 + .long 4075964160 + .long 1069099614 + .long 2468900271 + .long 1021769532 + .long 993165568 + .long 1069116079 + .long 1358104224 + .long 1021199776 + .long 528586752 + .long 1069132545 + .long 2200950332 + .long 1022024872 + .long 2752395776 + .long 1069149012 + .long 3197072454 + .long 1017751319 + .long 3439855616 + .long 1069165481 + .long 1651081806 + .long 1020809338 + .long 2661257728 + .long 1069181952 + .long 539032752 + .long 1021728805 + .long 486957312 + .long 1069198425 + .long 3136045149 + .long 1016888671 + .long 1282340352 + .long 1069214899 + .long 2593963259 + .long 1018956103 + .long 822921728 + .long 1069231375 + .long 2146032737 + .long 1022306465 + .long 3474216192 + .long 1069247852 + .long 3976811625 + .long 1021350207 + .long 716902656 + .long 1069264332 + .long 718267222 + .long 1018624727 + .long 1211594496 + .long 1069280813 + .long 1485641389 + .long 1018447451 + .long 734070272 + .long 1069297296 + .long 354455128 + .long 1021341291 + .long 3650110720 + .long 1069313780 + .long 682185947 + .long 1021651853 + .long 1440663040 + .long 1069330267 + .long 3558574550 + .long 1021615110 + .long 2766612224 + .long 1069346755 + .long 874607978 + .long 1017746872 + .long 3404011008 + .long 1069363245 + .long 4154988502 + .long 1021439906 + .long 3423949056 + .long 1069379737 + .long 2263202309 + .long 1021479615 + .long 2897587712 + .long 1069396231 + .long 2562065031 + .long 1022090363 + .long 1896159232 + .long 1069412727 + .long 3836237663 + .long 1019867288 + .long 490968576 + .long 1069429225 + .long 3322056743 + .long 1006752762 + .long 3048360192 + .long 1069445724 + .long 1152314833 + .long 1013122252 + .long 1049850624 + .long 1069462226 + .long 3601590727 + .long 1022214610 + .long 3156899584 + .long 1069478729 + .long 1855169970 + .long 1019487271 + .long 851173376 + .long 1069495235 + .long 312649594 + .long 1020868604 + .long 2794281728 + .long 1069511742 + .long 1093490181 + .long 1020777577 + .long 468042496 + .long 1069528252 + .long 1152540679 + .long 1021403732 + .long 2534219264 + .long 1069544763 + .long 2292126035 + .long 1021872430 + .long 1376146432 + .long 1069558527 + .long 3293753641 + .long 1020500454 + .long 4175442432 + .long 1069575044 + .long 3626347564 + .long 1021610969 + .long 3523113472 + .long 1069591566 + .long 339956500 + .long 1021119039 + .long 4003350528 + .long 1069608092 + .long 3429333082 + .long 1022813542 + .long 1611067392 + .long 1069624623 + .long 2298017544 + .long 1021977587 + .long 931782144 + .long 1069641158 + .long 2164684743 + .long 1021250988 + .long 2256725504 + .long 1069657697 + .long 1138762335 + .long 1021443776 + .long 1582853120 + .long 1069674241 + .long 1084010382 + .long 1022994693 + .long 3497758720 + .long 1069690789 + .long 406366244 + .long 1022713586 + .long 3999816960 + .long 1069707342 + .long 1488723042 + .long 1023381290 + .long 3383096064 + .long 1069723900 + .long 2541558953 + .long 1019137887 + .long 1942403584 + .long 1069740463 + .long 1879620343 + .long 1022653642 + .long 4268263680 + .long 1069757030 + .long 3039077047 + .long 1022252545 + .long 2067062272 + .long 1069773603 + .long 4190670677 + .long 1020725863 + .long 4225828096 + .long 1069790180 + .long 1998567321 + .long 1022014385 + .long 2452507136 + .long 1069806763 + .long 1511628873 + .long 1021900300 + .long 1340746240 + .long 1069823351 + .long 788367341 + .long 1022726208 + .long 1190035456 + .long 1069839944 + .long 3856337230 + .long 1021834118 + .long 2300688384 + .long 1069856542 + .long 3211396579 + .long 1022621365 + .long 678886400 + .long 1069873146 + .long 4001011887 + .long 1022042646 + .long 921594112 + .long 1069889755 + .long 557811968 + .long 1023065533 + .long 3331668992 + .long 1069906369 + .long 1877060679 + .long 1022419742 + .long 3917875200 + .long 1069922989 + .long 1181055171 + .long 1022752712 + .long 2984829696 + .long 1069939615 + .long 4294526932 + .long 1021499988 + .long 838049024 + .long 1069956247 + .long 3658081878 + .long 1022957952 + .long 2078928384 + .long 1069972884 + .long 820353701 + .long 1019391107 + .long 2719854336 + .long 1069989527 + .long 1644022489 + .long 1023378240 + .long 3069117696 + .long 1070006176 + .long 2771393702 + .long 1019319954 + .long 3435962368 + .long 1070022831 + .long 3876394145 + .long 1023024433 + .long 4130595328 + .long 1070039492 + .long 1630447748 + .long 1021465882 + .long 1169236224 + .long 1070056160 + .long 2828355997 + .long 1020458120 + .long 3453997312 + .long 1070072833 + .long 164091641 + .long 1020388279 + .long 2708127744 + .long 1070089513 + .long 3036550223 + .long 1023328684 + .long 3540797696 + .long 1070106199 + .long 3710949463 + .long 1022568805 + .long 1972276736 + .long 1070122892 + .long 3885277950 + .long 1019761674 + .long 2613815552 + .long 1070139591 + .long 2764165077 + .long 1022921023 + .long 1487791616 + .long 1070156297 + .long 1330644769 + .long 1023162679 + .long 3207593472 + .long 1070173009 + .long 3911007221 + .long 1022993496 + .long 3797764608 + .long 1070189728 + .long 979712598 + .long 1022554580 + .long 3578920448 + .long 1070206454 + .long 2825738223 + .long 1020223708 + .long 2872795648 + .long 1070223187 + .long 392451124 + .long 1022666279 + .long 2002258432 + .long 1070239927 + .long 3730407632 + .long 1023148291 + .long 1291326464 + .long 1070256674 + .long 3723802980 + .long 1022514089 + .long 1065180928 + .long 1070273428 + .long 2635617463 + .long 1022654470 + .long 1650181632 + .long 1070290189 + .long 2061982883 + .long 1022853411 + .long 3373882880 + .long 1070306957 + .long 319732785 + .long 1022017175 + .long 2270081280 + .long 1070323733 + .long 2237757411 + .long 1023064087 + .long 2963732736 + .long 1070340516 + .long 468839165 + .long 1023293774 + .long 1491099904 + .long 1070357307 + .long 1502657946 + .long 1021533479 + .long 2479636480 + .long 1070374105 + .long 482913562 + .long 1021986286 + .long 1968133632 + .long 1070390911 + .long 3281474337 + .long 1022646400 + .long 291639040 + .long 1070407725 + .long 2453320259 + .long 1022812423 + .long 2081472512 + .long 1070424546 + .long 2939989570 + .long 1023091888 + .long 3380340480 + .long 1070441375 + .long 2850707499 + .long 1021921109 + .long 232287488 + .long 1070458213 + .long 3674625342 + .long 1020725130 + .long 1567614208 + .long 1070475058 + .long 9347334 + .long 1022024009 + .long 3433091072 + .long 1070491911 + .long 282524999 + .long 1021433523 + .long 1876877312 + .long 1070508773 + .long 3470449440 + .long 1019309721 + .long 1538472192 + .long 1070525643 + .long 2089486825 + .long 1019698916 + .long 2763830784 + .long 1070542521 + .long 443498115 + .long 1020505194 + .long 1605381632 + .long 1070559408 + .long 3018871601 + .long 1022869913 + .long 2706946048 + .long 1070576303 + .long 3936260892 + .long 1023175875 + .long 2123887360 + .long 1070593207 + .long 2994220655 + .long 1022825948 + .long 104015104 + .long 1070603108 + .long 335054493 + .long 1023441853 + .long 2904568832 + .long 1070615800 + .long 1451215633 + .long 1023853857 + .long 3456197120 + .long 1070632739 + .long 436334733 + .long 1024026432 + .long 252452352 + .long 1070649697 + .long 34596167 + .long 1024031396 + .long 3328018432 + .long 1070666672 + .long 2644547073 + .long 1024296758 + .long 1255829248 + .long 1070683667 + .long 552832586 + .long 1023763122 + .long 4097058560 + .long 1070700680 + .long 1955640623 + .long 1021394654 + .long 451770112 + .long 1070717714 + .long 3428903777 + .long 1022941142 + .long 408920832 + .long 1070734767 + .long 165503263 + .long 1023894958 + .long 1186960640 + .long 1070751840 + .long 435826450 + .long 1024026134 + .long 19078656 + .long 1070768934 + .long 1834169749 + .long 1022899284 + .long 2743490304 + .long 1070786048 + .long 494581074 + .long 1018818479 + .long 2328961024 + .long 1070803184 + .long 2987908834 + .long 1022581110 + .long 350011392 + .long 1070820342 + .long 240771184 + .long 1024143083 + .long 2692326912 + .long 1070837521 + .long 666056837 + .long 1022394776 + .long 2373274368 + .long 1070854723 + .long 2484337770 + .long 1024228156 + .long 1017131520 + .long 1070871948 + .long 3285648279 + .long 1024025789 + .long 265558272 + .long 1070889196 + .long 392241896 + .long 1024252809 + .long 1778008064 + .long 1070906467 + .long 1536107943 + .long 1023949300 + .long 2937184768 + .long 1070923762 + .long 3541062251 + .long 1019448646 + .long 1144442880 + .long 1070941082 + .long 3691683781 + .long 1022123948 + .long 2410165504 + .long 1070958426 + .long 1804181960 + .long 1023945221 + .long 4174350848 + .long 1070975795 + .long 2016094861 + .long 1021716585 + .long 3897012480 + .long 1070993190 + .long 175294410 + .long 1023703404 + .long 3353623040 + .long 1071010611 + .long 167973242 + .long 1023240839 + .long 45671168 + .long 1071028059 + .long 2166856113 + .long 1021565413 + .long 86063872 + .long 1071045533 + .long 2676254727 + .long 1023985299 + .long 1019772672 + .long 1071063034 + .long 989043593 + .long 1021549587 + .long 414297344 + .long 1071080563 + .long 3960972046 + .long 1024307251 + .long 155173120 + .long 1071098120 + .long 1830919291 + .long 1021592251 + .long 2151562240 + .long 1071115705 + .long 405408666 + .long 1023423128 + .long 4041854720 + .long 1071133319 + .long 2043497827 + .long 1024411503 + .long 3489224192 + .long 1071150963 + .long 3072215864 + .long 1022698635 + .long 2477196288 + .long 1071168637 + .long 1812195139 + .long 1022689192 + .long 3015298816 + .long 1071186341 + .long 764841969 + .long 1021027331 + .long 2844731136 + .long 1071204076 + .long 2878117321 + .long 1019116513 + .long 4028950528 + .long 1071221842 + .long 698911452 + .long 1023265602 + .long 69441536 + .long 1071239641 + .long 3253467847 + .long 1020795075 + .long 1676209920 + .long 1071257471 + .long 4272431167 + .long 1022873982 + .long 2408752384 + .long 1071275334 + .long 648519100 + .long 1024385717 + .long 151623680 + .long 1071293231 + .long 345257017 + .long 1019561408 + .long 1410154240 + .long 1071311161 + .long 197863993 + .long 1023224207 + .long 4131351552 + .long 1071329125 + .long 2620801789 + .long 1024411169 + .long 1999664384 + .long 1071347125 + .long 3952692616 + .long 1024168086 + .long 1617668864 + .long 1071365160 + .long 3019889809 + .long 1021907692 + .long 1032074240 + .long 1071383231 + .long 59469899 + .long 1023656194 + .long 2619492096 + .long 1071401338 + .long 1417526820 + .long 1021457783 + .long 202429440 + .long 1071419483 + .long 2927667935 + .long 1019175447 + .long 525044224 + .long 1071437665 + .long 38166811 + .long 1023981879 + .long 1779258880 + .long 1071455885 + .long 481252500 + .long 1023310234 + .long 2195673600 + .long 1071474144 + .long 3962395981 + .long 1021339088 + .long 44573696 + .long 1071492443 + .long 3936281395 + .long 1023014829 + .long 2226905344 + .long 1071510781 + .long 1515320476 + .long 1024320623 + .long 2800512512 + .long 1071529160 + .long 1225403697 + .long 1021081846 + .long 161113600 + .long 1071547581 + .long 3064809733 + .long 1024173917 + .long 1338410240 + .long 1071566043 + .long 2027604973 + .long 1024362526 + .long 522433280 + .long 1071584548 + .long 2055171723 + .long 1023858825 + .long 539595776 + .long 1071603096 + .long 3868820135 + .long 1022936424 + .long 4264017664 + .long 1071621687 + .long 3228065145 + .long 1023479578 + .long 1733924096 + .long 1071640324 + .long 3511934475 + .long 1022496355 + .long 108880384 + .long 1071651839 + .long 615880967 + .long 1023519706 + .long 3517856512 + .long 1071661202 + .long 3113108559 + .long 1025190289 + .long 4043153152 + .long 1071670589 + .long 1571836218 + .long 1023106116 + .long 3251299072 + .long 1071680000 + .long 3444076102 + .long 1022187841 + .long 2736921600 + .long 1071689435 + .long 272771483 + .long 1025095280 + .long 3897698560 + .long 1071703633 + .long 2075390188 + .long 1022489022 + .long 3209485056 + .long 1071722652 + .long 1438094065 + .long 1021844944 + .long 3781432064 + .long 1071741774 + .long 1675017145 + .long 1024143828 + .long 2684184064 + .long 1071761003 + .long 2259963753 + .long 1024731393 + .long 1840489728 + .long 1071780342 + .long 3372883597 + .long 1023431408 + .long 3764087808 + .long 1071799794 + .long 3307523102 + .long 1024485788 + .long 3006232320 + .long 1071819364 + .long 3088971966 + .long 1025213251 + .long 3374881280 + .long 1071839055 + .long 834437749 + .long 1025236452 + .long 797284864 + .long 1071858872 + .long 3122663941 + .long 1025320473 + .long 545765120 + .long 1071878818 + .long 826539625 + .long 1022450955 + .long 107562240 + .long 1071898898 + .long 339584600 + .long 1022481255 + .long 2123649024 + .long 1071919116 + .long 3912959833 + .long 1024321009 + .long 1562385664 + .long 1071939478 + .long 2846067230 + .long 1023343981 + .long 2963085824 + .long 1071959988 + .long 954548627 + .long 1021475211 + .long 3325550592 + .long 1071980652 + .long 3459651155 + .long 1025305573 + .long 775752448 + .long 1072001476 + .long 3582746667 + .long 1023859460 + .long 3238590720 + .long 1072022464 + .long 634636162 + .long 1024472353 + .long 2758801920 + .long 1072043624 + .long 3078216319 + .long 1025304516 + .long 1370319104 + .long 1072064962 + .long 2570569078 + .long 1025099442 + .long 2615805184 + .long 1072086484 + .long 3729933412 + .long 1024605112 + .long 3077336576 + .long 1072108198 + .long 1948916066 + .long 1024781603 + .long 1099528192 + .long 1072130112 + .long 3139143157 + .long 1023729360 + .long 1231903232 + .long 1072152233 + .long 1349513477 + .long 1024737515 + .long 1507504128 + .long 1072174570 + .long 3484516322 + .long 1024000959 + .long 2214659840 + .long 1072197132 + .long 2563820917 + .long 1025225535 + .long 1804739840 + .long 1072219929 + .long 760038746 + .long 1024482855 + .long 1413746688 + .long 1072242971 + .long 3401734714 + .long 1025129838 + .long 821409536 + .long 1072266269 + .long 3729772551 + .long 1025484796 + .long 3031825664 + .long 1072289834 + .long 122256749 + .long 1024752594 + .long 1710784256 + .long 1072313680 + .long 1518205483 + .long 1024724809 + .long 3025265152 + .long 1072337819 + .long 409951989 + .long 1022835555 + .long 287769088 + .long 1072362267 + .long 800355594 + .long 1022484850 + .long 198179840 + .long 1072387038 + .long 3502926213 + .long 1024209373 + .long 1909130496 + .long 1072412149 + .long 3064694319 + .long 1025380823 + .long 1941732096 + .long 1072437619 + .long 4112930390 + .long 1024294679 + .long 3492010496 + .long 1072463467 + .long 2684918107 + .long 1023220233 + .long 81959680 + .long 1072489716 + .long 220021366 + .long 1020635131 + .long 2297837056 + .long 1072516387 + .long 4027683826 + .long 1021041185 + .long 270404096 + .long 1072543508 + .long 2012766065 + .long 1021780753 + .long 3667376896 + .long 1072571105 + .long 2727981522 + .long 1023009874 + .long 330400256 + .long 1072599212 + .long 2940017003 + .long 1025393439 + .long 1119293952 + .long 1072627861 + .long 1608550416 + .long 1022675612 + .long 3536155904 + .long 1072657091 + .long 349665778 + .long 1025156751 + .long 3078046720 + .long 1072686946 + .long 2016159996 + .long 1022193169 + .long 455228416 + .long 1072705361 + .long 1908539328 + .long 1026126332 + .long 1871505664 + .long 1072720988 + .long 2784700894 + .long 1025922277 + .long 1630994432 + .long 1072737010 + .long 361107678 + .long 1022887244 + .long 2084558336 + .long 1072753462 + .type Tbl_addr,@object + .size Tbl_addr,3840 + .space 768, 0x00 # pad + .align 16 +cv: + .long 0 + .long 0 + .long 1431655765 + .long 3217380693 + .long 858993459 + .long 3216192307 + .long 3067833783 + .long 3215383405 + .type cv,@object + .size cv,32 + .align 16 +PI_BY_2: + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .type PI_BY_2,@object + .size PI_BY_2,16 + .align 16 +NEG_PI: + .long 856972295 + .long 3164710438 + .long 1413754136 + .long 3221823995 + .type NEG_PI,@object + .size NEG_PI,16 + .align 16 +cv2: + .long 780903145 + .long 1066854586 + .long 858993459 + .long 1068708659 + .long 3340530119 + .long 1067392113 + .long 1431655765 + .long 1069897045 + .long 1321528399 + .long 1066517740 + .long 3067833783 + .long 1067899757 + .long 2021159460 + .long 1065855096 + .long 2576980378 + .long 1066178969 + .type cv2,@object + .size cv2,64 + .align 16 +HALFMASK: + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .type HALFMASK,@object + .size HALFMASK,16 + .align 16 +PI: + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 1074340347 + .type PI,@object + .size PI,16 + .align 4 +ONEMASK: + .long 0 + .long 1072693248 + .type ONEMASK,@object + .size ONEMASK,8 + .align 4 +TMASK: + .long 0 + .long 4294950912 + .type TMASK,@object + .size TMASK,8 + .align 4 +ONE_BY_2: + .long 0 + .long 1071644672 + .type ONE_BY_2,@object + .size ONE_BY_2,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_acos.1-. + .4byte ..___tag_value_acos.5-..___tag_value_acos.1 + .2byte 0x0400 + .4byte ..___tag_value_acos.3-..___tag_value_acos.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_acos.4-..___tag_value_acos.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_asin.S b/libm/x86_64/e_asin.S new file mode 100644 index 0000000..9f41c7c --- /dev/null +++ b/libm/x86_64/e_asin.S @@ -0,0 +1,2036 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// To compute asin(s), separate schemes are used when s is in different +// intervals. +// +// |s| in [2^{-4}, sqrt(3)/2): +// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52 +// asin(s)=asin(t)+asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2) +// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7) +// For the first degree term, r is evaluated as +// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t) +// (sqrt(1-t^2) read from table) +// The main source of error is still R (may still be affected by up to 3 ulps +// of rounding error). The table size must be sufficiently large, to minimize +// this effect. +// +// |s| in [sqrt(3)/2, 255/256): +// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded) +// asin(|s|)=pi/2-asin(t)+asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2) +// asin(r) evaluated as polynomial (same as above) +// The first degree term is evaluated as +// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2)) +// +// |s|<2^{-4}: evaluate as 13-degree polynomial +// +// |s| in [255/256,1): asin(|s|)=pi/2-asin(sqrt(1-s^2)) +// use 17-degree polynomial, get error term +// Q*eps ~ (1-s^2-Q^2)/(2*Q) for first term +// ( Q(1+eps)=sqrt(1-s^2) ) +// +// Special cases: +// asin(NaN) = quiet NaN, and raise invalid exception +// asin(INF) = QNaN and raise invalid exception +// asin(x) = QNaN and raise invalid exception, for |x|>1.0 +// asin(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin asin +ENTRY(asin) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_asin.1: + subq $24, %rsp +..___tag_value_asin.3: + movsd %xmm0, (%rsp) +..B1.2: + stmxcsr 16(%rsp) + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + jne .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + movsd ABSVALMASK(%rip), %xmm4 + movsd ONEMASK(%rip), %xmm3 + xorpd %xmm5, %xmm5 + movsd TMASK(%rip), %xmm2 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movq %xmm0, %xmm1 + psrlq $44, %xmm0 + movd %xmm0, %edx + movq %xmm1, %xmm7 + movl $8192, %ecx + pinsrw $2, %ecx, %xmm5 + movq %xmm1, %xmm0 + movl $524287, %eax + andl %edx, %eax + subl $260864, %eax + cmpl $955, %eax + jae .L_2TAG_PACKET_2.0.2 + mulsd %xmm1, %xmm1 + andl $65535, %edx + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + andpd %xmm7, %xmm2 + andl $-4, %edx + subl $64256, %edx + lea T_table(%rip), %r8 + movsd (%r8,%rdx,2), %xmm1 + orpd %xmm5, %xmm2 + lea Tbl_addr(%rip), %r8 + movapd (%r8,%rdx,4), %xmm4 + movq %xmm7, %xmm6 + addsd %xmm2, %xmm7 + subsd %xmm2, %xmm0 + mulsd %xmm7, %xmm0 + mulsd %xmm1, %xmm6 + mulsd %xmm2, %xmm3 + movq %xmm6, %xmm1 + addsd %xmm3, %xmm6 + divsd %xmm6, %xmm0 + movsd 16+cv(%rip), %xmm7 + movsd cv(%rip), %xmm5 + subsd %xmm3, %xmm1 + andpd SIGNMASK(%rip), %xmm2 + movq %xmm1, %xmm3 + mulsd %xmm1, %xmm1 + movsd 8+cv(%rip), %xmm6 + mulsd %xmm1, %xmm3 + mulsd %xmm1, %xmm7 + mulsd %xmm3, %xmm5 + xorpd %xmm2, %xmm4 + mulsd %xmm1, %xmm3 + addsd %xmm7, %xmm6 + mulsd %xmm3, %xmm6 + addsd %xmm4, %xmm5 + pshufd $238, %xmm4, %xmm4 + addsd %xmm5, %xmm6 + orpd %xmm2, %xmm4 + addsd %xmm6, %xmm0 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_3.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_3.0.2: + addsd %xmm4, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + subl $955, %eax + cmpl $67, %eax + jae .L_2TAG_PACKET_4.0.2 + mulsd %xmm1, %xmm1 + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + movl %edx, %eax + andpd ABSVALMASK(%rip), %xmm0 + andpd HALFMASK2(%rip), %xmm7 + movq %xmm0, %xmm1 + movsd ONEMASK(%rip), %xmm4 + movq %xmm7, %xmm6 + subsd %xmm7, %xmm1 + mulsd %xmm7, %xmm7 + addsd %xmm6, %xmm0 + subsd %xmm7, %xmm4 + mulsd %xmm1, %xmm0 + movq %xmm3, %xmm7 + andpd %xmm3, %xmm2 + psllq $2, %xmm3 + pextrw $3, %xmm3, %edx + orpd %xmm5, %xmm2 + subl $65216, %edx + addl %edx, %edx + lea T_table(%rip), %r8 + mulsd (%r8,%rdx,4), %xmm7 + mulsd %xmm2, %xmm6 + movapd PI_BY_2(%rip), %xmm3 + mulsd %xmm2, %xmm1 + mulsd %xmm2, %xmm2 + subsd %xmm7, %xmm6 + addsd %xmm1, %xmm6 + subsd %xmm2, %xmm4 + addsd %xmm7, %xmm7 + movsd cv(%rip), %xmm5 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm7 + movsd 16+cv(%rip), %xmm0 + divsd %xmm7, %xmm4 + movsd 8+cv(%rip), %xmm2 + lea Tbl_addr(%rip), %r8 + subpd (%r8,%rdx,8), %xmm3 + movq %xmm6, %xmm1 + mulsd %xmm6, %xmm6 + andl $524288, %eax + shrl $4, %eax + mulsd %xmm6, %xmm0 + mulsd %xmm6, %xmm1 + mulsd %xmm1, %xmm5 + mulsd %xmm6, %xmm1 + addsd %xmm2, %xmm0 + pxor %xmm6, %xmm6 + mulsd %xmm1, %xmm0 + addsd %xmm3, %xmm5 + pinsrw $3, %eax, %xmm6 + addsd %xmm5, %xmm0 + movq %xmm4, %xmm5 + pshufd $238, %xmm3, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm3 + subsd %xmm3, %xmm5 + subsd %xmm5, %xmm0 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_5.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_5.0.2: + xorpd %xmm6, %xmm0 + xorpd %xmm6, %xmm4 + subsd %xmm4, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + addl $15291, %eax + cmpl $14336, %eax + jae .L_2TAG_PACKET_6.0.2 + unpcklpd %xmm7, %xmm7 + movapd cv2(%rip), %xmm1 + movapd %xmm7, %xmm6 + movapd 16+cv2(%rip), %xmm2 + movapd 32+cv2(%rip), %xmm4 + mulpd %xmm7, %xmm7 + mulpd %xmm7, %xmm6 + mulpd %xmm7, %xmm1 + mulpd %xmm7, %xmm7 + movq %xmm6, %xmm3 + mulsd %xmm6, %xmm6 + addpd %xmm2, %xmm1 + mulpd %xmm7, %xmm4 + mulsd %xmm3, %xmm6 + addpd %xmm4, %xmm1 + mulpd %xmm6, %xmm1 + pshufd $238, %xmm1, %xmm2 + addsd %xmm2, %xmm1 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_7.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_7.0.2: + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + subl $15358, %eax + cmpl $2, %eax + jae .L_2TAG_PACKET_8.0.2 + mulsd %xmm1, %xmm1 + subsd %xmm1, %xmm3 + sqrtsd %xmm3, %xmm3 + movl %edx, %eax + andpd HALFMASK(%rip), %xmm7 + pshufd $68, %xmm3, %xmm5 + andpd HALFMASK(%rip), %xmm3 + movq %xmm7, %xmm1 + movsd ONEMASK(%rip), %xmm4 + movq %xmm7, %xmm6 + subsd %xmm7, %xmm0 + mulsd %xmm7, %xmm7 + addsd %xmm1, %xmm1 + mulsd %xmm0, %xmm1 + subsd %xmm7, %xmm4 + movq %xmm3, %xmm6 + mulsd %xmm3, %xmm3 + mulsd %xmm0, %xmm0 + subsd %xmm1, %xmm4 + subsd %xmm5, %xmm6 + addsd %xmm5, %xmm5 + subsd %xmm3, %xmm4 + movapd cv2(%rip), %xmm2 + pshufd $238, %xmm5, %xmm3 + subsd %xmm0, %xmm4 + addsd %xmm6, %xmm5 + pshufd $238, %xmm3, %xmm7 + addsd %xmm3, %xmm3 + mulsd %xmm6, %xmm5 + addsd %xmm5, %xmm4 + pshufd $238, %xmm7, %xmm6 + divsd %xmm3, %xmm4 + movapd 48+cv2(%rip), %xmm1 + movapd 16+cv2(%rip), %xmm5 + movapd 32+cv2(%rip), %xmm0 + mulpd %xmm7, %xmm7 + movq %xmm6, %xmm3 + mulpd %xmm7, %xmm2 + mulpd %xmm7, %xmm6 + shrl $4, %eax + andl $32768, %eax + mulsd %xmm7, %xmm1 + mulpd %xmm7, %xmm7 + addpd %xmm2, %xmm5 + movapd %xmm6, %xmm2 + mulsd %xmm6, %xmm6 + mulpd %xmm0, %xmm7 + movapd PI_BY_2(%rip), %xmm0 + mulsd %xmm6, %xmm2 + addpd %xmm5, %xmm7 + pshufd $238, %xmm1, %xmm5 + mulsd %xmm2, %xmm6 + mulpd %xmm2, %xmm7 + addsd %xmm5, %xmm1 + xorpd %xmm5, %xmm5 + pshufd $238, %xmm7, %xmm2 + mulsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm6 + addsd %xmm2, %xmm7 + movq %xmm3, %xmm2 + pinsrw $3, %eax, %xmm5 + subsd %xmm6, %xmm3 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm6 + addsd %xmm4, %xmm7 + subsd %xmm6, %xmm2 + subsd %xmm7, %xmm0 + subsd %xmm2, %xmm0 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_9.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_9.0.2: + xorpd %xmm5, %xmm0 + xorpd %xmm5, %xmm3 + subsd %xmm3, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_8.0.2: + addl $261886, %eax + cmpl $261888, %eax + jb .L_2TAG_PACKET_10.0.2 + movd %xmm0, %ecx + psrlq $32, %xmm0 + movd %xmm0, %edx + andl $2147483647, %edx + movl $1072693248, %eax + subl %edx, %eax + orl %ecx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_11.0.2 + movsd (%rsp), %xmm2 + movd %xmm2, %edx + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $2147483647, %ecx + subl $1, %edx + sbbl $2146435072, %ecx + cmpl $0, %ecx + jge .L_2TAG_PACKET_10.0.2 + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %edx + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_12.0.2 +.L_2TAG_PACKET_11.0.2: + movsd ABSVALMASK(%rip), %xmm1 + movsd PI_BY_2(%rip), %xmm2 + movsd 8+PI_BY_2(%rip), %xmm0 + addsd %xmm2, %xmm0 + andnpd %xmm7, %xmm1 + orpd %xmm1, %xmm0 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_13.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_13.0.2: + jmp ..B1.5 +.L_2TAG_PACKET_10.0.2: + movsd (%rsp), %xmm0 + xorpd %xmm6, %xmm6 + movq %xmm0, %xmm7 + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_14.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_14.0.2: + pextrw $3, %xmm0, %edx + andl $32752, %edx + subl $16, %edx + cmpl $32736, %edx + jb .L_2TAG_PACKET_15.0.2 + addsd %xmm0, %xmm6 + orpd %xmm6, %xmm0 + mulsd %xmm0, %xmm7 +.L_2TAG_PACKET_15.0.2: + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + movl %eax, 20(%rsp) + ldmxcsr 20(%rsp) + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_12.0.2: + movl 16(%rsp), %eax + andl $-24577, %eax + cmpl 16(%rsp), %eax + je .L_2TAG_PACKET_16.0.2 + stmxcsr 20(%rsp) + movl 16(%rsp), %eax + andl $24576, %eax + orl %eax, 20(%rsp) + ldmxcsr 20(%rsp) +.L_2TAG_PACKET_16.0.2: + movq %xmm0, 8(%rsp) +..B1.3: + movq 8(%rsp), %xmm0 +.L_2TAG_PACKET_17.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_asin.4: + ret +..___tag_value_asin.5: +END(asin) +# -- End asin + .section .rodata, "a" + .align 16 + .align 16 +ABSVALMASK: + .long 4294967295 + .long 2147483647 + .long 0 + .long 0 + .type ABSVALMASK,@object + .size ABSVALMASK,16 + .align 16 +T_table: + .long 2642784509 + .long 1072689083 + .long 1514442531 + .long 1072688953 + .long 333108933 + .long 1072688821 + .long 3392112024 + .long 1072688686 + .long 2099852862 + .long 1072688550 + .long 749609004 + .long 1072688412 + .long 3634632596 + .long 1072688271 + .long 2163248461 + .long 1072688129 + .long 628657846 + .long 1072687985 + .long 3324036511 + .long 1072687838 + .long 1657632815 + .long 1072687690 + .long 4217538760 + .long 1072687539 + .long 2411951597 + .long 1072687387 + .long 533944872 + .long 1072687233 + .long 2876566508 + .long 1072687076 + .long 847936891 + .long 1072686918 + .long 3036019913 + .long 1072686757 + .long 848884575 + .long 1072686595 + .long 2874443326 + .long 1072686430 + .long 520713666 + .long 1072686264 + .long 2375556481 + .long 1072686095 + .long 4141904948 + .long 1072685924 + .long 1522666382 + .long 1072685752 + .long 3105624104 + .long 1072685577 + .long 298666327 + .long 1072685401 + .long 1689524500 + .long 1072685222 + .long 2981002200 + .long 1072685041 + .long 4170844284 + .long 1072684858 + .long 961802263 + .long 1072684674 + .long 1941503454 + .long 1072684487 + .long 2812647170 + .long 1072684298 + .long 3572873869 + .long 1072684107 + .long 4219797823 + .long 1072683914 + .long 456039788 + .long 1072683720 + .long 869096151 + .long 1072683523 + .long 1161535119 + .long 1072683324 + .long 1330865866 + .long 1072683123 + .long 1374571204 + .long 1072682920 + .long 1290107538 + .long 1072682715 + .long 1074904836 + .long 1072682508 + .long 726366587 + .long 1072682299 + .long 241869763 + .long 1072682088 + .long 3913732079 + .long 1072681874 + .long 3149342765 + .long 1072681659 + .long 2240966306 + .long 1072681442 + .long 1185873216 + .long 1072681223 + .long 4276274591 + .long 1072681001 + .long 2919452883 + .long 1072680778 + .long 1407565635 + .long 1072680553 + .long 4032743551 + .long 1072680325 + .long 2202188565 + .long 1072680096 + .long 207977577 + .long 1072679865 + .long 2342160518 + .long 1072679631 + .long 11858423 + .long 1072679396 + .long 1804034453 + .long 1072679158 + .long 3420722787 + .long 1072678918 + .long 563930456 + .long 1072678677 + .long 1820539192 + .long 1072678433 + .long 2892501606 + .long 1072678187 + .long 3776710320 + .long 1072677939 + .long 175063337 + .long 1072677690 + .long 674333171 + .long 1072677438 + .long 976363026 + .long 1072677184 + .long 1077935934 + .long 1072676928 + .long 1921075490 + .long 1072676540 + .long 881493302 + .long 1072676016 + .long 3275752439 + .long 1072675483 + .long 486855588 + .long 1072674943 + .long 1077229111 + .long 1072674394 + .long 723950308 + .long 1072673837 + .long 3693582199 + .long 1072673271 + .long 1367335316 + .long 1072672698 + .long 2305837020 + .long 1072672116 + .long 2184358641 + .long 1072671526 + .long 972682840 + .long 1072670928 + .long 2935101762 + .long 1072670321 + .long 3745513263 + .long 1072669706 + .long 3372320886 + .long 1072669083 + .long 1783464620 + .long 1072668452 + .long 3241386215 + .long 1072667812 + .long 3418125284 + .long 1072667164 + .long 2280219148 + .long 1072666508 + .long 4088700758 + .long 1072665843 + .long 219227400 + .long 1072665171 + .long 3521816918 + .long 1072664489 + .long 1076205279 + .long 1072663800 + .long 1436484616 + .long 1072663102 + .long 271362610 + .long 1072662396 + .long 1838996688 + .long 1072661681 + .long 1807122518 + .long 1072660958 + .long 137953542 + .long 1072660227 + .long 1088178584 + .long 1072659487 + .long 324057537 + .long 1072658739 + .long 2101288076 + .long 1072657982 + .long 2085133974 + .long 1072657217 + .long 235324451 + .long 1072656444 + .long 806051592 + .long 1072655662 + .long 3756033140 + .long 1072654871 + .long 453542543 + .long 1072654073 + .long 3741177327 + .long 1072653265 + .long 691216109 + .long 1072652450 + .long 4145223372 + .long 1072651625 + .long 1174439091 + .long 1072650793 + .long 324416139 + .long 1072649952 + .long 1550246310 + .long 1072649102 + .long 511524674 + .long 1072648244 + .long 1457248482 + .long 1072647377 + .long 45944955 + .long 1072646502 + .long 525537397 + .long 1072645618 + .long 2848440188 + .long 1072644725 + .long 2671555633 + .long 1072643824 + .long 4241172637 + .long 1072642914 + .long 3213094278 + .long 1072641996 + .long 3832503688 + .long 1072641069 + .long 1754091534 + .long 1072640134 + .long 1221921804 + .long 1072639190 + .long 2184526489 + .long 1072638237 + .long 294902089 + .long 1072637276 + .long 4090375270 + .long 1072636305 + .long 632860906 + .long 1072635327 + .long 2753498702 + .long 1072634339 + .long 1808009252 + .long 1072633343 + .long 2036428672 + .long 1072632338 + .long 3383235626 + .long 1072631324 + .long 1497347484 + .long 1072630302 + .long 617018317 + .long 1072629271 + .long 684933058 + .long 1072628231 + .long 1643170798 + .long 1072627182 + .long 3011066360 + .long 1072625592 + .long 957158713 + .long 1072623442 + .long 1390907941 + .long 1072621256 + .long 3819155270 + .long 1072619034 + .long 3443571196 + .long 1072616777 + .long 4045412458 + .long 1072614484 + .long 805503923 + .long 1072612156 + .long 1778922015 + .long 1072609791 + .long 2125033665 + .long 1072607390 + .long 1287203863 + .long 1072604953 + .long 2992629568 + .long 1072602479 + .long 2367267127 + .long 1072599969 + .long 3115526047 + .long 1072597422 + .long 340219539 + .long 1072594839 + .long 2017215719 + .long 1072592218 + .long 3225443424 + .long 1072589560 + .long 3326565673 + .long 1072586865 + .long 1669811211 + .long 1072584133 + .long 1886735022 + .long 1072581363 + .long 3301071171 + .long 1072578555 + .long 928514283 + .long 1072575710 + .long 2656364059 + .long 1072572826 + .long 3473490507 + .long 1072569904 + .long 2649965606 + .long 1072566944 + .long 3736819052 + .long 1072563945 + .long 1680885175 + .long 1072560908 + .long 4413771 + .long 1072557832 + .long 2214869753 + .long 1072554716 + .long 3214725184 + .long 1072551561 + .long 2186079903 + .long 1072548367 + .long 2590372131 + .long 1072545133 + .long 3578146079 + .long 1072541859 + .long 4283712755 + .long 1072538545 + .long 3824834510 + .long 1072535191 + .long 1302400298 + .long 1072531797 + .long 95058636 + .long 1072528362 + .long 3563906063 + .long 1072524885 + .long 2167230730 + .long 1072521368 + .long 3524918334 + .long 1072517809 + .long 2353304918 + .long 1072514209 + .long 1939625839 + .long 1072510567 + .long 1256714581 + .long 1072506883 + .long 3552525848 + .long 1072503156 + .long 3464809522 + .long 1072499387 + .long 4200542593 + .long 1072495575 + .long 355609124 + .long 1072491721 + .long 3684139099 + .long 1072487822 + .long 148355918 + .long 1072483881 + .long 1457689242 + .long 1072479895 + .long 2118591596 + .long 1072475865 + .long 908848089 + .long 1072471791 + .long 877032689 + .long 1072467672 + .long 752012304 + .long 1072463508 + .long 3532301749 + .long 1072459298 + .long 3600563221 + .long 1072455043 + .long 3902857084 + .long 1072450742 + .long 3063101036 + .long 1072446395 + .long 3972344374 + .long 1072442001 + .long 903183549 + .long 1072437561 + .long 983892938 + .long 1072433073 + .long 2722858568 + .long 1072428537 + .long 302790515 + .long 1072423954 + .long 759811057 + .long 1072419322 + .long 2507809922 + .long 1072414641 + .long 2388408813 + .long 1072407528 + .long 2084492942 + .long 1072397870 + .long 2435703301 + .long 1072388010 + .long 1935433360 + .long 1072377945 + .long 2742047290 + .long 1072367671 + .long 2053284205 + .long 1072357185 + .long 657783367 + .long 1072346483 + .long 2893664841 + .long 1072335560 + .long 3718906405 + .long 1072324413 + .long 1547896303 + .long 1072313038 + .long 2494058440 + .long 1072301429 + .long 3133238742 + .long 1072289582 + .long 3327000086 + .long 1072277492 + .long 1860667274 + .long 1072265154 + .long 665340747 + .long 1072252562 + .long 443347841 + .long 1072239710 + .long 581282618 + .long 1072226592 + .long 3349780465 + .long 1072213201 + .long 914217606 + .long 1072199532 + .long 989797661 + .long 1072185576 + .long 945436416 + .long 1072171326 + .long 549291300 + .long 1072156774 + .long 1814636389 + .long 1072141911 + .long 239092858 + .long 1072126729 + .long 1794680724 + .long 1072111217 + .long 1241534678 + .long 1072095366 + .long 3366566214 + .long 1072079164 + .long 1244090828 + .long 1072062601 + .long 1708448120 + .long 1072045663 + .long 3544260650 + .long 1072028337 + .long 1402741403 + .long 1072010610 + .long 2551936888 + .long 1071992465 + .long 617669739 + .long 1071973887 + .long 794002186 + .long 1071954857 + .long 2021237693 + .long 1071935356 + .long 540450384 + .long 1071915364 + .long 1920555537 + .long 1071894857 + .long 2879585206 + .long 1071873811 + .long 3000237455 + .long 1071852199 + .long 3352974346 + .long 1071829991 + .long 569629937 + .long 1071807155 + .long 2077237208 + .long 1071783653 + .long 2284891805 + .long 1071759446 + .long 1226651784 + .long 1071734489 + .long 1102047405 + .long 1071708731 + .long 2009896384 + .long 1071682115 + .long 927419082 + .long 1071654577 + .long 85010366 + .long 1071607413 + .long 696431025 + .long 1071548180 + .long 2611410541 + .long 1071486585 + .long 2612593658 + .long 1071422396 + .long 3548155306 + .long 1071355336 + .long 3887997484 + .long 1071285073 + .long 244854763 + .long 1071211202 + .long 4214445648 + .long 1071133216 + .long 2303966727 + .long 1071050478 + .long 3991040013 + .long 1070962152 + .long 3126952278 + .long 1070867118 + .long 1817448378 + .long 1070763804 + .long 1793814864 + .long 1070649884 + .long 3507224072 + .long 1070447193 + .long 4027609105 + .long 1070148772 + .long 577507993 + .long 1069779414 + .long 2310232419 + .long 1068931829 + .type T_table,@object + .size T_table,2048 + .align 16 +Tbl_addr: + .long 3822952792 + .long 1021639372 + .long 182792448 + .long 1068507836 + .long 2264213271 + .long 1019558908 + .long 649052928 + .long 1068524253 + .long 1797139609 + .long 1022295143 + .long 1243095296 + .long 1068540671 + .long 1415938756 + .long 1021439537 + .long 2033294592 + .long 1068557090 + .long 2356809978 + .long 1021777916 + .long 3088063744 + .long 1068573510 + .long 2669055318 + .long 1022124482 + .long 180888576 + .long 1068589932 + .long 3566445325 + .long 1021358712 + .long 1970196992 + .long 1068606354 + .long 896980323 + .long 1021319659 + .long 4229555456 + .long 1068622777 + .long 436049712 + .long 1021319758 + .long 2732572160 + .long 1068639202 + .long 583123209 + .long 1020797960 + .long 1842831872 + .long 1068655628 + .long 1370449804 + .long 1021429270 + .long 1628994560 + .long 1068672055 + .long 2411391464 + .long 1021057980 + .long 2159763712 + .long 1068688483 + .long 1208692749 + .long 1021943903 + .long 3503886336 + .long 1068704912 + .long 538793309 + .long 1019744063 + .long 1435187200 + .long 1068721343 + .long 4085087612 + .long 1020608419 + .long 317469952 + .long 1068737775 + .long 144386942 + .long 1021440732 + .long 219617280 + .long 1068754208 + .long 2940088361 + .long 1019981122 + .long 1210558208 + .long 1068770642 + .long 2176850347 + .long 1018373705 + .long 3359268352 + .long 1068787077 + .long 2395611454 + .long 1021889042 + .long 2439803648 + .long 1068803514 + .long 1650705253 + .long 1020227966 + .long 2816203520 + .long 1068819952 + .long 3702166386 + .long 1019379914 + .long 262620672 + .long 1068836392 + .long 1855649370 + .long 1020453124 + .long 3438159616 + .long 1068852832 + .long 923063860 + .long 1019273834 + .long 3822105856 + .long 1068869274 + .long 4289947947 + .long 1019434249 + .long 1483729920 + .long 1068885718 + .long 787455814 + .long 1020738379 + .long 787321088 + .long 1068902163 + .long 3321653337 + .long 1021842569 + .long 1802253312 + .long 1068918609 + .long 2653633526 + .long 1021821525 + .long 302985984 + .long 1068935057 + .long 161272028 + .long 1021655149 + .long 653966080 + .long 1068951506 + .long 2566098667 + .long 1020066219 + .long 2924727296 + .long 1068967956 + .long 3646493722 + .long 1014292285 + .long 2889890304 + .long 1068984408 + .long 1081009196 + .long 1022189620 + .long 619098112 + .long 1069000862 + .long 4011643355 + .long 1021773297 + .long 477017600 + .long 1069017317 + .long 4030305534 + .long 1021292252 + .long 2533403904 + .long 1069033773 + .long 2645187591 + .long 1019527099 + .long 2563102208 + .long 1069050231 + .long 3857293792 + .long 1022311697 + .long 635982336 + .long 1069066691 + .long 3625936637 + .long 1017511744 + .long 1116940800 + .long 1069083152 + .long 3653872993 + .long 1022016631 + .long 4075964160 + .long 1069099614 + .long 2468900271 + .long 1021769532 + .long 993165568 + .long 1069116079 + .long 1358104224 + .long 1021199776 + .long 528586752 + .long 1069132545 + .long 2200950332 + .long 1022024872 + .long 2752395776 + .long 1069149012 + .long 3197072454 + .long 1017751319 + .long 3439855616 + .long 1069165481 + .long 1651081806 + .long 1020809338 + .long 2661257728 + .long 1069181952 + .long 539032752 + .long 1021728805 + .long 486957312 + .long 1069198425 + .long 3136045149 + .long 1016888671 + .long 1282340352 + .long 1069214899 + .long 2593963259 + .long 1018956103 + .long 822921728 + .long 1069231375 + .long 2146032737 + .long 1022306465 + .long 3474216192 + .long 1069247852 + .long 3976811625 + .long 1021350207 + .long 716902656 + .long 1069264332 + .long 718267222 + .long 1018624727 + .long 1211594496 + .long 1069280813 + .long 1485641389 + .long 1018447451 + .long 734070272 + .long 1069297296 + .long 354455128 + .long 1021341291 + .long 3650110720 + .long 1069313780 + .long 682185947 + .long 1021651853 + .long 1440663040 + .long 1069330267 + .long 3558574550 + .long 1021615110 + .long 2766612224 + .long 1069346755 + .long 874607978 + .long 1017746872 + .long 3404011008 + .long 1069363245 + .long 4154988502 + .long 1021439906 + .long 3423949056 + .long 1069379737 + .long 2263202309 + .long 1021479615 + .long 2897587712 + .long 1069396231 + .long 2562065031 + .long 1022090363 + .long 1896159232 + .long 1069412727 + .long 3836237663 + .long 1019867288 + .long 490968576 + .long 1069429225 + .long 3322056743 + .long 1006752762 + .long 3048360192 + .long 1069445724 + .long 1152314833 + .long 1013122252 + .long 1049850624 + .long 1069462226 + .long 3601590727 + .long 1022214610 + .long 3156899584 + .long 1069478729 + .long 1855169970 + .long 1019487271 + .long 851173376 + .long 1069495235 + .long 312649594 + .long 1020868604 + .long 2794281728 + .long 1069511742 + .long 1093490181 + .long 1020777577 + .long 468042496 + .long 1069528252 + .long 1152540679 + .long 1021403732 + .long 2534219264 + .long 1069544763 + .long 2292126035 + .long 1021872430 + .long 1376146432 + .long 1069558527 + .long 3293753641 + .long 1020500454 + .long 4175442432 + .long 1069575044 + .long 3626347564 + .long 1021610969 + .long 3523113472 + .long 1069591566 + .long 339956500 + .long 1021119039 + .long 4003350528 + .long 1069608092 + .long 3429333082 + .long 1022813542 + .long 1611067392 + .long 1069624623 + .long 2298017544 + .long 1021977587 + .long 931782144 + .long 1069641158 + .long 2164684743 + .long 1021250988 + .long 2256725504 + .long 1069657697 + .long 1138762335 + .long 1021443776 + .long 1582853120 + .long 1069674241 + .long 1084010382 + .long 1022994693 + .long 3497758720 + .long 1069690789 + .long 406366244 + .long 1022713586 + .long 3999816960 + .long 1069707342 + .long 1488723042 + .long 1023381290 + .long 3383096064 + .long 1069723900 + .long 2541558953 + .long 1019137887 + .long 1942403584 + .long 1069740463 + .long 1879620343 + .long 1022653642 + .long 4268263680 + .long 1069757030 + .long 3039077047 + .long 1022252545 + .long 2067062272 + .long 1069773603 + .long 4190670677 + .long 1020725863 + .long 4225828096 + .long 1069790180 + .long 1998567321 + .long 1022014385 + .long 2452507136 + .long 1069806763 + .long 1511628873 + .long 1021900300 + .long 1340746240 + .long 1069823351 + .long 788367341 + .long 1022726208 + .long 1190035456 + .long 1069839944 + .long 3856337230 + .long 1021834118 + .long 2300688384 + .long 1069856542 + .long 3211396579 + .long 1022621365 + .long 678886400 + .long 1069873146 + .long 4001011887 + .long 1022042646 + .long 921594112 + .long 1069889755 + .long 557811968 + .long 1023065533 + .long 3331668992 + .long 1069906369 + .long 1877060679 + .long 1022419742 + .long 3917875200 + .long 1069922989 + .long 1181055171 + .long 1022752712 + .long 2984829696 + .long 1069939615 + .long 4294526932 + .long 1021499988 + .long 838049024 + .long 1069956247 + .long 3658081878 + .long 1022957952 + .long 2078928384 + .long 1069972884 + .long 820353701 + .long 1019391107 + .long 2719854336 + .long 1069989527 + .long 1644022489 + .long 1023378240 + .long 3069117696 + .long 1070006176 + .long 2771393702 + .long 1019319954 + .long 3435962368 + .long 1070022831 + .long 3876394145 + .long 1023024433 + .long 4130595328 + .long 1070039492 + .long 1630447748 + .long 1021465882 + .long 1169236224 + .long 1070056160 + .long 2828355997 + .long 1020458120 + .long 3453997312 + .long 1070072833 + .long 164091641 + .long 1020388279 + .long 2708127744 + .long 1070089513 + .long 3036550223 + .long 1023328684 + .long 3540797696 + .long 1070106199 + .long 3710949463 + .long 1022568805 + .long 1972276736 + .long 1070122892 + .long 3885277950 + .long 1019761674 + .long 2613815552 + .long 1070139591 + .long 2764165077 + .long 1022921023 + .long 1487791616 + .long 1070156297 + .long 1330644769 + .long 1023162679 + .long 3207593472 + .long 1070173009 + .long 3911007221 + .long 1022993496 + .long 3797764608 + .long 1070189728 + .long 979712598 + .long 1022554580 + .long 3578920448 + .long 1070206454 + .long 2825738223 + .long 1020223708 + .long 2872795648 + .long 1070223187 + .long 392451124 + .long 1022666279 + .long 2002258432 + .long 1070239927 + .long 3730407632 + .long 1023148291 + .long 1291326464 + .long 1070256674 + .long 3723802980 + .long 1022514089 + .long 1065180928 + .long 1070273428 + .long 2635617463 + .long 1022654470 + .long 1650181632 + .long 1070290189 + .long 2061982883 + .long 1022853411 + .long 3373882880 + .long 1070306957 + .long 319732785 + .long 1022017175 + .long 2270081280 + .long 1070323733 + .long 2237757411 + .long 1023064087 + .long 2963732736 + .long 1070340516 + .long 468839165 + .long 1023293774 + .long 1491099904 + .long 1070357307 + .long 1502657946 + .long 1021533479 + .long 2479636480 + .long 1070374105 + .long 482913562 + .long 1021986286 + .long 1968133632 + .long 1070390911 + .long 3281474337 + .long 1022646400 + .long 291639040 + .long 1070407725 + .long 2453320259 + .long 1022812423 + .long 2081472512 + .long 1070424546 + .long 2939989570 + .long 1023091888 + .long 3380340480 + .long 1070441375 + .long 2850707499 + .long 1021921109 + .long 232287488 + .long 1070458213 + .long 3674625342 + .long 1020725130 + .long 1567614208 + .long 1070475058 + .long 9347334 + .long 1022024009 + .long 3433091072 + .long 1070491911 + .long 282524999 + .long 1021433523 + .long 1876877312 + .long 1070508773 + .long 3470449440 + .long 1019309721 + .long 1538472192 + .long 1070525643 + .long 2089486825 + .long 1019698916 + .long 2763830784 + .long 1070542521 + .long 443498115 + .long 1020505194 + .long 1605381632 + .long 1070559408 + .long 3018871601 + .long 1022869913 + .long 2706946048 + .long 1070576303 + .long 3936260892 + .long 1023175875 + .long 2123887360 + .long 1070593207 + .long 2994220655 + .long 1022825948 + .long 104015104 + .long 1070603108 + .long 335054493 + .long 1023441853 + .long 2904568832 + .long 1070615800 + .long 1451215633 + .long 1023853857 + .long 3456197120 + .long 1070632739 + .long 436334733 + .long 1024026432 + .long 252452352 + .long 1070649697 + .long 34596167 + .long 1024031396 + .long 3328018432 + .long 1070666672 + .long 2644547073 + .long 1024296758 + .long 1255829248 + .long 1070683667 + .long 552832586 + .long 1023763122 + .long 4097058560 + .long 1070700680 + .long 1955640623 + .long 1021394654 + .long 451770112 + .long 1070717714 + .long 3428903777 + .long 1022941142 + .long 408920832 + .long 1070734767 + .long 165503263 + .long 1023894958 + .long 1186960640 + .long 1070751840 + .long 435826450 + .long 1024026134 + .long 19078656 + .long 1070768934 + .long 1834169749 + .long 1022899284 + .long 2743490304 + .long 1070786048 + .long 494581074 + .long 1018818479 + .long 2328961024 + .long 1070803184 + .long 2987908834 + .long 1022581110 + .long 350011392 + .long 1070820342 + .long 240771184 + .long 1024143083 + .long 2692326912 + .long 1070837521 + .long 666056837 + .long 1022394776 + .long 2373274368 + .long 1070854723 + .long 2484337770 + .long 1024228156 + .long 1017131520 + .long 1070871948 + .long 3285648279 + .long 1024025789 + .long 265558272 + .long 1070889196 + .long 392241896 + .long 1024252809 + .long 1778008064 + .long 1070906467 + .long 1536107943 + .long 1023949300 + .long 2937184768 + .long 1070923762 + .long 3541062251 + .long 1019448646 + .long 1144442880 + .long 1070941082 + .long 3691683781 + .long 1022123948 + .long 2410165504 + .long 1070958426 + .long 1804181960 + .long 1023945221 + .long 4174350848 + .long 1070975795 + .long 2016094861 + .long 1021716585 + .long 3897012480 + .long 1070993190 + .long 175294410 + .long 1023703404 + .long 3353623040 + .long 1071010611 + .long 167973242 + .long 1023240839 + .long 45671168 + .long 1071028059 + .long 2166856113 + .long 1021565413 + .long 86063872 + .long 1071045533 + .long 2676254727 + .long 1023985299 + .long 1019772672 + .long 1071063034 + .long 989043593 + .long 1021549587 + .long 414297344 + .long 1071080563 + .long 3960972046 + .long 1024307251 + .long 155173120 + .long 1071098120 + .long 1830919291 + .long 1021592251 + .long 2151562240 + .long 1071115705 + .long 405408666 + .long 1023423128 + .long 4041854720 + .long 1071133319 + .long 2043497827 + .long 1024411503 + .long 3489224192 + .long 1071150963 + .long 3072215864 + .long 1022698635 + .long 2477196288 + .long 1071168637 + .long 1812195139 + .long 1022689192 + .long 3015298816 + .long 1071186341 + .long 764841969 + .long 1021027331 + .long 2844731136 + .long 1071204076 + .long 2878117321 + .long 1019116513 + .long 4028950528 + .long 1071221842 + .long 698911452 + .long 1023265602 + .long 69441536 + .long 1071239641 + .long 3253467847 + .long 1020795075 + .long 1676209920 + .long 1071257471 + .long 4272431167 + .long 1022873982 + .long 2408752384 + .long 1071275334 + .long 648519100 + .long 1024385717 + .long 151623680 + .long 1071293231 + .long 345257017 + .long 1019561408 + .long 1410154240 + .long 1071311161 + .long 197863993 + .long 1023224207 + .long 4131351552 + .long 1071329125 + .long 2620801789 + .long 1024411169 + .long 1999664384 + .long 1071347125 + .long 3952692616 + .long 1024168086 + .long 1617668864 + .long 1071365160 + .long 3019889809 + .long 1021907692 + .long 1032074240 + .long 1071383231 + .long 59469899 + .long 1023656194 + .long 2619492096 + .long 1071401338 + .long 1417526820 + .long 1021457783 + .long 202429440 + .long 1071419483 + .long 2927667935 + .long 1019175447 + .long 525044224 + .long 1071437665 + .long 38166811 + .long 1023981879 + .long 1779258880 + .long 1071455885 + .long 481252500 + .long 1023310234 + .long 2195673600 + .long 1071474144 + .long 3962395981 + .long 1021339088 + .long 44573696 + .long 1071492443 + .long 3936281395 + .long 1023014829 + .long 2226905344 + .long 1071510781 + .long 1515320476 + .long 1024320623 + .long 2800512512 + .long 1071529160 + .long 1225403697 + .long 1021081846 + .long 161113600 + .long 1071547581 + .long 3064809733 + .long 1024173917 + .long 1338410240 + .long 1071566043 + .long 2027604973 + .long 1024362526 + .long 522433280 + .long 1071584548 + .long 2055171723 + .long 1023858825 + .long 539595776 + .long 1071603096 + .long 3868820135 + .long 1022936424 + .long 4264017664 + .long 1071621687 + .long 3228065145 + .long 1023479578 + .long 1733924096 + .long 1071640324 + .long 3511934475 + .long 1022496355 + .long 108880384 + .long 1071651839 + .long 615880967 + .long 1023519706 + .long 3517856512 + .long 1071661202 + .long 3113108559 + .long 1025190289 + .long 4043153152 + .long 1071670589 + .long 1571836218 + .long 1023106116 + .long 3251299072 + .long 1071680000 + .long 3444076102 + .long 1022187841 + .long 2736921600 + .long 1071689435 + .long 272771483 + .long 1025095280 + .long 3897698560 + .long 1071703633 + .long 2075390188 + .long 1022489022 + .long 3209485056 + .long 1071722652 + .long 1438094065 + .long 1021844944 + .long 3781432064 + .long 1071741774 + .long 1675017145 + .long 1024143828 + .long 2684184064 + .long 1071761003 + .long 2259963753 + .long 1024731393 + .long 1840489728 + .long 1071780342 + .long 3372883597 + .long 1023431408 + .long 3764087808 + .long 1071799794 + .long 3307523102 + .long 1024485788 + .long 3006232320 + .long 1071819364 + .long 3088971966 + .long 1025213251 + .long 3374881280 + .long 1071839055 + .long 834437749 + .long 1025236452 + .long 797284864 + .long 1071858872 + .long 3122663941 + .long 1025320473 + .long 545765120 + .long 1071878818 + .long 826539625 + .long 1022450955 + .long 107562240 + .long 1071898898 + .long 339584600 + .long 1022481255 + .long 2123649024 + .long 1071919116 + .long 3912959833 + .long 1024321009 + .long 1562385664 + .long 1071939478 + .long 2846067230 + .long 1023343981 + .long 2963085824 + .long 1071959988 + .long 954548627 + .long 1021475211 + .long 3325550592 + .long 1071980652 + .long 3459651155 + .long 1025305573 + .long 775752448 + .long 1072001476 + .long 3582746667 + .long 1023859460 + .long 3238590720 + .long 1072022464 + .long 634636162 + .long 1024472353 + .long 2758801920 + .long 1072043624 + .long 3078216319 + .long 1025304516 + .long 1370319104 + .long 1072064962 + .long 2570569078 + .long 1025099442 + .long 2615805184 + .long 1072086484 + .long 3729933412 + .long 1024605112 + .long 3077336576 + .long 1072108198 + .long 1948916066 + .long 1024781603 + .long 1099528192 + .long 1072130112 + .long 3139143157 + .long 1023729360 + .long 1231903232 + .long 1072152233 + .long 1349513477 + .long 1024737515 + .long 1507504128 + .long 1072174570 + .long 3484516322 + .long 1024000959 + .long 2214659840 + .long 1072197132 + .long 2563820917 + .long 1025225535 + .long 1804739840 + .long 1072219929 + .long 760038746 + .long 1024482855 + .long 1413746688 + .long 1072242971 + .long 3401734714 + .long 1025129838 + .long 821409536 + .long 1072266269 + .long 3729772551 + .long 1025484796 + .long 3031825664 + .long 1072289834 + .long 122256749 + .long 1024752594 + .long 1710784256 + .long 1072313680 + .long 1518205483 + .long 1024724809 + .long 3025265152 + .long 1072337819 + .long 409951989 + .long 1022835555 + .long 287769088 + .long 1072362267 + .long 800355594 + .long 1022484850 + .long 198179840 + .long 1072387038 + .long 3502926213 + .long 1024209373 + .long 1909130496 + .long 1072412149 + .long 3064694319 + .long 1025380823 + .long 1941732096 + .long 1072437619 + .long 4112930390 + .long 1024294679 + .long 3492010496 + .long 1072463467 + .long 2684918107 + .long 1023220233 + .long 81959680 + .long 1072489716 + .long 220021366 + .long 1020635131 + .long 2297837056 + .long 1072516387 + .long 4027683826 + .long 1021041185 + .long 270404096 + .long 1072543508 + .long 2012766065 + .long 1021780753 + .long 3667376896 + .long 1072571105 + .long 2727981522 + .long 1023009874 + .long 330400256 + .long 1072599212 + .long 2940017003 + .long 1025393439 + .long 1119293952 + .long 1072627861 + .long 1608550416 + .long 1022675612 + .long 3536155904 + .long 1072657091 + .long 349665778 + .long 1025156751 + .long 3078046720 + .long 1072686946 + .long 2016159996 + .long 1022193169 + .long 455228416 + .long 1072705361 + .long 1908539328 + .long 1026126332 + .long 1871505664 + .long 1072720988 + .long 2784700894 + .long 1025922277 + .long 1630994432 + .long 1072737010 + .long 361107678 + .long 1022887244 + .long 2084558336 + .long 1072753462 + .type Tbl_addr,@object + .size Tbl_addr,3840 + .space 768, 0x00 # pad + .align 16 +SIGNMASK: + .long 0 + .long 2147483648 + .long 0 + .long 0 + .type SIGNMASK,@object + .size SIGNMASK,16 + .align 16 +HALFMASK2: + .long 0 + .long 2147483584 + .long 0 + .long 0 + .type HALFMASK2,@object + .size HALFMASK2,16 + .align 16 +PI_BY_2: + .long 856972295 + .long 1016178214 + .long 1413754136 + .long 1073291771 + .type PI_BY_2,@object + .size PI_BY_2,16 + .align 16 +cv2: + .long 780903145 + .long 1066854586 + .long 858993459 + .long 1068708659 + .long 3340530119 + .long 1067392113 + .long 1431655765 + .long 1069897045 + .long 1321528399 + .long 1066517740 + .long 3067833783 + .long 1067899757 + .long 2021159460 + .long 1065855096 + .long 2576980378 + .long 1066178969 + .type cv2,@object + .size cv2,64 + .align 16 +HALFMASK: + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .type HALFMASK,@object + .size HALFMASK,16 + .align 4 +ONEMASK: + .long 0 + .long 1072693248 + .type ONEMASK,@object + .size ONEMASK,8 + .align 4 +TMASK: + .long 0 + .long 4294950912 + .type TMASK,@object + .size TMASK,8 + .align 4 +cv: + .long 1431655765 + .long 1069897045 + .long 858993459 + .long 1068708659 + .long 3067833783 + .long 1067899757 + .type cv,@object + .size cv,24 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_asin.1-. + .4byte ..___tag_value_asin.5-..___tag_value_asin.1 + .2byte 0x0400 + .4byte ..___tag_value_asin.3-..___tag_value_asin.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_asin.4-..___tag_value_asin.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_atan2.S b/libm/x86_64/e_atan2.S new file mode 100644 index 0000000..f9baea9 --- /dev/null +++ b/libm/x86_64/e_atan2.S @@ -0,0 +1,1242 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// +//1. The method is based on the relationship of atan2(Y,X) to atan(|Y/X|) +// as follows. +// / sign(Y) atan(|Y/X|) if X > 0 +// atan2(Y,X) = +// \ sign(Y)*pi - sign(Y)*atan(|Y/X|) if X < 0 +// +// Thus, atan2(Y,X) is of the form atan2(Y,X) = PI + sgn*atan(|Y/X|) +// where PI and sgn can be determined by the four possible combinations of +// of the pair (sign(X),sign(Y)). We concentrate on the numerical method +// for atan(|Y/X|). +// +//2. For |Y/X| < 2^(-64), atan(|Y/X|) ~=~ |Y/X|. Hence, atan2(Y,X) is Y/X +// if X > 0, and sign(Y)*pi otherwise. +//3. For |Y/X| >= 2^(65), atan(|Y/X|) ~=~ pi/2. Hence atan2(Y,X) is sign(Y)pi/2. +//4. For 2^(-64) <= |Y/X| < 2^(-5), atan(|Y/X|) is approximated by a polynomial +// of the form Z + Z*E*polynomial(E), where Z = |Y/X| and E = Z*Z. +//5. For |Y/X| > 2^(5), atan(|Y/X|) = pi/2 + atan(-|X/Y|), and atan(-|X/Y|) is +// calculated using the polynomial in 4 above. +//6. For 2^(-5) <= |Y/X| <= 2^(5), we employ a table lookup method. First, +// we obtain B = 2^k * 1.b1 b2 b3 b4 = 2^k * (1+k/16) that approximate +// |Y/X| to approximately 5 significant bits. Hence, atan(|Y/X|) is +// +// atan(|Y/X|) = atan(B) + atan(Z), where Z = (|Y|-B|X|)/(|X|+B|Y|). +// ~=~ tau + Z + Z*E*polynomial(E), where E = Z*Z. +// +// B has the range from 2^(-6)*(1+14/16) to 2^5 = 2^(5)*(1+0/16), totally +// 163 possible values. These values are calculated beforehand and stored +// in a table. The polynomial is the one used in 4. +// +// Special cases: +// atan2(+-0, +0) = +-0 +// atan2(+-0, -0) = +-pi +// atan2(+-0, x) = +-0, for x > 0, and +-pi, for x < 0 +// atan2(y, +-0) = +pi/2 for y > 0, and -pi/2 for y < 0 +// atan2(+-y, +INF) = +-0, for finite y > 0 +// atan2(+-y, -INF) = +-pi, for finite y > 0 +// atan2(+-INF, x) = +-pi/2, for finite x +// atan2(+-INF, +INF) = +-pi/4 +// atan2(+-INF, -INF) = +-3*pi/4 +// +/******************************************************************************/ + +#include +# -- Begin atan2 +ENTRY(atan2) +# parameter 1: %xmm0 +# parameter 2: %xmm1 +..B1.1: +..___tag_value_atan2.1: + subq $24, %rsp +..___tag_value_atan2.3: + movsd %xmm0, (%rsp) + movsd %xmm1, 8(%rsp) +..B1.2: + pextrw $3, %xmm0, %eax + andl $32752, %eax + subl $14448, %eax + cmpl $3840, %eax + ja .L_2TAG_PACKET_0.0.2 + pextrw $3, %xmm1, %eax + andl $32752, %eax + subl $14448, %eax + cmpl $3840, %eax + ja .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + unpcklpd %xmm1, %xmm0 + xorpd %xmm5, %xmm5 + xorpd %xmm3, %xmm3 + movl $2048, %eax + pinsrw $3, %eax, %xmm5 + paddw %xmm1, %xmm5 + psrlq $29, %xmm5 + rcpss %xmm5, %xmm3 + xorpd %xmm4, %xmm4 + movl $14336, %ecx + pinsrw $3, %ecx, %xmm4 + psllq $29, %xmm3 + paddw %xmm4, %xmm3 + mulsd %xmm0, %xmm3 + xorpd %xmm2, %xmm2 + xorpd %xmm6, %xmm6 + xorpd %xmm7, %xmm7 + movl $32768, %eax + pinsrw $2, %eax, %xmm6 + movl $32767, %ecx + pinsrw $3, %ecx, %xmm7 + paddd %xmm6, %xmm3 + andpd %xmm7, %xmm3 + movq %xmm3, %xmm5 + pextrw $3, %xmm3, %eax + movl $16448, %ecx + pinsrw $3, %ecx, %xmm2 + minsd %xmm2, %xmm3 + movmskpd %xmm0, %edx + psllq $1, %xmm0 + psrlq $1, %xmm0 + cmpsd $2, %xmm2, %xmm5 + psllq $1, %xmm1 + psrlq $1, %xmm1 + movq %xmm1, %xmm6 + movq %xmm1, %xmm7 + movq %xmm0, %xmm2 + movl $0, %ecx + pinsrw $0, %ecx, %xmm6 + subsd %xmm6, %xmm7 + movq %xmm0, %xmm4 + mulsd %xmm3, %xmm6 + mulsd %xmm3, %xmm4 + mulsd %xmm3, %xmm7 + andpd %xmm5, %xmm0 + subsd %xmm6, %xmm0 + andpd %xmm5, %xmm1 + addsd %xmm1, %xmm4 + subsd %xmm7, %xmm0 + andl $32752, %eax + subl $16286, %eax + cmpl $1121, %eax + ja .L_2TAG_PACKET_3.0.2 + divsd %xmm4, %xmm0 + pextrw $3, %xmm3, %ecx + movsd a2(%rip), %xmm2 + movsd b2(%rip), %xmm3 + pextrw $0, %xmm5, %eax + addl %edx, %edx + lea P_TBL(%rip), %r8 + movapd (%r8,%rdx,8), %xmm6 + lea SGN_TBL(%rip), %r8 + movapd (%r8,%rdx,8), %xmm1 + subl $16286, %ecx + notl %eax + andl $1, %eax + addl %eax, %ecx + addl %ecx, %ecx + lea ATAN_TBL(%rip), %r8 + movapd (%r8,%rcx,8), %xmm5 + xorpd %xmm1, %xmm5 + addpd %xmm6, %xmm5 + movq %xmm5, %xmm6 + unpckhpd %xmm5, %xmm5 + xorpd %xmm0, %xmm1 + movq %xmm1, %xmm4 + mulsd %xmm0, %xmm0 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm3 + addsd %xmm6, %xmm1 + subsd %xmm1, %xmm6 + addsd %xmm4, %xmm6 + addsd 8+a2(%rip), %xmm2 + mulsd %xmm0, %xmm3 + mulsd %xmm4, %xmm0 + addsd %xmm5, %xmm6 + mulsd %xmm2, %xmm0 + addsd 8+b2(%rip), %xmm3 + mulsd %xmm3, %xmm0 + addsd %xmm6, %xmm0 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_3.0.2: + addl $942, %eax + cmpl $942, %eax + ja .L_2TAG_PACKET_4.0.2 + xorpd %xmm4, %xmm4 + movl $16368, %ecx + pinsrw $3, %ecx, %xmm4 + divsd %xmm1, %xmm4 + addl %edx, %edx + lea SGN_TBL(%rip), %r8 + movapd (%r8,%rdx,8), %xmm6 + unpcklpd %xmm3, %xmm3 + xorpd %xmm6, %xmm0 + xorpd %xmm6, %xmm2 + xorpd %xmm6, %xmm3 + lea P_TBL2(%rip), %r8 + movapd (%r8,%rdx,8), %xmm7 + movsd a2(%rip), %xmm1 + movsd b2(%rip), %xmm5 + lea SELECT_B(%rip), %r8 + andpd (%r8,%rdx,8), %xmm3 + mulsd %xmm4, %xmm2 + mulsd %xmm4, %xmm0 + movq %xmm2, %xmm6 + mulsd %xmm2, %xmm2 + mulsd %xmm2, %xmm1 + addsd %xmm2, %xmm5 + mulsd %xmm2, %xmm6 + addsd 8+a2(%rip), %xmm1 + mulsd %xmm2, %xmm5 + addsd %xmm0, %xmm7 + addpd %xmm3, %xmm7 + mulsd %xmm6, %xmm1 + addsd 8+b2(%rip), %xmm5 + mulsd %xmm1, %xmm5 + addsd %xmm7, %xmm5 + pshufd $238, %xmm7, %xmm0 + addsd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + movsd 8(%rsp), %xmm1 + movsd (%rsp), %xmm0 + pextrw $3, %xmm1, %eax + andl $32752, %eax + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl %eax, %ecx + jg .L_2TAG_PACKET_5.0.2 + pextrw $3, %xmm1, %ecx + cmpl $32767, %ecx + jg .L_2TAG_PACKET_6.0.2 + divsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + andpd SGNMASK(%rip), %xmm0 + movsd pi_table(%rip), %xmm2 + xorpd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_5.0.2: + andpd SGNMASK(%rip), %xmm0 + movsd pi2_table(%rip), %xmm2 + xorpd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: +.L_2TAG_PACKET_1.0.2: + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $32752, %ecx + je .L_2TAG_PACKET_7.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_8.0.2 + movsd POW55(%rip), %xmm3 + movl $1024, %edx + movsd INVEXPMASK(%rip), %xmm4 + xorpd %xmm6, %xmm6 + movsd EXPMASK(%rip), %xmm7 + cmpl $0, %ecx + je .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_10.0.2: + cmpl $0, %eax + je .L_2TAG_PACKET_11.0.2 +.L_2TAG_PACKET_12.0.2: + addl %ecx, %edx + subl %eax, %edx + cmpl $2048, %edx + ja .L_2TAG_PACKET_4.0.2 + addl $15344, %edx + pinsrw $3, %edx, %xmm6 + andpd %xmm4, %xmm0 + andpd %xmm4, %xmm1 + orpd %xmm6, %xmm0 + orpd %xmm7, %xmm1 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_9.0.2: + subl $880, %edx + mulsd %xmm3, %xmm0 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $0, %ecx + je .L_2TAG_PACKET_13.0.2 + jmp .L_2TAG_PACKET_10.0.2 +.L_2TAG_PACKET_11.0.2: + addl $880, %edx + mulsd %xmm3, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_14.0.2 + jmp .L_2TAG_PACKET_12.0.2 +.L_2TAG_PACKET_7.0.2: + movd %xmm0, %edx + movq %xmm0, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + andl $1048575, %ecx + orl %edx, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_15.0.2 + psrlq $63, %xmm0 + psllq $63, %xmm0 + cmpl $32752, %eax + jae .L_2TAG_PACKET_16.0.2 + movapd pi2_table(%rip), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_15.0.2: + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_16.0.2: + movd %xmm1, %eax + movq %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + movl $-2147483648, %edx + andl %ecx, %edx + andl $1048575, %ecx + orl %eax, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_17.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_18.0.2 + movapd pi4_table(%rip), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_17.0.2: + movq %xmm1, %xmm0 + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_18.0.2: + movapd pi4_table(%rip), %xmm5 + movapd pi2_table(%rip), %xmm6 + addpd %xmm6, %xmm5 + pshufd $238, %xmm5, %xmm6 + addpd %xmm6, %xmm5 + orpd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_8.0.2: + movd %xmm1, %eax + movq %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + movl $-2147483648, %edx + andl %ecx, %edx + andl $1048575, %ecx + orl %eax, %ecx + cmpl $0, %ecx + jne .L_2TAG_PACKET_17.0.2 + psrlq $63, %xmm0 + psllq $63, %xmm0 + cmpl $0, %edx + jne .L_2TAG_PACKET_19.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_19.0.2: + movapd pi_table(%rip), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_13.0.2: + pextrw $3, %xmm1, %edx + andl $32768, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_20.0.2 + movapd pi_table(%rip), %xmm5 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + comisd %xmm0, %xmm1 + orpd %xmm5, %xmm0 + je .L_2TAG_PACKET_21.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_20.0.2: + comisd %xmm0, %xmm1 + je .L_2TAG_PACKET_21.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_14.0.2: + movapd pi2_table(%rip), %xmm5 + psrlq $63, %xmm0 + psllq $63, %xmm0 + pshufd $238, %xmm5, %xmm4 + addsd %xmm4, %xmm5 + orpd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_21.0.2: + movq %xmm0, 16(%rsp) +..B1.3: + movq 16(%rsp), %xmm0 +.L_2TAG_PACKET_22.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_atan2.4: + ret +..___tag_value_atan2.5: +END(atan2) +# -- End atan2 + .section .rodata, "a" + .align 16 + .align 16 +a2: + .long 2006262985 + .long 1069310863 + .long 2358449471 + .long 3217342131 + .type a2,@object + .size a2,16 + .align 16 +b2: + .long 3845454352 + .long 1069952297 + .long 2829679149 + .long 1073771565 + .type b2,@object + .size b2,16 + .align 16 +P_TBL: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 3221823995 + .long 856972295 + .long 3164710438 + .type P_TBL,@object + .size P_TBL,64 + .align 16 +SGN_TBL: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .long 0 + .long 0 + .long 0 + .long 0 + .type SGN_TBL,@object + .size SGN_TBL,64 + .align 16 +ATAN_TBL: + .long 3390881280 + .long 1067318733 + .long 1411116779 + .long 1018950063 + .long 2985987840 + .long 1067384211 + .long 2088903695 + .long 1018086027 + .long 3148445184 + .long 1067449685 + .long 2044163806 + .long 1017271335 + .long 3667629184 + .long 1067515494 + .long 2353092775 + .long 1019967309 + .long 1546568832 + .long 1067580954 + .long 611991315 + .long 1017602584 + .long 3815996800 + .long 1067646404 + .long 466038598 + .long 1019686426 + .long 4050241920 + .long 1067711845 + .long 3265026328 + .long 1019626952 + .long 120454912 + .long 1067777277 + .long 1542207696 + .long 1020155608 + .long 2784639744 + .long 1067842697 + .long 3883834623 + .long 1018602870 + .long 1328010624 + .long 1067908107 + .long 1791097456 + .long 1019053126 + .long 2217794048 + .long 1067973505 + .long 551619938 + .long 1018494194 + .long 3333520000 + .long 1068038891 + .long 2390331823 + .long 1019033022 + .long 2557052032 + .long 1068104265 + .long 2423976108 + .long 1019728674 + .long 2067649536 + .long 1068169626 + .long 3757397745 + .long 1018672362 + .long 4047094784 + .long 1068234973 + .long 481613184 + .long 1019275104 + .long 2089853184 + .long 1068300307 + .long 1733914374 + .long 1020124677 + .long 2678003840 + .long 1068365626 + .long 1373600282 + .long 1013935474 + .long 3706496128 + .long 1068430930 + .long 1000610902 + .long 1019673285 + .long 3073179008 + .long 1068496219 + .long 1497143008 + .long 1019900342 + .long 2803716736 + .long 1068562846 + .long 1476677416 + .long 1019444094 + .long 3204984128 + .long 1068628077 + .long 1192335905 + .long 1018748628 + .long 831146624 + .long 1068693273 + .long 2733586224 + .long 1018823295 + .long 243029376 + .long 1068758431 + .long 950106081 + .long 1019046675 + .long 1735561920 + .long 1068823549 + .long 3546440856 + .long 1020104712 + .long 1339217792 + .long 1068888626 + .long 3028812387 + .long 1019818321 + .long 3706342144 + .long 1068953659 + .long 3814564029 + .long 1017763871 + .long 637726976 + .long 1069018648 + .long 3584007699 + .long 1017976868 + .long 1148779264 + .long 1069083589 + .long 2282532133 + .long 1019483954 + .long 1406131392 + .long 1069148481 + .long 1547359113 + .long 1019786342 + .long 1908875904 + .long 1069213322 + .long 1315508410 + .long 1020009473 + .long 3194947520 + .long 1069278110 + .long 3845393201 + .long 1015803761 + .long 1547487744 + .long 1069342844 + .long 3863107865 + .long 1019810104 + .long 1881061952 + .long 1069407521 + .long 4288343548 + .long 1019687581 + .long 563086336 + .long 1069472140 + .long 2582230241 + .long 1020099350 + .long 2594975552 + .long 1069536698 + .long 2306443764 + .long 1019667244 + .long 3438545024 + .long 1069606573 + .long 957455549 + .long 1015587735 + .long 4211357472 + .long 1069670906 + .long 2611778754 + .long 1017877214 + .long 3002835424 + .long 1069735101 + .long 235580458 + .long 1020211685 + .long 3905315424 + .long 1069799150 + .long 3630647617 + .long 1018736849 + .long 2849656576 + .long 1069863047 + .long 2412165062 + .long 1019693004 + .long 507429472 + .long 1069926785 + .long 1397750723 + .long 1018412717 + .long 2307470272 + .long 1069990356 + .long 1796470904 + .long 1019796181 + .long 1271814912 + .long 1070053755 + .long 189761565 + .long 1016149115 + .long 3800538144 + .long 1070116974 + .long 2524871582 + .long 1018263353 + .long 3916203552 + .long 1070180008 + .long 127848658 + .long 1017672664 + .long 457192032 + .long 1070242851 + .long 4020400938 + .long 1019823010 + .long 1385324704 + .long 1070305495 + .long 564511179 + .long 1016079094 + .long 2322869856 + .long 1070367935 + .long 2347103319 + .long 1018927760 + .long 3743438624 + .long 1070430165 + .long 877973862 + .long 1019638162 + .long 2392255552 + .long 1070492180 + .long 2432782267 + .long 1018872629 + .long 4180443328 + .long 1070553973 + .long 3102990015 + .long 1020093101 + .long 2547540832 + .long 1070636485 + .long 3877738253 + .long 1017300424 + .long 2735468912 + .long 1070697461 + .long 2446470256 + .long 1019235378 + .long 542633792 + .long 1070757943 + .long 583606328 + .long 1018624131 + .long 923265984 + .long 1070817911 + .long 1793926708 + .long 1019714161 + .long 918728448 + .long 1070877348 + .long 3726463586 + .long 1019433296 + .long 2572275008 + .long 1070936237 + .long 1845354238 + .long 1019459238 + .long 50974688 + .long 1070994564 + .long 983808064 + .long 1016685418 + .long 1105518320 + .long 1071052313 + .long 2357496692 + .long 1015139882 + .long 1264825328 + .long 1071109472 + .long 2244129354 + .long 1019046344 + .long 961157920 + .long 1071166029 + .long 3124185339 + .long 1018541776 + .long 1162701584 + .long 1071221973 + .long 1279780948 + .long 1019268918 + .long 3284935664 + .long 1071277294 + .long 2670033472 + .long 1019833744 + .long 497441888 + .long 1071331985 + .long 1032737410 + .long 1019795212 + .long 3377383904 + .long 1071386036 + .long 2356897182 + .long 1020205553 + .long 1126962000 + .long 1071439443 + .long 3723724586 + .long 1015212418 + .long 90291008 + .long 1071492199 + .long 4178672431 + .long 1020186971 + .long 190059536 + .long 1071595741 + .long 1763589807 + .long 1019162163 + .long 2497392840 + .long 1071670654 + .long 3036997041 + .long 1020204325 + .long 2616971944 + .long 1071719773 + .long 300151069 + .long 1017041957 + .long 2883518128 + .long 1071767563 + .long 2203981414 + .long 1019190108 + .long 1496354352 + .long 1071814030 + .long 332287966 + .long 1016846435 + .long 483276728 + .long 1071859184 + .long 653845024 + .long 1018830914 + .long 3097401072 + .long 1071903039 + .long 1514746408 + .long 1019278972 + .long 2737217248 + .long 1071945615 + .long 1358845067 + .long 1017268275 + .long 2072577560 + .long 1071986933 + .long 3041024735 + .long 1019929672 + .long 2266405656 + .long 1072027017 + .long 1271261130 + .long 1012925070 + .long 958652544 + .long 1072065894 + .long 2158017058 + .long 1019955372 + .long 3312993840 + .long 1072103591 + .long 765809169 + .long 1019114443 + .long 3177001304 + .long 1072140139 + .long 144180084 + .long 1019822186 + .long 3071642184 + .long 1072175568 + .long 4004602424 + .long 1019420740 + .long 4283953648 + .long 1072209909 + .long 1511950430 + .long 1020176966 + .long 1413754136 + .long 1072243195 + .long 856972295 + .long 1015129638 + .long 4073202944 + .long 1072306725 + .long 4068194804 + .long 1019714860 + .long 946117760 + .long 1072366415 + .long 694980733 + .long 1020150135 + .long 3980632032 + .long 1072422512 + .long 1313251280 + .long 1019948709 + .long 1468297112 + .long 1072475260 + .long 330111143 + .long 1019809198 + .long 3478063816 + .long 1072524887 + .long 2930067044 + .long 1017784081 + .long 1153979856 + .long 1072571613 + .long 2225786102 + .long 1017634481 + .long 2089828808 + .long 1072615641 + .long 474621367 + .long 1017043414 + .long 3531732632 + .long 1072657163 + .long 2276396220 + .long 1018757240 + .long 775214612 + .long 1072694803 + .long 3209744818 + .long 1019963015 + .long 662307284 + .long 1072713319 + .long 1381696763 + .long 1019763781 + .long 1192776652 + .long 1072730830 + .long 3017932994 + .long 1015179769 + .long 744202396 + .long 1072747407 + .long 2073854034 + .long 1019512292 + .long 8337908 + .long 1072763115 + .long 16004448 + .long 1019599514 + .long 3589868768 + .long 1072778013 + .long 1374369804 + .long 1018019237 + .long 121647320 + .long 1072792159 + .long 128481634 + .long 1018115438 + .long 2464923204 + .long 1072805601 + .long 1787331214 + .long 1016798022 + .long 4093304372 + .long 1072830562 + .long 3306868969 + .long 1019384078 + .long 1436891684 + .long 1072853231 + .long 676347266 + .long 1017302183 + .long 1104571840 + .long 1072873890 + .long 2870400285 + .long 1019938149 + .long 2037009832 + .long 1072892781 + .long 2956702105 + .long 1016472908 + .long 3139037960 + .long 1072910111 + .long 916057147 + .long 1018364335 + .long 1826698064 + .long 1072926058 + .long 2171961098 + .long 1019669816 + .long 1353941060 + .long 1072940774 + .long 1722928782 + .long 1019926215 + .long 1803191644 + .long 1072954391 + .long 1547878639 + .long 1020259262 + .long 1092591296 + .long 1072967024 + .long 3070107923 + .long 1018320401 + .long 2205372832 + .long 1072978772 + .long 787328196 + .long 1014621351 + .long 1291577100 + .long 1072989723 + .long 2964757301 + .long 1020242528 + .long 4234512804 + .long 1072999952 + .long 3136030038 + .long 1017522144 + .long 3248069132 + .long 1073009528 + .long 1506192355 + .long 1018050472 + .long 3932628500 + .long 1073018509 + .long 1045823554 + .long 1019946655 + .long 4195697848 + .long 1073026948 + .long 233443322 + .long 1018917447 + .long 2501811452 + .long 1073034892 + .long 901427976 + .long 1017333852 + .long 866379428 + .long 1073049455 + .long 2437443742 + .long 1019678792 + .long 1376865888 + .long 1073062480 + .long 3365790232 + .long 1014547152 + .long 3290094268 + .long 1073074195 + .long 3898947415 + .long 1018683566 + .long 354764884 + .long 1073084787 + .long 3854322404 + .long 1019662058 + .long 3332975496 + .long 1073094406 + .long 3171701655 + .long 1017830922 + .long 1141460088 + .long 1073103181 + .long 3946082701 + .long 1020032019 + .long 745761284 + .long 1073111216 + .long 1347210591 + .long 1019106121 + .long 1673304508 + .long 1073118600 + .long 1760606642 + .long 1017324577 + .long 983388240 + .long 1073125409 + .long 3740651204 + .long 1019514104 + .long 3895509100 + .long 1073131706 + .long 2409629983 + .long 1020069322 + .long 2128523668 + .long 1073137548 + .long 3045605368 + .long 1018579174 + .long 2075485692 + .long 1073142981 + .long 3720571789 + .long 1017557436 + .long 121855976 + .long 1073148047 + .long 2391744767 + .long 1020160645 + .long 4181733780 + .long 1073152780 + .long 995028816 + .long 1019681295 + .long 2887813280 + .long 1073157214 + .long 218733247 + .long 1020003509 + .long 2862180896 + .long 1073161375 + .long 2043806490 + .long 1018602288 + .long 3909375184 + .long 1073168973 + .long 1559903412 + .long 1020103444 + .long 3533966292 + .long 1073175738 + .long 734884149 + .long 1018462962 + .long 3815044608 + .long 1073181799 + .long 3630523428 + .long 1017250093 + .long 739639376 + .long 1073187261 + .long 4167476661 + .long 1020008277 + .long 1068309648 + .long 1073192207 + .long 2110061437 + .long 1019295858 + .long 2350566352 + .long 1073196707 + .long 582596516 + .long 1018568821 + .long 2529520024 + .long 1073200819 + .long 745552787 + .long 1019053165 + .long 1841667508 + .long 1073204591 + .long 3982568700 + .long 1016503327 + .long 2242261080 + .long 1073208063 + .long 3433582258 + .long 1016196763 + .long 715134328 + .long 1073211270 + .long 355901358 + .long 1020087916 + .long 2700735876 + .long 1073214240 + .long 3640957736 + .long 1019780205 + .long 141607580 + .long 1073217000 + .long 2488245051 + .long 1020262395 + .long 287934404 + .long 1073219570 + .long 2392691085 + .long 1019883292 + .long 2363373988 + .long 1073221969 + .long 4194561737 + .long 1019237447 + .long 3829340424 + .long 1073224214 + .long 429455526 + .long 1019490975 + .long 1988805928 + .long 1073226320 + .long 3029848706 + .long 1018104889 + .long 1647572320 + .long 1073230161 + .long 10289938 + .long 1017394880 + .long 3988000624 + .long 1073233576 + .long 1957559169 + .long 1019434816 + .long 4263843944 + .long 1073236633 + .long 204710264 + .long 1019908761 + .long 663197724 + .long 1073239386 + .long 1921757578 + .long 1019778948 + .long 3560800700 + .long 1073241876 + .long 3994348896 + .long 1019230192 + .long 2441785656 + .long 1073244141 + .long 871468611 + .long 1014800505 + .long 3277400272 + .long 1073246209 + .long 4092218139 + .long 1020040842 + .long 3951990120 + .long 1073248105 + .long 4276546478 + .long 1019763677 + .long 2737338540 + .long 1073249850 + .long 252776012 + .long 1018794951 + .long 1511361316 + .long 1073251461 + .long 3119653999 + .long 1018514803 + .long 3969162516 + .long 1073252952 + .long 1037069016 + .long 1016792900 + .long 413985240 + .long 1073254338 + .long 4110171432 + .long 1020001345 + .long 3681283576 + .long 1073255627 + .long 1463092818 + .long 1020260354 + .long 3146455488 + .long 1073256831 + .long 1031209123 + .long 1016554799 + .long 95214512 + .long 1073257958 + .long 1373808632 + .long 1019493031 + .long 4250240828 + .long 1073259013 + .long 3891047882 + .long 1020108730 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .type ATAN_TBL,@object + .size ATAN_TBL,2624 + .align 16 +P_TBL2: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 856972295 + .long 1017226790 + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 3164710438 + .long 1413754136 + .long 3221823995 + .type P_TBL2,@object + .size P_TBL2,64 + .align 16 +SELECT_B: + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .long 4294967295 + .long 4294967295 + .long 0 + .long 0 + .type SELECT_B,@object + .size SELECT_B,64 + .align 16 +SGNMASK: + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .type SGNMASK,@object + .size SGNMASK,16 + .align 16 +pi_table: + .long 1413754136 + .long 1074340347 + .long 856972295 + .long 1017226790 + .type pi_table,@object + .size pi_table,16 + .align 16 +pi2_table: + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .type pi2_table,@object + .size pi2_table,16 + .align 16 +pi4_table: + .long 1413754136 + .long 1072243195 + .long 856972295 + .long 1015129638 + .type pi4_table,@object + .size pi4_table,16 + .align 4 +POW55: + .long 0 + .long 1130364928 + .type POW55,@object + .size POW55,8 + .align 4 +INVEXPMASK: + .long 4294967295 + .long 2148532223 + .type INVEXPMASK,@object + .size INVEXPMASK,8 + .align 4 +EXPMASK: + .long 0 + .long 1072693248 + .type EXPMASK,@object + .size EXPMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_atan2.1-. + .4byte ..___tag_value_atan2.5-..___tag_value_atan2.1 + .2byte 0x0400 + .4byte ..___tag_value_atan2.3-..___tag_value_atan2.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_atan2.4-..___tag_value_atan2.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_cosh.S b/libm/x86_64/e_cosh.S new file mode 100644 index 0000000..8cdbca6 --- /dev/null +++ b/libm/x86_64/e_cosh.S @@ -0,0 +1,1372 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// cosh(x)=(exp(x)+exp(-x))/2 +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7), +// f=0.b1 b2 ... b7, k integer +// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f] +// Tp stores higher 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision +// +// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14}, +// for |x| in [1/8,3*2^8) +// e^{-|x|}=2^{-k-f}*2^{-r} +// +// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp= +// =2^k*Tp+2^k*Tp*P15+2^k*Dp +// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4) +// +// For |x| in [1/8, 3*2^7), cosh(x) is formed as +// RN(2^k*Tp+2^{-k}*Tn)+2^k*Tp*P15+2^{-k}*Tn*P`15+2^{-k}*TnL+2^{-k}*Dn+2^k*Dp +// +// For |x| in [3*2^7, 3*2^8), (e^|x|)/2 is returned, and +// the result is checked for overflow. +// +// For |x|<1/8, a Taylor polynomial expansion is used (degree 10) +// (error bound for polynomial expansion is below 0.501 ulp) +// +// Special cases: +// cosh(NaN) = quiet NaN, and raise invalid exception +// cosh(INF) = that INF +// cosh(0)=1 +// for finite argument, only cosh(0)=1 is exact +// For IEEE double +// cosh(x) overflows +// for x > 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2) +// +/******************************************************************************/ + +#include + +# -- Begin cosh +ENTRY(cosh) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_cosh.1: + pushq %rsi +..___tag_value_cosh.3: +..B1.2: + movsd HALFMASK(%rip), %xmm3 + xorpd %xmm4, %xmm4 + movsd L2E(%rip), %xmm1 + movsd 8+L2E(%rip), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd Shifter(%rip), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + andl $32767, %ecx + subl $16320, %ecx + cmpl $200, %ecx + jae .L_2TAG_PACKET_0.0.2 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + movq %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + xorpd %xmm5, %xmm5 + subsd %xmm6, %xmm3 + movapd cv(%rip), %xmm4 + addsd %xmm1, %xmm2 + movapd 16+cv(%rip), %xmm6 + subsd %xmm3, %xmm7 + movl $32704, %edx + pinsrw $3, %edx, %xmm5 + movapd 32+cv(%rip), %xmm1 + addsd %xmm7, %xmm2 + movl $127, %edx + andl %eax, %edx + addl %edx, %edx + shrl $3, %eax + andl $65520, %eax + addl $16352, %eax + xorpd %xmm0, %xmm0 + cmpl $184, %ecx + jae .L_2TAG_PACKET_1.0.2 + pshufd $68, %xmm5, %xmm5 + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + psubw %xmm0, %xmm5 + lea T2f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm0 + lea T2_neg_f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm5 + pshufd $68, %xmm2, %xmm3 + movapd 48+cv(%rip), %xmm7 + pshufd $68, %xmm2, %xmm2 + mulpd %xmm3, %xmm3 + mulpd %xmm2, %xmm4 + mulpd %xmm2, %xmm6 + mulpd 64+cv(%rip), %xmm2 + mulpd %xmm3, %xmm1 + mulpd %xmm3, %xmm7 + mulpd %xmm3, %xmm4 + mulpd %xmm3, %xmm1 + addpd %xmm7, %xmm6 + movq %xmm0, %xmm7 + addpd %xmm1, %xmm4 + shufpd $0, %xmm5, %xmm7 + addpd %xmm5, %xmm0 + mulpd %xmm7, %xmm2 + addpd %xmm6, %xmm4 + subsd %xmm0, %xmm7 + mulpd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm5, %xmm7 + addpd %xmm2, %xmm4 + addsd %xmm6, %xmm7 + pshufd $238, %xmm4, %xmm2 + addsd %xmm7, %xmm2 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + addl $16320, %ecx + cmpl $16320, %ecx + ja .L_2TAG_PACKET_2.0.2 + cmpl $15952, %ecx + jae .L_2TAG_PACKET_3.0.2 + addsd %xmm2, %xmm6 + movq ONEMASK(%rip), %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_1.0.2: + subl $16352, %eax + movl %eax, %ecx + andl $32752, %eax + shrl $1, %eax + andl $65520, %eax + subl %eax, %ecx + addl $16352, %eax + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + lea T2f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm0 + pshufd $68, %xmm2, %xmm3 + movsd 48+cv(%rip), %xmm7 + mulsd %xmm3, %xmm3 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm6 + mulsd 64+cv(%rip), %xmm2 + mulsd %xmm3, %xmm1 + mulsd %xmm3, %xmm7 + mulsd %xmm3, %xmm4 + addl $16368, %ecx + pinsrw $3, %ecx, %xmm5 + mulsd %xmm3, %xmm1 + addsd %xmm7, %xmm6 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + addsd %xmm6, %xmm4 + mulsd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm6, %xmm4 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm5, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + cmpl $32752, %eax + je .L_2TAG_PACKET_4.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_3.0.2: + movapd pv(%rip), %xmm1 + mulpd %xmm5, %xmm5 + movapd 16+pv(%rip), %xmm2 + xorpd %xmm3, %xmm3 + movq %xmm5, %xmm0 + mulpd %xmm5, %xmm1 + movsd ONEMASK(%rip), %xmm6 + mulpd %xmm5, %xmm5 + movl $16352, %eax + pinsrw $3, %eax, %xmm3 + addpd %xmm2, %xmm1 + mulpd %xmm5, %xmm1 + pshufd $238, %xmm1, %xmm2 + mulsd %xmm1, %xmm5 + mulsd %xmm3, %xmm0 + addsd %xmm5, %xmm2 + addsd %xmm2, %xmm0 + addsd %xmm6, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_5.0.2 + xorpd %xmm0, %xmm0 + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + mulsd %xmm0, %xmm0 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + mulsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + movq %xmm0, (%rsp) +..B1.3: + movq (%rsp), %xmm0 +.L_2TAG_PACKET_6.0.2: +..B1.5: + popq %rcx +..___tag_value_cosh.4: + ret +..___tag_value_cosh.5: +END(cosh) +# -- End cosh + .section .rodata, "a" + .align 16 + .align 16 +L2E: + .long 1610612736 + .long 1080497479 + .long 4166901572 + .long 1053077003 + .type L2E,@object + .size L2E,16 + .align 16 +Shifter: + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .type Shifter,@object + .size Shifter,16 + .align 16 +cv: + .long 3607404736 + .long 1044146952 + .long 3607404736 + .long 3191630600 + .long 4277811695 + .long 1063661122 + .long 4277811695 + .long 3211144770 + .long 2140175755 + .long 1033864261 + .long 2140175755 + .long 1033864261 + .long 4289495988 + .long 1054113747 + .long 4289495988 + .long 1054113747 + .long 4277811695 + .long 1064709698 + .long 4277811695 + .long 3212193346 + .type cv,@object + .size cv,80 + .align 16 +T2f: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 3706687593 + .long 1073526560 + .long 3521726940 + .long 1014301643 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .type T2f,@object + .size T2f,2048 + .align 16 +T2_neg_f: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .type T2_neg_f,@object + .size T2_neg_f,2048 + .align 16 +pv: + .long 3078135644 + .long 1049787983 + .long 381774870 + .long 1062650220 + .long 436314137 + .long 1056571808 + .long 1431655765 + .long 1067799893 + .type pv,@object + .size pv,32 + .align 4 +HALFMASK: + .long 4160749568 + .long 2147483647 + .type HALFMASK,@object + .size HALFMASK,8 + .align 4 +ONEMASK: + .long 0 + .long 1072693248 + .type ONEMASK,@object + .size ONEMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_cosh.1-. + .4byte ..___tag_value_cosh.5-..___tag_value_cosh.1 + .2byte 0x0400 + .4byte ..___tag_value_cosh.3-..___tag_value_cosh.1 + .2byte 0x100e + .byte 0x04 + .4byte ..___tag_value_cosh.4-..___tag_value_cosh.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_exp.S b/libm/x86_64/e_exp.S new file mode 100644 index 0000000..6882dfc --- /dev/null +++ b/libm/x86_64/e_exp.S @@ -0,0 +1,636 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Description: +// Let K = 64 (table size). +// x x/log(2) n +// e = 2 = 2 * T[j] * (1 + P(y)) +// where +// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K] +// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2] +// j/K +// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]). +// +// P(y) is a minimax polynomial approximation of exp(x)-1 +// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V). +// +// To avoid problems with arithmetic overflow and underflow, +// n n1 n2 +// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2] +// where BIAS is a value of exponent bias. +// +// Special cases: +// exp(NaN) = NaN +// exp(+INF) = +INF +// exp(-INF) = 0 +// exp(x) = 1 for subnormals +// for finite argument, only exp(0)=1 is exact +// For IEEE double +// if x > 709.782712893383973096 then exp(x) overflow +// if x < -745.133219101941108420 then exp(x) underflow +// +/******************************************************************************/ + +#include +# -- Begin exp +ENTRY(exp) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_exp.1: + subq $24, %rsp +..___tag_value_exp.3: + movsd %xmm0, 8(%rsp) +..B1.2: + unpcklpd %xmm0, %xmm0 + movapd cv(%rip), %xmm1 + movapd Shifter(%rip), %xmm6 + movapd 16+cv(%rip), %xmm2 + movapd 32+cv(%rip), %xmm3 + pextrw $3, %xmm0, %eax + andl $32767, %eax + movl $16527, %edx + subl %eax, %edx + subl $15504, %eax + orl %eax, %edx + cmpl $-2147483648, %edx + jae .L_2TAG_PACKET_0.0.2 + mulpd %xmm0, %xmm1 + addpd %xmm6, %xmm1 + movapd %xmm1, %xmm7 + subpd %xmm6, %xmm1 + mulpd %xmm1, %xmm2 + movapd 64+cv(%rip), %xmm4 + mulpd %xmm1, %xmm3 + movapd 80+cv(%rip), %xmm5 + subpd %xmm2, %xmm0 + movd %xmm7, %eax + movl %eax, %ecx + andl $63, %ecx + shll $4, %ecx + sarl $6, %eax + movl %eax, %edx + movdqa mmask(%rip), %xmm6 + pand %xmm6, %xmm7 + movdqa bias(%rip), %xmm6 + paddq %xmm6, %xmm7 + psllq $46, %xmm7 + subpd %xmm3, %xmm0 + lea Tbl_addr(%rip), %r8 + movapd (%rcx,%r8), %xmm2 + mulpd %xmm0, %xmm4 + movapd %xmm0, %xmm6 + movapd %xmm0, %xmm1 + mulpd %xmm6, %xmm6 + mulpd %xmm6, %xmm0 + addpd %xmm4, %xmm5 + mulsd %xmm6, %xmm0 + mulpd 48+cv(%rip), %xmm6 + addsd %xmm2, %xmm1 + unpckhpd %xmm2, %xmm2 + mulpd %xmm5, %xmm0 + addsd %xmm0, %xmm1 + orpd %xmm7, %xmm2 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + addsd %xmm6, %xmm0 + addl $894, %edx + cmpl $1916, %edx + ja .L_2TAG_PACKET_1.0.2 + mulsd %xmm2, %xmm0 + addsd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_1.0.2: + xorpd %xmm3, %xmm3 + movapd ALLONES(%rip), %xmm4 + movl $-1022, %edx + subl %eax, %edx + movd %edx, %xmm5 + psllq %xmm5, %xmm4 + movl %eax, %ecx + sarl $1, %eax + pinsrw $3, %eax, %xmm3 + movapd ebias(%rip), %xmm6 + psllq $4, %xmm3 + psubd %xmm3, %xmm2 + mulsd %xmm2, %xmm0 + cmpl $52, %edx + jg .L_2TAG_PACKET_2.0.2 + andpd %xmm2, %xmm4 + paddd %xmm6, %xmm3 + subsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + cmpl $1023, %ecx + jge .L_2TAG_PACKET_3.0.2 + pextrw $3, %xmm0, %ecx + andl $32768, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_4.0.2 + movapd %xmm0, %xmm6 + addsd %xmm4, %xmm0 + mulsd %xmm3, %xmm0 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $0, %ecx + je .L_2TAG_PACKET_5.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_5.0.2: + mulsd %xmm3, %xmm6 + mulsd %xmm3, %xmm4 + movq %xmm6, %xmm0 + pxor %xmm4, %xmm6 + psrad $31, %xmm6 + pshufd $85, %xmm6, %xmm6 + psllq $1, %xmm0 + psrlq $1, %xmm0 + pxor %xmm6, %xmm0 + psrlq $63, %xmm6 + paddq %xmm6, %xmm0 + paddq %xmm4, %xmm0 + movl $15, (%rsp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_4.0.2: + addsd %xmm4, %xmm0 + mulsd %xmm3, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_3.0.2: + addsd %xmm4, %xmm0 + mulsd %xmm3, %xmm0 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $32752, %ecx + jnb .L_2TAG_PACKET_7.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + paddd %xmm6, %xmm3 + addpd %xmm2, %xmm0 + mulsd %xmm3, %xmm0 + movl $15, (%rsp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_8.0.2: + cmpl $2146435072, %eax + jae .L_2TAG_PACKET_9.0.2 + movl 12(%rsp), %eax + cmpl $-2147483648, %eax + jae .L_2TAG_PACKET_10.0.2 + movsd XMAX(%rip), %xmm0 + mulsd %xmm0, %xmm0 +.L_2TAG_PACKET_7.0.2: + movl $14, (%rsp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_10.0.2: + movsd XMIN(%rip), %xmm0 + mulsd %xmm0, %xmm0 + movl $15, (%rsp) + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_9.0.2: + movl 8(%rsp), %edx + cmpl $2146435072, %eax + ja .L_2TAG_PACKET_11.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_11.0.2 + movl 12(%rsp), %eax + cmpl $2146435072, %eax + jne .L_2TAG_PACKET_12.0.2 + movsd INF(%rip), %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_12.0.2: + movsd ZERO(%rip), %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_11.0.2: + movsd 8(%rsp), %xmm0 + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + movl 12(%rsp), %eax + andl $2147483647, %eax + cmpl $1083179008, %eax + jae .L_2TAG_PACKET_8.0.2 + movsd 8(%rsp), %xmm0 + addsd ONE_val(%rip), %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + movq %xmm0, 16(%rsp) +..B1.3: + movq 16(%rsp), %xmm0 +.L_2TAG_PACKET_13.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_exp.4: + ret +..___tag_value_exp.5: +END(exp) +# -- End exp + .section .rodata, "a" + .align 16 + .align 16 +cv: + .long 1697350398 + .long 1079448903 + .long 1697350398 + .long 1079448903 + .long 4277796864 + .long 1065758274 + .long 4277796864 + .long 1065758274 + .long 3164486458 + .long 1025308570 + .long 3164486458 + .long 1025308570 + .long 4294967294 + .long 1071644671 + .long 4294967294 + .long 1071644671 + .long 3811088480 + .long 1062650204 + .long 1432067621 + .long 1067799893 + .long 3230715663 + .long 1065423125 + .long 1431604129 + .long 1069897045 + .type cv,@object + .size cv,96 + .align 16 +Shifter: + .long 0 + .long 1127743488 + .long 0 + .long 1127743488 + .type Shifter,@object + .size Shifter,16 + .align 16 +mmask: + .long 4294967232 + .long 0 + .long 4294967232 + .long 0 + .type mmask,@object + .size mmask,16 + .align 16 +bias: + .long 65472 + .long 0 + .long 65472 + .long 0 + .type bias,@object + .size bias,16 + .align 16 +Tbl_addr: + .long 0 + .long 0 + .long 0 + .long 0 + .long 235107661 + .long 1018002367 + .long 1048019040 + .long 11418 + .long 896005651 + .long 1015861842 + .long 3541402996 + .long 22960 + .long 1642514529 + .long 1012987726 + .long 410360776 + .long 34629 + .long 1568897900 + .long 1016568486 + .long 1828292879 + .long 46424 + .long 1882168529 + .long 1010744893 + .long 852742562 + .long 58348 + .long 509852888 + .long 1017336174 + .long 3490863952 + .long 70401 + .long 653277307 + .long 1017431380 + .long 2930322911 + .long 82586 + .long 1649557430 + .long 1017729363 + .long 1014845818 + .long 94904 + .long 1058231231 + .long 1015777676 + .long 3949972341 + .long 107355 + .long 1044000607 + .long 1016786167 + .long 828946858 + .long 119943 + .long 1151779725 + .long 1015705409 + .long 2288159958 + .long 132667 + .long 3819481236 + .long 1016499965 + .long 1853186616 + .long 145530 + .long 2552227826 + .long 1015039787 + .long 1709341917 + .long 158533 + .long 1829350193 + .long 1015216097 + .long 4112506593 + .long 171677 + .long 1913391795 + .long 1015756674 + .long 2799960843 + .long 184965 + .long 1303423926 + .long 1015238005 + .long 171030293 + .long 198398 + .long 1574172746 + .long 1016061241 + .long 2992903935 + .long 211976 + .long 3424156969 + .long 1017196428 + .long 926591434 + .long 225703 + .long 1938513547 + .long 1017631273 + .long 887463926 + .long 239579 + .long 2804567149 + .long 1015390024 + .long 1276261410 + .long 253606 + .long 631083525 + .long 1017690182 + .long 569847337 + .long 267786 + .long 1623370770 + .long 1011049453 + .long 1617004845 + .long 282120 + .long 3667985273 + .long 1013894369 + .long 3049340112 + .long 296610 + .long 3145379760 + .long 1014403278 + .long 3577096743 + .long 311258 + .long 2603100681 + .long 1017152460 + .long 1990012070 + .long 326066 + .long 3249202951 + .long 1017448880 + .long 1453150081 + .long 341035 + .long 419288974 + .long 1016280325 + .long 917841882 + .long 356167 + .long 3793507337 + .long 1016095713 + .long 3712504873 + .long 371463 + .long 728023093 + .long 1016345318 + .long 363667784 + .long 386927 + .long 2582678538 + .long 1017123460 + .long 2956612996 + .long 402558 + .long 7592966 + .long 1016721543 + .long 2186617380 + .long 418360 + .long 228611441 + .long 1016696141 + .long 1719614412 + .long 434334 + .long 2261665670 + .long 1017457593 + .long 1013258798 + .long 450482 + .long 544148907 + .long 1017323666 + .long 3907805043 + .long 466805 + .long 2383914918 + .long 1017143586 + .long 1447192520 + .long 483307 + .long 1176412038 + .long 1017267372 + .long 1944781190 + .long 499988 + .long 2882956373 + .long 1013312481 + .long 919555682 + .long 516851 + .long 3154077648 + .long 1016528543 + .long 2571947538 + .long 533897 + .long 348651999 + .long 1016405780 + .long 2604962540 + .long 551129 + .long 3253791412 + .long 1015920431 + .long 1110089947 + .long 568549 + .long 1509121860 + .long 1014756995 + .long 2568320822 + .long 586158 + .long 2617649212 + .long 1017340090 + .long 2966275556 + .long 603959 + .long 553214634 + .long 1016457425 + .long 2682146383 + .long 621954 + .long 730975783 + .long 1014083580 + .long 2191782032 + .long 640145 + .long 1486499517 + .long 1016818996 + .long 2069751140 + .long 658534 + .long 2595788928 + .long 1016407932 + .long 2990417244 + .long 677123 + .long 1853053619 + .long 1015310724 + .long 1434058175 + .long 695915 + .long 2462790535 + .long 1015814775 + .long 2572866477 + .long 714911 + .long 3693944214 + .long 1017259110 + .long 3092190714 + .long 734114 + .long 2979333550 + .long 1017188654 + .long 4076559942 + .long 753526 + .long 174054861 + .long 1014300631 + .long 2420883922 + .long 773150 + .long 816778419 + .long 1014197934 + .long 3716502172 + .long 792987 + .long 3507050924 + .long 1015341199 + .long 777507147 + .long 813041 + .long 1821514088 + .long 1013410604 + .long 3706687593 + .long 833312 + .long 920623539 + .long 1016295433 + .long 1242007931 + .long 853805 + .long 2789017511 + .long 1014276997 + .long 3707479175 + .long 874520 + .long 3586233004 + .long 1015962192 + .long 64696965 + .long 895462 + .long 474650514 + .long 1016642419 + .long 863738718 + .long 916631 + .long 1614448851 + .long 1014281732 + .long 3884662774 + .long 938030 + .long 2450082086 + .long 1016164135 + .long 2728693977 + .long 959663 + .long 1101668360 + .long 1015989180 + .long 3999357479 + .long 981531 + .long 835814894 + .long 1015702697 + .long 1533953344 + .long 1003638 + .long 1301400989 + .long 1014466875 + .long 2174652632 + .long 1025985 + .type Tbl_addr,@object + .size Tbl_addr,1024 + .align 16 +ALLONES: + .long 4294967295 + .long 4294967295 + .long 4294967295 + .long 4294967295 + .type ALLONES,@object + .size ALLONES,16 + .align 16 +ebias: + .long 0 + .long 1072693248 + .long 0 + .long 1072693248 + .type ebias,@object + .size ebias,16 + .align 4 +XMAX: + .long 4294967295 + .long 2146435071 + .type XMAX,@object + .size XMAX,8 + .align 4 +XMIN: + .long 0 + .long 1048576 + .type XMIN,@object + .size XMIN,8 + .align 4 +INF: + .long 0 + .long 2146435072 + .type INF,@object + .size INF,8 + .align 4 +ZERO: + .long 0 + .long 0 + .type ZERO,@object + .size ZERO,8 + .align 4 +ONE_val: + .long 0 + .long 1072693248 + .type ONE_val,@object + .size ONE_val,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_exp.1-. + .4byte ..___tag_value_exp.5-..___tag_value_exp.1 + .2byte 0x0400 + .4byte ..___tag_value_exp.3-..___tag_value_exp.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_exp.4-..___tag_value_exp.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_hypot.S b/libm/x86_64/e_hypot.S new file mode 100644 index 0000000..089b2b4 --- /dev/null +++ b/libm/x86_64/e_hypot.S @@ -0,0 +1,210 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// X87 version: +// Use 80-bit FPU precision fmul, fsqrt to compute square and sqrt. +// +// SSE version: +// Swap x, y if |x|<|y| +// For x=2^k*x, get y=y*2^(-k) +// Get S ~ sqrt(x^2+y^2) (leading 1 + leading 25 mantissa bits) +// +// Get D = ( RN(x^2+y^2) - S^2 ) + ( x^2 - RN(x^2) ) + +// + ( y^2 - ((RN(x^2+y^2)-RN(x^2)) ) +// +// Result is 2^k*(S + Se), where Se = S*e +// S*e is approximated as (D/2S)*( 1 - (D/2S)^2*1.0/S ) +// +// Return 2^k*(S+Se) +// +// For |y/x|<2^(-64), return x +// +// For cases where maximum biased exponent is either greater than 7fdh or +// below 32, take a special path to check for special cases (0, NaN, Inf), +// possible overflow, and more accurate computation for denormal results +// +// Special cases: +// hypot(x,y), hypot(y,x), and hypot(x,-y) are equivalent +// hypot(x,+-0) is equivalent to fabs(x) +// hypot(x,y) = y if (x==NaN or x==INF) and y==INF +// hypot(x,y) = x if (x==NaN or x==INF) and y!=INF (even if y==NaN!) +// hypot(x,y) = y if (x!=NaN and x!=INF) and (y==NaN or y==INF) +// +/******************************************************************************/ + +#include +# -- Begin hypot +ENTRY(hypot) +# parameter 1: %xmm0 +# parameter 2: %xmm1 +..B1.1: +..___tag_value_hypot.1: +..___tag_value_hypot.3: +..B1.2: + subq $64, %rsp + movapd static_const_table(%rip), %xmm3 + movsd %xmm0, 48(%rsp) + movsd %xmm1, 56(%rsp) + andpd %xmm3, %xmm0 + andpd %xmm3, %xmm1 + pextrw $3, %xmm0, %eax + pextrw $3, %xmm1, %edx + cmpl $24528, %eax + ja .L_2TAG_PACKET_0.0.1 + cmpl $24528, %edx + ja .L_2TAG_PACKET_0.0.1 +.L_2TAG_PACKET_1.0.1: + fldl 48(%rsp) + fldl 56(%rsp) + fxch %st(1) + fmul %st(0), %st + fxch %st(1) + nop + fmul %st(0), %st + faddp %st, %st(1) + fsqrt + jmp .L_2TAG_PACKET_2.0.1 +.L_2TAG_PACKET_0.0.1: + cmpl $32752, %eax + movl %eax, %ecx + jae .L_2TAG_PACKET_3.0.1 + subl %edx, %ecx + cmpl $32752, %edx + jae .L_2TAG_PACKET_3.0.1 + addl $928, %ecx + addl %edx, %eax + cmpl $1856, %ecx + ja .L_2TAG_PACKET_4.0.1 + cmpl $49056, %eax + jb .L_2TAG_PACKET_1.0.1 + fldl 48(%rsp) + fldl 56(%rsp) + fxch %st(1) + fmul %st(0), %st + fxch %st(1) + nop + fmul %st(0), %st + faddp %st, %st(1) + fsqrt +.L_2TAG_PACKET_5.0.1: + fstl (%rsp) + fstpt 16(%rsp) + xorl %eax, %eax + movw 24(%rsp), %ax + cmpl $17407, %eax + jae .L_2TAG_PACKET_6.0.1 + fldl (%rsp) + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_4.0.1: + movsd %xmm0, 32(%rsp) + movsd %xmm1, 40(%rsp) + fldl 32(%rsp) + faddl 40(%rsp) + jmp .L_2TAG_PACKET_5.0.1 +.L_2TAG_PACKET_6.0.1: + fldl (%rsp) + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_3.0.1: + shufpd $0, %xmm1, %xmm0 + movdqa %xmm0, %xmm2 + movdqa 16+static_const_table(%rip), %xmm3 + movsd %xmm0, 32(%rsp) + movsd %xmm1, 40(%rsp) + cmppd $3, %xmm0, %xmm2 + cmppd $0, %xmm0, %xmm3 + movmskpd %xmm2, %edx + movmskpd %xmm3, %rax + testl %edx, %edx + je .L_2TAG_PACKET_8.0.1 + fldl 32(%rsp) + fmull 40(%rsp) + testq $1, %rax + jne .L_2TAG_PACKET_9.0.1 + testq $2, %rax + jne .L_2TAG_PACKET_10.0.1 + jmp .L_2TAG_PACKET_2.0.1 +.L_2TAG_PACKET_8.0.1: + fldl 32(%rsp) + faddl 40(%rsp) + jmp .L_2TAG_PACKET_2.0.1 +.L_2TAG_PACKET_9.0.1: + fstpl 40(%rsp) + fldl 32(%rsp) + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_10.0.1: + fstpl 32(%rsp) + fldl 40(%rsp) + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_2.0.1: +.L_2TAG_PACKET_7.0.1: + fstpl 16(%rsp) + movq 16(%rsp), %xmm0 + addq $64, %rsp + ret +..B1.3: +..___tag_value_hypot.4: +END(hypot) +# -- End hypot + .section .rodata, "a" + .align 16 + .align 16 +static_const_table: + .long 4294967295 + .long 2147483647 + .long 4294967295 + .long 2147483647 + .long 0 + .long 2146435072 + .long 0 + .long 2146435072 + .type static_const_table,@object + .size static_const_table,32 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x00000014 + .4byte 0x0000001c + .4byte ..___tag_value_hypot.1-. + .4byte ..___tag_value_hypot.4-..___tag_value_hypot.1 + .2byte 0x0400 + .4byte ..___tag_value_hypot.3-..___tag_value_hypot.1 + .2byte 0x100e +# End diff --git a/libm/x86_64/e_log.S b/libm/x86_64/e_log.S new file mode 100644 index 0000000..40cb5e2 --- /dev/null +++ b/libm/x86_64/e_log.S @@ -0,0 +1,779 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpss instruction (B0) +// B = int((B0*2^7+0.5))/2^7 +// +// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts) +// +// Result: k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6) and +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log(NaN) = quiet NaN, and raise invalid exception +// log(+INF) = that INF +// log(0) = -INF with divide-by-zero exception raised +// log(1) = +0 +// log(x) = NaN with invalid exception raised if x < -0, including -INF +// +/******************************************************************************/ + +#include +# -- Begin log +ENTRY(log) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_log.1: + subq $24, %rsp +..___tag_value_log.3: + movsd %xmm0, (%rsp) +..B1.2: + movq $0x3ff0000000000000, %rax + movd %rax, %xmm2 + movq $0x77f0000000000000, %rdx + movd %rdx, %xmm3 + movl $32768, %ecx + movd %rcx, %xmm4 + movq $0xffffe00000000000, %r8 + movd %r8, %xmm5 + movq %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $16352, %ecx + psrlq $27, %xmm0 + lea L_tbl(%rip), %r11 + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + paddd %xmm4, %xmm0 + orpd %xmm3, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm1, %xmm5 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm1 + mulpd %xmm0, %xmm5 + andl $32752, %eax + subl %ecx, %eax + cvtsi2sd %eax, %xmm7 + mulsd %xmm0, %xmm1 + movq log2(%rip), %xmm6 + movapd coeff(%rip), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd (%r11,%rdx), %xmm0 + movapd 16+coeff(%rip), %xmm4 + addsd %xmm5, %xmm1 + movapd 32+coeff(%rip), %xmm2 + mulsd %xmm7, %xmm6 + movddup %xmm1, %xmm5 + mulsd 8+log2(%rip), %xmm7 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm4 + mulpd %xmm5, %xmm5 + movddup %xmm0, %xmm6 + addsd %xmm1, %xmm0 + addpd %xmm2, %xmm4 + mulpd %xmm5, %xmm3 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm4 + pshufd $238, %xmm0, %xmm2 + addsd %xmm6, %xmm1 + mulsd %xmm5, %xmm5 + addsd %xmm2, %xmm7 + addpd %xmm3, %xmm4 + addsd %xmm7, %xmm1 + mulpd %xmm5, %xmm4 + addsd %xmm4, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + movq (%rsp), %xmm0 + movq (%rsp), %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_2.0.2 + cmpl $16, %eax + jb .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_4.0.2: + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_5.0.2: + ja .L_2TAG_PACKET_4.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_4.0.2 + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_3.0.2: + xorpd %xmm1, %xmm1 + addsd %xmm0, %xmm1 + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_7.0.2 + xorpd %xmm1, %xmm1 + movl $18416, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + movq %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + psrlq $27, %xmm0 + movl $18416, %ecx + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_5.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + movl $3, 16(%rsp) + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $2, 16(%rsp) +.L_2TAG_PACKET_8.0.2: + movq %xmm0, 8(%rsp) +..B1.3: + movq 8(%rsp), %xmm0 +.L_2TAG_PACKET_9.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_log.4: + ret +..___tag_value_log.5: +END(log) +# -- End log + .section .rodata, "a" + .align 16 + .align 16 +L_tbl: + .long 4277811200 + .long 1072049730 + .long 2479318832 + .long 1026487127 + .long 2854492160 + .long 1072033410 + .long 215631550 + .long 1025638968 + .long 1547061248 + .long 1072017216 + .long 2886781435 + .long 1026423395 + .long 649825280 + .long 1072001146 + .long 4281533405 + .long 1024038923 + .long 646346752 + .long 1071985198 + .long 1562735921 + .long 1023790276 + .long 2203734016 + .long 1071969370 + .long 1838397691 + .long 3173936209 + .long 1872169984 + .long 1071953661 + .long 3981202460 + .long 1022325013 + .long 669557760 + .long 1071938069 + .long 4182597802 + .long 3173174122 + .long 4076413952 + .long 1071922591 + .long 1209029111 + .long 3170736207 + .long 556125184 + .long 1071907228 + .long 821086028 + .long 3173437049 + .long 204914688 + .long 1071891976 + .long 2097025986 + .long 3171071798 + .long 387545088 + .long 1071876834 + .long 3142936996 + .long 3173092218 + .long 2912783360 + .long 1071861800 + .long 2502420140 + .long 1024505919 + .long 1144260608 + .long 1071846874 + .long 3315658140 + .long 3173469843 + .long 1471209472 + .long 1071832053 + .long 129621009 + .long 3172443877 + .long 1829683200 + .long 1071817336 + .long 3885467693 + .long 1025535275 + .long 288676864 + .long 1071802722 + .long 86139472 + .long 3171639793 + .long 3636378624 + .long 1071788208 + .long 1850238587 + .long 1024654342 + .long 1606817792 + .long 1071773795 + .long 3388899795 + .long 3173675586 + .long 1236164608 + .long 1071759480 + .long 3983599207 + .long 1020046558 + .long 1089616896 + .long 1071745262 + .long 4171974224 + .long 1024773198 + .long 4143093760 + .long 1071731139 + .long 2727587401 + .long 3173965207 + .long 600267776 + .long 1071717112 + .long 3147685042 + .long 3173353031 + .long 2249313280 + .long 1071703177 + .long 125835074 + .long 1025255832 + .long 3805303808 + .long 1071689334 + .long 2289991207 + .long 1025460331 + .long 87278592 + .long 1071675583 + .long 1106114045 + .long 1025933602 + .long 3195405312 + .long 1071661920 + .long 3885316576 + .long 3171206239 + .long 3853649920 + .long 1071648346 + .long 2977069852 + .long 3171236771 + .long 2944026624 + .long 1071625048 + .long 1008093493 + .long 1023444474 + .long 3993180160 + .long 1071598247 + .long 1862355595 + .long 1024642533 + .long 1454641152 + .long 1071571617 + .long 1514603089 + .long 1026500596 + .long 3286085632 + .long 1071545154 + .long 1400028424 + .long 3173279056 + .long 438773760 + .long 1071518858 + .long 120727864 + .long 3172148914 + .long 1212979200 + .long 1071492725 + .long 1625055594 + .long 3172901933 + .long 1189017600 + .long 1071466754 + .long 3920062376 + .long 1025727407 + .long 403064832 + .long 1071440943 + .long 1053271728 + .long 3171391427 + .long 3343210496 + .long 1071415289 + .long 3243395502 + .long 3173627613 + .long 1765777408 + .long 1071389792 + .long 2145968512 + .long 1026354304 + .long 461430784 + .long 1071364449 + .long 4094322285 + .long 1026021467 + .long 71706624 + .long 1071339258 + .long 763632021 + .long 1024496933 + .long 1380503552 + .long 1071314217 + .long 1383547992 + .long 3173088453 + .long 1015732224 + .long 1071289325 + .long 3198646877 + .long 1025390322 + .long 35977216 + .long 1071264580 + .long 2141026805 + .long 1025754693 + .long 3927306240 + .long 1071239979 + .long 282116272 + .long 3173394334 + .long 1125341184 + .long 1071215523 + .long 2768427504 + .long 3172279059 + .long 1666971648 + .long 1071191208 + .long 786837629 + .long 3172427445 + .long 2827694080 + .long 1071167033 + .long 3857122416 + .long 3173014241 + .long 2003683328 + .long 1071142997 + .long 859010954 + .long 1026545007 + .long 1004017664 + .long 1071119098 + .long 3356644970 + .long 3173458064 + .long 1753020416 + .long 1071095334 + .long 788338552 + .long 1026157693 + .long 1992718336 + .long 1071071704 + .long 1239179443 + .long 1026394889 + .long 3870234624 + .long 1071048206 + .long 2082614663 + .long 1024926053 + .long 1050437632 + .long 1071024840 + .long 660007840 + .long 1025548499 + .long 188395520 + .long 1071001603 + .long 3878792704 + .long 3173889571 + .long 3747176448 + .long 1070978493 + .long 144991708 + .long 3171552042 + .long 1405669376 + .long 1070955511 + .long 3999088879 + .long 1025486317 + .long 121151488 + .long 1070932654 + .long 2170865497 + .long 1026473584 + .long 2652319744 + .long 1070909920 + .long 453695652 + .long 3173916809 + .long 3262236672 + .long 1070887309 + .long 157800053 + .long 3173984206 + .long 601221120 + .long 1070864820 + .long 3968917661 + .long 1023992886 + .long 1999843328 + .long 1070842450 + .long 3053895004 + .long 1024998228 + .long 1992167424 + .long 1070820199 + .long 2968614856 + .long 1024552653 + .long 3788726272 + .long 1070798065 + .long 3542170808 + .long 3173573242 + .long 2094829568 + .long 1070776048 + .long 1246758132 + .long 1026202874 + .long 288675840 + .long 1070754146 + .long 3747328950 + .long 1026331585 + .long 1829681152 + .long 1070732357 + .long 3125197546 + .long 1024100318 + .long 1666869248 + .long 1070710681 + .long 1363656119 + .long 1026336493 + .long 3417110528 + .long 1070689116 + .long 4154791553 + .long 1026267853 + .long 2183653376 + .long 1070667662 + .long 1671819292 + .long 3173785870 + .long 1734434816 + .long 1070646317 + .long 373091049 + .long 1025972363 + .long 1615681536 + .long 1070625080 + .long 384650897 + .long 1022926043 + .long 1445382144 + .long 1070603950 + .long 344320330 + .long 3172397196 + .long 1823715328 + .long 1070569756 + .long 3389841200 + .long 1025231852 + .long 3839688704 + .long 1070527917 + .long 1706790417 + .long 3167363349 + .long 4293332992 + .long 1070486286 + .long 1614935088 + .long 1019351591 + .long 2966720512 + .long 1070444861 + .long 4145393717 + .long 3173711658 + .long 4066729984 + .long 1070403639 + .long 1974925028 + .long 3171437182 + .long 3337621504 + .long 1070362619 + .long 3314953170 + .long 3169971314 + .long 943448064 + .long 1070321799 + .long 1498682038 + .long 3173862340 + .long 1465634816 + .long 1070281176 + .long 1319952810 + .long 3171693965 + .long 1015734272 + .long 1070240749 + .long 1347821929 + .long 3173544515 + .long 118001664 + .long 1070200516 + .long 1751482746 + .long 1026134093 + .long 3707174912 + .long 1070160474 + .long 1486946159 + .long 1023930920 + .long 3946381312 + .long 1070120623 + .long 2867408081 + .long 3171368276 + .long 1699848192 + .long 1070080961 + .long 2590187139 + .long 1025379803 + .long 2235846656 + .long 1070041485 + .long 1888568069 + .long 3172754960 + .long 2339729408 + .long 1070002194 + .long 3852214753 + .long 3173323149 + .long 3196850176 + .long 1069963086 + .long 742141560 + .long 1025101707 + .long 1800683520 + .long 1069924160 + .long 3949500444 + .long 3172102179 + .long 3835801600 + .long 1069885413 + .long 3848895943 + .long 1025913832 + .long 2201202688 + .long 1069846845 + .long 1425913464 + .long 1025868665 + .long 2778279936 + .long 1069808453 + .long 2120889677 + .long 3173831128 + .long 2954203136 + .long 1069770236 + .long 592147081 + .long 1019621288 + .long 210141184 + .long 1069732193 + .long 3414275233 + .long 1023647084 + .long 709476352 + .long 1069694321 + .long 2413027164 + .long 1024462115 + .long 2116284416 + .long 1069656619 + .long 1144559924 + .long 1026336654 + .long 2183651328 + .long 1069619086 + .long 3459057650 + .long 1025634168 + .long 3047047168 + .long 1069581720 + .long 1879674924 + .long 3173508573 + .long 970711040 + .long 1069541521 + .long 1335954173 + .long 3173332182 + .long 2198478848 + .long 1069467449 + .long 2951103968 + .long 3173892200 + .long 1669611520 + .long 1069393703 + .long 531044147 + .long 1025149248 + .long 29114368 + .long 1069320280 + .long 3327831251 + .long 1025918673 + .long 2376949760 + .long 1069247176 + .long 737634533 + .long 3172176000 + .long 1085390848 + .long 1069174390 + .long 3108243400 + .long 3171828406 + .long 1566130176 + .long 1069101918 + .long 985483226 + .long 1025708380 + .long 792780800 + .long 1069029758 + .long 4184866295 + .long 1024426204 + .long 183156736 + .long 1068957907 + .long 2845699378 + .long 1022107277 + .long 1301782528 + .long 1068886362 + .long 1012735262 + .long 3173804294 + .long 1562411008 + .long 1068815121 + .long 2197086703 + .long 3170187813 + .long 2815549440 + .long 1068744181 + .long 2782613207 + .long 1026345054 + .long 2756124672 + .long 1068673540 + .long 2929486205 + .long 3173037800 + .long 3511050240 + .long 1068603195 + .long 1443733147 + .long 3173331549 + .long 3047047168 + .long 1068533144 + .long 1879674924 + .long 3172459997 + .long 3221667840 + .long 1068427825 + .long 1338588027 + .long 3171815742 + .long 3453861888 + .long 1068288883 + .long 1205348359 + .long 3172624626 + .long 3506110464 + .long 1068150514 + .long 893105198 + .long 1025571866 + .long 346013696 + .long 1068012714 + .long 3495569021 + .long 3172563349 + .long 4074029056 + .long 1067875476 + .long 3961106338 + .long 3171065595 + .long 3559784448 + .long 1067738798 + .long 1975385384 + .long 3173783155 + .long 797769728 + .long 1067602675 + .long 3760305787 + .long 1026047642 + .long 2313633792 + .long 1067467101 + .long 1559353171 + .long 1023480256 + .long 3960766464 + .long 1067213778 + .long 1067365107 + .long 1025865926 + .long 684261376 + .long 1066944805 + .long 844762164 + .long 3173687482 + .long 630718464 + .long 1066676905 + .long 2458269694 + .long 1024033081 + .long 1486061568 + .long 1066410070 + .long 115537874 + .long 3173243995 + .long 2743664640 + .long 1065886792 + .long 3665098304 + .long 3173471607 + .long 1971912704 + .long 1065357333 + .long 2577214440 + .long 3171993451 + .long 1498939392 + .long 1064306693 + .long 3409036923 + .long 1025599151 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .type L_tbl,@object + .size L_tbl,2064 + .align 16 +log2: + .long 4277811200 + .long 1067855426 + .long 2479318832 + .long 1022292823 + .type log2,@object + .size log2,16 + .align 16 +coeff: + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1030730101 + .long 3217380702 + .long 1431655765 + .long 1070945621 + .long 2576980378 + .long 1070176665 + .long 0 + .long 3219128320 + .type coeff,@object + .size coeff,48 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_log.1-. + .4byte ..___tag_value_log.5-..___tag_value_log.1 + .2byte 0x0400 + .4byte ..___tag_value_log.3-..___tag_value_log.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_log.4-..___tag_value_log.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_log10.S b/libm/x86_64/e_log10.S new file mode 100644 index 0000000..4f43a36 --- /dev/null +++ b/libm/x86_64/e_log10.S @@ -0,0 +1,807 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpss instruction (B0) +// B = int((B0*LH*2^7+0.5))/2^7 +// LH is a short approximation for log10(e) +// +// Reduced argument: r=B*mx-LH (computed accurately in high and low parts) +// +// Result: k*log10(2) - log(B) + p(r) +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log10(0) = -INF with divide-by-zero exception raised +// log10(1) = +0 +// log10(x) = NaN with invalid exception raised if x < -0, including -INF +// log10(+INF) = +INF +// +/******************************************************************************/ + +#include +# -- Begin log10 +ENTRY(log10) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_log10.1: + subq $24, %rsp +..___tag_value_log10.3: + movsd %xmm0, (%rsp) +..B1.2: + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movl $1054736384, %ecx + movd %ecx, %xmm7 + xorpd %xmm3, %xmm3 + movl $30704, %edx + pinsrw $3, %edx, %xmm3 + movq %xmm0, %xmm1 + movl $32768, %edx + movd %edx, %xmm4 + movapd HIGHSIGMASK(%rip), %xmm5 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $16352, %ecx + psrlq $27, %xmm0 + movq LOG10_E(%rip), %xmm2 + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $78, %xmm5, %xmm6 + psrlq $12, %xmm1 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 +.L_2TAG_PACKET_1.0.2: + mulss %xmm7, %xmm0 + orpd %xmm3, %xmm1 + lea L_tbl(%rip), %r11 + andpd %xmm1, %xmm5 + paddd %xmm4, %xmm0 + subsd %xmm5, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm6, %xmm0 + andl $32752, %eax + subl %ecx, %eax + cvtsi2sd %eax, %xmm7 + mulpd %xmm0, %xmm5 + mulsd %xmm0, %xmm1 + movq log2(%rip), %xmm6 + movapd coeff(%rip), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd -1504(%r11,%rdx), %xmm0 + movapd 16+coeff(%rip), %xmm4 + addsd %xmm5, %xmm1 + movapd 32+coeff(%rip), %xmm2 + mulsd %xmm7, %xmm6 + pshufd $68, %xmm1, %xmm5 + mulsd 8+log2(%rip), %xmm7 + mulsd %xmm1, %xmm3 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm4 + movq 8+LOG10_E(%rip), %xmm6 + mulpd %xmm5, %xmm5 + addpd %xmm2, %xmm4 + mulpd %xmm5, %xmm3 + pshufd $228, %xmm0, %xmm2 + addsd %xmm1, %xmm0 + mulsd %xmm1, %xmm4 + subsd %xmm0, %xmm2 + mulsd %xmm1, %xmm6 + addsd %xmm2, %xmm1 + pshufd $238, %xmm0, %xmm2 + mulsd %xmm5, %xmm5 + addsd %xmm2, %xmm7 + addsd %xmm6, %xmm1 + addpd %xmm3, %xmm4 + addsd %xmm7, %xmm1 + mulpd %xmm5, %xmm4 + addsd %xmm4, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + movq (%rsp), %xmm0 + movq (%rsp), %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_2.0.2 + cmpl $16, %eax + jb .L_2TAG_PACKET_3.0.2 +.L_2TAG_PACKET_4.0.2: + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_5.0.2: + ja .L_2TAG_PACKET_4.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_4.0.2 + jmp .L_2TAG_PACKET_6.0.2 +.L_2TAG_PACKET_3.0.2: + xorpd %xmm1, %xmm1 + addsd %xmm0, %xmm1 + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_7.0.2 + xorpd %xmm1, %xmm1 + movl $18416, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movq %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psrlq $27, %xmm0 + movq LOG10_E(%rip), %xmm2 + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $78, %xmm5, %xmm6 + psrlq $12, %xmm1 + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_2.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_5.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + movl $9, 16(%rsp) + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $8, 16(%rsp) +.L_2TAG_PACKET_8.0.2: + movq %xmm0, 8(%rsp) +..B1.3: + movq 8(%rsp), %xmm0 +.L_2TAG_PACKET_9.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_log10.4: + ret +..___tag_value_log10.5: +END(log10) +# -- End log10 + .section .rodata, "a" + .align 16 + .align 16 +HIGHSIGMASK: + .long 4160749568 + .long 4294967295 + .long 0 + .long 4294959104 + .type HIGHSIGMASK,@object + .size HIGHSIGMASK,16 + .align 16 +LOG10_E: + .long 0 + .long 1071366144 + .long 3207479560 + .long 1062894188 + .type LOG10_E,@object + .size LOG10_E,16 + .align 16 +L_tbl: + .long 1352628224 + .long 1070810131 + .long 521319256 + .long 1025503025 + .long 2150839296 + .long 1070801944 + .long 3329350096 + .long 3170190015 + .long 1360613376 + .long 1070793794 + .long 2024059075 + .long 1024991594 + .long 1875350528 + .long 1070785680 + .long 2163882141 + .long 3163564137 + .long 2312126464 + .long 1070777602 + .long 1975711076 + .long 1023674196 + .long 1306336256 + .long 1070769560 + .long 3524899523 + .long 3170508164 + .long 1806334976 + .long 1070761553 + .long 4254777025 + .long 1025238739 + .long 2483193856 + .long 1070753581 + .long 3800671317 + .long 3172916830 + .long 2025350144 + .long 1070745644 + .long 1731514745 + .long 1025501083 + .long 3433285632 + .long 1070737741 + .long 2551857336 + .long 3169662186 + .long 1134317568 + .long 1070729873 + .long 3426297655 + .long 3172637891 + .long 2457152512 + .long 1070722038 + .long 63549415 + .long 1025415416 + .long 1861803008 + .long 1070714237 + .long 1910171636 + .long 1023977580 + .long 2414140416 + .long 1070706469 + .long 4002514337 + .long 3170841618 + .long 2900726784 + .long 1070698734 + .long 3268064083 + .long 1022459609 + .long 2123517952 + .long 1070691032 + .long 1767031218 + .long 1022448156 + .long 3194569728 + .long 1070683362 + .long 3402332618 + .long 3171671160 + .long 650882048 + .long 1070675725 + .long 4146023905 + .long 3171023038 + .long 1928988672 + .long 1070668119 + .long 1438617867 + .long 1016360491 + .long 1594908672 + .long 1070660545 + .long 971389377 + .long 1024763979 + .long 2818746368 + .long 1070653002 + .long 3555925341 + .long 3172434821 + .long 194584576 + .long 1070645491 + .long 943919215 + .long 3172950063 + .long 1215096832 + .long 1070638010 + .long 2283358588 + .long 1022335098 + .long 501519360 + .long 1070630560 + .long 480904295 + .long 1024437959 + .long 1278266368 + .long 1070623140 + .long 2755806066 + .long 3172342012 + .long 2487812096 + .long 1070615750 + .long 2489653202 + .long 3172481099 + .long 3085451264 + .long 1070608390 + .long 3759184951 + .long 3172574892 + .long 2039090176 + .long 1070601060 + .long 1361176676 + .long 3172355319 + .long 953057280 + .long 1070591423 + .long 1176587546 + .long 3166422018 + .long 3370524672 + .long 1070576879 + .long 3669570051 + .long 1025376630 + .long 749742080 + .long 1070562394 + .long 707700964 + .long 3170814058 + .long 4008353792 + .long 1070547965 + .long 3247327652 + .long 1022431400 + .long 2612455424 + .long 1070533594 + .long 2453457344 + .long 3172322969 + .long 3230920704 + .long 1070519279 + .long 1296781801 + .long 1025115335 + .long 3965253632 + .long 1070505020 + .long 373075289 + .long 1017938528 + .long 2593157120 + .long 1070476669 + .long 1068054086 + .long 1021616576 + .long 925962240 + .long 1070448537 + .long 850121213 + .long 1023928989 + .long 1732556800 + .long 1070420620 + .long 1305206740 + .long 3172665570 + .long 3815630848 + .long 1070392915 + .long 192642943 + .long 3172699907 + .long 2001758208 + .long 1070365420 + .long 2820786683 + .long 1024704867 + .long 16746496 + .long 1070338131 + .long 1399573110 + .long 3171372773 + .long 1886492672 + .long 1070311044 + .long 3621428075 + .long 3172974358 + .long 3338196992 + .long 1070284157 + .long 3793882035 + .long 1025124701 + .long 381769728 + .long 1070257468 + .long 3877933342 + .long 3170195490 + .long 2186491904 + .long 1070230972 + .long 1838687089 + .long 1017927292 + .long 1008330752 + .long 1070204668 + .long 2228321664 + .long 1025352196 + .long 2247065600 + .long 1070178552 + .long 1413900906 + .long 3170902532 + .long 2964070400 + .long 1070152622 + .long 3590454629 + .long 1025016844 + .long 465154048 + .long 1070126876 + .long 2079688550 + .long 3172268183 + .long 883615744 + .long 1070101310 + .long 989244452 + .long 3171900485 + .long 1993768960 + .long 1070075922 + .long 1124327841 + .long 3172964992 + .long 1794471936 + .long 1070050710 + .long 1140575046 + .long 1022673726 + .long 2797932544 + .long 1070025671 + .long 1894836933 + .long 3172544059 + .long 3433797632 + .long 1070000803 + .long 3221831166 + .long 3171921685 + .long 2338371584 + .long 1069976104 + .long 3732461053 + .long 3164513518 + .long 2644013056 + .long 1069951571 + .long 2519460462 + .long 3172548740 + .long 3383814144 + .long 1069927202 + .long 2290997657 + .long 1025499649 + .long 3781380096 + .long 1069902995 + .long 380479405 + .long 1025184136 + .long 3245785088 + .long 1069878948 + .long 1096398261 + .long 3169885192 + .long 1366712320 + .long 1069855059 + .long 2218343715 + .long 3170281628 + .long 2204717056 + .long 1069831325 + .long 2668334011 + .long 1025264524 + .long 1401772032 + .long 1069807745 + .long 4103993159 + .long 1022925721 + .long 3356721152 + .long 1069784316 + .long 3573790772 + .long 3172186527 + .long 4041148416 + .long 1069761037 + .long 4027691910 + .long 3171276990 + .long 3880151040 + .long 1069737906 + .long 4087118786 + .long 3172710734 + .long 3453364224 + .long 1069714921 + .long 99014299 + .long 3172003077 + .long 3491092480 + .long 1069692080 + .long 3801836701 + .long 3172989287 + .long 575580160 + .long 1069669382 + .long 1920406012 + .long 3170874125 + .long 22282240 + .long 1069646824 + .long 964193370 + .long 1019363159 + .long 2991429632 + .long 1069624404 + .long 3372589890 + .long 1023425053 + .long 2189645824 + .long 1069602122 + .long 2610503872 + .long 1023652442 + .long 3341467648 + .long 1069579975 + .long 1190292004 + .long 1022425665 + .long 3711293440 + .long 1069557962 + .long 1104795356 + .long 1023625829 + .long 1380401152 + .long 1069524644 + .long 1156998217 + .long 1025100499 + .long 765710336 + .long 1069481144 + .long 1736649113 + .long 1024999439 + .long 849412096 + .long 1069437902 + .long 2618178330 + .long 3170853629 + .long 1433104384 + .long 1069394915 + .long 43477267 + .long 3170378811 + .long 2548596736 + .long 1069352180 + .long 3967367063 + .long 1025246584 + .long 157577216 + .long 1069309695 + .long 100402533 + .long 3172825502 + .long 3326238720 + .long 1069267455 + .long 1176892909 + .long 1025464099 + .long 4155494400 + .long 1069225459 + .long 3713707617 + .long 3172630046 + .long 3545804800 + .long 1069183704 + .long 857007315 + .long 1024965777 + .long 2602520576 + .long 1069142187 + .long 2588758347 + .long 1022463131 + .long 2631196672 + .long 1069100905 + .long 2118424235 + .long 1022490989 + .long 838135808 + .long 1069059856 + .long 4117002727 + .long 1024874520 + .long 3210903552 + .long 1069019036 + .long 650070125 + .long 3172012966 + .long 3039211520 + .long 1068978444 + .long 438055812 + .long 1017743757 + .long 2385633280 + .long 1068938077 + .long 3011990369 + .long 3171312044 + .long 3491618816 + .long 1068897932 + .long 712813818 + .long 3172720400 + .long 183644160 + .long 1068858008 + .long 4287006742 + .long 1022379728 + .long 3639214080 + .long 1068818300 + .long 353762279 + .long 3172980009 + .long 3728416768 + .long 1068778808 + .long 1851367730 + .long 1025486574 + .long 3370094592 + .long 1068739529 + .long 4046594913 + .long 3172567047 + .long 1348407296 + .long 1068700461 + .long 143189675 + .long 1025397632 + .long 899403776 + .long 1068661601 + .long 3753687842 + .long 3170772772 + .long 1117708288 + .long 1068622947 + .long 1857340812 + .long 3170782678 + .long 1248276480 + .long 1068584497 + .long 1289858203 + .long 1025222289 + .long 683237376 + .long 1068546249 + .long 2356679608 + .long 3171629170 + .long 3253764096 + .long 1068508200 + .long 3267136556 + .long 1018554987 + .long 94478336 + .long 1068441756 + .long 1927868814 + .long 3169378180 + .long 3233144832 + .long 1068366445 + .long 2682188854 + .long 1023964004 + .long 2940297216 + .long 1068291522 + .long 275301289 + .long 1023944679 + .long 3677708288 + .long 1068216982 + .long 302658771 + .long 1024465567 + .long 1576968192 + .long 1068142822 + .long 3672035940 + .long 3172254610 + .long 1614069760 + .long 1068069037 + .long 480052905 + .long 3172692062 + .long 424435712 + .long 1067995624 + .long 2207869657 + .long 3170965436 + .long 3477782528 + .long 1067922578 + .long 2980661858 + .long 3164990018 + .long 3598401536 + .long 1067849897 + .long 1974393034 + .long 3171357083 + .long 2435235840 + .long 1067777577 + .long 1385289011 + .long 1024615823 + .long 1867333632 + .long 1067705614 + .long 3442236633 + .long 1025334384 + .long 3999301632 + .long 1067634004 + .long 3506472073 + .long 1025132546 + .long 2566971392 + .long 1067562745 + .long 1425757592 + .long 3172358463 + .long 112943104 + .long 1067491833 + .long 1693407156 + .long 3172426603 + .long 3079929856 + .long 1067392159 + .long 3999942455 + .long 1018549369 + .long 2443837440 + .long 1067251701 + .long 974534460 + .long 1023963412 + .long 359366656 + .long 1067111917 + .long 2204915018 + .long 1013514416 + .long 3564519424 + .long 1066972799 + .long 3977441659 + .long 3170879860 + .long 2011086848 + .long 1066834343 + .long 590145514 + .long 1025390011 + .long 3216982016 + .long 1066696541 + .long 3629120110 + .long 1024330313 + .long 2194128896 + .long 1066559388 + .long 2367098512 + .long 3172260338 + .long 2916220928 + .long 1066422877 + .long 2262431886 + .long 1021229446 + .long 2263941120 + .long 1066172214 + .long 3118507287 + .long 1021484970 + .long 3076292608 + .long 1065901726 + .long 1411737803 + .long 3172957147 + .long 1186136064 + .long 1065632488 + .long 3109349337 + .long 1025397383 + .long 3085303808 + .long 1065364487 + .long 584715031 + .long 3172596519 + .long 1821048832 + .long 1064842211 + .long 2182246895 + .long 3172536214 + .long 697368576 + .long 1064311094 + .long 3157561765 + .long 3172716357 + .long 894042112 + .long 1063260131 + .long 3237958154 + .long 3172587292 + .long 0 + .long 0 + .long 0 + .long 0 + .type L_tbl,@object + .size L_tbl,2064 + .align 16 +log2: + .long 1352628224 + .long 1066615827 + .long 521319256 + .long 1021308721 + .type log2,@object + .size log2,16 + .align 16 +coeff: + .long 3248877870 + .long 1077250164 + .long 1691676429 + .long 3221787401 + .long 945132465 + .long 3223701783 + .long 3700831335 + .long 1073506818 + .long 2141010593 + .long 1075227551 + .long 3698831637 + .long 3220339442 + .type coeff,@object + .size coeff,48 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_log10.1-. + .4byte ..___tag_value_log10.5-..___tag_value_log10.1 + .2byte 0x0400 + .4byte ..___tag_value_log10.3-..___tag_value_log10.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_log10.4-..___tag_value_log10.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_pow.S b/libm/x86_64/e_pow.S new file mode 100644 index 0000000..9ec3828 --- /dev/null +++ b/libm/x86_64/e_pow.S @@ -0,0 +1,4282 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// log2(x) calculation: +// +// Get B~1/mx based on the output of rcpps instruction (B0) +// B = int((B0*LH*2^9+0.5))/2^9 +// LH is a short approximation for log2(e) +// +// Reduced argument, scaled by LH: +// r=B*mx-LH (computed accurately in high and low parts) +// +// log2(x) result: k - log2(B) + p(r) +// p(r) is a degree 8 polynomial +// -log2(B) read from data table (high, low parts) +// log2(x) is formed from high and low parts +// For |x| in [1-1/32, 1+1/16), a slower but more accurate computation +// based om the same table design is performed. +// +// Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8, +// to filter out all potential OF/UF cases. +// exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5 +// polynomial +// +// Special cases: +// pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd +// integer < 0. +// pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and +// not an odd integer. +// pow(-0,y) = -0 for y an odd integer > 0. +// pow(-0,y) = +0 for y > 0 and not an odd integer. +// pow(-1,-INF) = 1. +// pow(+1,y) = 1 for any y, even a NaN. +// pow(x,-0) = 1 for any x, even a NaN. +// pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and +// finite non-integer y. +// pow(x,-INF) = +INF for |x|<1. +// pow(x,-INF) = +0 for |x|>1. +// pow(x,+INF) = +0 for |x|<1. +// pow(x,+INF) = +INF for |x|>1. +// pow(-INF,y) = -0 for y an odd integer < 0. +// pow(-INF,y) = +0 for y < 0 and not an odd integer. +// pow(-INF,y) = -INF for y an odd integer > 0. +// pow(-INF,y) = +INF for y > 0 and not an odd integer. +// pow(+INF,y) = +0 for y <0. +// pow(+INF,y) = +INF for y >0. +// +/******************************************************************************/ + +#include +# -- Begin pow +ENTRY(pow) +# parameter 1: %xmm0 +# parameter 2: %xmm1 +..B1.1: +..___tag_value_pow.1: + subq $40, %rsp +..___tag_value_pow.3: + movsd %xmm0, 8(%rsp) + movsd %xmm1, 16(%rsp) +..B1.2: + pextrw $3, %xmm0, %eax + xorpd %xmm2, %xmm2 + movq $0x3ff0000000000000, %r9 + movd %r9, %xmm2 + movl $1069088768, %r8d + movd %r8, %xmm7 + xorpd %xmm1, %xmm1 + movq $0x77f0000000000000, %r10 + movd %r10, %xmm1 + movq %xmm0, %xmm3 + movl $32752, %edx + andl %eax, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + orpd %xmm2, %xmm0 + movapd HIGHSIGMASK(%rip), %xmm6 + psrlq $27, %xmm0 + movq LOG2_E(%rip), %xmm2 + psrld $2, %xmm0 + addl $16, %ecx + bsr %ecx, %ecx + rcpps %xmm0, %xmm0 + psllq $12, %xmm3 + movl $8192, %r11d + movd %r11, %xmm4 + psrlq $12, %xmm3 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 + movq $0, %r8 +.L_2TAG_PACKET_1.0.2: + mulss %xmm7, %xmm0 + movl $-1, %edx + subl $4, %ecx + shll %cl, %edx + shlq $32, %rdx + movd %rdx, %xmm5 + orpd %xmm1, %xmm3 + subl $16351, %eax + cmpl $1, %eax + jbe .L_2TAG_PACKET_2.0.2 + paddd %xmm4, %xmm0 + andpd %xmm3, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 +.L_2TAG_PACKET_3.0.2: + subsd %xmm5, %xmm3 + andpd %xmm6, %xmm0 + subl $1, %eax + sarl $4, %eax + cvtsi2sd %eax, %xmm7 + mulpd %xmm0, %xmm5 +.L_2TAG_PACKET_4.0.2: + mulsd %xmm0, %xmm3 + movapd coeff(%rip), %xmm1 + lea L_tbl(%rip), %r11 + subsd %xmm2, %xmm5 + movapd 16+coeff(%rip), %xmm4 + movl %eax, %ecx + sarl $31, %eax + addl %eax, %ecx + xorl %ecx, %eax + addl $1, %eax + bsr %eax, %eax + unpcklpd %xmm3, %xmm5 + movapd 32+coeff(%rip), %xmm6 + addsd %xmm5, %xmm3 + andl $16760832, %edx + shrl $10, %edx + addpd -3648(%r11,%rdx), %xmm5 + movapd 48+coeff(%rip), %xmm0 + pshufd $68, %xmm3, %xmm2 + mulsd %xmm3, %xmm3 + mulpd %xmm2, %xmm1 + mulpd %xmm2, %xmm4 + addsd %xmm7, %xmm5 + mulsd %xmm3, %xmm2 + addpd %xmm1, %xmm6 + mulsd %xmm3, %xmm3 + addpd %xmm4, %xmm0 + movq 16(%rsp), %xmm1 + movw 22(%rsp), %cx + pshufd $238, %xmm5, %xmm7 + movq HIGHMASK_Y(%rip), %xmm4 + mulpd %xmm2, %xmm6 + pshufd $68, %xmm3, %xmm3 + mulpd %xmm2, %xmm0 + shll $4, %eax + subl $15872, %eax + andl $32752, %ecx + addl %ecx, %eax + mulpd %xmm6, %xmm3 + cmpl $624, %eax + jae .L_2TAG_PACKET_5.0.2 + xorpd %xmm6, %xmm6 + movl $17080, %edx + pinsrw $3, %edx, %xmm6 + movq %xmm1, %xmm2 + andpd %xmm1, %xmm4 + subsd %xmm4, %xmm1 + mulsd %xmm5, %xmm4 + addsd %xmm7, %xmm0 + mulsd %xmm5, %xmm1 + movq %xmm6, %xmm7 + addsd %xmm4, %xmm6 + lea T_exp(%rip), %r11 + addpd %xmm0, %xmm3 + movd %xmm6, %edx + subsd %xmm7, %xmm6 + pshufd $238, %xmm3, %xmm0 + subsd %xmm6, %xmm4 + addsd %xmm3, %xmm0 + movl %edx, %ecx + andl $255, %edx + addl %edx, %edx + movapd (%r11,%rdx,8), %xmm5 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + movapd e_coeff(%rip), %xmm7 + movapd 16+e_coeff(%rip), %xmm3 + shll $12, %ecx + xorl %r8d, %ecx + andl $-1048576, %ecx + movd %rcx, %xmm6 + addsd %xmm4, %xmm2 + movq $0x3fe62e42fefa39ef, %r9 + movd %r9, %xmm1 + pshufd $68, %xmm2, %xmm0 + pshufd $68, %xmm2, %xmm4 + mulsd %xmm2, %xmm1 + pshufd $17, %xmm6, %xmm6 + mulpd %xmm0, %xmm0 + mulpd %xmm4, %xmm7 + paddd %xmm6, %xmm5 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm5, %xmm6 + mulsd %xmm0, %xmm0 + addpd %xmm7, %xmm3 + addsd %xmm6, %xmm1 + mulpd %xmm3, %xmm0 + pshufd $238, %xmm0, %xmm3 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm0 + addsd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + addl $16, %eax + movl $32752, %edx + andl %eax, %edx + cmpl $32752, %edx + je .L_2TAG_PACKET_6.0.2 + testl $32768, %eax + jne .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_8.0.2: + movq 8(%rsp), %xmm0 + movq 8(%rsp), %xmm3 + movd %xmm3, %edx + psrlq $32, %xmm3 + movd %xmm3, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_9.0.2 + xorpd %xmm3, %xmm3 + movl $18416, %eax + pinsrw $3, %eax, %xmm3 + mulsd %xmm3, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movq %xmm0, %xmm3 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psrlq $27, %xmm0 + movq LOG2_E(%rip), %xmm2 + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm3 + movapd HIGHSIGMASK(%rip), %xmm6 + psrlq $12, %xmm3 + mulss %xmm7, %xmm0 + movl $-1024, %edx + movd %edx, %xmm5 + orpd %xmm1, %xmm3 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm3, %xmm5 + movl $0, %r8d + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + andl $32752, %eax + subl $18416, %eax + sarl $4, %eax + cvtsi2sd %eax, %xmm7 + mulpd %xmm0, %xmm5 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_10.0.2: + movq 8(%rsp), %xmm0 + movq 8(%rsp), %xmm3 + movd %xmm3, %edx + psrlq $32, %xmm3 + movd %xmm3, %ecx + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_9.0.2 + xorpd %xmm3, %xmm3 + movl $18416, %eax + pinsrw $3, %eax, %xmm3 + mulsd %xmm3, %xmm0 + xorpd %xmm2, %xmm2 + movl $16368, %eax + pinsrw $3, %eax, %xmm2 + movq %xmm0, %xmm3 + pextrw $3, %xmm0, %eax + orpd %xmm2, %xmm0 + movl $18416, %ecx + psrlq $27, %xmm0 + movq LOG2_E(%rip), %xmm2 + psrld $2, %xmm0 + rcpps %xmm0, %xmm0 + psllq $12, %xmm3 + movapd HIGHSIGMASK(%rip), %xmm6 + psrlq $12, %xmm3 + mulss %xmm7, %xmm0 + movl $-1024, %edx + movd %edx, %xmm5 + orpd %xmm1, %xmm3 + paddd %xmm4, %xmm0 + psllq $32, %xmm5 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm3, %xmm5 + movl $-2147483648, %r8d + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + andl $32752, %eax + subl $18416, %eax + sarl $4, %eax + cvtsi2sd %eax, %xmm7 + mulpd %xmm0, %xmm5 + jmp .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + cmpl $0, %eax + jl .L_2TAG_PACKET_11.0.2 + cmpl $736, %eax + jae .L_2TAG_PACKET_12.0.2 + addsd %xmm7, %xmm0 + movq HALFMASK(%rip), %xmm2 + addpd %xmm0, %xmm3 + xorpd %xmm6, %xmm6 + movl $17080, %eax + pinsrw $3, %eax, %xmm6 + pshufd $238, %xmm3, %xmm0 + addsd %xmm3, %xmm0 + movq %xmm5, %xmm3 + addsd %xmm0, %xmm5 + movq %xmm2, %xmm4 + subsd %xmm5, %xmm3 + movq %xmm5, %xmm7 + andpd %xmm2, %xmm5 + movq %xmm1, %xmm2 + andpd %xmm1, %xmm4 + subsd %xmm5, %xmm7 + addsd %xmm3, %xmm0 + subsd %xmm4, %xmm1 + mulsd %xmm5, %xmm4 + addsd %xmm7, %xmm0 + mulsd %xmm0, %xmm2 + movq %xmm6, %xmm7 + mulsd %xmm5, %xmm1 + addsd %xmm4, %xmm6 + movd %xmm6, %eax + subsd %xmm7, %xmm6 + lea T_exp(%rip), %r11 + addsd %xmm1, %xmm2 + movapd e_coeff(%rip), %xmm7 + movapd 16+e_coeff(%rip), %xmm3 + subsd %xmm6, %xmm4 + pextrw $3, %xmm6, %edx + movl %eax, %ecx + andl $255, %eax + addl %eax, %eax + movapd (%r11,%rax,8), %xmm5 + addsd %xmm4, %xmm2 + sarl $8, %ecx + movl %ecx, %eax + sarl $1, %ecx + subl %ecx, %eax + shll $20, %ecx + xorl %r8d, %ecx + movd %ecx, %xmm6 + movq 32+e_coeff(%rip), %xmm1 + andl $32767, %edx + cmpl $16529, %edx + ja .L_2TAG_PACKET_12.0.2 + pshufd $68, %xmm2, %xmm0 + pshufd $68, %xmm2, %xmm4 + mulpd %xmm0, %xmm0 + mulpd %xmm4, %xmm7 + pshufd $17, %xmm6, %xmm6 + mulsd %xmm2, %xmm1 + mulsd %xmm0, %xmm0 + paddd %xmm6, %xmm5 + addpd %xmm7, %xmm3 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm5, %xmm6 + mulpd %xmm3, %xmm0 + addsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm3 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + shll $4, %eax + xorpd %xmm4, %xmm4 + addl $16368, %eax + pinsrw $3, %eax, %xmm4 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm0 + movq %xmm0, %xmm1 + addsd %xmm5, %xmm0 + mulsd %xmm4, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + je .L_2TAG_PACKET_13.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_14.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + movq 16(%rsp), %xmm1 + movq 8(%rsp), %xmm0 + movq %xmm0, %xmm2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + je .L_2TAG_PACKET_15.0.2 + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_16.0.2 + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_16.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + movl $29, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_18.0.2: + movq 16(%rsp), %xmm0 + addpd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_15.0.2: + movd %xmm1, %eax + movq %xmm1, %xmm2 + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_19.0.2 + pextrw $3, %xmm2, %eax + andl $32752, %eax + cmpl $32752, %eax + jne .L_2TAG_PACKET_20.0.2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + jne .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_20.0.2: + pextrw $3, %xmm0, %eax + testl $32768, %eax + jne .L_2TAG_PACKET_21.0.2 + testl $-2147483648, %ecx + jne .L_2TAG_PACKET_22.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_23.0.2: + movq 16(%rsp), %xmm1 + movd %xmm1, %eax + testl $1, %eax + jne .L_2TAG_PACKET_24.0.2 + testl $2, %eax + jne .L_2TAG_PACKET_25.0.2 + jmp .L_2TAG_PACKET_24.0.2 +.L_2TAG_PACKET_21.0.2: + shrl $20, %ecx + andl $2047, %ecx + cmpl $1075, %ecx + ja .L_2TAG_PACKET_24.0.2 + je .L_2TAG_PACKET_26.0.2 + cmpl $1074, %ecx + ja .L_2TAG_PACKET_23.0.2 + cmpl $1023, %ecx + jb .L_2TAG_PACKET_24.0.2 + movq 16(%rsp), %xmm1 + movl $17208, %eax + xorpd %xmm3, %xmm3 + pinsrw $3, %eax, %xmm3 + movq %xmm3, %xmm4 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + jne .L_2TAG_PACKET_24.0.2 + movd %xmm3, %eax + andl $1, %eax + je .L_2TAG_PACKET_24.0.2 +.L_2TAG_PACKET_25.0.2: + movq 16(%rsp), %xmm1 + pextrw $3, %xmm1, %eax + andl $32768, %eax + jne .L_2TAG_PACKET_27.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_27.0.2: + xorpd %xmm0, %xmm0 + movl $32768, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_24.0.2: + movq 16(%rsp), %xmm1 + pextrw $3, %xmm1, %eax + andl $32768, %eax + jne .L_2TAG_PACKET_22.0.2 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_26.0.2: + movq 16(%rsp), %xmm1 + movd %xmm1, %eax + andl $1, %eax + je .L_2TAG_PACKET_24.0.2 + jmp .L_2TAG_PACKET_25.0.2 +.L_2TAG_PACKET_28.0.2: + movd %xmm1, %eax + psrlq $20, %xmm1 + movd %xmm1, %edx + orl %edx, %eax + je .L_2TAG_PACKET_29.0.2 + movq 16(%rsp), %xmm0 + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_29.0.2: + movq 8(%rsp), %xmm0 + pextrw $3, %xmm0, %eax + cmpl $49136, %eax + jne .L_2TAG_PACKET_30.0.2 + movd %xmm0, %ecx + psrlq $20, %xmm0 + movd %xmm0, %edx + orl %edx, %ecx + jne .L_2TAG_PACKET_30.0.2 + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_30.0.2: + movq 16(%rsp), %xmm1 + andl $32752, %eax + subl $16368, %eax + pextrw $3, %xmm1, %edx + xorpd %xmm0, %xmm0 + xorl %edx, %eax + andl $32768, %eax + je .L_2TAG_PACKET_31.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_31.0.2: + movl $32752, %ecx + pinsrw $3, %ecx, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_32.0.2: + movd %xmm1, %eax + cmpl $17184, %edx + ja .L_2TAG_PACKET_33.0.2 + testl $1, %eax + jne .L_2TAG_PACKET_34.0.2 + testl $2, %eax + je .L_2TAG_PACKET_35.0.2 + jmp .L_2TAG_PACKET_36.0.2 +.L_2TAG_PACKET_33.0.2: + testl $1, %eax + je .L_2TAG_PACKET_35.0.2 + jmp .L_2TAG_PACKET_36.0.2 +.L_2TAG_PACKET_7.0.2: + movq 8(%rsp), %xmm2 + movd %xmm2, %eax + psrlq $31, %xmm2 + movd %xmm2, %ecx + orl %ecx, %eax + je .L_2TAG_PACKET_9.0.2 + movq 16(%rsp), %xmm1 + pextrw $3, %xmm1, %edx + movd %xmm1, %eax + movq %xmm1, %xmm2 + psrlq $32, %xmm2 + movd %xmm2, %ecx + addl %ecx, %ecx + orl %eax, %ecx + je .L_2TAG_PACKET_37.0.2 + andl $32752, %edx + cmpl $32752, %edx + je .L_2TAG_PACKET_28.0.2 + cmpl $17200, %edx + ja .L_2TAG_PACKET_35.0.2 + cmpl $17184, %edx + jae .L_2TAG_PACKET_32.0.2 + cmpl $16368, %edx + jb .L_2TAG_PACKET_34.0.2 + movl $17208, %eax + xorpd %xmm2, %xmm2 + pinsrw $3, %eax, %xmm2 + movq %xmm2, %xmm4 + addsd %xmm1, %xmm2 + subsd %xmm2, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32767, %eax + jne .L_2TAG_PACKET_34.0.2 + movd %xmm2, %eax + andl $1, %eax + je .L_2TAG_PACKET_35.0.2 +.L_2TAG_PACKET_36.0.2: + xorpd %xmm1, %xmm1 + movl $30704, %edx + pinsrw $3, %edx, %xmm1 + movq LOG2_E(%rip), %xmm2 + movq 8(%rsp), %xmm4 + pextrw $3, %xmm4, %eax + movl $8192, %edx + movd %edx, %xmm4 + andl $32767, %eax + subl $16, %eax + jl .L_2TAG_PACKET_10.0.2 + movl %eax, %edx + andl $32752, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + addl $16, %ecx + bsr %ecx, %ecx + movl $-2147483648, %r8d + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_34.0.2: + xorpd %xmm1, %xmm1 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + xorpd %xmm0, %xmm0 + mulsd %xmm1, %xmm0 + movl $28, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_35.0.2: + xorpd %xmm1, %xmm1 + movl $30704, %edx + pinsrw $3, %edx, %xmm1 + movq LOG2_E(%rip), %xmm2 + movq 8(%rsp), %xmm4 + pextrw $3, %xmm4, %eax + movl $8192, %edx + movd %edx, %xmm4 + andl $32767, %eax + subl $16, %eax + jl .L_2TAG_PACKET_8.0.2 + movl %eax, %edx + andl $32752, %edx + subl $16368, %edx + movl %edx, %ecx + sarl $31, %edx + addl %edx, %ecx + xorl %edx, %ecx + addl $16, %ecx + bsr %ecx, %ecx + movl $0, %r8d + jmp .L_2TAG_PACKET_1.0.2 +.L_2TAG_PACKET_19.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_22.0.2: + xorpd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_11.0.2: + addl $384, %eax + cmpl $0, %eax + jl .L_2TAG_PACKET_38.0.2 + mulsd %xmm1, %xmm5 + addsd %xmm7, %xmm0 + shrl $31, %r8d + addpd %xmm0, %xmm3 + pshufd $238, %xmm3, %xmm0 + addsd %xmm0, %xmm3 + lea log2(%rip), %r11 + movq (%r11,%r8,8), %xmm4 + mulsd %xmm3, %xmm1 + xorpd %xmm0, %xmm0 + movl $16368, %eax + shll $15, %r8d + orl %r8d, %eax + pinsrw $3, %eax, %xmm0 + addsd %xmm1, %xmm5 + mulsd %xmm4, %xmm5 + addsd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_38.0.2: +.L_2TAG_PACKET_37.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_39.0.2: + xorpd %xmm0, %xmm0 + movl $16368, %eax + pinsrw $3, %eax, %xmm0 + movl $26, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_9.0.2: + movq 16(%rsp), %xmm1 + movq %xmm1, %xmm2 + pextrw $3, %xmm1, %eax + andl $32752, %eax + cmpl $32752, %eax + jne .L_2TAG_PACKET_40.0.2 + movd %xmm2, %eax + psrlq $20, %xmm2 + movd %xmm2, %edx + orl %edx, %eax + jne .L_2TAG_PACKET_18.0.2 +.L_2TAG_PACKET_40.0.2: + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + movl %edx, %ecx + addl %edx, %edx + orl %edx, %eax + je .L_2TAG_PACKET_39.0.2 + shrl $21, %edx + cmpl $1075, %edx + ja .L_2TAG_PACKET_41.0.2 + je .L_2TAG_PACKET_42.0.2 + cmpl $1023, %edx + jb .L_2TAG_PACKET_41.0.2 + movq 16(%rsp), %xmm1 + movl $17208, %eax + xorpd %xmm3, %xmm3 + pinsrw $3, %eax, %xmm3 + movq %xmm3, %xmm4 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + pextrw $3, %xmm1, %eax + andl $32752, %eax + jne .L_2TAG_PACKET_41.0.2 + movd %xmm3, %eax + andl $1, %eax + je .L_2TAG_PACKET_41.0.2 +.L_2TAG_PACKET_43.0.2: + movq 8(%rsp), %xmm0 + testl $-2147483648, %ecx + jne .L_2TAG_PACKET_44.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_42.0.2: + movq 16(%rsp), %xmm1 + movd %xmm1, %eax + testl $1, %eax + jne .L_2TAG_PACKET_43.0.2 +.L_2TAG_PACKET_41.0.2: + testl $-2147483648, %ecx + je .L_2TAG_PACKET_22.0.2 + xorpd %xmm0, %xmm0 +.L_2TAG_PACKET_44.0.2: + movl $16368, %eax + xorpd %xmm1, %xmm1 + pinsrw $3, %eax, %xmm1 + divsd %xmm0, %xmm1 + movq %xmm1, %xmm0 + movl $27, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_12.0.2: + movq 8(%rsp), %xmm2 + movq 16(%rsp), %xmm6 + pextrw $3, %xmm2, %eax + pextrw $3, %xmm6, %edx + movl $32752, %ecx + andl %edx, %ecx + cmpl $32752, %ecx + je .L_2TAG_PACKET_45.0.2 + andl $32752, %eax + subl $16368, %eax + xorl %eax, %edx + testl $32768, %edx + jne .L_2TAG_PACKET_46.0.2 +.L_2TAG_PACKET_47.0.2: + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + shrl $16, %r8d + orl %r8d, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 +.L_2TAG_PACKET_14.0.2: + movl $24, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_46.0.2: + movl $16, %eax + pinsrw $3, %eax, %xmm0 + mulsd %xmm0, %xmm0 + testl $-2147483648, %r8d + je .L_2TAG_PACKET_48.0.2 + movq $0x8000000000000000, %r9 + movd %r9, %xmm2 + xorpd %xmm2, %xmm0 +.L_2TAG_PACKET_48.0.2: + movl $25, (%rsp) + jmp .L_2TAG_PACKET_17.0.2 +.L_2TAG_PACKET_13.0.2: + pextrw $3, %xmm5, %ecx + pextrw $3, %xmm4, %edx + movl $-1, %eax + andl $32752, %ecx + subl $16368, %ecx + andl $32752, %edx + addl %ecx, %edx + movl $-31, %ecx + sarl $4, %edx + subl %edx, %ecx + jle .L_2TAG_PACKET_49.0.2 + cmpl $20, %ecx + ja .L_2TAG_PACKET_50.0.2 + shll %cl, %eax +.L_2TAG_PACKET_49.0.2: + movd %eax, %xmm0 + psllq $32, %xmm0 + andpd %xmm5, %xmm0 + subsd %xmm0, %xmm5 + addsd %xmm1, %xmm5 + mulsd %xmm4, %xmm0 + mulsd %xmm4, %xmm5 + addsd %xmm5, %xmm0 +.L_2TAG_PACKET_50.0.2: + jmp .L_2TAG_PACKET_48.0.2 +.L_2TAG_PACKET_2.0.2: + movw 22(%rsp), %cx + movl $-2147483648, %edx + movd %rdx, %xmm1 + xorpd %xmm7, %xmm7 + paddd %xmm4, %xmm0 + movd %xmm0, %edx + psllq $29, %xmm0 + paddq %xmm3, %xmm1 + andpd %xmm1, %xmm5 + andw $32752, %cx + cmpw $16560, %cx + jb .L_2TAG_PACKET_3.0.2 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm3 + addl $16351, %eax + shrl $4, %eax + subl $1022, %eax + cvtsi2sd %eax, %xmm7 + mulpd %xmm0, %xmm5 + lea L_tbl(%rip), %r11 + movq coeff_h(%rip), %xmm4 + mulsd %xmm0, %xmm3 + movq coeff_h(%rip), %xmm6 + subsd %xmm2, %xmm5 + movq 8+coeff_h(%rip), %xmm1 + pshufd $68, %xmm3, %xmm2 + unpcklpd %xmm3, %xmm5 + addsd %xmm5, %xmm3 + movq 8+coeff_h(%rip), %xmm0 + andl $16760832, %edx + shrl $10, %edx + addpd -3648(%r11,%rdx), %xmm7 + mulsd %xmm5, %xmm4 + mulsd %xmm5, %xmm0 + mulsd %xmm2, %xmm6 + mulsd %xmm2, %xmm1 + movq %xmm5, %xmm2 + mulsd %xmm5, %xmm4 + addsd %xmm0, %xmm5 + movq %xmm7, %xmm0 + addsd %xmm3, %xmm2 + addsd %xmm5, %xmm7 + mulsd %xmm2, %xmm6 + subsd %xmm7, %xmm0 + movq %xmm7, %xmm2 + addsd %xmm4, %xmm7 + addsd %xmm5, %xmm0 + subsd %xmm7, %xmm2 + addsd %xmm2, %xmm4 + pshufd $238, %xmm5, %xmm2 + movq %xmm7, %xmm5 + addsd %xmm2, %xmm7 + addsd %xmm0, %xmm4 + movapd coeff(%rip), %xmm0 + subsd %xmm7, %xmm5 + addsd %xmm4, %xmm6 + movq %xmm7, %xmm4 + addsd %xmm2, %xmm5 + addsd %xmm1, %xmm7 + movapd 64+coeff(%rip), %xmm2 + subsd %xmm7, %xmm4 + addsd %xmm5, %xmm6 + addsd %xmm1, %xmm4 + pshufd $238, %xmm7, %xmm5 + movapd %xmm7, %xmm1 + addsd %xmm5, %xmm7 + subsd %xmm7, %xmm1 + addsd %xmm5, %xmm1 + movapd 80+coeff(%rip), %xmm5 + pshufd $68, %xmm3, %xmm3 + addsd %xmm4, %xmm6 + addsd %xmm1, %xmm6 + movapd 32+coeff(%rip), %xmm1 + mulpd %xmm3, %xmm0 + mulpd %xmm3, %xmm2 + pshufd $68, %xmm3, %xmm4 + mulpd %xmm3, %xmm3 + addpd %xmm1, %xmm0 + addpd %xmm2, %xmm5 + mulsd %xmm3, %xmm4 + movq HIGHMASK_LOG_X(%rip), %xmm2 + mulpd %xmm3, %xmm3 + movq 16(%rsp), %xmm1 + movw 22(%rsp), %cx + mulpd %xmm4, %xmm0 + pextrw $3, %xmm7, %eax + mulpd %xmm4, %xmm5 + mulpd %xmm3, %xmm0 + movq 8+HIGHMASK_Y(%rip), %xmm4 + andpd %xmm7, %xmm2 + addsd %xmm6, %xmm5 + subsd %xmm2, %xmm7 + addpd %xmm0, %xmm5 + andl $32752, %eax + subl $16368, %eax + andl $32752, %ecx + cmpl $32752, %ecx + je .L_2TAG_PACKET_45.0.2 + addl %eax, %ecx + cmpl $16576, %ecx + jae .L_2TAG_PACKET_51.0.2 + pshufd $238, %xmm5, %xmm0 + andpd %xmm1, %xmm4 + movq %xmm1, %xmm3 + addsd %xmm0, %xmm5 + subsd %xmm4, %xmm1 + xorpd %xmm6, %xmm6 + movl $17080, %edx + pinsrw $3, %edx, %xmm6 + addsd %xmm5, %xmm7 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm1 + movq %xmm6, %xmm5 + mulsd %xmm7, %xmm3 + addsd %xmm4, %xmm6 + addsd %xmm3, %xmm1 + movapd e_coeff(%rip), %xmm7 + movd %xmm6, %edx + subsd %xmm5, %xmm6 + lea T_exp(%rip), %r11 + movapd 16+e_coeff(%rip), %xmm3 + movq 32+e_coeff(%rip), %xmm2 + subsd %xmm6, %xmm4 + movl %edx, %ecx + andl $255, %edx + addl %edx, %edx + movapd (%r11,%rdx,8), %xmm5 + addsd %xmm1, %xmm4 + pextrw $3, %xmm6, %edx + shrl $8, %ecx + movl %ecx, %eax + shrl $1, %ecx + subl %ecx, %eax + shll $20, %ecx + movd %ecx, %xmm6 + pshufd $68, %xmm4, %xmm0 + pshufd $68, %xmm4, %xmm1 + mulpd %xmm0, %xmm0 + mulpd %xmm1, %xmm7 + pshufd $17, %xmm6, %xmm6 + mulsd %xmm4, %xmm2 + andl $32767, %edx + cmpl $16529, %edx + ja .L_2TAG_PACKET_12.0.2 + mulsd %xmm0, %xmm0 + paddd %xmm6, %xmm5 + addpd %xmm7, %xmm3 + mulsd %xmm5, %xmm2 + pshufd $238, %xmm5, %xmm6 + mulpd %xmm3, %xmm0 + addsd %xmm6, %xmm2 + pshufd $238, %xmm0, %xmm3 + addl $1023, %eax + shll $20, %eax + orl %r8d, %eax + movd %eax, %xmm4 + mulsd %xmm5, %xmm0 + mulsd %xmm5, %xmm3 + addsd %xmm2, %xmm0 + psllq $32, %xmm4 + addsd %xmm3, %xmm0 + movq %xmm0, %xmm1 + addsd %xmm5, %xmm0 + mulsd %xmm4, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + je .L_2TAG_PACKET_13.0.2 + cmpl $32752, %eax + je .L_2TAG_PACKET_14.0.2 +.L_2TAG_PACKET_52.0.2: + jmp ..B1.5 +.L_2TAG_PACKET_45.0.2: + movq 8(%rsp), %xmm0 + xorpd %xmm2, %xmm2 + movl $49136, %eax + pinsrw $3, %eax, %xmm2 + addsd %xmm0, %xmm2 + pextrw $3, %xmm2, %eax + cmpl $0, %eax + jne .L_2TAG_PACKET_53.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_53.0.2: + movq 16(%rsp), %xmm1 + movd %xmm1, %edx + movq %xmm1, %xmm3 + psrlq $20, %xmm3 + movd %xmm3, %ecx + orl %edx, %ecx + je .L_2TAG_PACKET_54.0.2 + addsd %xmm1, %xmm1 + movq %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_51.0.2: + pextrw $3, %xmm1, %eax + pextrw $3, %xmm2, %ecx + xorl %ecx, %eax + testl $32768, %eax + je .L_2TAG_PACKET_47.0.2 + jmp .L_2TAG_PACKET_46.0.2 +.L_2TAG_PACKET_54.0.2: + pextrw $3, %xmm0, %eax + andl $32752, %eax + pextrw $3, %xmm1, %edx + xorpd %xmm0, %xmm0 + subl $16368, %eax + xorl %edx, %eax + testl $32768, %eax + je .L_2TAG_PACKET_55.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_55.0.2: + movl $32752, %edx + pinsrw $3, %edx, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_17.0.2: + movq %xmm0, 24(%rsp) +..B1.3: + movq 24(%rsp), %xmm0 +.L_2TAG_PACKET_56.0.2: +..B1.5: + addq $40, %rsp +..___tag_value_pow.4: + ret +..___tag_value_pow.5: +END(pow) +# -- End pow + .section .rodata, "a" + .align 16 + .align 16 +HIGHSIGMASK: + .long 0 + .long 4294965248 + .long 0 + .long 4294965248 + .type HIGHSIGMASK,@object + .size HIGHSIGMASK,16 + .align 16 +LOG2_E: + .long 0 + .long 1073160192 + .long 370913857 + .long 3210587105 + .type LOG2_E,@object + .size LOG2_E,16 + .align 16 +coeff: + .long 1841914130 + .long 3213059448 + .long 3995341938 + .long 3214607105 + .long 2677381210 + .long 3216320731 + .long 3011779882 + .long 3218479542 + .long 1367832035 + .long 1066403058 + .long 2894285243 + .long 1067936923 + .long 1215221452 + .long 1069835102 + .long 370913857 + .long 3210587105 + .long 2677381210 + .long 3216320731 + .long 4172642429 + .long 1056068382 + .long 1215221451 + .long 1069835102 + .long 1092638156 + .long 3184925618 + .type coeff,@object + .size coeff,96 + .align 16 +L_tbl: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 536870912 + .long 1072689162 + .long 2523013013 + .long 1046157398 + .long 3758096384 + .long 1072685081 + .long 3851513758 + .long 3190968952 + .long 0 + .long 1072681007 + .long 2241466466 + .long 1046044599 + .long 3221225472 + .long 1072676937 + .long 2990928271 + .long 3193084984 + .long 3758096384 + .long 1072672873 + .long 2905112743 + .long 3192918576 + .long 1610612736 + .long 1072668815 + .long 3370591264 + .long 1046051793 + .long 2147483648 + .long 1072664762 + .long 3272361216 + .long 3193793653 + .long 3758096384 + .long 1072660714 + .long 46546755 + .long 1043206936 + .long 3221225472 + .long 1072656672 + .long 3017067724 + .long 3192177962 + .long 0 + .long 1072652636 + .long 3688436631 + .long 3192814956 + .long 2684354560 + .long 1072648604 + .long 1707461992 + .long 3193056712 + .long 2684354560 + .long 1072644578 + .long 1188114540 + .long 3193603086 + .long 3758096384 + .long 1072640557 + .long 3533180564 + .long 1045459375 + .long 2684354560 + .long 1072636542 + .long 2000337630 + .long 3193475557 + .long 2684354560 + .long 1072632532 + .long 3698062443 + .long 3193752766 + .long 3758096384 + .long 1072628527 + .long 3161606138 + .long 3190532995 + .long 2147483648 + .long 1072624528 + .long 3165265478 + .long 3193158459 + .long 1610612736 + .long 1072620534 + .long 1600940077 + .long 3193226777 + .long 2147483648 + .long 1072616545 + .long 1363272552 + .long 3192614278 + .long 3758096384 + .long 1072612561 + .long 3966209910 + .long 3191249654 + .long 2147483648 + .long 1072608583 + .long 1093672789 + .long 3190637330 + .long 1610612736 + .long 1072604610 + .long 1735239357 + .long 3192753616 + .long 1610612736 + .long 1072600642 + .long 1470665156 + .long 1045559697 + .long 2684354560 + .long 1072596679 + .long 3840624926 + .long 1045928953 + .long 536870912 + .long 1072592722 + .long 4259072556 + .long 3191035622 + .long 3221225472 + .long 1072588769 + .long 3613088753 + .long 3192165681 + .long 2147483648 + .long 1072584822 + .long 3175234446 + .long 1039486948 + .long 1610612736 + .long 1072580880 + .long 856576441 + .long 1045702812 + .long 2147483648 + .long 1072576943 + .long 2253498719 + .long 3193285334 + .long 2684354560 + .long 1072573011 + .long 1587070728 + .long 3190801577 + .long 3758096384 + .long 1072569084 + .long 159986317 + .long 1042519436 + .long 1073741824 + .long 1072565163 + .long 3999541949 + .long 3192020440 + .long 2684354560 + .long 1072561246 + .long 3281310262 + .long 1045586786 + .long 536870912 + .long 1072557335 + .long 3775179406 + .long 1045226055 + .long 3221225472 + .long 1072553428 + .long 643472356 + .long 3193681786 + .long 1073741824 + .long 1072549527 + .long 248169775 + .long 1045068977 + .long 3758096384 + .long 1072545630 + .long 307016632 + .long 1042640932 + .long 2147483648 + .long 1072541739 + .long 3872718526 + .long 3189781486 + .long 536870912 + .long 1072537853 + .long 969711630 + .long 3191724732 + .long 3221225472 + .long 1072533971 + .long 4018820394 + .long 3193189264 + .long 1073741824 + .long 1072530095 + .long 3102233092 + .long 1045510224 + .long 3758096384 + .long 1072526223 + .long 1029307912 + .long 3193812776 + .long 1073741824 + .long 1072522357 + .long 984083153 + .long 1045987403 + .long 3221225472 + .long 1072518495 + .long 4171455401 + .long 3193084080 + .long 0 + .long 1072514639 + .long 2592660757 + .long 1046121691 + .long 1073741824 + .long 1072510787 + .long 2964365712 + .long 1046054453 + .long 2147483648 + .long 1072506940 + .long 3792777877 + .long 3193704729 + .long 2147483648 + .long 1072503098 + .long 2948536104 + .long 3192467100 + .long 1610612736 + .long 1072499261 + .long 3836005619 + .long 1041873166 + .long 536870912 + .long 1072495429 + .long 3124543160 + .long 1044409168 + .long 3221225472 + .long 1072491601 + .long 286227933 + .long 1041065990 + .long 1073741824 + .long 1072487779 + .long 2111296776 + .long 3193604419 + .long 2147483648 + .long 1072483961 + .long 2606822001 + .long 3192940394 + .long 2147483648 + .long 1072480148 + .long 194696800 + .long 1046026063 + .long 1610612736 + .long 1072476340 + .long 8535452 + .long 1046200178 + .long 536870912 + .long 1072472537 + .long 950463625 + .long 3192731897 + .long 2147483648 + .long 1072468738 + .long 973831566 + .long 1045683197 + .long 3221225472 + .long 1072464944 + .long 3330435892 + .long 3190277577 + .long 3221225472 + .long 1072461155 + .long 208692097 + .long 3193517651 + .long 1610612736 + .long 1072457371 + .long 2113097415 + .long 1044781749 + .long 3758096384 + .long 1072453591 + .long 1088808936 + .long 3193716142 + .long 0 + .long 1072449817 + .long 1443002127 + .long 3193250205 + .long 3221225472 + .long 1072446046 + .long 3967357419 + .long 1046109477 + .long 1610612736 + .long 1072442281 + .long 3013517861 + .long 3193159691 + .long 2147483648 + .long 1072438520 + .long 2524586286 + .long 1046121951 + .long 1610612736 + .long 1072434764 + .long 1476892861 + .long 1046434731 + .long 0 + .long 1072431013 + .long 3089640950 + .long 3192305780 + .long 536870912 + .long 1072427266 + .long 3812255529 + .long 1045730879 + .long 0 + .long 1072423524 + .long 995354762 + .long 3191528673 + .long 1610612736 + .long 1072419786 + .long 3260567684 + .long 1046273695 + .long 2147483648 + .long 1072416053 + .long 2738210286 + .long 3191471516 + .long 536870912 + .long 1072412325 + .long 1931849805 + .long 1044560405 + .long 1610612736 + .long 1072408601 + .long 358896655 + .long 1044029237 + .long 1073741824 + .long 1072404882 + .long 2214589842 + .long 3193202126 + .long 2684354560 + .long 1072401167 + .long 3118097363 + .long 3192592906 + .long 2147483648 + .long 1072397457 + .long 1835998884 + .long 1045788247 + .long 0 + .long 1072393752 + .long 1585488319 + .long 1045289910 + .long 0 + .long 1072390051 + .long 480160949 + .long 1046030455 + .long 2684354560 + .long 1072386354 + .long 1832959667 + .long 3193013644 + .long 2684354560 + .long 1072382662 + .long 3611346555 + .long 1044544210 + .long 1073741824 + .long 1072378975 + .long 2749418734 + .long 3193712580 + .long 1073741824 + .long 1072375292 + .long 2390043472 + .long 3191710658 + .long 3221225472 + .long 1072371613 + .long 2828199902 + .long 1042265217 + .long 3221225472 + .long 1072367939 + .long 569209321 + .long 3191230982 + .long 536870912 + .long 1072364270 + .long 236159139 + .long 1046240123 + .long 536870912 + .long 1072360605 + .long 1010656270 + .long 3193813968 + .long 1610612736 + .long 1072356944 + .long 2409080597 + .long 1044025029 + .long 536870912 + .long 1072353288 + .long 598419513 + .long 1043327370 + .long 1073741824 + .long 1072349636 + .long 4105950479 + .long 1045747958 + .long 3758096384 + .long 1072345988 + .long 343243853 + .long 3192420172 + .long 3221225472 + .long 1072342345 + .long 2088439530 + .long 1046172091 + .long 536870912 + .long 1072338707 + .long 4117721107 + .long 1043882496 + .long 3758096384 + .long 1072335072 + .long 3192032958 + .long 3192998645 + .long 3758096384 + .long 1072331442 + .long 2366522518 + .long 1045401957 + .long 1610612736 + .long 1072327817 + .long 3685533141 + .long 3193701947 + .long 536870912 + .long 1072324196 + .long 1058658672 + .long 3193572492 + .long 536870912 + .long 1072320579 + .long 166346347 + .long 1045456348 + .long 2147483648 + .long 1072316966 + .long 2027889772 + .long 1046349302 + .long 1073741824 + .long 1072313358 + .long 1079497888 + .long 1044585259 + .long 1073741824 + .long 1072309754 + .long 2189851573 + .long 1045132990 + .long 2684354560 + .long 1072306154 + .long 2486629386 + .long 3193613625 + .long 536870912 + .long 1072302559 + .long 1263686579 + .long 1044789259 + .long 0 + .long 1072298968 + .long 2412061798 + .long 3191369627 + .long 536870912 + .long 1072295381 + .long 584315716 + .long 3193144135 + .long 1610612736 + .long 1072291798 + .long 449000738 + .long 1046330451 + .long 0 + .long 1072288220 + .long 3938320157 + .long 1044446220 + .long 3758096384 + .long 1072284645 + .long 2949844595 + .long 3193462371 + .long 3758096384 + .long 1072281075 + .long 2771329642 + .long 3192121593 + .long 536870912 + .long 1072277510 + .long 3971508621 + .long 3193002806 + .long 2147483648 + .long 1072273948 + .long 4071942301 + .long 1044952619 + .long 536870912 + .long 1072270391 + .long 2090502395 + .long 1044660556 + .long 0 + .long 1072266838 + .long 3657520961 + .long 3193770938 + .long 3758096384 + .long 1072263288 + .long 1608175110 + .long 1045543239 + .long 0 + .long 1072259744 + .long 2506924180 + .long 1045530501 + .long 1073741824 + .long 1072256203 + .long 18238493 + .long 1046305623 + .long 3221225472 + .long 1072252666 + .long 3862640487 + .long 3192882407 + .long 1073741824 + .long 1072249134 + .long 3850158761 + .long 1043656099 + .long 3758096384 + .long 1072245605 + .long 2356524356 + .long 1045915296 + .long 3221225472 + .long 1072242081 + .long 936497287 + .long 3193842353 + .long 2147483648 + .long 1072238561 + .long 2840845344 + .long 1046454771 + .long 2147483648 + .long 1072235045 + .long 3688100713 + .long 1044895451 + .long 2684354560 + .long 1072231533 + .long 479979913 + .long 3193842442 + .long 2684354560 + .long 1072228025 + .long 1016321898 + .long 1046251032 + .long 3758096384 + .long 1072224521 + .long 562232474 + .long 3191974558 + .long 536870912 + .long 1072221022 + .long 3870512029 + .long 3193113881 + .long 1610612736 + .long 1072217526 + .long 1239780547 + .long 3191583604 + .long 2684354560 + .long 1072214034 + .long 2815421327 + .long 1045873682 + .long 0 + .long 1072210547 + .long 2371009561 + .long 1041508792 + .long 1610612736 + .long 1072207063 + .long 1304636524 + .long 3192414284 + .long 3221225472 + .long 1072203583 + .long 210144854 + .long 3193327333 + .long 0 + .long 1072200108 + .long 1454303272 + .long 1046360024 + .long 1610612736 + .long 1072196636 + .long 2095757548 + .long 1044984677 + .long 3221225472 + .long 1072193168 + .long 2027215580 + .long 3192880933 + .long 0 + .long 1072189705 + .long 214794880 + .long 1043457954 + .long 1073741824 + .long 1072186245 + .long 884624917 + .long 1043497079 + .long 2147483648 + .long 1072182789 + .long 2792396634 + .long 3193171685 + .long 2684354560 + .long 1072179337 + .long 4128995250 + .long 3192103434 + .long 2684354560 + .long 1072175889 + .long 333866043 + .long 1046372325 + .long 3221225472 + .long 1072172445 + .long 2194445544 + .long 3193958905 + .long 2684354560 + .long 1072169005 + .long 2316082269 + .long 3192041703 + .long 1610612736 + .long 1072165569 + .long 581005057 + .long 1046322848 + .long 536870912 + .long 1072162137 + .long 3280786513 + .long 1045457251 + .long 3221225472 + .long 1072158708 + .long 2567093361 + .long 1044710359 + .long 1073741824 + .long 1072155284 + .long 3740443584 + .long 1044224237 + .long 2684354560 + .long 1072151863 + .long 3981028272 + .long 1042596351 + .long 3758096384 + .long 1072148446 + .long 3820011120 + .long 3191915623 + .long 0 + .long 1072145034 + .long 2946439484 + .long 3193831276 + .long 3758096384 + .long 1072141624 + .long 3075274422 + .long 3190132432 + .long 2684354560 + .long 1072138219 + .long 496052167 + .long 1043619760 + .long 1073741824 + .long 1072134818 + .long 271106589 + .long 3192265149 + .long 2684354560 + .long 1072131420 + .long 2091955684 + .long 1044443554 + .long 3758096384 + .long 1072128026 + .long 723240109 + .long 3191007419 + .long 3758096384 + .long 1072124636 + .long 1748629070 + .long 1044510075 + .long 3221225472 + .long 1072121250 + .long 3289522046 + .long 3193095178 + .long 1610612736 + .long 1072117868 + .long 3599052146 + .long 3193720427 + .long 3221225472 + .long 1072114489 + .long 2446758135 + .long 3193436303 + .long 3758096384 + .long 1072111114 + .long 1652171097 + .long 3192137173 + .long 3221225472 + .long 1072107743 + .long 1353007155 + .long 1044523902 + .long 1610612736 + .long 1072104376 + .long 990601105 + .long 1046296663 + .long 3758096384 + .long 1072101012 + .long 2228627618 + .long 3193041040 + .long 0 + .long 1072097653 + .long 812484756 + .long 3191950723 + .long 3758096384 + .long 1072094296 + .long 817833130 + .long 3192279242 + .long 2147483648 + .long 1072090944 + .long 3563228521 + .long 3193810951 + .long 3221225472 + .long 1072087595 + .long 2729108859 + .long 3190936185 + .long 3221225472 + .long 1072084250 + .long 2249121662 + .long 3190639690 + .long 2147483648 + .long 1072080909 + .long 4082471745 + .long 3193929368 + .long 3758096384 + .long 1072077571 + .long 2827323806 + .long 3193708561 + .long 3758096384 + .long 1072074237 + .long 735866167 + .long 1042434690 + .long 2684354560 + .long 1072070907 + .long 3240808889 + .long 3191918422 + .long 0 + .long 1072067581 + .long 466482777 + .long 3186962221 + .long 0 + .long 1072064258 + .long 1576076296 + .long 1045849056 + .long 3221225472 + .long 1072060938 + .long 2751923560 + .long 3191910703 + .long 0 + .long 1072057623 + .long 1908755527 + .long 1046437515 + .long 0 + .long 1072054311 + .long 3175841411 + .long 1044572886 + .long 2684354560 + .long 1072051002 + .long 1633258450 + .long 3192670420 + .long 3221225472 + .long 1072047697 + .long 1867746657 + .long 1045726209 + .long 2684354560 + .long 1072044396 + .long 338968864 + .long 3193084662 + .long 0 + .long 1072041099 + .long 1501742471 + .long 3191742031 + .long 0 + .long 1072037805 + .long 4266775786 + .long 3192686970 + .long 2147483648 + .long 1072034514 + .long 4249283553 + .long 1045769728 + .long 2684354560 + .long 1072031227 + .long 2758366873 + .long 1046402161 + .long 1610612736 + .long 1072027944 + .long 2161186990 + .long 1044736865 + .long 2684354560 + .long 1072024664 + .long 810300171 + .long 1045748777 + .long 2147483648 + .long 1072021388 + .long 183688927 + .long 3191515581 + .long 3758096384 + .long 1072018115 + .long 368874072 + .long 3192363575 + .long 3221225472 + .long 1072014846 + .long 2459092970 + .long 1041794640 + .long 536870912 + .long 1072011581 + .long 867488640 + .long 1046310291 + .long 536870912 + .long 1072008319 + .long 50140871 + .long 1043327329 + .long 2684354560 + .long 1072005060 + .long 1241902518 + .long 3192739252 + .long 2684354560 + .long 1072001805 + .long 1027881659 + .long 3193858388 + .long 0 + .long 1071998554 + .long 38457322 + .long 1045489179 + .long 0 + .long 1071995306 + .long 3432963337 + .long 3190969347 + .long 1610612736 + .long 1071992061 + .long 534931792 + .long 1046302734 + .long 1610612736 + .long 1071988820 + .long 1817895268 + .long 3192551860 + .long 3221225472 + .long 1071985582 + .long 357237383 + .long 3191870833 + .long 2684354560 + .long 1071982348 + .long 108262401 + .long 3193365867 + .long 3758096384 + .long 1071979117 + .long 1964729244 + .long 1042502249 + .long 2684354560 + .long 1071975890 + .long 2088446957 + .long 1038010503 + .long 3221225472 + .long 1071972666 + .long 2947239447 + .long 1046377845 + .long 1610612736 + .long 1071969446 + .long 774932072 + .long 1046064854 + .long 2147483648 + .long 1071966229 + .long 4080937590 + .long 3193041284 + .long 3758096384 + .long 1071963015 + .long 2208251454 + .long 1045945089 + .long 3221225472 + .long 1071959805 + .long 2850924475 + .long 1045650959 + .long 0 + .long 1071956599 + .long 714040997 + .long 1046275153 + .long 3221225472 + .long 1071953395 + .long 85533782 + .long 3192816920 + .long 3221225472 + .long 1071950195 + .long 1252511005 + .long 1044805706 + .long 1073741824 + .long 1071946999 + .long 2384659038 + .long 3193391602 + .long 0 + .long 1071943806 + .long 416481813 + .long 1043730233 + .long 536870912 + .long 1071940616 + .long 1675424499 + .long 1046348030 + .long 3221225472 + .long 1071937429 + .long 1175989513 + .long 3193009113 + .long 2684354560 + .long 1071934246 + .long 2400084650 + .long 3192451713 + .long 3758096384 + .long 1071931066 + .long 1467335692 + .long 3193350868 + .long 1610612736 + .long 1071927890 + .long 266493801 + .long 1044954481 + .long 1073741824 + .long 1071924717 + .long 3919093445 + .long 1046023575 + .long 2147483648 + .long 1071921547 + .long 3017408483 + .long 1044880828 + .long 536870912 + .long 1071918381 + .long 948849966 + .long 3193892224 + .long 3758096384 + .long 1071915217 + .long 1870232600 + .long 1045777228 + .long 536870912 + .long 1071912058 + .long 822381492 + .long 3193639186 + .long 2147483648 + .long 1071908901 + .long 788243705 + .long 1044966343 + .long 1073741824 + .long 1071905748 + .long 1344278809 + .long 1044428545 + .long 1073741824 + .long 1071902598 + .long 172864300 + .long 1045765608 + .long 2684354560 + .long 1071899451 + .long 211555467 + .long 3192963574 + .long 536870912 + .long 1071896308 + .long 3373438023 + .long 1045643168 + .long 0 + .long 1071893168 + .long 2867180960 + .long 3189945998 + .long 536870912 + .long 1071890031 + .long 36724362 + .long 3193240584 + .long 1610612736 + .long 1071886897 + .long 2140176984 + .long 1045945349 + .long 0 + .long 1071883767 + .long 436842360 + .long 1040712587 + .long 3758096384 + .long 1071880639 + .long 1225147329 + .long 3193814594 + .long 3758096384 + .long 1071877515 + .long 1586157348 + .long 3191614322 + .long 536870912 + .long 1071874395 + .long 3329332918 + .long 1041699791 + .long 2684354560 + .long 1071871277 + .long 1635968041 + .long 3191783756 + .long 1073741824 + .long 1071868163 + .long 2876158382 + .long 1046097093 + .long 1073741824 + .long 1071865052 + .long 4267556964 + .long 3193723000 + .long 1073741824 + .long 1071861944 + .long 195475940 + .long 1045520795 + .long 2147483648 + .long 1071858839 + .long 2239193514 + .long 1046478675 + .long 0 + .long 1071855738 + .long 4168275596 + .long 1044926285 + .long 2684354560 + .long 1071852639 + .long 142514114 + .long 1045595182 + .long 2147483648 + .long 1071849544 + .long 1943457984 + .long 3192930015 + .long 2147483648 + .long 1071846452 + .long 202659489 + .long 3193926317 + .long 2684354560 + .long 1071843363 + .long 2208408789 + .long 3193857484 + .long 3758096384 + .long 1071840277 + .long 2237297552 + .long 3192939576 + .long 1073741824 + .long 1071837195 + .long 2726920839 + .long 1044193954 + .long 3758096384 + .long 1071834115 + .long 2337732207 + .long 3193611773 + .long 2147483648 + .long 1071831039 + .long 1390088602 + .long 1044000317 + .long 1610612736 + .long 1071827966 + .long 3806188736 + .long 3193463913 + .long 1073741824 + .long 1071824896 + .long 1795276560 + .long 1043671965 + .long 1073741824 + .long 1071821829 + .long 2960792799 + .long 1046240474 + .long 2147483648 + .long 1071818765 + .long 3350591592 + .long 3193333939 + .long 3221225472 + .long 1071815704 + .long 408870754 + .long 3193322854 + .long 0 + .long 1071812647 + .long 4146717132 + .long 1046063520 + .long 2147483648 + .long 1071809592 + .long 1681114919 + .long 3192114313 + .long 0 + .long 1071806541 + .long 1098393137 + .long 3190846732 + .long 2684354560 + .long 1071803492 + .long 2437484983 + .long 3193448718 + .long 1073741824 + .long 1071800447 + .long 1036809185 + .long 3192023501 + .long 0 + .long 1071797405 + .long 659668848 + .long 3193596312 + .long 3221225472 + .long 1071794365 + .long 1112062459 + .long 3192773376 + .long 2147483648 + .long 1071791329 + .long 4082956335 + .long 1045830513 + .long 1610612736 + .long 1071788296 + .long 2387089965 + .long 1045532601 + .long 1610612736 + .long 1071785266 + .long 1522101980 + .long 3193941957 + .long 1073741824 + .long 1071782239 + .long 2157197585 + .long 3188193305 + .long 1073741824 + .long 1071779215 + .long 946810220 + .long 3193223819 + .long 1073741824 + .long 1071776194 + .long 4069942444 + .long 3193878549 + .long 536870912 + .long 1071773176 + .long 1693463440 + .long 1046360588 + .long 536870912 + .long 1071770161 + .long 1954543254 + .long 1046409381 + .long 1073741824 + .long 1071767149 + .long 1050471249 + .long 3193933095 + .long 536870912 + .long 1071764140 + .long 1256240478 + .long 1046456865 + .long 536870912 + .long 1071761134 + .long 676764254 + .long 1046055503 + .long 536870912 + .long 1071758131 + .long 1421032967 + .long 1044779786 + .long 536870912 + .long 1071755131 + .long 38735992 + .long 3192766355 + .long 0 + .long 1071752134 + .long 2960669690 + .long 1044484680 + .long 3758096384 + .long 1071749139 + .long 788707382 + .long 1045299895 + .long 3221225472 + .long 1071746148 + .long 685689300 + .long 1040778831 + .long 2147483648 + .long 1071743160 + .long 1170994182 + .long 1046159174 + .long 1073741824 + .long 1071740175 + .long 64591436 + .long 1046153849 + .long 0 + .long 1071737193 + .long 2338031659 + .long 3189997702 + .long 2684354560 + .long 1071734213 + .long 1941624568 + .long 3186752676 + .long 536870912 + .long 1071731237 + .long 1401255580 + .long 1046383990 + .long 2684354560 + .long 1071728263 + .long 376888427 + .long 1045896456 + .long 536870912 + .long 1071725293 + .long 2831424639 + .long 3193539109 + .long 1610612736 + .long 1071722325 + .long 3303123696 + .long 1044599415 + .long 2684354560 + .long 1071719360 + .long 1077295329 + .long 3189877372 + .long 3221225472 + .long 1071716398 + .long 1434061099 + .long 3184529771 + .long 3221225472 + .long 1071713439 + .long 2104991590 + .long 1045062074 + .long 3221225472 + .long 1071710483 + .long 722060869 + .long 3193788526 + .long 536870912 + .long 1071704580 + .long 3928796486 + .long 1046129020 + .long 536870912 + .long 1071698688 + .long 588844628 + .long 1045492135 + .long 2684354560 + .long 1071692807 + .long 326739366 + .long 3193004445 + .long 1610612736 + .long 1071686938 + .long 2456436042 + .long 1046278169 + .long 2684354560 + .long 1071681080 + .long 2831303512 + .long 1043670046 + .long 536870912 + .long 1071675234 + .long 607223418 + .long 1045507322 + .long 0 + .long 1071669399 + .long 4254921332 + .long 3193290483 + .long 0 + .long 1071663575 + .long 914994333 + .long 3191263853 + .long 1073741824 + .long 1071657762 + .long 4147050180 + .long 3193228552 + .long 2684354560 + .long 1071651960 + .long 594554157 + .long 3193503935 + .long 0 + .long 1071646170 + .long 1062846796 + .long 1045944331 + .long 1073741824 + .long 1071636109 + .long 2909238893 + .long 3193436884 + .long 1073741824 + .long 1071624572 + .long 1682918119 + .long 1042211899 + .long 1073741824 + .long 1071613057 + .long 2419209426 + .long 1045437062 + .long 1073741824 + .long 1071601564 + .long 2951341321 + .long 3190193214 + .long 0 + .long 1071590093 + .long 3084900875 + .long 3192394907 + .long 1073741824 + .long 1071578643 + .long 999567454 + .long 1046433447 + .long 2147483648 + .long 1071567215 + .long 1570101857 + .long 3193291160 + .long 0 + .long 1071555809 + .long 1080647881 + .long 3185154585 + .long 0 + .long 1071544424 + .long 3526309177 + .long 1044843640 + .long 2147483648 + .long 1071533060 + .long 2213463349 + .long 3191738930 + .long 1073741824 + .long 1071521718 + .long 1039925195 + .long 3192618353 + .long 1073741824 + .long 1071510397 + .long 2115757280 + .long 3193671567 + .long 1073741824 + .long 1071499097 + .long 1188751495 + .long 3191145560 + .long 2147483648 + .long 1071487818 + .long 3983461449 + .long 3193897029 + .long 2147483648 + .long 1071476560 + .long 782141500 + .long 1042879962 + .long 2147483648 + .long 1071465323 + .long 4038904626 + .long 1045063881 + .long 2147483648 + .long 1071454107 + .long 2613036921 + .long 3193217642 + .long 0 + .long 1071442912 + .long 2095723435 + .long 1044629175 + .long 1073741824 + .long 1071431737 + .long 3879795974 + .long 1045767874 + .long 1073741824 + .long 1071420583 + .long 2662198042 + .long 3191434637 + .long 3221225472 + .long 1071409449 + .long 4037605722 + .long 3193703090 + .long 2147483648 + .long 1071398336 + .long 1860331835 + .long 1040814822 + .long 3221225472 + .long 1071387243 + .long 1522972033 + .long 3190305974 + .long 1073741824 + .long 1071376171 + .long 2361534207 + .long 1043699366 + .long 0 + .long 1071365119 + .long 4180309179 + .long 1044142099 + .long 0 + .long 1071354087 + .long 1201038528 + .long 3192968772 + .long 0 + .long 1071343075 + .long 1342478171 + .long 3193251215 + .long 0 + .long 1071332083 + .long 3836883348 + .long 3193472007 + .long 3221225472 + .long 1071321110 + .long 3864874250 + .long 1045593126 + .long 2147483648 + .long 1071310158 + .long 2169494998 + .long 1046045346 + .long 1073741824 + .long 1071299226 + .long 3785165075 + .long 3193319246 + .long 2147483648 + .long 1071288313 + .long 1137692678 + .long 3192716779 + .long 1073741824 + .long 1071277420 + .long 1752107598 + .long 1046366120 + .long 3221225472 + .long 1071266546 + .long 1912656912 + .long 1046352281 + .long 3221225472 + .long 1071255692 + .long 2882676334 + .long 1046406353 + .long 1073741824 + .long 1071244858 + .long 963612460 + .long 1045282811 + .long 0 + .long 1071234043 + .long 3811255773 + .long 1046231636 + .long 1073741824 + .long 1071223247 + .long 1126055989 + .long 3192224037 + .long 2147483648 + .long 1071212470 + .long 2079145427 + .long 1044432413 + .long 0 + .long 1071201713 + .long 3611595621 + .long 1043358745 + .long 2147483648 + .long 1071190974 + .long 390522769 + .long 1045888252 + .long 1073741824 + .long 1071180255 + .long 4087939723 + .long 3192930745 + .long 3221225472 + .long 1071169554 + .long 1451494480 + .long 3190219274 + .long 1073741824 + .long 1071158873 + .long 427176194 + .long 3193042022 + .long 2147483648 + .long 1071148210 + .long 1882381948 + .long 3192727946 + .long 2147483648 + .long 1071137566 + .long 3736313771 + .long 3192087019 + .long 1073741824 + .long 1071126941 + .long 1560398816 + .long 3193185715 + .long 2147483648 + .long 1071116334 + .long 1021942441 + .long 1041526696 + .long 2147483648 + .long 1071105746 + .long 3517080249 + .long 3193576041 + .long 3221225472 + .long 1071095176 + .long 2248589878 + .long 1044527624 + .long 2147483648 + .long 1071084625 + .long 2412896695 + .long 1046112867 + .long 3221225472 + .long 1071074092 + .long 3834725738 + .long 1044562378 + .long 1073741824 + .long 1071063578 + .long 1150920407 + .long 1043768986 + .long 0 + .long 1071053082 + .long 1379393428 + .long 3188690690 + .long 0 + .long 1071042604 + .long 3058183278 + .long 3193617655 + .long 0 + .long 1071032144 + .long 421133665 + .long 3193417186 + .long 0 + .long 1071021702 + .long 2860161357 + .long 3191816125 + .long 0 + .long 1071011278 + .long 1742405964 + .long 1043580240 + .long 0 + .long 1071000872 + .long 2821215927 + .long 3188984273 + .long 3221225472 + .long 1070990483 + .long 510275597 + .long 1045813401 + .long 2147483648 + .long 1070980113 + .long 304266588 + .long 3191193536 + .long 3221225472 + .long 1070969760 + .long 1854784211 + .long 1046302073 + .long 0 + .long 1070959426 + .long 3773082854 + .long 3193008899 + .long 2147483648 + .long 1070949108 + .long 3003572392 + .long 1046404879 + .long 3221225472 + .long 1070938808 + .long 1702149204 + .long 1046407257 + .long 2147483648 + .long 1070928526 + .long 3935314439 + .long 1046438280 + .long 3221225472 + .long 1070918261 + .long 2677087609 + .long 1045501749 + .long 2147483648 + .long 1070908014 + .long 4190598039 + .long 3193640515 + .long 1073741824 + .long 1070897784 + .long 368874072 + .long 1044879927 + .long 2147483648 + .long 1070887571 + .long 3584052697 + .long 3192024662 + .long 3221225472 + .long 1070877375 + .long 3762307829 + .long 1045886918 + .long 1073741824 + .long 1070867197 + .long 495710920 + .long 1046317072 + .long 0 + .long 1070857036 + .long 2292768238 + .long 3190887508 + .long 3221225472 + .long 1070846891 + .long 1044078151 + .long 3193772914 + .long 1073741824 + .long 1070836764 + .long 3266010457 + .long 1043443755 + .long 3221225472 + .long 1070826653 + .long 3571665822 + .long 1045547823 + .long 1073741824 + .long 1070816560 + .long 393348347 + .long 3190525143 + .long 2147483648 + .long 1070806483 + .long 4241722498 + .long 3192084193 + .long 2147483648 + .long 1070796423 + .long 1693797068 + .long 3192807972 + .long 0 + .long 1070786380 + .long 2860086745 + .long 1046331646 + .long 2147483648 + .long 1070776353 + .long 1366141759 + .long 3192979363 + .long 1073741824 + .long 1070766343 + .long 737899283 + .long 1045853346 + .long 3221225472 + .long 1070756349 + .long 88734873 + .long 1043881257 + .long 3221225472 + .long 1070746372 + .long 1438003315 + .long 3192917101 + .long 0 + .long 1070736412 + .long 1066505530 + .long 1043896695 + .long 3221225472 + .long 1070726467 + .long 2706653041 + .long 3191113643 + .long 3221225472 + .long 1070716539 + .long 1321764476 + .long 1039573724 + .long 0 + .long 1070706628 + .long 1126753211 + .long 1044502976 + .long 2147483648 + .long 1070696732 + .long 773642884 + .long 1044110727 + .long 1073741824 + .long 1070686853 + .long 1263743406 + .long 3193115278 + .long 0 + .long 1070676990 + .long 3115237732 + .long 3193089176 + .long 3221225472 + .long 1070667142 + .long 3642626838 + .long 3191146032 + .long 2147483648 + .long 1070657311 + .long 2091696428 + .long 1044337177 + .long 1073741824 + .long 1070647496 + .long 3168958391 + .long 1044197568 + .long 0 + .long 1070637697 + .long 711148669 + .long 3193181047 + .long 2147483648 + .long 1070627913 + .long 4207182773 + .long 3193402092 + .long 3221225472 + .long 1070618145 + .long 918070640 + .long 3192902845 + .long 3221225472 + .long 1070608393 + .long 3135571447 + .long 3192193928 + .long 2147483648 + .long 1070598657 + .long 1043705517 + .long 3193188604 + .long 2147483648 + .long 1070581777 + .long 1886680492 + .long 1043890286 + .long 2147483648 + .long 1070562367 + .long 3373799420 + .long 3191917802 + .long 2147483648 + .long 1070542988 + .long 2919618025 + .long 3192461752 + .long 2147483648 + .long 1070523640 + .long 2926365158 + .long 3193113492 + .long 0 + .long 1070504323 + .long 519978638 + .long 1045918846 + .long 0 + .long 1070485037 + .long 3665353151 + .long 3193546248 + .long 0 + .long 1070465781 + .long 2327718958 + .long 1045050797 + .long 0 + .long 1070446556 + .long 345326861 + .long 3188224716 + .long 2147483648 + .long 1070427361 + .long 2263747488 + .long 3192871328 + .long 0 + .long 1070408197 + .long 3894192264 + .long 1045693123 + .long 0 + .long 1070389063 + .long 994321593 + .long 1046347203 + .long 2147483648 + .long 1070369959 + .long 3540366700 + .long 1042296230 + .long 0 + .long 1070350886 + .long 966420752 + .long 3192400412 + .long 2147483648 + .long 1070331842 + .long 1954511160 + .long 3193467762 + .long 2147483648 + .long 1070312828 + .long 1875003040 + .long 1045485629 + .long 0 + .long 1070293845 + .long 4003372005 + .long 3193714109 + .long 2147483648 + .long 1070274890 + .long 2216083644 + .long 1045720399 + .long 0 + .long 1070255966 + .long 1240985743 + .long 1045879414 + .long 0 + .long 1070237071 + .long 1573064162 + .long 1046427916 + .long 0 + .long 1070218206 + .long 2500166582 + .long 3193848169 + .long 2147483648 + .long 1070199369 + .long 862131539 + .long 1045606065 + .long 0 + .long 1070180563 + .long 3733427622 + .long 3193545988 + .long 0 + .long 1070161785 + .long 124515358 + .long 1045504766 + .long 2147483648 + .long 1070143036 + .long 689228007 + .long 1044238436 + .long 0 + .long 1070124317 + .long 976284835 + .long 3189879978 + .long 2147483648 + .long 1070105626 + .long 2997446224 + .long 3193394244 + .long 2147483648 + .long 1070086964 + .long 594985163 + .long 3190453447 + .long 2147483648 + .long 1070068331 + .long 3634411091 + .long 3193012662 + .long 0 + .long 1070049727 + .long 841316482 + .long 3192551604 + .long 0 + .long 1070031151 + .long 518949849 + .long 3189505693 + .long 2147483648 + .long 1070012603 + .long 207633604 + .long 1043791305 + .long 2147483648 + .long 1069994084 + .long 925415631 + .long 3189658670 + .long 2147483648 + .long 1069975593 + .long 3348775015 + .long 1046231055 + .long 0 + .long 1069957131 + .long 4137593961 + .long 1045760644 + .long 2147483648 + .long 1069938696 + .long 3081207972 + .long 1046319652 + .long 2147483648 + .long 1069920290 + .long 2912811806 + .long 3193250863 + .long 0 + .long 1069901912 + .long 1704663230 + .long 3192651171 + .long 2147483648 + .long 1069883561 + .long 1726887473 + .long 3193427817 + .long 2147483648 + .long 1069865238 + .long 516302873 + .long 1042556919 + .long 2147483648 + .long 1069846943 + .long 3737277289 + .long 3192083505 + .long 0 + .long 1069828676 + .long 2829909067 + .long 3191628520 + .long 0 + .long 1069810436 + .long 3474800299 + .long 3187384991 + .long 2147483648 + .long 1069792223 + .long 2041291754 + .long 3186735048 + .long 2147483648 + .long 1069774038 + .long 3100739290 + .long 3192991951 + .long 2147483648 + .long 1069755880 + .long 2641686866 + .long 1042449846 + .long 0 + .long 1069737750 + .long 1353612457 + .long 3192928544 + .long 2147483648 + .long 1069719646 + .long 1823398190 + .long 3193125156 + .long 0 + .long 1069701570 + .long 2629108558 + .long 3192983089 + .long 2147483648 + .long 1069683520 + .long 314889080 + .long 3193178947 + .long 2147483648 + .long 1069665497 + .long 3426846470 + .long 1046055034 + .long 0 + .long 1069647502 + .long 2451521798 + .long 3193081447 + .long 2147483648 + .long 1069629532 + .long 963200030 + .long 1046315089 + .long 0 + .long 1069611590 + .long 3644976987 + .long 1046450297 + .long 2147483648 + .long 1069593674 + .long 1514045874 + .long 3193337489 + .long 0 + .long 1069575785 + .long 2640752615 + .long 3192734715 + .long 0 + .long 1069557922 + .long 177381730 + .long 3193107348 + .long 0 + .long 1069532650 + .long 546871269 + .long 1045601847 + .long 0 + .long 1069497029 + .long 2220408187 + .long 1045964849 + .long 0 + .long 1069461461 + .long 3101209784 + .long 3192417098 + .long 0 + .long 1069425944 + .long 3768825782 + .long 1046196178 + .long 0 + .long 1069390480 + .long 737308942 + .long 1043872555 + .long 0 + .long 1069355068 + .long 1944808119 + .long 3193362317 + .long 0 + .long 1069319707 + .long 852406261 + .long 3191004250 + .long 0 + .long 1069284398 + .long 3202370743 + .long 3192549796 + .long 0 + .long 1069249140 + .long 900633975 + .long 1043862575 + .long 0 + .long 1069213934 + .long 3417168564 + .long 3193213168 + .long 0 + .long 1069178778 + .long 2513309972 + .long 1046051953 + .long 0 + .long 1069143674 + .long 1836846968 + .long 1044036653 + .long 0 + .long 1069108621 + .long 675391362 + .long 3193334972 + .long 0 + .long 1069073618 + .long 1859398086 + .long 3191668729 + .long 0 + .long 1069038666 + .long 3835994043 + .long 3193252196 + .long 0 + .long 1069003764 + .long 563337246 + .long 3192060530 + .long 0 + .long 1068968912 + .long 3715154210 + .long 1045592716 + .long 0 + .long 1068934111 + .long 51415636 + .long 3192193939 + .long 0 + .long 1068899359 + .long 822049108 + .long 1045846080 + .long 0 + .long 1068864658 + .long 3739043340 + .long 3193184949 + .long 0 + .long 1068830006 + .long 2500828997 + .long 3193115638 + .long 0 + .long 1068795403 + .long 1479335089 + .long 1045458233 + .long 0 + .long 1068760850 + .long 1914098598 + .long 1045079833 + .long 0 + .long 1068726346 + .long 1470374909 + .long 1046125471 + .long 0 + .long 1068691892 + .long 2048101185 + .long 3192960024 + .long 0 + .long 1068657486 + .long 801101802 + .long 1042523454 + .long 0 + .long 1068623129 + .long 412171467 + .long 1044799425 + .long 0 + .long 1068588821 + .long 2124566049 + .long 1040459843 + .long 0 + .long 1068554561 + .long 2087558263 + .long 1046083102 + .long 0 + .long 1068520350 + .long 290389316 + .long 1045220023 + .long 0 + .long 1068473430 + .long 393737815 + .long 1045770085 + .long 0 + .long 1068405202 + .long 3273111658 + .long 3193594336 + .long 0 + .long 1068337068 + .long 3076935419 + .long 3191993934 + .long 0 + .long 1068269030 + .long 1564279721 + .long 1040713632 + .long 0 + .long 1068201088 + .long 1950103787 + .long 3191285473 + .long 0 + .long 1068133240 + .long 111301617 + .long 1046140470 + .long 0 + .long 1068065488 + .long 2740933659 + .long 1046091898 + .long 0 + .long 1067997832 + .long 1267131462 + .long 3192947024 + .long 0 + .long 1067930268 + .long 629787343 + .long 1045599114 + .long 0 + .long 1067862800 + .long 2943029746 + .long 3191100621 + .long 0 + .long 1067795426 + .long 2538631151 + .long 3193953989 + .long 0 + .long 1067728144 + .long 3881795033 + .long 3191377363 + .long 0 + .long 1067660956 + .long 2752747058 + .long 3186250103 + .long 0 + .long 1067593862 + .long 892170014 + .long 3193330390 + .long 0 + .long 1067526860 + .long 2000985783 + .long 3192968647 + .long 0 + .long 1067459950 + .long 1954077304 + .long 1044399908 + .long 0 + .long 1067335900 + .long 4120702847 + .long 3193150730 + .long 0 + .long 1067202448 + .long 353489980 + .long 1045676744 + .long 0 + .long 1067069184 + .long 2609643324 + .long 3192108001 + .long 0 + .long 1066936100 + .long 2904433317 + .long 1044836541 + .long 0 + .long 1066803200 + .long 319656790 + .long 1044863904 + .long 0 + .long 1066670484 + .long 2407987331 + .long 3192995083 + .long 0 + .long 1066537948 + .long 2437746120 + .long 3193127733 + .long 0 + .long 1066405592 + .long 762570215 + .long 3189946997 + .long 0 + .long 1066145040 + .long 3317159694 + .long 1046060125 + .long 0 + .long 1065881056 + .long 2317845886 + .long 3191679176 + .long 0 + .long 1065617424 + .long 3665195816 + .long 1045633853 + .long 0 + .long 1065354160 + .long 2008730355 + .long 3193898211 + .long 0 + .long 1064829264 + .long 3746236192 + .long 1046121471 + .long 0 + .long 1064303680 + .long 885296753 + .long 3191852441 + .long 0 + .long 1063253696 + .long 449976495 + .long 3192682663 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .type L_tbl,@object + .size L_tbl,8208 + .space 496, 0x00 # pad + .align 16 +HIGHMASK_Y: + .long 0 + .long 4294967288 + .long 0 + .long 4294967295 + .type HIGHMASK_Y,@object + .size HIGHMASK_Y,16 + .align 16 +T_exp: + .long 0 + .long 1072693248 + .long 0 + .long 997195776 + .long 4200250559 + .long 1072696090 + .long 2808127345 + .long 3162830514 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 339411585 + .long 1072701800 + .long 264588982 + .long 3162685233 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 772914124 + .long 1072707540 + .long 4004372762 + .long 1013278737 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 1928746161 + .long 1072713311 + .long 983617676 + .long 1015333753 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 238821257 + .long 1072719114 + .long 1469694871 + .long 3163933563 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 728934454 + .long 1072724948 + .long 1413842688 + .long 1015227188 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 4133881824 + .long 1072730813 + .long 2148155345 + .long 3163979875 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 2602514713 + .long 1072736711 + .long 2268929336 + .long 1015402860 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 1172597893 + .long 1072742641 + .long 114433263 + .long 1016396169 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 590962156 + .long 1072748603 + .long 3829346666 + .long 3164324173 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 1608493509 + .long 1072754597 + .long 3159622171 + .long 3163856313 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 685187902 + .long 1072760624 + .long 378731989 + .long 1015891691 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 2875075254 + .long 1072766683 + .long 4144233330 + .long 3164382292 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 351405227 + .long 1072772776 + .long 3125337328 + .long 3160871055 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 2471440686 + .long 1072778901 + .long 968836267 + .long 3163263464 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1416741826 + .long 1072785060 + .long 2196380210 + .long 1012462139 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 2257959872 + .long 1072791252 + .long 3802946148 + .long 1014013503 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 1480023343 + .long 1072797478 + .long 2247196168 + .long 1016376029 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 4162030108 + .long 1072803737 + .long 2763428480 + .long 1016577925 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 2502433899 + .long 1072810031 + .long 2148595913 + .long 1016072567 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 1588871207 + .long 1072816359 + .long 143439582 + .long 3164011992 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2218315341 + .long 1072822721 + .long 2694295388 + .long 3164337444 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 897099801 + .long 1072829118 + .long 754756297 + .long 1016289581 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 2725843665 + .long 1072835549 + .long 1433917087 + .long 1015887099 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 4219606026 + .long 1072842015 + .long 2434574742 + .long 1015730124 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1897844341 + .long 1072848517 + .long 1254300460 + .long 1016324514 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 874372905 + .long 1072855054 + .long 100263788 + .long 1016989308 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 1972484976 + .long 1072861626 + .long 675290301 + .long 3162688626 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 1724976915 + .long 1072868234 + .long 420909223 + .long 3164165955 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 964107055 + .long 1072874878 + .long 2800439588 + .long 3163881797 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 526652809 + .long 1072881558 + .long 4223459736 + .long 1016927951 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 1253935211 + .long 1072888274 + .long 1395382931 + .long 3160751189 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 3991843581 + .long 1072895026 + .long 4092853457 + .long 1015634339 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 1000925746 + .long 1072901816 + .long 1018491672 + .long 3164358120 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1726216749 + .long 1072908642 + .long 2466808228 + .long 3162724981 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 2732492859 + .long 1072915505 + .long 2691479646 + .long 3163304260 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 589198666 + .long 1072922406 + .long 2664346172 + .long 3164206538 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 460407023 + .long 1072929344 + .long 4237175092 + .long 3164187045 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3219942644 + .long 1072936319 + .long 3798990616 + .long 1016417382 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1156440435 + .long 1072943333 + .long 2351451249 + .long 1015015632 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 3743175029 + .long 1072950384 + .long 2072812490 + .long 3163223651 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 3278348324 + .long 1072957474 + .long 3069497416 + .long 1015799288 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 654919306 + .long 1072964603 + .long 3232961757 + .long 3164096045 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1065662932 + .long 1072971770 + .long 2533670915 + .long 1015578814 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 1118294578 + .long 1072978976 + .long 2197495694 + .long 3160957977 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 1720398391 + .long 1072986221 + .long 3980678963 + .long 3164348656 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 3784486610 + .long 1072993505 + .long 1581883040 + .long 3162747529 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3933059031 + .long 1073000829 + .long 2133366768 + .long 3162580408 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 3088564500 + .long 1073008193 + .long 1762311517 + .long 1016094249 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 2178460671 + .long 1073015597 + .long 777878098 + .long 3163891069 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2135241198 + .long 1073023041 + .long 1236747871 + .long 1014637723 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 3896463087 + .long 1073030525 + .long 1139797873 + .long 3162282381 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 4109806887 + .long 1073038050 + .long 422403966 + .long 1015517805 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 3723038930 + .long 1073045616 + .long 378465264 + .long 3163618158 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3689071823 + .long 1073053223 + .long 2321004996 + .long 3163601292 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 671025100 + .long 1073060872 + .long 3832014351 + .long 3164070606 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 4222122499 + .long 1073068561 + .long 1277378074 + .long 3164305313 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 2425981843 + .long 1073076293 + .long 2830390851 + .long 3164395175 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 551349105 + .long 1073084067 + .long 3821916050 + .long 3163155165 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 3872257780 + .long 1073091882 + .long 1253592103 + .long 1017006910 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 488188413 + .long 1073099741 + .long 3199821029 + .long 1016612624 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 4273770423 + .long 1073107641 + .long 3383180809 + .long 3164267477 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3339203574 + .long 1073115585 + .long 1483497780 + .long 3163457330 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 2979960120 + .long 1073123572 + .long 2599109725 + .long 1015547069 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 4201977662 + .long 1073131602 + .long 748330254 + .long 1014642933 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 3721688645 + .long 1073139676 + .long 3069276937 + .long 1016887977 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 2555984613 + .long 1073147794 + .long 2652555442 + .long 3163601268 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 1727278727 + .long 1073155956 + .long 3562710623 + .long 1012520516 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 2263535754 + .long 1073164162 + .long 752233586 + .long 3163687584 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 903334909 + .long 1073172413 + .long 1636462108 + .long 1016088573 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 2980802057 + .long 1073180708 + .long 378619896 + .long 1016821879 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 950803702 + .long 1073189049 + .long 1655364926 + .long 1016285608 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 158781403 + .long 1073197435 + .long 2221464712 + .long 3164335029 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 1660913392 + .long 1073205866 + .long 4218599604 + .long 1016184283 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 2224145553 + .long 1073214343 + .long 3482522030 + .long 3162537745 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2916157145 + .long 1073222866 + .long 219487565 + .long 1016357943 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 515457527 + .long 1073231436 + .long 836709333 + .long 1016699802 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 396319521 + .long 1073240052 + .long 4172420816 + .long 3160123208 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3643909174 + .long 1073248714 + .long 3537586109 + .long 1015403223 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 2759350287 + .long 1073257424 + .long 1148526634 + .long 1016943509 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 3134592888 + .long 1073266181 + .long 4232266862 + .long 1017039710 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 1577608921 + .long 1073274986 + .long 1875489510 + .long 3164016970 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 3492293770 + .long 1073283838 + .long 2248032210 + .long 1016435402 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 1403662306 + .long 1073292739 + .long 2788809599 + .long 3162719583 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 727685349 + .long 1073301688 + .long 2038246809 + .long 3163407318 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2591453363 + .long 1073310685 + .long 2132396182 + .long 3160122774 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 3833209506 + .long 1073319731 + .long 2722920684 + .long 1014803418 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 1297350157 + .long 1073328827 + .long 1308022040 + .long 3164461134 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 424392917 + .long 1073337972 + .long 2749202995 + .long 3163887294 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2366108318 + .long 1073347166 + .long 2867985102 + .long 3162810830 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3985553595 + .long 1073356410 + .long 4002146062 + .long 1016882712 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2152073944 + .long 1073365705 + .long 1486860576 + .long 3164252032 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 2331271250 + .long 1073375050 + .long 812057446 + .long 1013256022 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1405169241 + .long 1073384446 + .long 2998539689 + .long 3163879527 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 557149882 + .long 1073393893 + .long 3672720709 + .long 1015585841 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 977020788 + .long 1073403391 + .long 3065100517 + .long 1016590139 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 3861050111 + .long 1073412940 + .long 254893773 + .long 3163861756 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 1822067026 + .long 1073422542 + .long 1241994956 + .long 1016388866 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 364333489 + .long 1073432196 + .long 3923737744 + .long 3162469949 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 703710506 + .long 1073441902 + .long 1384660846 + .long 1016244467 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 4062661092 + .long 1073451660 + .long 1422616006 + .long 3164303894 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 3080351519 + .long 1073461472 + .long 3379126789 + .long 3158266577 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 3287523847 + .long 1073471337 + .long 1625971539 + .long 3158058531 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 1631695677 + .long 1073481256 + .long 2717633076 + .long 3163392602 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 3657065772 + .long 1073491228 + .long 399025623 + .long 3164005654 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 2029714210 + .long 1073501255 + .long 613660079 + .long 1016147719 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2307442995 + .long 1073511336 + .long 3190117721 + .long 3163453115 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 1464976603 + .long 1073521472 + .long 3507292405 + .long 3163026110 + .long 3706687593 + .long 1073526560 + .long 3521726939 + .long 1014301643 + .long 778901109 + .long 1073531663 + .long 2248183954 + .long 3162317327 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1532734324 + .long 1073541909 + .long 3094216535 + .long 3164211433 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 721996136 + .long 1073552211 + .long 563754734 + .long 1016419894 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3939148246 + .long 1073562568 + .long 3210352148 + .long 1016322899 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 3898795731 + .long 1073572982 + .long 1249994144 + .long 1012918394 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 1912561781 + .long 1073583453 + .long 3147495102 + .long 1016726829 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 3594158869 + .long 1073593980 + .long 2456521700 + .long 3164305137 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 1679558232 + .long 1073604565 + .long 2390342287 + .long 3164382546 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 1796832535 + .long 1073615207 + .long 3176955716 + .long 3161634089 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 991358482 + .long 1073625907 + .long 838715019 + .long 3164206244 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 610758006 + .long 1073636665 + .long 1965209397 + .long 3162914808 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2009970496 + .long 1073647481 + .long 2159039665 + .long 3163621524 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 2256325230 + .long 1073658356 + .long 580117746 + .long 1016365871 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 2719515920 + .long 1073669290 + .long 2760332941 + .long 1016186509 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 481706282 + .long 1073680284 + .long 1696079173 + .long 3163759104 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1222472308 + .long 1073691337 + .long 1054357470 + .long 3162069594 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2038973688 + .long 1073702450 + .long 892941374 + .long 1017095035 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 35929225 + .long 1073713624 + .long 2809788041 + .long 3160485544 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 915592468 + .long 1073724858 + .long 352947894 + .long 3162072947 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .long 1797923801 + .long 1073736153 + .long 1950547427 + .long 1014277635 + .type T_exp,@object + .size T_exp,4096 + .space 512, 0x00 # pad + .align 16 +e_coeff: + .long 3884607281 + .long 1062590591 + .long 3607404736 + .long 1068264200 + .long 1874480759 + .long 1065595563 + .long 4286760335 + .long 1070514109 + .long 4277811695 + .long 1072049730 + .long 0 + .long 0 + .type e_coeff,@object + .size e_coeff,48 + .align 16 +coeff_h: + .long 0 + .long 3218479616 + .long 0 + .long 3210587105 + .type coeff_h,@object + .size coeff_h,16 + .align 16 +HIGHMASK_LOG_X: + .long 4160749568 + .long 4294967295 + .long 0 + .long 4294965248 + .type HIGHMASK_LOG_X,@object + .size HIGHMASK_LOG_X,16 + .align 8 +HALFMASK: + .long 4160749568 + .long 4294967295 + .long 4160749568 + .long 4294967295 + .type HALFMASK,@object + .size HALFMASK,16 + .align 8 +log2: + .long 4277811695 + .long 1072049730 + .long 4277811695 + .long 3219533378 + .type log2,@object + .size log2,16 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_pow.1-. + .4byte ..___tag_value_pow.5-..___tag_value_pow.1 + .2byte 0x0400 + .4byte ..___tag_value_pow.3-..___tag_value_pow.1 + .2byte 0x300e + .byte 0x04 + .4byte ..___tag_value_pow.4-..___tag_value_pow.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/e_sinh.S b/libm/x86_64/e_sinh.S new file mode 100644 index 0000000..4d8db63 --- /dev/null +++ b/libm/x86_64/e_sinh.S @@ -0,0 +1,1430 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// sinh(x)=(exp(x)-exp(-x))/2 +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7), +// f=0.b1 b2 ... b7, k integer +// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f] +// Tp stores the high 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision +// +// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14}, +// for |x| in [23/64,3*2^7) +// e^{-|x|}=2^{-k-f}*2^{-r} +// +// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp= +// =2^k*Tp+2^k*Tp*P15+2^k*Dp +// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)+2^{-k}*Dn +// +// For |x| in [1/8, 3*2^7), sinh(x) is formed as +// RN(2^k*Tp-2^{-k}*Tn)+2^k*Tp*P15-2^{-k}*Tn*P`15-2^{-k}*TnL-2^{-k}*Dn+2^k*Dp +// +// For x in (3*2^7, 3*2^8), sign(x)*(e^|x|)/2 is returned, and +// the result is checked for overflow. +// +// For |x|<23/64, a Taylor polynomial expansion is used (degree 13) +// To reduce rounding errors, the p3*x^3 term is computed as +// (p3*xh^3)_high+[(p3*xl*(3*x*xh+xl^2))+(p3*xh^3)_low], +// where x=xh+xl, (xh are the leading 17 bits of x), and +// (p3*xh^3)_high=RN(x+p3*xh^3)-x +// (error bound for polynomial expansion is below 0.51 ulp) +// +// Special cases: +// sinh(NaN) = quiet NaN, and raise invalid exception +// sinh(+/-INF) = +/-INF +// sinh(x) = x for subnormals +// for finite argument, only sinh(0)=0 is exact +// For IEEE double +// sinh(x) overflows for x > +// 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2) +// +/******************************************************************************/ + +#include +# -- Begin sinh +ENTRY(sinh) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_sinh.1: + pushq %rsi +..___tag_value_sinh.3: +..B1.2: + movsd HALFMASK(%rip), %xmm3 + xorpd %xmm4, %xmm4 + movsd L2E(%rip), %xmm1 + movsd 8+L2E(%rip), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd Shifter(%rip), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + movl $32768, %edx + andl %ecx, %edx + andl $32767, %ecx + subl $16343, %ecx + cmpl $177, %ecx + jae .L_2TAG_PACKET_0.0.2 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + shll $3, %edx + orl %edx, %eax + movq %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + xorpd %xmm5, %xmm5 + subsd %xmm6, %xmm3 + movapd cv(%rip), %xmm4 + addsd %xmm1, %xmm2 + movapd 16+cv(%rip), %xmm6 + subsd %xmm3, %xmm7 + movl $32704, %edx + pinsrw $3, %edx, %xmm5 + movapd 32+cv(%rip), %xmm1 + addsd %xmm7, %xmm2 + movl $127, %edx + andl %eax, %edx + addl %edx, %edx + shrl $3, %eax + andl $65520, %eax + addl $16352, %eax + xorpd %xmm0, %xmm0 + cmpl $161, %ecx + jae .L_2TAG_PACKET_1.0.2 + pshufd $68, %xmm5, %xmm5 + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + psubw %xmm0, %xmm5 + lea T2f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm0 + lea T2_neg_f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm5 + pshufd $68, %xmm2, %xmm3 + movapd 48+cv(%rip), %xmm7 + pshufd $68, %xmm2, %xmm2 + mulpd %xmm3, %xmm3 + mulpd %xmm2, %xmm4 + mulpd %xmm2, %xmm6 + mulpd 64+cv(%rip), %xmm2 + mulpd %xmm3, %xmm1 + mulpd %xmm3, %xmm7 + mulpd %xmm3, %xmm4 + mulpd %xmm3, %xmm1 + addpd %xmm7, %xmm6 + movq %xmm0, %xmm7 + addpd %xmm1, %xmm4 + shufpd $0, %xmm5, %xmm7 + subpd %xmm5, %xmm0 + mulpd %xmm7, %xmm2 + addpd %xmm6, %xmm4 + subsd %xmm0, %xmm7 + mulpd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + subsd %xmm5, %xmm7 + addpd %xmm2, %xmm4 + addsd %xmm6, %xmm7 + pshufd $238, %xmm4, %xmm2 + addsd %xmm7, %xmm2 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_1.0.2: + subl $16352, %eax + movl %eax, %ecx + andl $32752, %eax + shrl $1, %eax + andl $65520, %eax + subl %eax, %ecx + addl $16352, %eax + pinsrw $3, %eax, %xmm0 + pshufd $68, %xmm0, %xmm0 + lea T2f(%rip), %r8 + mulpd (%r8,%rdx,8), %xmm0 + pshufd $68, %xmm2, %xmm3 + movsd 48+cv(%rip), %xmm7 + mulsd %xmm3, %xmm3 + mulsd %xmm2, %xmm4 + mulsd %xmm2, %xmm6 + mulsd 64+cv(%rip), %xmm2 + mulsd %xmm3, %xmm1 + mulsd %xmm3, %xmm7 + mulsd %xmm3, %xmm4 + addl $16368, %ecx + pinsrw $3, %ecx, %xmm5 + mulsd %xmm3, %xmm1 + addsd %xmm7, %xmm6 + addsd %xmm1, %xmm4 + mulsd %xmm0, %xmm2 + addsd %xmm6, %xmm4 + mulsd %xmm2, %xmm4 + pshufd $238, %xmm0, %xmm6 + addsd %xmm6, %xmm4 + addsd %xmm4, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm5, %xmm0 + pextrw $3, %xmm0, %eax + andl $32752, %eax + movl $127, %edx + cmpl $32752, %eax + je .L_2TAG_PACKET_2.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + addl $16343, %ecx + cmpl $16343, %ecx + ja .L_2TAG_PACKET_3.0.2 + cmpl $15856, %ecx + jb .L_2TAG_PACKET_4.0.2 + movapd pv(%rip), %xmm1 + pshufd $68, %xmm0, %xmm6 + mulpd %xmm5, %xmm5 + movapd 16+pv(%rip), %xmm2 + pshufd $68, %xmm0, %xmm7 + movapd 32+pv(%rip), %xmm3 + pshufd $68, %xmm0, %xmm4 + andpd MASK3(%rip), %xmm6 + mulpd %xmm5, %xmm1 + mulsd %xmm5, %xmm2 + subpd %xmm6, %xmm4 + mulpd %xmm5, %xmm7 + addpd %xmm3, %xmm1 + pshufd $68, %xmm6, %xmm3 + mulpd %xmm5, %xmm5 + mulsd %xmm7, %xmm2 + mulpd %xmm7, %xmm1 + pshufd $68, %xmm0, %xmm7 + mulsd %xmm6, %xmm6 + addsd %xmm7, %xmm7 + mulsd %xmm4, %xmm4 + mulpd %xmm5, %xmm1 + addsd %xmm0, %xmm7 + mulsd %xmm3, %xmm6 + mulsd %xmm3, %xmm7 + pshufd $238, %xmm1, %xmm3 + mulsd %xmm5, %xmm1 + pshufd $238, %xmm4, %xmm5 + addsd %xmm2, %xmm3 + pshufd $238, %xmm2, %xmm2 + addsd %xmm4, %xmm7 + movq %xmm0, %xmm4 + mulsd %xmm2, %xmm6 + mulsd %xmm5, %xmm7 + addsd %xmm6, %xmm0 + mulsd %xmm2, %xmm7 + subsd %xmm0, %xmm4 + addsd %xmm7, %xmm1 + addsd %xmm4, %xmm6 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + cmpl $16, %ecx + jae .L_2TAG_PACKET_5.0.2 + movq %xmm0, %xmm1 + mulsd %xmm1, %xmm1 + jmp ..B1.5 +.L_2TAG_PACKET_5.0.2: + xorpd %xmm2, %xmm2 + movl $17392, %ecx + pinsrw $3, %ecx, %xmm2 + xorpd %xmm3, %xmm3 + movl $15344, %edx + pinsrw $3, %edx, %xmm3 + mulsd %xmm0, %xmm2 + addsd %xmm2, %xmm0 + mulsd %xmm3, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_3.0.2: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_6.0.2 + xorpd %xmm0, %xmm0 + movl $32736, %eax + pinsrw $3, %eax, %xmm0 + orl %edx, %eax + pinsrw $3, %eax, %xmm1 + mulsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_2.0.2 +.L_2TAG_PACKET_6.0.2: + xorpd %xmm1, %xmm1 + movl $32768, %eax + pinsrw $3, %eax, %xmm1 + andnpd %xmm0, %xmm1 + mulsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + movq %xmm0, (%rsp) +..B1.3: + movq (%rsp), %xmm0 +.L_2TAG_PACKET_7.0.2: +..B1.5: + popq %rcx +..___tag_value_sinh.4: + ret +..___tag_value_sinh.5: +END(sinh) +# -- End sinh + .section .rodata, "a" + .align 16 + .align 16 +L2E: + .long 1610612736 + .long 1080497479 + .long 4166901572 + .long 1053077003 + .type L2E,@object + .size L2E,16 + .align 16 +Shifter: + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .type Shifter,@object + .size Shifter,16 + .align 16 +cv: + .long 3607404736 + .long 1044146952 + .long 3607404736 + .long 3191630600 + .long 4277811695 + .long 1063661122 + .long 4277811695 + .long 3211144770 + .long 2140175755 + .long 1033864261 + .long 2140175755 + .long 1033864261 + .long 4289495988 + .long 1054113747 + .long 4289495988 + .long 1054113747 + .long 4277811695 + .long 1064709698 + .long 4277811695 + .long 1064709698 + .type cv,@object + .size cv,80 + .align 16 +T2f: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 2851812149 + .long 1072698941 + .long 2595802551 + .long 1016815913 + .long 1048019041 + .long 1072704666 + .long 1398474845 + .long 3161559171 + .long 3899555717 + .long 1072710421 + .long 427280750 + .long 3163595548 + .long 3541402996 + .long 1072716208 + .long 2759177317 + .long 1015903202 + .long 702412510 + .long 1072722027 + .long 3803266087 + .long 3163328991 + .long 410360776 + .long 1072727877 + .long 1269990655 + .long 1013024446 + .long 3402036099 + .long 1072733758 + .long 405889334 + .long 1016154232 + .long 1828292879 + .long 1072739672 + .long 1255956747 + .long 1016636974 + .long 728909815 + .long 1072745618 + .long 383930225 + .long 1016078044 + .long 852742562 + .long 1072751596 + .long 667253586 + .long 1010842135 + .long 2952712987 + .long 1072757606 + .long 3293494651 + .long 3161168877 + .long 3490863953 + .long 1072763649 + .long 960797498 + .long 3163997456 + .long 3228316108 + .long 1072769725 + .long 3010241991 + .long 3159471380 + .long 2930322912 + .long 1072775834 + .long 2599499422 + .long 3163762623 + .long 3366293073 + .long 1072781976 + .long 3119426314 + .long 1015169130 + .long 1014845819 + .long 1072788152 + .long 3117910646 + .long 3162607681 + .long 948735466 + .long 1072794361 + .long 3516338028 + .long 3163623459 + .long 3949972341 + .long 1072800603 + .long 2068408548 + .long 1015962444 + .long 2214878420 + .long 1072806880 + .long 892270087 + .long 3164164998 + .long 828946858 + .long 1072813191 + .long 10642492 + .long 1016988014 + .long 586995997 + .long 1072819536 + .long 41662348 + .long 3163676568 + .long 2288159958 + .long 1072825915 + .long 2169144469 + .long 1015924597 + .long 2440944790 + .long 1072832329 + .long 2492769774 + .long 1015196030 + .long 1853186616 + .long 1072838778 + .long 3066496371 + .long 1016705150 + .long 1337108031 + .long 1072845262 + .long 3203724452 + .long 1015726421 + .long 1709341917 + .long 1072851781 + .long 2571168217 + .long 1015201075 + .long 3790955393 + .long 1072858335 + .long 2352942462 + .long 3164228666 + .long 4112506593 + .long 1072864925 + .long 2947355221 + .long 1015419624 + .long 3504003472 + .long 1072871551 + .long 3594001060 + .long 3158379228 + .long 2799960843 + .long 1072878213 + .long 1423655381 + .long 1016070727 + .long 2839424854 + .long 1072884911 + .long 1171596163 + .long 1014090255 + .long 171030293 + .long 1072891646 + .long 3526460132 + .long 1015477354 + .long 4232894513 + .long 1072898416 + .long 2383938684 + .long 1015717095 + .long 2992903935 + .long 1072905224 + .long 2218154406 + .long 1016276769 + .long 1603444721 + .long 1072912069 + .long 1548633640 + .long 3163249902 + .long 926591435 + .long 1072918951 + .long 3208833762 + .long 3163962090 + .long 1829099622 + .long 1072925870 + .long 1016661181 + .long 3164509581 + .long 887463927 + .long 1072932827 + .long 3596744163 + .long 3161842742 + .long 3272845541 + .long 1072939821 + .long 928852419 + .long 3164536824 + .long 1276261410 + .long 1072946854 + .long 300981948 + .long 1015732745 + .long 78413852 + .long 1072953925 + .long 4183226867 + .long 3164065827 + .long 569847338 + .long 1072961034 + .long 472945272 + .long 3160339305 + .long 3645941911 + .long 1072968181 + .long 3814685081 + .long 3162621917 + .long 1617004845 + .long 1072975368 + .long 82804944 + .long 1011391354 + .long 3978100823 + .long 1072982593 + .long 3513027190 + .long 1016894539 + .long 3049340112 + .long 1072989858 + .long 3062915824 + .long 1014219171 + .long 4040676318 + .long 1072997162 + .long 4090609238 + .long 1016712034 + .long 3577096743 + .long 1073004506 + .long 2951496418 + .long 1014842263 + .long 2583551245 + .long 1073011890 + .long 3161094195 + .long 1016655067 + .long 1990012071 + .long 1073019314 + .long 3529070563 + .long 3163861769 + .long 2731501122 + .long 1073026778 + .long 1774031855 + .long 3163518597 + .long 1453150082 + .long 1073034283 + .long 498154669 + .long 3162536638 + .long 3395129871 + .long 1073041828 + .long 4025345435 + .long 3163383964 + .long 917841882 + .long 1073049415 + .long 18715565 + .long 1016707884 + .long 3566716925 + .long 1073057042 + .long 1536826856 + .long 1015191009 + .long 3712504873 + .long 1073064711 + .long 88491949 + .long 1016476236 + .long 2321106615 + .long 1073072422 + .long 2171176610 + .long 1010584347 + .long 363667784 + .long 1073080175 + .long 813753950 + .long 1016833785 + .long 3111574537 + .long 1073087969 + .long 2606161479 + .long 3163808322 + .long 2956612997 + .long 1073095806 + .long 2118169751 + .long 3163784129 + .long 885834528 + .long 1073103686 + .long 1973258547 + .long 3163310140 + .long 2186617381 + .long 1073111608 + .long 2270764084 + .long 3164321289 + .long 3561793907 + .long 1073119573 + .long 1157054053 + .long 1012938926 + .long 1719614413 + .long 1073127582 + .long 330458198 + .long 3164331316 + .long 1963711167 + .long 1073135634 + .long 1744767757 + .long 3161622870 + .long 1013258799 + .long 1073143730 + .long 1748797611 + .long 3161177658 + .long 4182873220 + .long 1073151869 + .long 629542646 + .long 3163044879 + .long 3907805044 + .long 1073160053 + .long 2257091225 + .long 3162598983 + .long 1218806132 + .long 1073168282 + .long 1818613052 + .long 3163597017 + .long 1447192521 + .long 1073176555 + .long 1462857171 + .long 3163563097 + .long 1339972927 + .long 1073184873 + .long 167908909 + .long 1016620728 + .long 1944781191 + .long 1073193236 + .long 3993278767 + .long 3162772855 + .long 19972402 + .long 1073201645 + .long 3507899862 + .long 1017057868 + .long 919555682 + .long 1073210099 + .long 3121969534 + .long 1013996802 + .long 1413356050 + .long 1073218599 + .long 1651349291 + .long 3163716742 + .long 2571947539 + .long 1073227145 + .long 3558159064 + .long 3164425245 + .long 1176749997 + .long 1073235738 + .long 2738998779 + .long 3163084420 + .long 2604962541 + .long 1073244377 + .long 2614425274 + .long 3164587768 + .long 3649726105 + .long 1073253063 + .long 4085036346 + .long 1016698050 + .long 1110089947 + .long 1073261797 + .long 1451641639 + .long 1016523249 + .long 380978316 + .long 1073270578 + .long 854188970 + .long 3161511262 + .long 2568320822 + .long 1073279406 + .long 2732824428 + .long 1015401491 + .long 194117574 + .long 1073288283 + .long 777528612 + .long 3164460665 + .long 2966275557 + .long 1073297207 + .long 2176155324 + .long 3160891335 + .long 3418903055 + .long 1073306180 + .long 2527457337 + .long 3161869180 + .long 2682146384 + .long 1073315202 + .long 2082178513 + .long 3164411995 + .long 1892288442 + .long 1073324273 + .long 2446255666 + .long 3163648957 + .long 2191782032 + .long 1073333393 + .long 2960257726 + .long 1014791238 + .long 434316067 + .long 1073342563 + .long 2028358766 + .long 1014506698 + .long 2069751141 + .long 1073351782 + .long 1562170675 + .long 3163773257 + .long 3964284211 + .long 1073361051 + .long 2111583915 + .long 1016475740 + .long 2990417245 + .long 1073370371 + .long 3683467745 + .long 3164417902 + .long 321958744 + .long 1073379742 + .long 3401933767 + .long 1016843134 + .long 1434058175 + .long 1073389163 + .long 251133233 + .long 1016134345 + .long 3218338682 + .long 1073398635 + .long 3404164304 + .long 3163525684 + .long 2572866477 + .long 1073408159 + .long 878562433 + .long 1016570317 + .long 697153126 + .long 1073417735 + .long 1283515429 + .long 3164331765 + .long 3092190715 + .long 1073427362 + .long 814012168 + .long 3160571998 + .long 2380618042 + .long 1073437042 + .long 3149557219 + .long 3164369375 + .long 4076559943 + .long 1073446774 + .long 2119478331 + .long 3161806927 + .long 815859274 + .long 1073456560 + .long 240396590 + .long 3164536019 + .long 2420883922 + .long 1073466398 + .long 2049810052 + .long 1015168464 + .long 1540824585 + .long 1073476290 + .long 1064017011 + .long 3164536266 + .long 3716502172 + .long 1073486235 + .long 2303740125 + .long 1015091301 + .long 1610600570 + .long 1073496235 + .long 3766732298 + .long 1016808759 + .long 777507147 + .long 1073506289 + .long 4282924205 + .long 1016236109 + .long 2483480501 + .long 1073516397 + .long 1216371780 + .long 1014082748 + .long 3706687593 + .long 1073526560 + .long 3521726940 + .long 1014301643 + .long 1432208378 + .long 1073536779 + .long 1401068914 + .long 3163412539 + .long 1242007932 + .long 1073547053 + .long 1132034716 + .long 3164388407 + .long 135105010 + .long 1073557383 + .long 1906148728 + .long 3164424315 + .long 3707479175 + .long 1073567768 + .long 3613079303 + .long 1015213314 + .long 382305176 + .long 1073578211 + .long 2347622376 + .long 3163627201 + .long 64696965 + .long 1073588710 + .long 1768797490 + .long 1016865536 + .long 4076975200 + .long 1073599265 + .long 2029000899 + .long 1016257111 + .long 863738719 + .long 1073609879 + .long 1326992220 + .long 3163661773 + .long 351641897 + .long 1073620550 + .long 2172261526 + .long 3164059175 + .long 3884662774 + .long 1073631278 + .long 2158611599 + .long 1015258761 + .long 4224142467 + .long 1073642065 + .long 3389820386 + .long 1016255778 + .long 2728693978 + .long 1073652911 + .long 396109971 + .long 3164511267 + .long 764307441 + .long 1073663816 + .long 3021057420 + .long 3164378099 + .long 3999357479 + .long 1073674779 + .long 2258941616 + .long 1016973300 + .long 929806999 + .long 1073685803 + .long 3205336643 + .long 1016308133 + .long 1533953344 + .long 1073696886 + .long 769171851 + .long 1016714209 + .long 2912730644 + .long 1073708029 + .long 3490067722 + .long 3164453650 + .long 2174652632 + .long 1073719233 + .long 4087714590 + .long 1015498835 + .long 730821105 + .long 1073730498 + .long 2523232743 + .long 1013115764 + .type T2f,@object + .size T2f,2048 + .align 16 +T2_neg_f: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .type T2_neg_f,@object + .size T2_neg_f,2048 + .align 16 +pv: + .long 329805064 + .long 1038488134 + .long 2773927730 + .long 1053236707 + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1069897045 + .long 1744127201 + .long 1046144581 + .long 436314137 + .long 1059717536 + .type pv,@object + .size pv,48 + .align 16 +MASK3: + .long 0 + .long 4294967280 + .long 0 + .long 4294967280 + .type MASK3,@object + .size MASK3,16 + .align 8 +HALFMASK: + .long 4160749568 + .long 2147483647 + .type HALFMASK,@object + .size HALFMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_sinh.1-. + .4byte ..___tag_value_sinh.5-..___tag_value_sinh.1 + .2byte 0x0400 + .4byte ..___tag_value_sinh.3-..___tag_value_sinh.1 + .2byte 0x100e + .byte 0x04 + .4byte ..___tag_value_sinh.4-..___tag_value_sinh.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/s_atan.S b/libm/x86_64/s_atan.S new file mode 100644 index 0000000..2453e10 --- /dev/null +++ b/libm/x86_64/s_atan.S @@ -0,0 +1,927 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// This implementation uses the main path for |x| in [2^{-5},2^65). +// For |x| in [2^{-64},2^{-5}), a secondary path is used. +// For the biased exponent of X within 3FFH-64 and 3FF+64, we use one branch. +// We use the following definition of B and X` so that the formula +// atan(X) = Tau + atan( (X`-B) / (One + BX) ) is correct +// +// X = (-1)^s * 2^k * 1. x1 x2 ... x52 +// +// Define X` = 0 if k >= 5; and X` = |X| otherwise +// Define One = 0 if k >= 5; and One = 1 otherwise +// Define B = 0 if k <= -6; B = 2^k * 1.x1 x2 x3 x4 1 if -5 <= k <= 4 +// Define B = 2^5 * 1.0 0 ... 0 if k >= 5 +// +// Tau is 0 if k <= -6; +// Tau is atan( B ) if -5 <= k <= 4 +// Tau is pi/2 if k >= 5 +// +// Special cases: +// atan(NaN) = quiet NaN +// atan(+/-INF) = +/-Pi/2 +// atan(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin atan +ENTRY(atan) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_atan.1: + pushq %rsi +..___tag_value_atan.3: + movsd %xmm0, (%rsp) +..B1.2: + movq $0xffff000000000000, %r8 + movd %r8, %xmm3 + movq ONEMASK(%rip), %xmm5 + movq $0x800000000000, %r9 + movd %r9, %xmm4 + pextrw $3, %xmm0, %edx + andpd %xmm0, %xmm3 + pshufd $68, %xmm0, %xmm1 + orpd %xmm4, %xmm3 + movl %edx, %eax + andl $32767, %edx + subl $16288, %edx + cmpl $159, %edx + ja .L_2TAG_PACKET_0.0.1 + mulsd %xmm3, %xmm1 + subsd %xmm3, %xmm0 + addsd %xmm5, %xmm1 + divsd %xmm1, %xmm0 + addl $1, %edx + movq a2(%rip), %xmm2 + movq b2(%rip), %xmm4 + andl $32768, %eax + xorpd %xmm7, %xmm7 + pinsrw $3, %eax, %xmm7 + addl %edx, %edx + lea atan_tbl(%rip), %r8 + movq (%r8,%rdx,8), %xmm6 + movq 8(%r8,%rdx,8), %xmm5 + xorpd %xmm7, %xmm5 + xorpd %xmm7, %xmm6 + movq 8+a2(%rip), %xmm7 + movddup %xmm0, %xmm1 + mulsd %xmm0, %xmm0 + movddup %xmm1, %xmm3 + addsd %xmm6, %xmm1 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm4 + subsd %xmm1, %xmm6 + mulsd %xmm0, %xmm4 + addsd %xmm7, %xmm2 + mulsd %xmm3, %xmm0 + addsd %xmm3, %xmm6 + mulsd %xmm2, %xmm0 + addsd 8+b2(%rip), %xmm4 + addsd %xmm5, %xmm6 + mulsd %xmm4, %xmm0 + addsd %xmm6, %xmm0 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_1.0.1 +.L_2TAG_PACKET_0.0.1: + addl $944, %edx + cmpl $1103, %edx + ja .L_2TAG_PACKET_2.0.1 + movq a2(%rip), %xmm4 + movq b2(%rip), %xmm7 + movq (%rsp), %xmm0 + mulsd %xmm1, %xmm1 + movq 8+a2(%rip), %xmm2 + movq 8+b2(%rip), %xmm5 + mulsd %xmm1, %xmm4 + addsd %xmm1, %xmm7 + movq %xmm1, %xmm6 + mulsd %xmm0, %xmm1 + addsd %xmm4, %xmm2 + mulsd %xmm6, %xmm7 + mulsd %xmm1, %xmm2 + addsd %xmm5, %xmm7 + mulsd %xmm7, %xmm2 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_1.0.1 +.L_2TAG_PACKET_2.0.1: + addl $15344, %edx + cmpl $16368, %edx + ja .L_2TAG_PACKET_3.0.1 + movq (%rsp), %xmm0 + movq (%rsp), %xmm1 + cmpl $16, %edx + jae .L_2TAG_PACKET_1.0.1 + mulsd %xmm0, %xmm1 + jmp .L_2TAG_PACKET_1.0.1 +.L_2TAG_PACKET_3.0.1: + cmpl $17392, %edx + jae .L_2TAG_PACKET_4.0.1 + movq $0xbff0000000000000, %r8 + movd %r8, %xmm1 + divsd %xmm0, %xmm1 + movq a2(%rip), %xmm2 + movq b2(%rip), %xmm4 + andl $32768, %eax + xorpd %xmm7, %xmm7 + pinsrw $3, %eax, %xmm7 + addl %edx, %edx + movq pi_table(%rip), %xmm6 + movq 8+pi_table(%rip), %xmm5 + xorpd %xmm7, %xmm5 + xorpd %xmm7, %xmm6 + movq 8+a2(%rip), %xmm7 + movddup %xmm1, %xmm0 + mulsd %xmm1, %xmm1 + movddup %xmm0, %xmm3 + addsd %xmm6, %xmm0 + mulsd %xmm1, %xmm2 + addsd %xmm1, %xmm4 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm4 + addsd %xmm7, %xmm2 + mulsd %xmm3, %xmm1 + addsd %xmm3, %xmm6 + mulsd %xmm2, %xmm1 + addsd 8+b2(%rip), %xmm4 + addsd %xmm5, %xmm6 + mulsd %xmm4, %xmm1 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_1.0.1 +.L_2TAG_PACKET_4.0.1: + movq (%rsp), %xmm4 + movq SGNMASK(%rip), %xmm0 + movq pi_table(%rip), %xmm2 + movq 8+pi_table(%rip), %xmm3 + movd %xmm1, %eax + psrlq $32, %xmm1 + movd %xmm1, %edx + andl $2147483647, %edx + cmpl $2146435072, %edx + jae .L_2TAG_PACKET_5.0.1 +.L_2TAG_PACKET_6.0.1: + andnpd %xmm4, %xmm0 + orpd %xmm0, %xmm2 + orpd %xmm3, %xmm0 + addsd %xmm2, %xmm0 + jmp .L_2TAG_PACKET_1.0.1 +.L_2TAG_PACKET_5.0.1: + subl $2146435072, %edx + orl %edx, %eax + cmpl $0, %eax + je .L_2TAG_PACKET_6.0.1 + movq %xmm4, %xmm0 + addsd %xmm0, %xmm0 +.L_2TAG_PACKET_1.0.1: +..B1.3: + popq %rcx +..___tag_value_atan.4: + ret +..___tag_value_atan.5: +END(atan) +# -- End atan + .section .rodata, "a" + .align 4 + .align 4 +ONEMASK: + .long 0 + .long 1072693248 + .type ONEMASK,@object + .size ONEMASK,8 + .align 4 +a2: + .long 2006262985 + .long 1069310863 + .long 2358449471 + .long 3217342131 + .type a2,@object + .size a2,16 + .align 4 +b2: + .long 3845454352 + .long 1069952297 + .long 2829679149 + .long 1073771565 + .type b2,@object + .size b2,16 + .align 4 +atan_tbl: + .long 0 + .long 0 + .long 0 + .long 0 + .long 3819695742 + .long 1067482761 + .long 2398680355 + .long 3155462074 + .long 2998791009 + .long 1067548225 + .long 3868465248 + .long 3157182472 + .long 3339424991 + .long 1067613680 + .long 3296670360 + .long 1010752543 + .long 2710002256 + .long 1067679126 + .long 3403896007 + .long 1010910768 + .long 3275701428 + .long 1067744562 + .long 119959933 + .long 1011482843 + .long 2908636881 + .long 1067809988 + .long 2464489612 + .long 1011545526 + .long 3777889398 + .long 1067875403 + .long 3262682165 + .long 1009703919 + .long 3759667419 + .long 1067940807 + .long 1838130851 + .long 3157373556 + .long 732369940 + .long 1068006200 + .long 1203428313 + .long 1010055371 + .long 1166616461 + .long 1068071580 + .long 2901274051 + .long 3158549977 + .long 2945472892 + .long 1068136947 + .long 3726120658 + .long 1009762715 + .long 3954480976 + .long 1068202301 + .long 1289173457 + .long 1009429861 + .long 2081752829 + .long 1068267642 + .long 1836909874 + .long 1006212095 + .long 3807999788 + .long 1068332968 + .long 2172459940 + .long 3156162078 + .long 2731789884 + .long 1068398280 + .long 3450718392 + .long 3159216547 + .long 1044477961 + .long 1068463577 + .long 2230553229 + .long 1011424339 + .long 1486930287 + .long 1068530218 + .long 2861547474 + .long 1012041376 + .long 2293016881 + .long 1068595466 + .long 136843272 + .long 1012684797 + .long 201518157 + .long 1068660680 + .long 63231984 + .long 1012427198 + .long 4054234584 + .long 1068725856 + .long 3927006960 + .long 1011878955 + .long 1246477213 + .long 1068790995 + .long 1494265652 + .long 3155219350 + .long 678186699 + .long 1068856093 + .long 1264361424 + .long 3159256693 + .long 2690594995 + .long 1068921148 + .long 3906996379 + .long 1009288267 + .long 3362611517 + .long 1068986159 + .long 1650970041 + .long 3158331771 + .long 3102162111 + .long 1069051124 + .long 365917035 + .long 3160264153 + .long 2352611067 + .long 1069116041 + .long 4008970190 + .long 3159478182 + .long 1594134794 + .long 1069180908 + .long 466690178 + .long 1012526501 + .long 1345079306 + .long 1069245723 + .long 2268273568 + .long 3160164092 + .long 2163300970 + .long 1069310484 + .long 2750834800 + .long 3158113482 + .long 352522716 + .long 1069375190 + .long 1750411372 + .long 1011790845 + .long 848541647 + .long 1069439838 + .long 2164207573 + .long 1011698350 + .long 40647312 + .long 1069504427 + .long 2949165434 + .long 3159107267 + .long 2216766270 + .long 1069574357 + .long 2197920765 + .long 3161055954 + .long 1090914384 + .long 1069638757 + .long 2330454674 + .long 1013365998 + .long 387601244 + .long 1069703022 + .long 3185681168 + .long 1013434071 + .long 3991640484 + .long 1069767144 + .long 1313211590 + .long 3161087959 + .long 3322489502 + .long 1069831118 + .long 3013977995 + .long 1013053011 + .long 3121698570 + .long 1069894936 + .long 4069015667 + .long 1013023362 + .long 4289964660 + .long 1069958591 + .long 1736191156 + .long 3158266731 + .long 3903312386 + .long 1070022077 + .long 1833592413 + .long 3159731471 + .long 3818449864 + .long 1070085387 + .long 851036429 + .long 3159730451 + .long 2097480306 + .long 1070148515 + .long 3506390884 + .long 3160462302 + .long 1611694502 + .long 1070211454 + .long 2785735540 + .long 3160465144 + .long 1464694796 + .long 1070274198 + .long 4229277299 + .long 3159907000 + .long 1299612775 + .long 1070336741 + .long 4116653788 + .long 3160427739 + .long 1310544789 + .long 1070399077 + .long 1064430331 + .long 1013218202 + .long 2253168030 + .long 1070461200 + .long 1405044609 + .long 3157623179 + .long 1159567373 + .long 1070523105 + .long 2353445521 + .long 3159992176 + .long 1359373750 + .long 1070605818 + .long 1748171336 + .long 3161879263 + .long 908341706 + .long 1070667034 + .long 3372710815 + .long 3161775245 + .long 1743027350 + .long 1070727765 + .long 687089934 + .long 3160507171 + .long 2055355646 + .long 1070787992 + .long 2392855242 + .long 1013682469 + .long 690426164 + .long 1070847697 + .long 1103926666 + .long 1014052810 + .long 1483247847 + .long 1070906862 + .long 2082645847 + .long 3161345479 + .long 392040270 + .long 1070965472 + .long 2407720023 + .long 1014053754 + .long 2673846014 + .long 1071023511 + .long 1293605532 + .long 3158464385 + .long 1384215810 + .long 1071080967 + .long 2446095872 + .long 3159216407 + .long 3101660631 + .long 1071137826 + .long 698040758 + .long 1014855328 + .long 2094057058 + .long 1071194078 + .long 2282048339 + .long 1014040385 + .long 1712750594 + .long 1071249712 + .long 1204372378 + .long 3162276464 + .long 1411515787 + .long 1071304719 + .long 949080808 + .long 1015006403 + .long 931538085 + .long 1071359091 + .long 3027127039 + .long 1014307233 + .long 179139065 + .long 1071412821 + .long 4285547492 + .long 3161934731 + .long 3387721259 + .long 1071465902 + .long 373225773 + .long 1013486625 + .long 2132236852 + .long 1071544299 + .long 3250533429 + .long 1014031677 + .long 1942070284 + .long 1071645596 + .long 1237964179 + .long 3163239113 + .long 1532707802 + .long 1071695380 + .long 330645583 + .long 1012495610 + .long 2294184979 + .long 1071743834 + .long 3959472897 + .long 1015833116 + .long 3805060714 + .long 1071790961 + .long 2671256142 + .long 1013727772 + .long 2215037898 + .long 1071836770 + .long 2683359117 + .long 1015831902 + .long 483661594 + .long 1071881273 + .long 836288326 + .long 3162648643 + .long 1534679894 + .long 1071924486 + .long 373258696 + .long 3162470096 + .long 1538714628 + .long 1071966430 + .long 3199433068 + .long 1015325501 + .long 527642555 + .long 1072007128 + .long 3636832592 + .long 3161843145 + .long 291339150 + .long 1072046605 + .long 890169537 + .long 3160586117 + .long 2450210201 + .long 1072084888 + .long 1636353294 + .long 3163193400 + .long 2411367951 + .long 1072122007 + .long 374899873 + .long 1011331750 + .long 681549971 + .long 1072157992 + .long 506411689 + .long 1015373954 + .long 1466745541 + .long 1072192873 + .long 2143860931 + .long 1013364334 + .long 2845622366 + .long 1072226682 + .long 2869178209 + .long 3162423682 + .long 2838871438 + .long 1072275456 + .long 3742223599 + .long 1014338577 + .long 4200275274 + .long 1072337034 + .long 1566539915 + .long 3161839550 + .long 3034733530 + .long 1072394897 + .long 652621408 + .long 3162261964 + .long 3207412993 + .long 1072449290 + .long 3206124665 + .long 1014408733 + .long 624461478 + .long 1072500450 + .long 932437485 + .long 1015204343 + .long 767665908 + .long 1072548600 + .long 1037911952 + .long 3163527627 + .long 1110773639 + .long 1072593952 + .long 2371517912 + .long 3160465741 + .long 1940828530 + .long 1072636704 + .long 2731408428 + .long 3162895795 + .long 1911329388 + .long 1072677041 + .long 1773089615 + .long 3159569267 + .long 1764715788 + .long 1072704191 + .long 691346949 + .long 3164069946 + .long 3332979233 + .long 1072722195 + .long 3550733983 + .long 1014770628 + .long 1321870254 + .long 1072739231 + .long 1415315820 + .long 1016224052 + .long 3657429030 + .long 1072755365 + .long 3910539033 + .long 1015966402 + .long 4197624557 + .long 1072770661 + .long 2333399254 + .long 3164546480 + .long 1512059493 + .long 1072785177 + .long 2701510318 + .long 1016178092 + .long 453379037 + .long 1072798965 + .long 4046344253 + .long 3162814364 + .long 1942345162 + .long 1072818388 + .long 621134147 + .long 1016335195 + .long 4210176273 + .long 1072842164 + .long 2701013387 + .long 3164326619 + .long 4185644010 + .long 1072863795 + .long 4163699341 + .long 1016203112 + .long 679688788 + .long 1072883543 + .long 4147276762 + .long 1014066750 + .long 29432865 + .long 1072901630 + .long 970415797 + .long 1016902063 + .long 4070721092 + .long 1072918247 + .long 2539004411 + .long 3163736096 + .long 2252468843 + .long 1072933561 + .long 3424082887 + .long 3163407177 + .long 2929724825 + .long 1072947712 + .long 3661482235 + .long 3163846989 + .long 1377513368 + .long 1072960824 + .long 3987926680 + .long 1013647908 + .long 1031632908 + .long 1072973003 + .long 3672217151 + .long 1016614619 + .long 2516508130 + .long 1072984342 + .long 545855020 + .long 3162728930 + .long 3792452178 + .long 1072994923 + .long 3420119467 + .long 1016471430 + .long 3147791459 + .long 1073004818 + .long 1342204979 + .long 1013937254 + .long 999189752 + .long 1073014090 + .long 1006335472 + .long 3162850919 + .long 711011011 + .long 1073022794 + .long 4633488 + .long 3162966895 + .long 15640363 + .long 1073030980 + .long 1686389560 + .long 3164376226 + .long 1218463589 + .long 1073042382 + .long 1526837110 + .long 3163533985 + .long 2538470555 + .long 1073056144 + .long 2273304406 + .long 3163784996 + .long 1229720947 + .long 1073068489 + .long 2971628206 + .long 3162356540 + .long 3115427016 + .long 1073079621 + .long 4215132957 + .long 3164282762 + .long 4030612557 + .long 1073089709 + .long 1913251691 + .long 3163671292 + .long 2728521257 + .long 1073098892 + .long 2861089500 + .long 1015454459 + .long 1118696283 + .long 1073107285 + .long 1628948053 + .long 1016179658 + .long 2682711255 + .long 1073114984 + .long 2906306266 + .long 1014142643 + .long 2073898081 + .long 1073122072 + .long 1322740454 + .long 3164497217 + .long 1403700297 + .long 1073128618 + .long 416137895 + .long 3162781466 + .long 2502685617 + .long 1073134681 + .long 3242008732 + .long 1014593495 + .long 1531926851 + .long 1073140313 + .long 1362708094 + .long 1016517604 + .long 3572814411 + .long 1073145557 + .long 3709790527 + .long 1012646874 + .long 1695536111 + .long 1073150453 + .long 3980346340 + .long 1016705136 + .long 2363057203 + .long 1073155033 + .long 2551194792 + .long 1012569695 + .long 2873365682 + .long 1073159327 + .long 3181154748 + .long 1017041450 + .long 1053384691 + .long 1073165288 + .long 3074536879 + .long 1016965660 + .long 3270542712 + .long 1073172451 + .long 2535319415 + .long 3163051778 + .long 1353631484 + .long 1073178850 + .long 1173833755 + .long 1015534537 + .long 3511218460 + .long 1073184599 + .long 1243608109 + .long 3161592122 + .long 4121259284 + .long 1073189793 + .long 398584912 + .long 3163829923 + .long 1193862106 + .long 1073194509 + .long 1873745539 + .long 3163802819 + .long 3861949790 + .long 1073198808 + .long 3841261147 + .long 1015587248 + .long 1486904578 + .long 1073202745 + .long 1634726776 + .long 3163847886 + .long 2879153715 + .long 1073206362 + .long 200456242 + .long 3164138657 + .long 385353253 + .long 1073209698 + .long 1186355517 + .long 1014887155 + .long 1125865839 + .long 1073212783 + .long 203561262 + .long 3161244927 + .long 1221361475 + .long 1073215645 + .long 3382476563 + .long 1014936138 + .long 2077323573 + .long 1073218307 + .long 1005121005 + .long 3164430752 + .long 215611373 + .long 1073220790 + .long 353198764 + .long 3164485137 + .long 2347419265 + .long 1073223110 + .long 1103143360 + .long 1016542137 + .long 1379112765 + .long 1073225284 + .long 381583533 + .long 3162870833 + .long 3891198463 + .long 1073228298 + .long 1771275754 + .long 1014654681 + .long 3395914051 + .long 1073231917 + .long 2350900914 + .long 3164013978 + .long 2799919478 + .long 1073235146 + .long 2893950164 + .long 3163260901 + .long 1138673476 + .long 1073238045 + .long 2622204785 + .long 3164174388 + .long 3408855940 + .long 1073240661 + .long 2800881650 + .long 1016008624 + .long 2044858738 + .long 1073243035 + .long 604544785 + .long 1017022901 + .long 2578795176 + .long 1073245198 + .long 2557332925 + .long 1016135165 + .long 4196285314 + .long 1073247177 + .long 2032365307 + .long 1016194735 + .long 224877747 + .long 1073248996 + .long 497926916 + .long 1016947111 + .long 3271386490 + .long 1073250671 + .long 2689994846 + .long 1016631513 + .long 813635989 + .long 1073252221 + .long 747035277 + .long 3164530136 + .long 369829519 + .long 1073253658 + .long 2182033858 + .long 3163190340 + .long 1187679052 + .long 1073254994 + .long 673954443 + .long 1016149821 + .long 4232586098 + .long 1073256239 + .long 497775200 + .long 3162179015 + .long 426690558 + .long 1073257404 + .long 3063343247 + .long 1016865578 + .long 1624065902 + .long 1073258494 + .long 1354224996 + .long 3163503778 + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .type atan_tbl,@object + .size atan_tbl,2592 + .align 4 +pi_table: + .long 1413754136 + .long 1073291771 + .long 856972295 + .long 1016178214 + .type pi_table,@object + .size pi_table,16 + .align 4 +SGNMASK: + .long 4294967295 + .long 2147483647 + .type SGNMASK,@object + .size SGNMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_atan.1-. + .4byte ..___tag_value_atan.5-..___tag_value_atan.1 + .2byte 0x0400 + .4byte ..___tag_value_atan.3-..___tag_value_atan.1 + .2byte 0x100e + .byte 0x04 + .4byte ..___tag_value_atan.4-..___tag_value_atan.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/s_cbrt.S b/libm/x86_64/s_cbrt.S new file mode 100644 index 0000000..4aa4373 --- /dev/null +++ b/libm/x86_64/s_cbrt.S @@ -0,0 +1,754 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Assume x=2^{3*k+j} * 1.b1 b2 ... b5 b6 ... b52, where j = 0,1,2. +// Let r=(x*2^{-3k-j} - 1.b1 b2 ... b5 1)* rcp[b1 b2 ..b5], +// where rcp[b1 b2 .. b5]=1/(1.b1 b2 b3 b4 b5 1) in double precision +// cbrt(2^j * 1. b1 b2 .. b5 1) is approximated as T[j][b1..b5]+D[j][b1..b5] +// (T stores the high 53 bits, D stores the low order bits) +// Result=2^k*T+(2^k*T*r)*P+2^k*D +// where P=p1+p2*r+..+p8*r^7 +// +// Special cases: +// cbrt(NaN) = quiet NaN, and raise invalid exception +// cbrt(INF) = that INF +// cbrt(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin cbrt +ENTRY(cbrt) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_cbrt.1: + subq $24, %rsp +..___tag_value_cbrt.3: + movsd %xmm0, (%rsp) +..B1.2: + movq %xmm0, %xmm7 + movl $524032, %edx + movsd EXP_MSK3(%rip), %xmm5 + movsd EXP_MSK2(%rip), %xmm3 + psrlq $44, %xmm7 + pextrw $0, %xmm7, %ecx + movd %xmm7, %eax + movsd EXP_MASK(%rip), %xmm1 + movsd SIG_MASK(%rip), %xmm2 + andl $248, %ecx + lea rcp_table(%rip), %r8 + movsd (%rcx,%r8), %xmm4 + movq %rax, %r9 + andl %eax, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_0.0.1 + cmpl $524032, %edx + je .L_2TAG_PACKET_1.0.1 + shrl $8, %edx + shrq $8, %r9 + andpd %xmm0, %xmm2 + andpd %xmm5, %xmm0 + orpd %xmm2, %xmm3 + orpd %xmm0, %xmm1 + movapd coeff_table(%rip), %xmm5 + movl $5462, %eax + movapd 16+coeff_table(%rip), %xmm6 + mull %edx + movq %r9, %rdx + andq $2047, %r9 + shrl $14, %eax + andl $2048, %edx + subq %rax, %r9 + subq %rax, %r9 + subq %rax, %r9 + shlq $8, %r9 + addl $682, %eax + orl %edx, %eax + movd %eax, %xmm7 + addq %r9, %rcx + psllq $52, %xmm7 +.L_2TAG_PACKET_2.0.1: + movapd 32+coeff_table(%rip), %xmm2 + movapd 48+coeff_table(%rip), %xmm0 + subsd %xmm3, %xmm1 + movq %xmm7, %xmm3 + lea cbrt_table(%rip), %r8 + mulsd (%rcx,%r8), %xmm7 + mulsd %xmm4, %xmm1 + lea D_table(%rip), %r8 + mulsd (%rcx,%r8), %xmm3 + movapd %xmm1, %xmm4 + unpcklpd %xmm1, %xmm1 + mulpd %xmm1, %xmm5 + mulpd %xmm1, %xmm6 + mulpd %xmm1, %xmm1 + addpd %xmm5, %xmm2 + addpd %xmm6, %xmm0 + mulpd %xmm1, %xmm2 + mulpd %xmm1, %xmm1 + mulsd %xmm7, %xmm4 + addpd %xmm2, %xmm0 + mulsd %xmm0, %xmm1 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + mulsd %xmm4, %xmm0 + addsd %xmm3, %xmm0 + addsd %xmm7, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_0.0.1: + mulsd SCALE63(%rip), %xmm0 + movq %xmm0, %xmm7 + movl $524032, %edx + psrlq $44, %xmm7 + pextrw $0, %xmm7, %ecx + movd %xmm7, %eax + andl $248, %ecx + lea rcp_table(%rip), %r8 + movsd (%rcx,%r8), %xmm4 + movq %rax, %r9 + andl %eax, %edx + shrl $8, %edx + shrq $8, %r9 + cmpl $0, %edx + je .L_2TAG_PACKET_3.0.1 + andpd %xmm0, %xmm2 + andpd %xmm5, %xmm0 + orpd %xmm2, %xmm3 + orpd %xmm0, %xmm1 + movapd coeff_table(%rip), %xmm5 + movl $5462, %eax + movapd 16+coeff_table(%rip), %xmm6 + mull %edx + movq %r9, %rdx + andq $2047, %r9 + shrl $14, %eax + andl $2048, %edx + subq %rax, %r9 + subq %rax, %r9 + subq %rax, %r9 + shlq $8, %r9 + addl $661, %eax + orl %edx, %eax + movd %eax, %xmm7 + addq %r9, %rcx + psllq $52, %xmm7 + jmp .L_2TAG_PACKET_2.0.1 +.L_2TAG_PACKET_3.0.1: + cmpq $0, %r9 + jne .L_2TAG_PACKET_4.0.1 + xorpd %xmm0, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_4.0.1: + movsd ZERON(%rip), %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_1.0.1: + movl 4(%rsp), %eax + movl (%rsp), %edx + movl %eax, %ecx + andl $2147483647, %ecx + cmpl $2146435072, %ecx + ja .L_2TAG_PACKET_5.0.1 + cmpl $0, %edx + jne .L_2TAG_PACKET_5.0.1 + cmpl $2146435072, %eax + jne .L_2TAG_PACKET_6.0.1 + movsd INF(%rip), %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_6.0.1: + movsd NEG_INF(%rip), %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_5.0.1: + movsd (%rsp), %xmm0 + addsd %xmm0, %xmm0 + movq %xmm0, 8(%rsp) +.L_2TAG_PACKET_7.0.1: +..B1.4: + addq $24, %rsp +..___tag_value_cbrt.4: + ret +..___tag_value_cbrt.5: +END(cbrt) +# -- End cbrt + .section .rodata, "a" + .align 16 + .align 16 +coeff_table: + .long 1553778919 + .long 3213899486 + .long 3534952507 + .long 3215266280 + .long 1646371399 + .long 3214412045 + .long 477218588 + .long 3216798151 + .long 3582521621 + .long 1066628362 + .long 1007461464 + .long 1068473053 + .long 889629714 + .long 1067378449 + .long 1431655765 + .long 1070945621 + .type coeff_table,@object + .size coeff_table,64 + .align 4 +EXP_MSK3: + .long 4294967295 + .long 1048575 + .type EXP_MSK3,@object + .size EXP_MSK3,8 + .align 4 +EXP_MSK2: + .long 0 + .long 3220193280 + .type EXP_MSK2,@object + .size EXP_MSK2,8 + .align 4 +EXP_MASK: + .long 0 + .long 3220176896 + .type EXP_MASK,@object + .size EXP_MASK,8 + .align 4 +SIG_MASK: + .long 0 + .long 1032192 + .type SIG_MASK,@object + .size SIG_MASK,8 + .align 4 +rcp_table: + .long 528611360 + .long 3220144632 + .long 2884679527 + .long 3220082993 + .long 1991868891 + .long 3220024928 + .long 2298714891 + .long 3219970134 + .long 58835168 + .long 3219918343 + .long 3035110223 + .long 3219869313 + .long 1617585086 + .long 3219822831 + .long 2500867033 + .long 3219778702 + .long 4241943008 + .long 3219736752 + .long 258732970 + .long 3219696825 + .long 404232216 + .long 3219658776 + .long 2172167368 + .long 3219622476 + .long 1544257904 + .long 3219587808 + .long 377579543 + .long 3219554664 + .long 1616385542 + .long 3219522945 + .long 813783277 + .long 3219492562 + .long 3940743189 + .long 3219463431 + .long 2689777499 + .long 3219435478 + .long 1700977147 + .long 3219408632 + .long 3169102082 + .long 3219382828 + .long 327235604 + .long 3219358008 + .long 1244336319 + .long 3219334115 + .long 1300311200 + .long 3219311099 + .long 3095471925 + .long 3219288912 + .long 2166487928 + .long 3219267511 + .long 2913108253 + .long 3219246854 + .long 293672978 + .long 3219226904 + .long 288737297 + .long 3219207624 + .long 1810275472 + .long 3219188981 + .long 174592167 + .long 3219170945 + .long 3539053052 + .long 3219153485 + .long 2164392968 + .long 3219136576 + .type rcp_table,@object + .size rcp_table,256 + .align 4 +cbrt_table: + .long 572345495 + .long 1072698681 + .long 1998204467 + .long 1072709382 + .long 3861501553 + .long 1072719872 + .long 2268192434 + .long 1072730162 + .long 2981979308 + .long 1072740260 + .long 270859143 + .long 1072750176 + .long 2958651392 + .long 1072759916 + .long 313113243 + .long 1072769490 + .long 919449400 + .long 1072778903 + .long 2809328903 + .long 1072788162 + .long 2222981587 + .long 1072797274 + .long 2352530781 + .long 1072806244 + .long 594152517 + .long 1072815078 + .long 1555767199 + .long 1072823780 + .long 4282421314 + .long 1072832355 + .long 2355578597 + .long 1072840809 + .long 1162590619 + .long 1072849145 + .long 797864051 + .long 1072857367 + .long 431273680 + .long 1072865479 + .long 2669831148 + .long 1072873484 + .long 733477752 + .long 1072881387 + .long 4280220604 + .long 1072889189 + .long 801961634 + .long 1072896896 + .long 2915370760 + .long 1072904508 + .long 1159613482 + .long 1072912030 + .long 2689944798 + .long 1072919463 + .long 1248687822 + .long 1072926811 + .long 2967951030 + .long 1072934075 + .long 630170432 + .long 1072941259 + .long 3760898254 + .long 1072948363 + .long 0 + .long 1072955392 + .long 2370273294 + .long 1072962345 + .long 1261754802 + .long 1072972640 + .long 546334065 + .long 1072986123 + .long 1054893830 + .long 1072999340 + .long 1571187597 + .long 1073012304 + .long 1107975175 + .long 1073025027 + .long 3606909377 + .long 1073037519 + .long 1113616747 + .long 1073049792 + .long 4154744632 + .long 1073061853 + .long 3358931423 + .long 1073073713 + .long 4060702372 + .long 1073085379 + .long 747576176 + .long 1073096860 + .long 3023138255 + .long 1073108161 + .long 1419988548 + .long 1073119291 + .long 1914185305 + .long 1073130255 + .long 294389948 + .long 1073141060 + .long 3761802570 + .long 1073151710 + .long 978281566 + .long 1073162213 + .long 823148820 + .long 1073172572 + .long 2420954441 + .long 1073182792 + .long 3815449908 + .long 1073192878 + .long 2046058587 + .long 1073202835 + .long 1807524753 + .long 1073212666 + .long 2628681401 + .long 1073222375 + .long 3225667357 + .long 1073231966 + .long 1555307421 + .long 1073241443 + .long 3454043099 + .long 1073250808 + .long 1208137896 + .long 1073260066 + .long 3659916772 + .long 1073269218 + .long 1886261264 + .long 1073278269 + .long 3593647839 + .long 1073287220 + .long 3086012205 + .long 1073296075 + .long 2769796922 + .long 1073304836 + .long 888716057 + .long 1073317807 + .long 2201465623 + .long 1073334794 + .long 164369365 + .long 1073351447 + .long 3462666733 + .long 1073367780 + .long 2773905457 + .long 1073383810 + .long 1342879088 + .long 1073399550 + .long 2543933975 + .long 1073415012 + .long 1684477781 + .long 1073430209 + .long 3532178543 + .long 1073445151 + .long 1147747300 + .long 1073459850 + .long 1928031793 + .long 1073474314 + .long 2079717015 + .long 1073488553 + .long 4016765315 + .long 1073502575 + .long 3670431139 + .long 1073516389 + .long 3549227225 + .long 1073530002 + .long 11637607 + .long 1073543422 + .long 588220169 + .long 1073556654 + .long 2635407503 + .long 1073569705 + .long 2042029317 + .long 1073582582 + .long 1925128962 + .long 1073595290 + .long 4136375664 + .long 1073607834 + .long 759964600 + .long 1073620221 + .long 4257606771 + .long 1073632453 + .long 297278907 + .long 1073644538 + .long 3655053093 + .long 1073656477 + .long 2442253172 + .long 1073668277 + .long 1111876799 + .long 1073679941 + .long 3330973139 + .long 1073691472 + .long 3438879452 + .long 1073702875 + .long 3671565478 + .long 1073714153 + .long 1317849547 + .long 1073725310 + .long 1642364115 + .long 1073736348 + .type cbrt_table,@object + .size cbrt_table,768 + .align 4 +D_table: + .long 4050900474 + .long 1014427190 + .long 1157977860 + .long 1016444461 + .long 1374568199 + .long 1017271387 + .long 2809163288 + .long 1016882676 + .long 3742377377 + .long 1013168191 + .long 3101606597 + .long 1017541672 + .long 65224358 + .long 1017217597 + .long 2691591250 + .long 1017266643 + .long 4020758549 + .long 1017689313 + .long 1316310992 + .long 1018030788 + .long 1031537856 + .long 1014090882 + .long 3261395239 + .long 1016413641 + .long 886424999 + .long 1016313335 + .long 3114776834 + .long 1014195875 + .long 1681120620 + .long 1017825416 + .long 1329600273 + .long 1016625740 + .long 465474623 + .long 1017097119 + .long 4251633980 + .long 1017169077 + .long 1986990133 + .long 1017710645 + .long 752958613 + .long 1017159641 + .long 2216216792 + .long 1018020163 + .long 4282860129 + .long 1015924861 + .long 1557627859 + .long 1016039538 + .long 3889219754 + .long 1018086237 + .long 3684996408 + .long 1017353275 + .long 723532103 + .long 1017717141 + .long 2951149676 + .long 1012528470 + .long 831890937 + .long 1017830553 + .long 1031212645 + .long 1017387331 + .long 2741737450 + .long 1017604974 + .long 2863311531 + .long 1003776682 + .long 4276736099 + .long 1013153088 + .long 4111778382 + .long 1015673686 + .long 1728065769 + .long 1016413986 + .long 2708718031 + .long 1018078833 + .long 1069335005 + .long 1015291224 + .long 700037144 + .long 1016482032 + .long 2904566452 + .long 1017226861 + .long 4074156649 + .long 1017622651 + .long 25019565 + .long 1015245366 + .long 3601952608 + .long 1015771755 + .long 3267129373 + .long 1017904664 + .long 503203103 + .long 1014921629 + .long 2122011730 + .long 1018027866 + .long 3927295461 + .long 1014189456 + .long 2790625147 + .long 1016024251 + .long 1330460186 + .long 1016940346 + .long 4033568463 + .long 1015538390 + .long 3695818227 + .long 1017509621 + .long 257573361 + .long 1017208868 + .long 3227697852 + .long 1017337964 + .long 234118548 + .long 1017169577 + .long 4009025803 + .long 1017278524 + .long 1948343394 + .long 1017749310 + .long 678398162 + .long 1018144239 + .long 3083864863 + .long 1016669086 + .long 2415453452 + .long 1017890370 + .long 175467344 + .long 1017330033 + .long 3197359580 + .long 1010339928 + .long 2071276951 + .long 1015941358 + .long 268372543 + .long 1016737773 + .long 938132959 + .long 1017389108 + .long 1816750559 + .long 1017337448 + .long 4119203749 + .long 1017152174 + .long 2578653878 + .long 1013108497 + .long 2470331096 + .long 1014678606 + .long 123855735 + .long 1016553320 + .long 1265650889 + .long 1014782687 + .long 3414398172 + .long 1017182638 + .long 1040773369 + .long 1016158401 + .long 3483628886 + .long 1016886550 + .long 4140499405 + .long 1016191425 + .long 3893477850 + .long 1016964495 + .long 3935319771 + .long 1009634717 + .long 2978982660 + .long 1015027112 + .long 2452709923 + .long 1017990229 + .long 3190365712 + .long 1015835149 + .long 4237588139 + .long 1015832925 + .long 2610678389 + .long 1017962711 + .long 2127316774 + .long 1017405770 + .long 824267502 + .long 1017959463 + .long 2165924042 + .long 1017912225 + .long 2774007076 + .long 1013257418 + .long 4123916326 + .long 1017582284 + .long 1976417958 + .long 1016959909 + .long 4092806412 + .long 1017711279 + .long 119251817 + .long 1015363631 + .long 3475418768 + .long 1017675415 + .long 1972580503 + .long 1015470684 + .long 815541017 + .long 1017517969 + .long 2429917451 + .long 1017397776 + .long 4062888482 + .long 1016749897 + .long 68284153 + .long 1017925678 + .long 2207779246 + .long 1016320298 + .long 1183466520 + .long 1017408657 + .long 143326427 + .long 1017060403 + .type D_table,@object + .size D_table,768 + .align 4 +SCALE63: + .long 0 + .long 1138753536 + .type SCALE63,@object + .size SCALE63,8 + .align 4 +ZERON: + .long 0 + .long 2147483648 + .type ZERON,@object + .size ZERON,8 + .align 4 +INF: + .long 0 + .long 2146435072 + .type INF,@object + .size INF,8 + .align 4 +NEG_INF: + .long 0 + .long 4293918720 + .type NEG_INF,@object + .size NEG_INF,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_cbrt.1-. + .4byte ..___tag_value_cbrt.5-..___tag_value_cbrt.1 + .2byte 0x0400 + .4byte ..___tag_value_cbrt.3-..___tag_value_cbrt.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_cbrt.4-..___tag_value_cbrt.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/s_cos.S b/libm/x86_64/s_cos.S new file mode 100644 index 0000000..ab5a0e1 --- /dev/null +++ b/libm/x86_64/s_cos.S @@ -0,0 +1,1275 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// 1. RANGE REDUCTION +// +// We perform an initial range reduction from X to r with +// +// X =~= N * pi/32 + r +// +// so that |r| <= pi/64 + epsilon. We restrict inputs to those +// where |N| <= 932560. Beyond this, the range reduction is +// insufficiently accurate. For extremely small inputs, +// denormalization can occur internally, impacting performance. +// This means that the main path is actually only taken for +// 2^-252 <= |X| < 90112. +// +// To avoid branches, we perform the range reduction to full +// accuracy each time. +// +// X - N * (P_1 + P_2 + P_3) +// +// where P_1 and P_2 are 32-bit numbers (so multiplication by N +// is exact) and P_3 is a 53-bit number. Together, these +// approximate pi well enough for all cases in the restricted +// range. +// +// The main reduction sequence is: +// +// y = 32/pi * x +// N = integer(y) +// (computed by adding and subtracting off SHIFTER) +// +// m_1 = N * P_1 +// m_2 = N * P_2 +// r_1 = x - m_1 +// r = r_1 - m_2 +// (this r can be used for most of the calculation) +// +// c_1 = r_1 - r +// m_3 = N * P_3 +// c_2 = c_1 - m_2 +// c = c_2 - m_3 +// +// 2. MAIN ALGORITHM +// +// The algorithm uses a table lookup based on B = M * pi / 32 +// where M = N mod 64. The stored values are: +// sigma closest power of 2 to cos(B) +// C_hl 53-bit cos(B) - sigma +// S_hi + S_lo 2 * 53-bit sin(B) +// +// The computation is organized as follows: +// +// sin(B + r + c) = [sin(B) + sigma * r] + +// r * (cos(B) - sigma) + +// sin(B) * [cos(r + c) - 1] + +// cos(B) * [sin(r + c) - r] +// +// which is approximately: +// +// [S_hi + sigma * r] + +// C_hl * r + +// S_lo + S_hi * [(cos(r) - 1) - r * c] + +// (C_hl + sigma) * [(sin(r) - r) + c] +// +// and this is what is actually computed. We separate this sum +// into four parts: +// +// hi + med + pols + corr +// +// where +// +// hi = S_hi + sigma r +// med = C_hl * r +// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r) +// corr = S_lo + c * ((C_hl + sigma) - S_hi * r) +// +// 3. POLYNOMIAL +// +// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) * +// (sin(r) - r) can be rearranged freely, since it is quite +// small, so we exploit parallelism to the fullest. +// +// psc4 = SC_4 * r_1 +// msc4 = psc4 * r +// r2 = r * r +// msc2 = SC_2 * r2 +// r4 = r2 * r2 +// psc3 = SC_3 + msc4 +// psc1 = SC_1 + msc2 +// msc3 = r4 * psc3 +// sincospols = psc1 + msc3 +// pols = sincospols * +// +// +// 4. CORRECTION TERM +// +// This is where the "c" component of the range reduction is +// taken into account; recall that just "r" is used for most of +// the calculation. +// +// -c = m_3 - c_2 +// -d = S_hi * r - (C_hl + sigma) +// corr = -c * -d + S_lo +// +// 5. COMPENSATED SUMMATIONS +// +// The two successive compensated summations add up the high +// and medium parts, leaving just the low parts to add up at +// the end. +// +// rs = sigma * r +// res_int = S_hi + rs +// k_0 = S_hi - res_int +// k_2 = k_0 + rs +// med = C_hl * r +// res_hi = res_int + med +// k_1 = res_int - res_hi +// k_3 = k_1 + med +// +// 6. FINAL SUMMATION +// +// We now add up all the small parts: +// +// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3 +// +// Now the overall result is just: +// +// res_hi + res_lo +// +// 7. SMALL ARGUMENTS +// +// Inputs with |X| < 2^-252 are treated specially as +// 1 - |x|. +// +// Special cases: +// cos(NaN) = quiet NaN, and raise invalid exception +// cos(INF) = NaN and raise invalid exception +// cos(0) = 1 +// +/******************************************************************************/ + +#include +# -- Begin cos +ENTRY(cos) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_cos.1: + pushq %rbx +..___tag_value_cos.3: + subq $16, %rsp +..___tag_value_cos.5: + movsd %xmm0, 8(%rsp) +..B1.2: + movl 12(%rsp), %eax + movq PI32INV(%rip), %xmm1 + andl $2147418112, %eax + subl $808452096, %eax + cmpl $281346048, %eax + ja .L_2TAG_PACKET_0.0.1 + mulsd %xmm0, %xmm1 + movapd ONEHALF(%rip), %xmm5 + movq SIGN_MASK(%rip), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %edx + cvtsi2sd %edx, %xmm1 + movapd P_2(%rip), %xmm2 + movq P_1(%rip), %xmm3 + mulsd %xmm1, %xmm3 + unpcklpd %xmm1, %xmm1 + addq $1865232, %rdx + movq %xmm0, %xmm4 + andq $63, %rdx + movapd SC_4(%rip), %xmm5 + lea Ctable(%rip), %rax + shlq $5, %rdx + addq %rdx, %rax + mulpd %xmm1, %xmm2 + subsd %xmm3, %xmm0 + mulsd P_3(%rip), %xmm1 + subsd %xmm3, %xmm4 + movq 8(%rax), %xmm7 + unpcklpd %xmm0, %xmm0 + movq %xmm4, %xmm3 + subsd %xmm2, %xmm4 + mulpd %xmm0, %xmm5 + subpd %xmm2, %xmm0 + movapd SC_2(%rip), %xmm6 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm2, %xmm3 + movapd (%rax), %xmm2 + subsd %xmm3, %xmm1 + movq 24(%rax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd SC_3(%rip), %xmm5 + mulsd (%rax), %xmm4 + addpd SC_1(%rip), %xmm6 + mulpd %xmm0, %xmm5 + movq %xmm3, %xmm0 + addsd 8(%rax), %xmm3 + mulpd %xmm7, %xmm1 + movq %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movq 8(%rax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%rax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm5, %xmm0 + addsd %xmm7, %xmm3 + addsd %xmm1, %xmm0 + addsd %xmm3, %xmm0 + addsd %xmm6, %xmm0 + unpckhpd %xmm6, %xmm6 + addsd %xmm6, %xmm0 + addsd %xmm4, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_0.0.1: + jg .L_2TAG_PACKET_1.0.1 + pextrw $3, %xmm0, %eax + andw $32767, %ax + pinsrw $3, %eax, %xmm0 + movq ONE(%rip), %xmm1 + subsd %xmm0, %xmm1 + movq %xmm1, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_1.0.1: + pextrw $3, %xmm0, %eax + andl $32752, %eax + cmpl $32752, %eax + je .L_2TAG_PACKET_2.0.1 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + subl $16224, %ecx + shrl $7, %ecx + andl $65532, %ecx + lea PI_INV_TABLE(%rip), %r11 + addq %r11, %rcx + movd %xmm0, %rax + movl 20(%rcx), %r10d + movl 24(%rcx), %r8d + movl %eax, %edx + shrq $21, %rax + orl $-2147483648, %eax + shrl $11, %eax + movl %r10d, %r9d + imulq %rdx, %r10 + imulq %rax, %r9 + imulq %rax, %r8 + movl 16(%rcx), %esi + movl 12(%rcx), %edi + movl %r10d, %r11d + shrq $32, %r10 + addq %r10, %r9 + addq %r8, %r11 + movl %r11d, %r8d + shrq $32, %r11 + addq %r11, %r9 + movl %esi, %r10d + imulq %rdx, %rsi + imulq %rax, %r10 + movl %edi, %r11d + imulq %rdx, %rdi + movl %esi, %ebx + shrq $32, %rsi + addq %rbx, %r9 + movl %r9d, %ebx + shrq $32, %r9 + addq %rsi, %r10 + addq %r9, %r10 + shlq $32, %rbx + orq %rbx, %r8 + imulq %rax, %r11 + movl 8(%rcx), %r9d + movl 4(%rcx), %esi + movl %edi, %ebx + shrq $32, %rdi + addq %rbx, %r10 + movl %r10d, %ebx + shrq $32, %r10 + addq %rdi, %r11 + addq %r10, %r11 + movq %r9, %rdi + imulq %rdx, %r9 + imulq %rax, %rdi + movl %r9d, %r10d + shrq $32, %r9 + addq %r10, %r11 + movl %r11d, %r10d + shrq $32, %r11 + addq %r9, %rdi + addq %r11, %rdi + movq %rsi, %r9 + imulq %rdx, %rsi + imulq %rax, %r9 + shlq $32, %r10 + orq %rbx, %r10 + movl (%rcx), %eax + movl %esi, %r11d + shrq $32, %rsi + addq %r11, %rdi + movl %edi, %r11d + shrq $32, %rdi + addq %rsi, %r9 + addq %rdi, %r9 + imulq %rax, %rdx + pextrw $3, %xmm0, %ebx + lea PI_INV_TABLE(%rip), %rdi + subq %rdi, %rcx + addl %ecx, %ecx + addl %ecx, %ecx + addl %ecx, %ecx + addl $19, %ecx + movl $32768, %esi + andl %ebx, %esi + shrl $4, %ebx + andl $2047, %ebx + subl $1023, %ebx + subl %ebx, %ecx + addq %rdx, %r9 + movl %ecx, %edx + addl $32, %edx + cmpl $1, %ecx + jl .L_2TAG_PACKET_3.0.1 + negl %ecx + addl $29, %ecx + shll %cl, %r9d + movl %r9d, %edi + andl $536870911, %r9d + testl $268435456, %r9d + jne .L_2TAG_PACKET_4.0.1 + shrl %cl, %r9d + movl $0, %ebx + shlq $32, %r9 + orq %r11, %r9 +.L_2TAG_PACKET_5.0.1: +.L_2TAG_PACKET_6.0.1: + cmpq $0, %r9 + je .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_8.0.1: + bsr %r9, %r11 + movl $29, %ecx + subl %r11d, %ecx + jle .L_2TAG_PACKET_9.0.1 + shlq %cl, %r9 + movq %r10, %rax + shlq %cl, %r10 + addl %ecx, %edx + negl %ecx + addl $64, %ecx + shrq %cl, %rax + shrq %cl, %r8 + orq %rax, %r9 + orq %r8, %r10 +.L_2TAG_PACKET_10.0.1: + cvtsi2sdq %r9, %xmm0 + shrq $1, %r10 + cvtsi2sdq %r10, %xmm3 + xorpd %xmm4, %xmm4 + shll $4, %edx + negl %edx + addl $16368, %edx + orl %esi, %edx + xorl %ebx, %edx + pinsrw $3, %edx, %xmm4 + movq PI_4(%rip), %xmm2 + movq 8+PI_4(%rip), %xmm6 + xorpd %xmm5, %xmm5 + subl $1008, %edx + pinsrw $3, %edx, %xmm5 + mulsd %xmm4, %xmm0 + shll $16, %esi + sarl $31, %esi + mulsd %xmm5, %xmm3 + movq %xmm0, %xmm1 + mulsd %xmm2, %xmm0 + shrl $29, %edi + addsd %xmm3, %xmm1 + mulsd %xmm2, %xmm3 + addl %esi, %edi + xorl %esi, %edi + mulsd %xmm1, %xmm6 + movl %edi, %eax + addsd %xmm3, %xmm6 + movq %xmm0, %xmm2 + addsd %xmm6, %xmm0 + subsd %xmm0, %xmm2 + addsd %xmm2, %xmm6 +.L_2TAG_PACKET_11.0.1: + movq PI32INV(%rip), %xmm1 + mulsd %xmm0, %xmm1 + movq ONEHALF(%rip), %xmm5 + movq SIGN_MASK(%rip), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %rdx + cvtsi2sdq %rdx, %xmm1 + movq P_1(%rip), %xmm3 + movapd P_2(%rip), %xmm2 + mulsd %xmm1, %xmm3 + unpcklpd %xmm1, %xmm1 + shll $3, %eax + addl $1865232, %edx + movq %xmm0, %xmm4 + addl %eax, %edx + andl $63, %edx + movapd SC_4(%rip), %xmm5 + lea Ctable(%rip), %rax + shll $5, %edx + addq %rdx, %rax + mulpd %xmm1, %xmm2 + subsd %xmm3, %xmm0 + mulsd P_3(%rip), %xmm1 + subsd %xmm3, %xmm4 + movq 8(%rax), %xmm7 + unpcklpd %xmm0, %xmm0 + movq %xmm4, %xmm3 + subsd %xmm2, %xmm4 + mulpd %xmm0, %xmm5 + subpd %xmm2, %xmm0 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm2, %xmm3 + movapd (%rax), %xmm2 + subsd %xmm3, %xmm1 + movq 24(%rax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + subsd %xmm6, %xmm1 + movapd SC_2(%rip), %xmm6 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd SC_3(%rip), %xmm5 + mulsd (%rax), %xmm4 + addpd SC_1(%rip), %xmm6 + mulpd %xmm0, %xmm5 + movq %xmm3, %xmm0 + addsd 8(%rax), %xmm3 + mulpd %xmm7, %xmm1 + movq %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movq 8(%rax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%rax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm0, %xmm5 + addsd %xmm7, %xmm3 + addsd %xmm5, %xmm1 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + unpckhpd %xmm6, %xmm6 + movq %xmm4, %xmm0 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_7.0.1: + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + movq $0, %r8 + cmpq $0, %r9 + jne .L_2TAG_PACKET_8.0.1 + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + cmpq $0, %r9 + jne .L_2TAG_PACKET_8.0.1 + xorpd %xmm0, %xmm0 + xorpd %xmm6, %xmm6 + jmp .L_2TAG_PACKET_11.0.1 +.L_2TAG_PACKET_9.0.1: + je .L_2TAG_PACKET_10.0.1 + negl %ecx + shrq %cl, %r10 + movq %r9, %rax + shrq %cl, %r9 + subl %ecx, %edx + negl %ecx + addl $64, %ecx + shlq %cl, %rax + orq %rax, %r10 + jmp .L_2TAG_PACKET_10.0.1 +.L_2TAG_PACKET_3.0.1: + negl %ecx + shlq $32, %r9 + orq %r11, %r9 + shlq %cl, %r9 + movq %r9, %rdi + testl $-2147483648, %r9d + jne .L_2TAG_PACKET_12.0.1 + shrl %cl, %r9d + movl $0, %ebx + shrq $3, %rdi + jmp .L_2TAG_PACKET_6.0.1 +.L_2TAG_PACKET_4.0.1: + shrl %cl, %r9d + movl $536870912, %ebx + shrl %cl, %ebx + shlq $32, %r9 + orq %r11, %r9 + shlq $32, %rbx + addl $536870912, %edi + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + jmp .L_2TAG_PACKET_5.0.1 +.L_2TAG_PACKET_12.0.1: + shrl %cl, %r9d + movq $0x100000000, %rbx + shrq %cl, %rbx + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + shrq $3, %rdi + addl $536870912, %edi + jmp .L_2TAG_PACKET_6.0.1 +.L_2TAG_PACKET_2.0.1: + movsd 8(%rsp), %xmm0 + mulsd NEG_ZERO(%rip), %xmm0 + movq %xmm0, (%rsp) +.L_2TAG_PACKET_13.0.1: +..B1.4: + addq $16, %rsp +..___tag_value_cos.6: + popq %rbx +..___tag_value_cos.8: + ret +..___tag_value_cos.9: +END(cos) +# -- End cos + .section .rodata, "a" + .align 16 + .align 16 +ONEHALF: + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .type ONEHALF,@object + .size ONEHALF,16 + .align 16 +P_2: + .long 442499072 + .long 1032893537 + .long 442499072 + .long 1032893537 + .type P_2,@object + .size P_2,16 + .align 16 +SC_4: + .long 2773927732 + .long 1053236707 + .long 436314138 + .long 1056571808 + .type SC_4,@object + .size SC_4,16 + .align 16 +Ctable: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 1072693248 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 1072693248 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 1071644672 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 1071644672 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 1070596096 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 1070596096 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 1069547520 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 3217031168 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 3218079744 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 3218079744 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 3219128320 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 3219128320 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 3220176896 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 3220176896 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 3219128320 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 3219128320 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 3218079744 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 3218079744 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 3217031168 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 1069547520 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 1070596096 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 1070596096 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 1071644672 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 1071644672 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 1072693248 + .type Ctable,@object + .size Ctable,2048 + .align 16 +SC_2: + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1067799893 + .type SC_2,@object + .size SC_2,16 + .align 16 +SC_3: + .long 436314138 + .long 3207201184 + .long 381774871 + .long 3210133868 + .type SC_3,@object + .size SC_3,16 + .align 16 +SC_1: + .long 1431655765 + .long 3217380693 + .long 0 + .long 3219128320 + .type SC_1,@object + .size SC_1,16 + .align 16 +PI_INV_TABLE: + .long 0 + .long 0 + .long 2734261102 + .long 1313084713 + .long 4230436817 + .long 4113882560 + .long 3680671129 + .long 1011060801 + .long 4266746795 + .long 3736847713 + .long 3072618042 + .long 1112396512 + .long 105459434 + .long 164729372 + .long 4263373596 + .long 2972297022 + .long 3900847605 + .long 784024708 + .long 3919343654 + .long 3026157121 + .long 965858873 + .long 2203269620 + .long 2625920907 + .long 3187222587 + .long 536385535 + .long 3724908559 + .long 4012839307 + .long 1510632735 + .long 1832287951 + .long 667617719 + .long 1330003814 + .long 2657085997 + .long 1965537991 + .long 3957715323 + .long 1023883767 + .long 2320667370 + .long 1811636145 + .long 529358088 + .long 1443049542 + .long 4235946923 + .long 4040145953 + .type PI_INV_TABLE,@object + .size PI_INV_TABLE,164 + .space 12, 0x00 # pad + .align 16 +PI_4: + .long 1073741824 + .long 1072243195 + .long 407279769 + .long 1046758445 + .type PI_4,@object + .size PI_4,16 + .align 8 +PI32INV: + .long 1841940611 + .long 1076125488 + .type PI32INV,@object + .size PI32INV,8 + .align 8 +SIGN_MASK: + .long 0 + .long 2147483648 + .type SIGN_MASK,@object + .size SIGN_MASK,8 + .align 8 +P_1: + .long 1413480448 + .long 1069097467 + .type P_1,@object + .size P_1,8 + .align 8 +P_3: + .long 771977331 + .long 996350346 + .type P_3,@object + .size P_3,8 + .align 8 +ONE: + .long 0 + .long 1072693248 + .type ONE,@object + .size ONE,8 + .align 8 +NEG_ZERO: + .long 0 + .long 2147483648 + .type NEG_ZERO,@object + .size NEG_ZERO,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000002c + .4byte 0x0000001c + .4byte ..___tag_value_cos.1-. + .4byte ..___tag_value_cos.9-..___tag_value_cos.1 + .2byte 0x0400 + .4byte ..___tag_value_cos.3-..___tag_value_cos.1 + .4byte 0x0283100e + .byte 0x04 + .4byte ..___tag_value_cos.5-..___tag_value_cos.3 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_cos.6-..___tag_value_cos.5 + .4byte 0x04c3100e + .4byte ..___tag_value_cos.8-..___tag_value_cos.6 + .2byte 0x080e +# End diff --git a/libm/x86_64/s_expm1.S b/libm/x86_64/s_expm1.S new file mode 100644 index 0000000..9da1d9d --- /dev/null +++ b/libm/x86_64/s_expm1.S @@ -0,0 +1,727 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Description: +// Let K = 64 (table size). +// +// Four sub-domains: +// 1. |x| < 1/(2*K) +// expm1(x) ~ P(x) +// 2. 1/(2*K) <= |x| <= 56*log(2) +// x x/log(2) n +// e - 1 = 2 = 2 * T[j] * (1 + P(y)) - 1 +// 3. 56*log(2) < x < MAX_LOG +// x x x/log(2) n +// e - 1 ~ e = 2 = 2 * T[j] * (1 + P(y)) +// 4. x < -56*log(2) +// x x +// e - 1 = -1 + e ~ -1 +// where +// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K] +// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2] +// j/K +// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]). +// +// P(y) is a minimax polynomial approximation of exp(x)-1 +// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V). +// +// In case 3, to avoid problems with arithmetic overflow and underflow, +// n n1 n2 +// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2] +// and BIAS is a value of exponent bias. +// +// Special cases: +// expm1(NaN) is NaN +// expm1(+INF) is +INF +// expm1(-INF) is -1 +// expm1(x) is x for subnormals +// for finite argument, only expm1(0)=0 is exact. +// For IEEE double +// if x > 709.782712893383973096 then expm1(x) overflow +// +/******************************************************************************/ + +#include +# -- Begin expm1 +ENTRY(expm1) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_expm1.1: + subq $56, %rsp +..___tag_value_expm1.3: + movsd %xmm0, 32(%rsp) +..B1.2: + unpcklpd %xmm0, %xmm0 + movapd cv(%rip), %xmm1 + movapd Shifter(%rip), %xmm6 + movapd 16+cv(%rip), %xmm2 + movapd 32+cv(%rip), %xmm3 + pextrw $3, %xmm0, %eax + andl $32767, %eax + movl $16527, %edx + subl %eax, %edx + subl $16304, %eax + orl %eax, %edx + cmpl $-2147483648, %edx + jae .L_2TAG_PACKET_0.0.2 + mulpd %xmm0, %xmm1 + addpd %xmm6, %xmm1 + movapd %xmm1, %xmm7 + subpd %xmm6, %xmm1 + mulpd %xmm1, %xmm2 + movapd 48+cv(%rip), %xmm4 + mulpd %xmm1, %xmm3 + movapd 64+cv(%rip), %xmm5 + subpd %xmm2, %xmm0 + movd %xmm7, %eax + movl %eax, %ecx + andl $63, %ecx + shll $4, %ecx + sarl $6, %eax + movl %eax, %edx + subpd %xmm3, %xmm0 + lea Tbl_addr(%rip), %r11 + movapd (%rcx,%r11), %xmm2 + movq 80+cv(%rip), %xmm3 + mulpd %xmm0, %xmm4 + movapd %xmm0, %xmm1 + mulpd %xmm0, %xmm0 + mulsd %xmm0, %xmm3 + addpd %xmm4, %xmm5 + mulsd %xmm0, %xmm0 + movq %xmm2, %xmm4 + unpckhpd %xmm2, %xmm2 + movdqa mmask(%rip), %xmm6 + pand %xmm6, %xmm7 + movdqa bias(%rip), %xmm6 + paddq %xmm6, %xmm7 + psllq $46, %xmm7 + mulsd %xmm0, %xmm3 + mulpd %xmm5, %xmm0 + addl $894, %edx + cmpl $1916, %edx + ja .L_2TAG_PACKET_1.0.2 + addsd %xmm3, %xmm0 + xorpd %xmm3, %xmm3 + movl $16368, %eax + pinsrw $3, %eax, %xmm3 + orpd %xmm7, %xmm2 + mulsd %xmm4, %xmm7 + movq %xmm3, %xmm6 + addsd %xmm1, %xmm3 + pextrw $3, %xmm2, %edx + pshufd $238, %xmm0, %xmm5 + psrlq $38, %xmm3 + psllq $38, %xmm3 + movq %xmm2, %xmm4 + subsd %xmm3, %xmm6 + addsd %xmm5, %xmm0 + addsd %xmm6, %xmm1 + addsd %xmm7, %xmm4 + mulsd %xmm3, %xmm7 + mulsd %xmm2, %xmm3 + xorpd %xmm5, %xmm5 + movl $16368, %eax + pinsrw $3, %eax, %xmm5 + addsd %xmm1, %xmm0 + movl $17184, %ecx + subl %edx, %ecx + subl $16256, %edx + orl %edx, %ecx + jl .L_2TAG_PACKET_2.0.2 + mulsd %xmm4, %xmm0 + subsd %xmm5, %xmm3 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 +.L_2TAG_PACKET_3.0.2: + jmp ..B1.5 +.L_2TAG_PACKET_2.0.2: + cmpl $0, %edx + jl .L_2TAG_PACKET_4.0.2 + mulsd %xmm4, %xmm0 + subsd %xmm5, %xmm7 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_4.0.2: + mulsd %xmm4, %xmm0 + addsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + subsd %xmm5, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_1.0.2: + movl 36(%rsp), %ecx + addsd %xmm0, %xmm1 + unpckhpd %xmm0, %xmm0 + addsd %xmm1, %xmm0 + cmpl $0, %ecx + jl .L_2TAG_PACKET_5.0.2 + fstcw (%rsp) + movw (%rsp), %dx + orw $768, %dx + movw %dx, 4(%rsp) + fldcw 4(%rsp) + movl %eax, %edx + sarl $1, %eax + subl %eax, %edx + movdqa emask(%rip), %xmm6 + pandn %xmm2, %xmm6 + addl $1023, %eax + movd %eax, %xmm3 + psllq $52, %xmm3 + orpd %xmm3, %xmm6 + mulsd %xmm3, %xmm4 + movsd %xmm0, 16(%rsp) + fldl 16(%rsp) + movsd %xmm6, 24(%rsp) + fldl 24(%rsp) + movsd %xmm4, 16(%rsp) + fldl 16(%rsp) + addl $1023, %edx + movd %edx, %xmm4 + psllq $52, %xmm4 + faddp %st, %st(1) + fmul %st, %st(1) + faddp %st, %st(1) + movsd %xmm4, 24(%rsp) + fldl 24(%rsp) + fmulp %st, %st(1) + fstpl 16(%rsp) + movsd 16(%rsp), %xmm0 + fldcw (%rsp) + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + cmpl $32752, %ecx + jae .L_2TAG_PACKET_6.0.2 + jmp ..B1.5 + cmpl $-2147483648, %ecx + jb .L_2TAG_PACKET_6.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + movl $41, 8(%rsp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_8.0.2: + cmpl $2146435072, %eax + jae .L_2TAG_PACKET_9.0.2 + movsd XMAX(%rip), %xmm0 + mulsd %xmm0, %xmm0 + movl $41, 8(%rsp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_9.0.2: + movl 36(%rsp), %eax + movl 32(%rsp), %edx + movl %eax, %ecx + andl $2147483647, %eax + cmpl $2146435072, %eax + ja .L_2TAG_PACKET_10.0.2 + cmpl $0, %edx + jne .L_2TAG_PACKET_10.0.2 + cmpl $0, %ecx + jl .L_2TAG_PACKET_11.0.2 + movq INF(%rip), %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_11.0.2: + jmp .L_2TAG_PACKET_5.0.2 +.L_2TAG_PACKET_10.0.2: + movsd 32(%rsp), %xmm0 + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_12.0.2: + addl $16304, %eax + cmpl $15504, %eax + jb .L_2TAG_PACKET_13.0.2 + movapd cvl(%rip), %xmm2 + pshufd $68, %xmm0, %xmm1 + movapd 16+cvl(%rip), %xmm3 + movapd 32+cvl(%rip), %xmm4 + movq 48+cvl(%rip), %xmm5 + mulsd %xmm1, %xmm1 + xorpd %xmm6, %xmm6 + movl $16352, %eax + pinsrw $3, %eax, %xmm6 + mulpd %xmm0, %xmm2 + xorpd %xmm7, %xmm7 + movl $16368, %edx + pinsrw $3, %edx, %xmm7 + addpd %xmm3, %xmm2 + mulsd %xmm1, %xmm5 + pshufd $228, %xmm1, %xmm3 + mulpd %xmm1, %xmm1 + mulsd %xmm0, %xmm6 + mulpd %xmm0, %xmm2 + addpd %xmm4, %xmm2 + movq %xmm7, %xmm4 + addsd %xmm6, %xmm7 + mulpd %xmm3, %xmm1 + psrlq $27, %xmm7 + psllq $27, %xmm7 + movq HIGHMASK(%rip), %xmm3 + subsd %xmm7, %xmm4 + mulpd %xmm1, %xmm2 + addsd %xmm4, %xmm6 + pshufd $238, %xmm2, %xmm1 + addsd %xmm2, %xmm6 + andpd %xmm0, %xmm3 + movq %xmm0, %xmm4 + addsd %xmm6, %xmm1 + subsd %xmm3, %xmm0 + addsd %xmm5, %xmm1 + mulsd %xmm7, %xmm3 + mulsd %xmm7, %xmm0 + mulsd %xmm1, %xmm4 + addsd %xmm4, %xmm0 + addsd %xmm3, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_13.0.2: + cmpl $16, %eax + jae .L_2TAG_PACKET_3.0.2 + movq %xmm0, %xmm2 + movd %xmm0, %eax + psrlq $31, %xmm2 + movd %xmm2, %ecx + orl %ecx, %eax + je .L_2TAG_PACKET_3.0.2 + movl $16, %edx + xorpd %xmm1, %xmm1 + pinsrw $3, %edx, %xmm1 + mulsd %xmm1, %xmm1 + movl $42, 8(%rsp) + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_0.0.2: + cmpl $0, %eax + jl .L_2TAG_PACKET_12.0.2 + movl 36(%rsp), %eax + cmpl $1083179008, %eax + jge .L_2TAG_PACKET_8.0.2 + cmpl $-1048576, %eax + jae .L_2TAG_PACKET_9.0.2 +.L_2TAG_PACKET_5.0.2: + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_7.0.2: + movq %xmm0, 40(%rsp) +..B1.3: + movq 40(%rsp), %xmm0 +.L_2TAG_PACKET_14.0.2: +..B1.5: + addq $56, %rsp +..___tag_value_expm1.4: + ret +..___tag_value_expm1.5: +END(expm1) +# -- End expm1 + .section .rodata, "a" + .align 16 + .align 16 +cv: + .long 1697350398 + .long 1079448903 + .long 1697350398 + .long 1079448903 + .long 4277796864 + .long 1065758274 + .long 4277796864 + .long 1065758274 + .long 3164486458 + .long 1025308570 + .long 3164486458 + .long 1025308570 + .long 1963358694 + .long 1065423121 + .long 1431655765 + .long 1069897045 + .long 1431655765 + .long 1067799893 + .long 0 + .long 1071644672 + .long 381774871 + .long 1062650220 + .long 381774871 + .long 1062650220 + .type cv,@object + .size cv,96 + .align 16 +Shifter: + .long 0 + .long 1127743488 + .long 0 + .long 1127743488 + .type Shifter,@object + .size Shifter,16 + .align 16 +Tbl_addr: + .long 0 + .long 0 + .long 0 + .long 0 + .long 1000070955 + .long 1042145304 + .long 1040187392 + .long 11418 + .long 988267849 + .long 1039500660 + .long 3539992576 + .long 22960 + .long 36755401 + .long 1042114290 + .long 402653184 + .long 34629 + .long 3634769483 + .long 1042178627 + .long 1820327936 + .long 46424 + .long 2155991225 + .long 1041560680 + .long 847249408 + .long 58348 + .long 2766913307 + .long 1039293264 + .long 3489660928 + .long 70401 + .long 3651174602 + .long 1040488175 + .long 2927624192 + .long 82586 + .long 3073892131 + .long 1042240606 + .long 1006632960 + .long 94904 + .long 1328391742 + .long 1042019037 + .long 3942645760 + .long 107355 + .long 2650893825 + .long 1041903210 + .long 822083584 + .long 119943 + .long 2397289153 + .long 1041802037 + .long 2281701376 + .long 132667 + .long 430997175 + .long 1042110606 + .long 1845493760 + .long 145530 + .long 1230936525 + .long 1041801015 + .long 1702887424 + .long 158533 + .long 740675935 + .long 1040178913 + .long 4110417920 + .long 171677 + .long 3489810261 + .long 1041825986 + .long 2793406464 + .long 184965 + .long 2532600530 + .long 1040767882 + .long 167772160 + .long 198398 + .long 3542557060 + .long 1041827263 + .long 2986344448 + .long 211976 + .long 1401563777 + .long 1041061093 + .long 922746880 + .long 225703 + .long 3129406026 + .long 1041852413 + .long 880803840 + .long 239579 + .long 900993572 + .long 1039283234 + .long 1275068416 + .long 253606 + .long 2115029358 + .long 1042140042 + .long 562036736 + .long 267786 + .long 1086643152 + .long 1041785419 + .long 1610612736 + .long 282120 + .long 82864366 + .long 1041256244 + .long 3045064704 + .long 296610 + .long 2392968152 + .long 1040913683 + .long 3573547008 + .long 311258 + .long 2905856183 + .long 1040002214 + .long 1988100096 + .long 326066 + .long 3742008261 + .long 1040011137 + .long 1451229184 + .long 341035 + .long 863393794 + .long 1040880621 + .long 914358272 + .long 356167 + .long 1446136837 + .long 1041372426 + .long 3707764736 + .long 371463 + .long 927855201 + .long 1040617636 + .long 360710144 + .long 386927 + .long 1492679939 + .long 1041050306 + .long 2952790016 + .long 402558 + .long 608827001 + .long 1041582217 + .long 2181038080 + .long 418360 + .long 606260204 + .long 1042271987 + .long 1711276032 + .long 434334 + .long 3163044019 + .long 1041843851 + .long 1006632960 + .long 450482 + .long 4148747325 + .long 1041962972 + .long 3900702720 + .long 466805 + .long 802924201 + .long 1041275378 + .long 1442840576 + .long 483307 + .long 3052749833 + .long 1041940577 + .long 1937768448 + .long 499988 + .long 2216116399 + .long 1041486744 + .long 914358272 + .long 516851 + .long 2729697836 + .long 1041445764 + .long 2566914048 + .long 533897 + .long 540608356 + .long 1041310907 + .long 2600468480 + .long 551129 + .long 2916344493 + .long 1040535661 + .long 1107296256 + .long 568549 + .long 731391814 + .long 1039497014 + .long 2566914048 + .long 586158 + .long 1024722704 + .long 1041461625 + .long 2961178624 + .long 603959 + .long 3806831748 + .long 1041732499 + .long 2675965952 + .long 621954 + .long 238953304 + .long 1040316488 + .long 2189426688 + .long 640145 + .long 749123235 + .long 1041725785 + .long 2063597568 + .long 658534 + .long 1168187977 + .long 1041175214 + .long 2986344448 + .long 677123 + .long 3506096399 + .long 1042186095 + .long 1426063360 + .long 695915 + .long 1470221620 + .long 1041675499 + .long 2566914048 + .long 714911 + .long 3182425146 + .long 1041483134 + .long 3087007744 + .long 734114 + .long 3131698208 + .long 1042208657 + .long 4068474880 + .long 753526 + .long 2300504125 + .long 1041428596 + .long 2415919104 + .long 773150 + .long 2290297931 + .long 1037388400 + .long 3716153344 + .long 792987 + .long 3532148223 + .long 1041626194 + .long 771751936 + .long 813041 + .long 1161884404 + .long 1042015258 + .long 3699376128 + .long 833312 + .long 876383176 + .long 1037968878 + .long 1241513984 + .long 853805 + .long 3379986796 + .long 1042213153 + .long 3699376128 + .long 874520 + .long 1545797737 + .long 1041681569 + .long 58720256 + .long 895462 + .long 2925146801 + .long 1042212567 + .long 855638016 + .long 916631 + .long 1316627971 + .long 1038516204 + .long 3883925504 + .long 938030 + .long 3267869137 + .long 1040337004 + .long 2726297600 + .long 959663 + .long 3720868999 + .long 1041782409 + .long 3992977408 + .long 981531 + .long 433316142 + .long 1041994064 + .long 1526726656 + .long 1003638 + .long 781232103 + .long 1040093400 + .long 2172649472 + .long 1025985 + .type Tbl_addr,@object + .size Tbl_addr,1024 + .align 16 +mmask: + .long 4294967232 + .long 0 + .long 4294967232 + .long 0 + .type mmask,@object + .size mmask,16 + .align 16 +bias: + .long 65472 + .long 0 + .long 65472 + .long 0 + .type bias,@object + .size bias,16 + .align 16 +emask: + .long 0 + .long 4293918720 + .long 0 + .long 4293918720 + .type emask,@object + .size emask,16 + .align 16 +cvl: + .long 2773927732 + .long 1053236707 + .long 381774871 + .long 1062650220 + .long 379653899 + .long 1056571845 + .long 286331153 + .long 1065423121 + .long 436314138 + .long 1059717536 + .long 1431655765 + .long 1067799893 + .long 1431655765 + .long 1069897045 + .long 0 + .long 1071644672 + .type cvl,@object + .size cvl,64 + .align 8 +XMAX: + .long 4294967295 + .long 2146435071 + .type XMAX,@object + .size XMAX,8 + .align 8 +INF: + .long 0 + .long 2146435072 + .type INF,@object + .size INF,8 + .align 8 +HIGHMASK: + .long 4227858432 + .long 4294967295 + .type HIGHMASK,@object + .size HIGHMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_expm1.1-. + .4byte ..___tag_value_expm1.5-..___tag_value_expm1.1 + .2byte 0x0400 + .4byte ..___tag_value_expm1.3-..___tag_value_expm1.1 + .2byte 0x400e + .byte 0x04 + .4byte ..___tag_value_expm1.4-..___tag_value_expm1.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/s_log1p.S b/libm/x86_64/s_log1p.S new file mode 100644 index 0000000..1ff2d39 --- /dev/null +++ b/libm/x86_64/s_log1p.S @@ -0,0 +1,829 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Let x=2^k * mx, mx in [1,2) +// +// Get B~1/mx based on the output of rcpps instruction (B0) +// B = int((B0*2^7+0.5))/2^7 +// +// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts) +// +// Result: k*log(2) - log(B) + p(r) +// p(r) is a degree 7 polynomial +// -log(B) read from data table (high, low parts) +// Result is formed from high and low parts +// +// Special cases: +// log1p(NaN) = quiet NaN, and raise invalid exception +// log1p(+INF) = that INF +// log1p(x) = NaN if x < -1 or x = -INF, and raises invalid exception +// log1p(-1) = -INF, and raises divide-by-zero exception +// log1p(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin log1p +ENTRY(log1p) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_log1p.1: + subq $24, %rsp +..___tag_value_log1p.3: + movsd %xmm0, 8(%rsp) +..B1.2: + movq $0x3ff0000000000000, %rax + movd %rax, %xmm2 + xorpd %xmm3, %xmm3 + movl $32768, %ecx + movd %rcx, %xmm4 + movq $0xffffe00000000000, %r8 + movd %r8, %xmm5 + movddup %xmm0, %xmm7 + pshufd $68, %xmm2, %xmm6 + pextrw $3, %xmm0, %ecx + addsd %xmm2, %xmm0 + movq %xmm0, %xmm1 + pextrw $3, %xmm0, %eax + subsd %xmm0, %xmm6 + orpd %xmm2, %xmm0 + psrlq $27, %xmm0 + lea L_tbl(%rip), %r11 + psrld $2, %xmm0 + subl $16, %eax + cmpl $32736, %eax + jae .L_2TAG_PACKET_0.0.2 + addsd %xmm6, %xmm7 + rcpps %xmm0, %xmm0 + psllq $12, %xmm1 + pshufd $228, %xmm5, %xmm6 + psrlq $12, %xmm1 + andl $32752, %ecx + cmpl $16256, %ecx + jb .L_2TAG_PACKET_1.0.2 + andl $32752, %eax + movl $32720, %ecx + subl %eax, %ecx + pinsrw $3, %ecx, %xmm3 +.L_2TAG_PACKET_2.0.2: + mulsd %xmm3, %xmm7 + paddd %xmm4, %xmm0 + movq $0x3800000000000000, %rcx + movd %rcx, %xmm4 + orpd %xmm2, %xmm1 + movd %xmm0, %edx + psllq $29, %xmm0 + andpd %xmm1, %xmm5 + andpd %xmm6, %xmm0 + subsd %xmm5, %xmm1 + paddd %xmm4, %xmm0 + mulsd %xmm0, %xmm5 + movl $16352, %ecx + subl %ecx, %eax + cvtsi2sd %eax, %xmm4 + mulsd %xmm0, %xmm7 + mulsd %xmm0, %xmm1 + movq log2(%rip), %xmm6 + movapd coeff(%rip), %xmm3 + subsd %xmm2, %xmm5 + andl $16711680, %edx + shrl $12, %edx + movapd (%r11,%rdx), %xmm0 + movapd 16+coeff(%rip), %xmm2 + addsd %xmm5, %xmm1 + movq %xmm1, %xmm5 + addsd %xmm7, %xmm1 + subsd %xmm1, %xmm5 + addsd %xmm5, %xmm7 + mulsd %xmm4, %xmm6 + mulsd 8+log2(%rip), %xmm4 + mulsd %xmm1, %xmm3 + movddup %xmm1, %xmm5 + addsd %xmm6, %xmm0 + mulpd %xmm5, %xmm2 + mulpd %xmm5, %xmm5 + movddup %xmm0, %xmm6 + addsd %xmm1, %xmm0 + addpd 32+coeff(%rip), %xmm2 + mulpd %xmm5, %xmm3 + subsd %xmm0, %xmm6 + mulsd %xmm1, %xmm2 + addsd %xmm7, %xmm4 + mulsd %xmm1, %xmm7 + addsd %xmm6, %xmm1 + pshufd $238, %xmm0, %xmm6 + mulsd %xmm5, %xmm5 + addsd %xmm6, %xmm4 + subsd %xmm7, %xmm1 + addpd %xmm3, %xmm2 + addsd %xmm4, %xmm1 + mulpd %xmm5, %xmm2 + addsd %xmm2, %xmm1 + pshufd $238, %xmm2, %xmm5 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_0.0.2: + movq 8(%rsp), %xmm0 + movq 8(%rsp), %xmm1 + addl $16, %eax + cmpl $32768, %eax + jae .L_2TAG_PACKET_3.0.2 + cmpl $0, %eax + je .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_5.0.2: + addsd %xmm0, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_6.0.2: + ja .L_2TAG_PACKET_5.0.2 + cmpl $0, %edx + ja .L_2TAG_PACKET_5.0.2 + jmp .L_2TAG_PACKET_7.0.2 +.L_2TAG_PACKET_3.0.2: + movd %xmm1, %edx + psrlq $32, %xmm1 + movd %xmm1, %ecx + addl %ecx, %ecx + cmpl $-2097152, %ecx + jae .L_2TAG_PACKET_6.0.2 + orl %ecx, %edx + cmpl $0, %edx + je .L_2TAG_PACKET_4.0.2 +.L_2TAG_PACKET_7.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $32752, %eax + pinsrw $3, %eax, %xmm1 + movl $141, (%rsp) + mulsd %xmm1, %xmm0 + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_4.0.2: + xorpd %xmm1, %xmm1 + xorpd %xmm0, %xmm0 + movl $49136, %eax + pinsrw $3, %eax, %xmm0 + divsd %xmm1, %xmm0 + movl $140, (%rsp) + jmp .L_2TAG_PACKET_8.0.2 +.L_2TAG_PACKET_1.0.2: + movq 8(%rsp), %xmm0 + cmpl $15504, %ecx + jb .L_2TAG_PACKET_9.0.2 + movapd coeff2(%rip), %xmm1 + pshufd $68, %xmm0, %xmm0 + movapd 16+coeff2(%rip), %xmm2 + pshufd $68, %xmm0, %xmm4 + movapd 32+coeff2(%rip), %xmm3 + mulpd %xmm0, %xmm1 + xorpd %xmm6, %xmm6 + mulpd %xmm4, %xmm4 + addpd %xmm2, %xmm1 + pshufd $68, %xmm4, %xmm5 + mulpd %xmm0, %xmm4 + movl $49120, %eax + pinsrw $3, %eax, %xmm6 + mulpd %xmm0, %xmm1 + mulsd %xmm4, %xmm4 + addpd %xmm3, %xmm1 + mulsd %xmm6, %xmm5 + mulpd %xmm4, %xmm1 + pshufd $238, %xmm1, %xmm7 + addsd %xmm7, %xmm1 + addsd %xmm5, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.5 +.L_2TAG_PACKET_9.0.2: + cmpl $16, %ecx + jb .L_2TAG_PACKET_10.0.2 + jmp ..B1.5 +.L_2TAG_PACKET_10.0.2: + movq %xmm0, %xmm1 + mulsd %xmm1, %xmm1 + jmp ..B1.5 +.L_2TAG_PACKET_8.0.2: + movq %xmm0, 16(%rsp) +..B1.3: + movq 16(%rsp), %xmm0 +.L_2TAG_PACKET_11.0.2: +..B1.5: + addq $24, %rsp +..___tag_value_log1p.4: + ret +..___tag_value_log1p.5: +END(log1p) +# -- End log1p + .section .rodata, "a" + .align 16 + .align 16 +L_tbl: + .long 4277811200 + .long 1072049730 + .long 2479318832 + .long 1026487127 + .long 2854492160 + .long 1072033410 + .long 215631550 + .long 1025638968 + .long 1547061248 + .long 1072017216 + .long 2886781435 + .long 1026423395 + .long 649825280 + .long 1072001146 + .long 4281533405 + .long 1024038923 + .long 646346752 + .long 1071985198 + .long 1562735921 + .long 1023790276 + .long 2203734016 + .long 1071969370 + .long 1838397691 + .long 3173936209 + .long 1872169984 + .long 1071953661 + .long 3981202460 + .long 1022325013 + .long 669557760 + .long 1071938069 + .long 4182597802 + .long 3173174122 + .long 4076413952 + .long 1071922591 + .long 1209029111 + .long 3170736207 + .long 556125184 + .long 1071907228 + .long 821086028 + .long 3173437049 + .long 204914688 + .long 1071891976 + .long 2097025986 + .long 3171071798 + .long 387545088 + .long 1071876834 + .long 3142936996 + .long 3173092218 + .long 2912783360 + .long 1071861800 + .long 2502420140 + .long 1024505919 + .long 1144260608 + .long 1071846874 + .long 3315658140 + .long 3173469843 + .long 1471209472 + .long 1071832053 + .long 129621009 + .long 3172443877 + .long 1829683200 + .long 1071817336 + .long 3885467693 + .long 1025535275 + .long 288676864 + .long 1071802722 + .long 86139472 + .long 3171639793 + .long 3636378624 + .long 1071788208 + .long 1850238587 + .long 1024654342 + .long 1606817792 + .long 1071773795 + .long 3388899795 + .long 3173675586 + .long 1236164608 + .long 1071759480 + .long 3983599207 + .long 1020046558 + .long 1089616896 + .long 1071745262 + .long 4171974224 + .long 1024773198 + .long 4143093760 + .long 1071731139 + .long 2727587401 + .long 3173965207 + .long 600267776 + .long 1071717112 + .long 3147685042 + .long 3173353031 + .long 2249313280 + .long 1071703177 + .long 125835074 + .long 1025255832 + .long 3805303808 + .long 1071689334 + .long 2289991207 + .long 1025460331 + .long 87278592 + .long 1071675583 + .long 1106114045 + .long 1025933602 + .long 3195405312 + .long 1071661920 + .long 3885316576 + .long 3171206239 + .long 3853649920 + .long 1071648346 + .long 2977069852 + .long 3171236771 + .long 2944026624 + .long 1071625048 + .long 1008093493 + .long 1023444474 + .long 3993180160 + .long 1071598247 + .long 1862355595 + .long 1024642533 + .long 1454641152 + .long 1071571617 + .long 1514603089 + .long 1026500596 + .long 3286085632 + .long 1071545154 + .long 1400028424 + .long 3173279056 + .long 438773760 + .long 1071518858 + .long 120727864 + .long 3172148914 + .long 1212979200 + .long 1071492725 + .long 1625055594 + .long 3172901933 + .long 1189017600 + .long 1071466754 + .long 3920062376 + .long 1025727407 + .long 403064832 + .long 1071440943 + .long 1053271728 + .long 3171391427 + .long 3343210496 + .long 1071415289 + .long 3243395502 + .long 3173627613 + .long 1765777408 + .long 1071389792 + .long 2145968512 + .long 1026354304 + .long 461430784 + .long 1071364449 + .long 4094322285 + .long 1026021467 + .long 71706624 + .long 1071339258 + .long 763632021 + .long 1024496933 + .long 1380503552 + .long 1071314217 + .long 1383547992 + .long 3173088453 + .long 1015732224 + .long 1071289325 + .long 3198646877 + .long 1025390322 + .long 35977216 + .long 1071264580 + .long 2141026805 + .long 1025754693 + .long 3927306240 + .long 1071239979 + .long 282116272 + .long 3173394334 + .long 1125341184 + .long 1071215523 + .long 2768427504 + .long 3172279059 + .long 1666971648 + .long 1071191208 + .long 786837629 + .long 3172427445 + .long 2827694080 + .long 1071167033 + .long 3857122416 + .long 3173014241 + .long 2003683328 + .long 1071142997 + .long 859010954 + .long 1026545007 + .long 1004017664 + .long 1071119098 + .long 3356644970 + .long 3173458064 + .long 1753020416 + .long 1071095334 + .long 788338552 + .long 1026157693 + .long 1992718336 + .long 1071071704 + .long 1239179443 + .long 1026394889 + .long 3870234624 + .long 1071048206 + .long 2082614663 + .long 1024926053 + .long 1050437632 + .long 1071024840 + .long 660007840 + .long 1025548499 + .long 188395520 + .long 1071001603 + .long 3878792704 + .long 3173889571 + .long 3747176448 + .long 1070978493 + .long 144991708 + .long 3171552042 + .long 1405669376 + .long 1070955511 + .long 3999088879 + .long 1025486317 + .long 121151488 + .long 1070932654 + .long 2170865497 + .long 1026473584 + .long 2652319744 + .long 1070909920 + .long 453695652 + .long 3173916809 + .long 3262236672 + .long 1070887309 + .long 157800053 + .long 3173984206 + .long 601221120 + .long 1070864820 + .long 3968917661 + .long 1023992886 + .long 1999843328 + .long 1070842450 + .long 3053895004 + .long 1024998228 + .long 1992167424 + .long 1070820199 + .long 2968614856 + .long 1024552653 + .long 3788726272 + .long 1070798065 + .long 3542170808 + .long 3173573242 + .long 2094829568 + .long 1070776048 + .long 1246758132 + .long 1026202874 + .long 288675840 + .long 1070754146 + .long 3747328950 + .long 1026331585 + .long 1829681152 + .long 1070732357 + .long 3125197546 + .long 1024100318 + .long 1666869248 + .long 1070710681 + .long 1363656119 + .long 1026336493 + .long 3417110528 + .long 1070689116 + .long 4154791553 + .long 1026267853 + .long 2183653376 + .long 1070667662 + .long 1671819292 + .long 3173785870 + .long 1734434816 + .long 1070646317 + .long 373091049 + .long 1025972363 + .long 1615681536 + .long 1070625080 + .long 384650897 + .long 1022926043 + .long 1445382144 + .long 1070603950 + .long 344320330 + .long 3172397196 + .long 1823715328 + .long 1070569756 + .long 3389841200 + .long 1025231852 + .long 3839688704 + .long 1070527917 + .long 1706790417 + .long 3167363349 + .long 4293332992 + .long 1070486286 + .long 1614935088 + .long 1019351591 + .long 2966720512 + .long 1070444861 + .long 4145393717 + .long 3173711658 + .long 4066729984 + .long 1070403639 + .long 1974925028 + .long 3171437182 + .long 3337621504 + .long 1070362619 + .long 3314953170 + .long 3169971314 + .long 943448064 + .long 1070321799 + .long 1498682038 + .long 3173862340 + .long 1465634816 + .long 1070281176 + .long 1319952810 + .long 3171693965 + .long 1015734272 + .long 1070240749 + .long 1347821929 + .long 3173544515 + .long 118001664 + .long 1070200516 + .long 1751482746 + .long 1026134093 + .long 3707174912 + .long 1070160474 + .long 1486946159 + .long 1023930920 + .long 3946381312 + .long 1070120623 + .long 2867408081 + .long 3171368276 + .long 1699848192 + .long 1070080961 + .long 2590187139 + .long 1025379803 + .long 2235846656 + .long 1070041485 + .long 1888568069 + .long 3172754960 + .long 2339729408 + .long 1070002194 + .long 3852214753 + .long 3173323149 + .long 3196850176 + .long 1069963086 + .long 742141560 + .long 1025101707 + .long 1800683520 + .long 1069924160 + .long 3949500444 + .long 3172102179 + .long 3835801600 + .long 1069885413 + .long 3848895943 + .long 1025913832 + .long 2201202688 + .long 1069846845 + .long 1425913464 + .long 1025868665 + .long 2778279936 + .long 1069808453 + .long 2120889677 + .long 3173831128 + .long 2954203136 + .long 1069770236 + .long 592147081 + .long 1019621288 + .long 210141184 + .long 1069732193 + .long 3414275233 + .long 1023647084 + .long 709476352 + .long 1069694321 + .long 2413027164 + .long 1024462115 + .long 2116284416 + .long 1069656619 + .long 1144559924 + .long 1026336654 + .long 2183651328 + .long 1069619086 + .long 3459057650 + .long 1025634168 + .long 3047047168 + .long 1069581720 + .long 1879674924 + .long 3173508573 + .long 970711040 + .long 1069541521 + .long 1335954173 + .long 3173332182 + .long 2198478848 + .long 1069467449 + .long 2951103968 + .long 3173892200 + .long 1669611520 + .long 1069393703 + .long 531044147 + .long 1025149248 + .long 29114368 + .long 1069320280 + .long 3327831251 + .long 1025918673 + .long 2376949760 + .long 1069247176 + .long 737634533 + .long 3172176000 + .long 1085390848 + .long 1069174390 + .long 3108243400 + .long 3171828406 + .long 1566130176 + .long 1069101918 + .long 985483226 + .long 1025708380 + .long 792780800 + .long 1069029758 + .long 4184866295 + .long 1024426204 + .long 183156736 + .long 1068957907 + .long 2845699378 + .long 1022107277 + .long 1301782528 + .long 1068886362 + .long 1012735262 + .long 3173804294 + .long 1562411008 + .long 1068815121 + .long 2197086703 + .long 3170187813 + .long 2815549440 + .long 1068744181 + .long 2782613207 + .long 1026345054 + .long 2756124672 + .long 1068673540 + .long 2929486205 + .long 3173037800 + .long 3511050240 + .long 1068603195 + .long 1443733147 + .long 3173331549 + .long 3047047168 + .long 1068533144 + .long 1879674924 + .long 3172459997 + .long 3221667840 + .long 1068427825 + .long 1338588027 + .long 3171815742 + .long 3453861888 + .long 1068288883 + .long 1205348359 + .long 3172624626 + .long 3506110464 + .long 1068150514 + .long 893105198 + .long 1025571866 + .long 346013696 + .long 1068012714 + .long 3495569021 + .long 3172563349 + .long 4074029056 + .long 1067875476 + .long 3961106338 + .long 3171065595 + .long 3559784448 + .long 1067738798 + .long 1975385384 + .long 3173783155 + .long 797769728 + .long 1067602675 + .long 3760305787 + .long 1026047642 + .long 2313633792 + .long 1067467101 + .long 1559353171 + .long 1023480256 + .long 3960766464 + .long 1067213778 + .long 1067365107 + .long 1025865926 + .long 684261376 + .long 1066944805 + .long 844762164 + .long 3173687482 + .long 630718464 + .long 1066676905 + .long 2458269694 + .long 1024033081 + .long 1486061568 + .long 1066410070 + .long 115537874 + .long 3173243995 + .long 2743664640 + .long 1065886792 + .long 3665098304 + .long 3173471607 + .long 1971912704 + .long 1065357333 + .long 2577214440 + .long 3171993451 + .long 1498939392 + .long 1064306693 + .long 3409036923 + .long 1025599151 + .long 0 + .long 0 + .long 0 + .long 2147483648 + .type L_tbl,@object + .size L_tbl,2064 + .align 16 +log2: + .long 4277811200 + .long 1067855426 + .long 2479318832 + .long 1022292823 + .type log2,@object + .size log2,16 + .align 16 +coeff: + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1030730101 + .long 3217380702 + .long 1431655765 + .long 1070945621 + .long 2576980378 + .long 1070176665 + .long 0 + .long 3219128320 + .type coeff,@object + .size coeff,48 + .align 16 +coeff2: + .long 0 + .long 3217031168 + .long 2576980378 + .long 1070176665 + .long 2454267026 + .long 1069697316 + .long 0 + .long 3218079744 + .long 1431655765 + .long 3217380693 + .long 1431655765 + .long 1070945621 + .type coeff2,@object + .size coeff2,48 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_log1p.1-. + .4byte ..___tag_value_log1p.5-..___tag_value_log1p.1 + .2byte 0x0400 + .4byte ..___tag_value_log1p.3-..___tag_value_log1p.1 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_log1p.4-..___tag_value_log1p.3 + .2byte 0x080e + .byte 0x00 +# End diff --git a/libm/x86_64/s_sin.S b/libm/x86_64/s_sin.S new file mode 100644 index 0000000..2f93a34 --- /dev/null +++ b/libm/x86_64/s_sin.S @@ -0,0 +1,1300 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// 1. RANGE REDUCTION +// +// We perform an initial range reduction from X to r with +// +// X =~= N * pi/32 + r +// +// so that |r| <= pi/64 + epsilon. We restrict inputs to those +// where |N| <= 932560. Beyond this, the range reduction is +// insufficiently accurate. For extremely small inputs, +// denormalization can occur internally, impacting performance. +// This means that the main path is actually only taken for +// 2^-252 <= |X| < 90112. +// +// To avoid branches, we perform the range reduction to full +// accuracy each time. +// +// X - N * (P_1 + P_2 + P_3) +// +// where P_1 and P_2 are 32-bit numbers (so multiplication by N +// is exact) and P_3 is a 53-bit number. Together, these +// approximate pi well enough for all cases in the restricted +// range. +// +// The main reduction sequence is: +// +// y = 32/pi * x +// N = integer(y) +// (computed by adding and subtracting off SHIFTER) +// +// m_1 = N * P_1 +// m_2 = N * P_2 +// r_1 = x - m_1 +// r = r_1 - m_2 +// (this r can be used for most of the calculation) +// +// c_1 = r_1 - r +// m_3 = N * P_3 +// c_2 = c_1 - m_2 +// c = c_2 - m_3 +// +// 2. MAIN ALGORITHM +// +// The algorithm uses a table lookup based on B = M * pi / 32 +// where M = N mod 64. The stored values are: +// sigma closest power of 2 to cos(B) +// C_hl 53-bit cos(B) - sigma +// S_hi + S_lo 2 * 53-bit sin(B) +// +// The computation is organized as follows: +// +// sin(B + r + c) = [sin(B) + sigma * r] + +// r * (cos(B) - sigma) + +// sin(B) * [cos(r + c) - 1] + +// cos(B) * [sin(r + c) - r] +// +// which is approximately: +// +// [S_hi + sigma * r] + +// C_hl * r + +// S_lo + S_hi * [(cos(r) - 1) - r * c] + +// (C_hl + sigma) * [(sin(r) - r) + c] +// +// and this is what is actually computed. We separate this sum +// into four parts: +// +// hi + med + pols + corr +// +// where +// +// hi = S_hi + sigma r +// med = C_hl * r +// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r) +// corr = S_lo + c * ((C_hl + sigma) - S_hi * r) +// +// 3. POLYNOMIAL +// +// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) * +// (sin(r) - r) can be rearranged freely, since it is quite +// small, so we exploit parallelism to the fullest. +// +// psc4 = SC_4 * r_1 +// msc4 = psc4 * r +// r2 = r * r +// msc2 = SC_2 * r2 +// r4 = r2 * r2 +// psc3 = SC_3 + msc4 +// psc1 = SC_1 + msc2 +// msc3 = r4 * psc3 +// sincospols = psc1 + msc3 +// pols = sincospols * +// +// +// 4. CORRECTION TERM +// +// This is where the "c" component of the range reduction is +// taken into account; recall that just "r" is used for most of +// the calculation. +// +// -c = m_3 - c_2 +// -d = S_hi * r - (C_hl + sigma) +// corr = -c * -d + S_lo +// +// 5. COMPENSATED SUMMATIONS +// +// The two successive compensated summations add up the high +// and medium parts, leaving just the low parts to add up at +// the end. +// +// rs = sigma * r +// res_int = S_hi + rs +// k_0 = S_hi - res_int +// k_2 = k_0 + rs +// med = C_hl * r +// res_hi = res_int + med +// k_1 = res_int - res_hi +// k_3 = k_1 + med +// +// 6. FINAL SUMMATION +// +// We now add up all the small parts: +// +// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3 +// +// Now the overall result is just: +// +// res_hi + res_lo +// +// 7. SMALL ARGUMENTS +// +// If |x| < SNN (SNN meaning the smallest normal number), we +// simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we +// do 2^-55 * (2^55 * x - x). +// +// Special cases: +// sin(NaN) = quiet NaN, and raise invalid exception +// sin(INF) = NaN and raise invalid exception +// sin(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin sin +ENTRY(sin) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_sin.1: + pushq %rbx +..___tag_value_sin.3: + subq $16, %rsp +..___tag_value_sin.5: + movsd %xmm0, 8(%rsp) +..B1.2: + movl 12(%rsp), %eax + movq PI32INV(%rip), %xmm1 + movq SHIFTER(%rip), %xmm2 + andl $2147418112, %eax + subl $808452096, %eax + cmpl $281346048, %eax + ja .L_2TAG_PACKET_0.0.1 + mulsd %xmm0, %xmm1 + movapd ONEHALF(%rip), %xmm5 + movq SIGN_MASK(%rip), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %edx + cvtsi2sd %edx, %xmm1 + movapd P_2(%rip), %xmm6 + movq $0x3fb921fb54400000, %r8 + movd %r8, %xmm3 + movapd SC_4(%rip), %xmm5 + pshufd $68, %xmm0, %xmm4 + mulsd %xmm1, %xmm3 + movddup %xmm1, %xmm1 + andl $63, %edx + shll $5, %edx + lea Ctable(%rip), %rax + addq %rdx, %rax + mulpd %xmm1, %xmm6 + mulsd P_3(%rip), %xmm1 + subsd %xmm3, %xmm4 + movq 8(%rax), %xmm7 + subsd %xmm3, %xmm0 + movddup %xmm4, %xmm3 + subsd %xmm6, %xmm4 + pshufd $68, %xmm0, %xmm0 + movapd (%rax), %xmm2 + mulpd %xmm0, %xmm5 + subpd %xmm6, %xmm0 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm6, %xmm3 + movapd SC_2(%rip), %xmm6 + subsd %xmm3, %xmm1 + movq 24(%rax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd SC_3(%rip), %xmm5 + mulsd (%rax), %xmm4 + addpd SC_1(%rip), %xmm6 + mulpd %xmm0, %xmm5 + movq %xmm3, %xmm0 + addsd 8(%rax), %xmm3 + mulpd %xmm7, %xmm1 + movq %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movq 8(%rax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%rax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm0, %xmm5 + addsd %xmm7, %xmm3 + addsd %xmm5, %xmm1 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + unpckhpd %xmm6, %xmm6 + movq %xmm4, %xmm0 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_0.0.1: + jg .L_2TAG_PACKET_1.0.1 + shrl $20, %eax + cmpw $3325, %ax + jne .L_2TAG_PACKET_2.0.1 + mulsd ALL_ONES(%rip), %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_2.0.1: + movq TWO_POW_55(%rip), %xmm3 + mulsd %xmm0, %xmm3 + subsd %xmm0, %xmm3 + mulsd TWO_POW_M55(%rip), %xmm3 + jmp ..B1.4 +.L_2TAG_PACKET_1.0.1: + pextrw $3, %xmm0, %eax + andl $32752, %eax + cmpl $32752, %eax + je .L_2TAG_PACKET_3.0.1 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + subl $16224, %ecx + shrl $7, %ecx + andl $65532, %ecx + lea PI_INV_TABLE(%rip), %r11 + addq %r11, %rcx + movd %xmm0, %rax + movl 20(%rcx), %r10d + movl 24(%rcx), %r8d + movl %eax, %edx + shrq $21, %rax + orl $-2147483648, %eax + shrl $11, %eax + movl %r10d, %r9d + imulq %rdx, %r10 + imulq %rax, %r9 + imulq %rax, %r8 + movl 16(%rcx), %esi + movl 12(%rcx), %edi + movl %r10d, %r11d + shrq $32, %r10 + addq %r10, %r9 + addq %r8, %r11 + movl %r11d, %r8d + shrq $32, %r11 + addq %r11, %r9 + movl %esi, %r10d + imulq %rdx, %rsi + imulq %rax, %r10 + movl %edi, %r11d + imulq %rdx, %rdi + movl %esi, %ebx + shrq $32, %rsi + addq %rbx, %r9 + movl %r9d, %ebx + shrq $32, %r9 + addq %rsi, %r10 + addq %r9, %r10 + shlq $32, %rbx + orq %rbx, %r8 + imulq %rax, %r11 + movl 8(%rcx), %r9d + movl 4(%rcx), %esi + movl %edi, %ebx + shrq $32, %rdi + addq %rbx, %r10 + movl %r10d, %ebx + shrq $32, %r10 + addq %rdi, %r11 + addq %r10, %r11 + movq %r9, %rdi + imulq %rdx, %r9 + imulq %rax, %rdi + movl %r9d, %r10d + shrq $32, %r9 + addq %r10, %r11 + movl %r11d, %r10d + shrq $32, %r11 + addq %r9, %rdi + addq %r11, %rdi + movq %rsi, %r9 + imulq %rdx, %rsi + imulq %rax, %r9 + shlq $32, %r10 + orq %rbx, %r10 + movl (%rcx), %eax + movl %esi, %r11d + shrq $32, %rsi + addq %r11, %rdi + movl %edi, %r11d + shrq $32, %rdi + addq %rsi, %r9 + addq %rdi, %r9 + imulq %rax, %rdx + pextrw $3, %xmm0, %ebx + lea PI_INV_TABLE(%rip), %rdi + subq %rdi, %rcx + addl %ecx, %ecx + addl %ecx, %ecx + addl %ecx, %ecx + addl $19, %ecx + movl $32768, %esi + andl %ebx, %esi + shrl $4, %ebx + andl $2047, %ebx + subl $1023, %ebx + subl %ebx, %ecx + addq %rdx, %r9 + movl %ecx, %edx + addl $32, %edx + cmpl $1, %ecx + jl .L_2TAG_PACKET_4.0.1 + negl %ecx + addl $29, %ecx + shll %cl, %r9d + movl %r9d, %edi + andl $536870911, %r9d + testl $268435456, %r9d + jne .L_2TAG_PACKET_5.0.1 + shrl %cl, %r9d + movl $0, %ebx + shlq $32, %r9 + orq %r11, %r9 +.L_2TAG_PACKET_6.0.1: +.L_2TAG_PACKET_7.0.1: + cmpq $0, %r9 + je .L_2TAG_PACKET_8.0.1 +.L_2TAG_PACKET_9.0.1: + bsr %r9, %r11 + movl $29, %ecx + subl %r11d, %ecx + jle .L_2TAG_PACKET_10.0.1 + shlq %cl, %r9 + movq %r10, %rax + shlq %cl, %r10 + addl %ecx, %edx + negl %ecx + addl $64, %ecx + shrq %cl, %rax + shrq %cl, %r8 + orq %rax, %r9 + orq %r8, %r10 +.L_2TAG_PACKET_11.0.1: + cvtsi2sdq %r9, %xmm0 + shrq $1, %r10 + cvtsi2sdq %r10, %xmm3 + xorpd %xmm4, %xmm4 + shll $4, %edx + negl %edx + addl $16368, %edx + orl %esi, %edx + xorl %ebx, %edx + pinsrw $3, %edx, %xmm4 + movq PI_4(%rip), %xmm2 + movq 8+PI_4(%rip), %xmm6 + xorpd %xmm5, %xmm5 + subl $1008, %edx + pinsrw $3, %edx, %xmm5 + mulsd %xmm4, %xmm0 + shll $16, %esi + sarl $31, %esi + mulsd %xmm5, %xmm3 + movq %xmm0, %xmm1 + mulsd %xmm2, %xmm0 + shrl $29, %edi + addsd %xmm3, %xmm1 + mulsd %xmm2, %xmm3 + addl %esi, %edi + xorl %esi, %edi + mulsd %xmm1, %xmm6 + movl %edi, %eax + addsd %xmm3, %xmm6 + movq %xmm0, %xmm2 + addsd %xmm6, %xmm0 + subsd %xmm0, %xmm2 + addsd %xmm2, %xmm6 +.L_2TAG_PACKET_12.0.1: + movq PI32INV(%rip), %xmm1 + mulsd %xmm0, %xmm1 + movq ONEHALF(%rip), %xmm5 + movq SIGN_MASK(%rip), %xmm4 + andpd %xmm0, %xmm4 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + cvttsd2si %xmm1, %edx + cvtsi2sd %edx, %xmm1 + movq P_1(%rip), %xmm3 + movapd P_2(%rip), %xmm2 + mulsd %xmm1, %xmm3 + unpcklpd %xmm1, %xmm1 + shll $3, %eax + addl $1865216, %edx + movq %xmm0, %xmm4 + addl %eax, %edx + andl $63, %edx + movapd SC_4(%rip), %xmm5 + lea Ctable(%rip), %rax + shll $5, %edx + addq %rdx, %rax + mulpd %xmm1, %xmm2 + subsd %xmm3, %xmm0 + mulsd P_3(%rip), %xmm1 + subsd %xmm3, %xmm4 + movq 8(%rax), %xmm7 + unpcklpd %xmm0, %xmm0 + movq %xmm4, %xmm3 + subsd %xmm2, %xmm4 + mulpd %xmm0, %xmm5 + subpd %xmm2, %xmm0 + mulsd %xmm4, %xmm7 + subsd %xmm4, %xmm3 + mulpd %xmm0, %xmm5 + mulpd %xmm0, %xmm0 + subsd %xmm2, %xmm3 + movapd (%rax), %xmm2 + subsd %xmm3, %xmm1 + movq 24(%rax), %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm7 + subsd %xmm6, %xmm1 + movapd SC_2(%rip), %xmm6 + mulsd %xmm4, %xmm2 + mulpd %xmm0, %xmm6 + mulsd %xmm4, %xmm3 + mulpd %xmm0, %xmm2 + mulpd %xmm0, %xmm0 + addpd SC_3(%rip), %xmm5 + mulsd (%rax), %xmm4 + addpd SC_1(%rip), %xmm6 + mulpd %xmm0, %xmm5 + movq %xmm3, %xmm0 + addsd 8(%rax), %xmm3 + mulpd %xmm7, %xmm1 + movq %xmm4, %xmm7 + addsd %xmm3, %xmm4 + addpd %xmm5, %xmm6 + movq 8(%rax), %xmm5 + subsd %xmm3, %xmm5 + subsd %xmm4, %xmm3 + addsd 16(%rax), %xmm1 + mulpd %xmm2, %xmm6 + addsd %xmm0, %xmm5 + addsd %xmm7, %xmm3 + addsd %xmm5, %xmm1 + addsd %xmm3, %xmm1 + addsd %xmm6, %xmm1 + unpckhpd %xmm6, %xmm6 + movq %xmm4, %xmm0 + addsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_8.0.1: + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + movq $0, %r8 + cmpq $0, %r9 + jne .L_2TAG_PACKET_9.0.1 + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + cmpq $0, %r9 + jne .L_2TAG_PACKET_9.0.1 + xorpd %xmm0, %xmm0 + xorpd %xmm6, %xmm6 + jmp .L_2TAG_PACKET_12.0.1 +.L_2TAG_PACKET_10.0.1: + je .L_2TAG_PACKET_11.0.1 + negl %ecx + shrq %cl, %r10 + movq %r9, %rax + shrq %cl, %r9 + subl %ecx, %edx + negl %ecx + addl $64, %ecx + shlq %cl, %rax + orq %rax, %r10 + jmp .L_2TAG_PACKET_11.0.1 +.L_2TAG_PACKET_4.0.1: + negl %ecx + shlq $32, %r9 + orq %r11, %r9 + shlq %cl, %r9 + movq %r9, %rdi + testl $-2147483648, %r9d + jne .L_2TAG_PACKET_13.0.1 + shrl %cl, %r9d + movl $0, %ebx + shrq $3, %rdi + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_5.0.1: + shrl %cl, %r9d + movl $536870912, %ebx + shrl %cl, %ebx + shlq $32, %r9 + orq %r11, %r9 + shlq $32, %rbx + addl $536870912, %edi + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + jmp .L_2TAG_PACKET_6.0.1 +.L_2TAG_PACKET_13.0.1: + shrl %cl, %r9d + movq $0x100000000, %rbx + shrq %cl, %rbx + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + shrq $3, %rdi + addl $536870912, %edi + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_3.0.1: + movq 8(%rsp), %xmm0 + mulsd NEG_ZERO(%rip), %xmm0 + movq %xmm0, (%rsp) +.L_2TAG_PACKET_14.0.1: +..B1.4: + addq $16, %rsp +..___tag_value_sin.6: + popq %rbx +..___tag_value_sin.8: + ret +..___tag_value_sin.9: +END(sin) +# -- End sin + .section .rodata, "a" + .align 16 + .align 16 +ONEHALF: + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .type ONEHALF,@object + .size ONEHALF,16 + .align 16 +P_2: + .long 442499072 + .long 1032893537 + .long 442499072 + .long 1032893537 + .type P_2,@object + .size P_2,16 + .align 16 +SC_4: + .long 2773927732 + .long 1053236707 + .long 436314138 + .long 1056571808 + .type SC_4,@object + .size SC_4,16 + .align 16 +Ctable: + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 1072693248 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 1072693248 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 1071644672 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 1071644672 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 1070596096 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 1070596096 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 1069547520 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 1072683149 + .long 1073741824 + .long 3163061750 + .long 0 + .long 3217031168 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 1072652951 + .long 536870912 + .long 1014325783 + .long 0 + .long 3218079744 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 1072602945 + .long 3758096384 + .long 1015505073 + .long 0 + .long 3218079744 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 1072533611 + .long 536870912 + .long 1014257638 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 1072445618 + .long 2147483648 + .long 3161907377 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 1072339814 + .long 3758096384 + .long 1010431536 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 1072217216 + .long 536870912 + .long 3162686945 + .long 0 + .long 3219128320 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 1072079006 + .long 536870912 + .long 3163282740 + .long 0 + .long 3219128320 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 1071926515 + .long 536870912 + .long 1013450602 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 1071761211 + .long 536870912 + .long 1015752157 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 1071524701 + .long 536870912 + .long 1012796809 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 1071152610 + .long 3758096384 + .long 3160878317 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 1070765062 + .long 2684354560 + .long 3161838221 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 1070135480 + .long 3221225472 + .long 3160567065 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 1069094822 + .long 3758096384 + .long 3158189848 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 393047345 + .long 1064548654 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 3220176896 + .long 18115067 + .long 1066642694 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 3220176896 + .long 2476548698 + .long 1067846634 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 3220176896 + .long 2255197647 + .long 1068727457 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 3220176896 + .long 1945768569 + .long 1069431400 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 3220176896 + .long 1539668340 + .long 1069912679 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 3220176896 + .long 1403757309 + .long 1070403070 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 3220176896 + .long 2583490354 + .long 3217719929 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 3219128320 + .long 2485417816 + .long 3217109964 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 3219128320 + .long 2598800519 + .long 3215750067 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 3219128320 + .long 2140183630 + .long 1067272748 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 3219128320 + .long 1699043957 + .long 1069418613 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 3219128320 + .long 1991047213 + .long 3215237169 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 3218079744 + .long 240740309 + .long 1068244255 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 3218079744 + .long 257503056 + .long 1067164005 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 3217031168 + .long 0 + .long 0 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 0 + .long 257503056 + .long 3214647653 + .long 2748392742 + .long 3220166797 + .long 1073741824 + .long 1015578102 + .long 0 + .long 1069547520 + .long 240740309 + .long 3215727903 + .long 3489094832 + .long 3220136599 + .long 536870912 + .long 3161809431 + .long 0 + .long 1070596096 + .long 1991047213 + .long 1067753521 + .long 1455828442 + .long 3220086593 + .long 3758096384 + .long 3162988721 + .long 0 + .long 1070596096 + .long 1699043957 + .long 3216902261 + .long 3476196678 + .long 3220017259 + .long 536870912 + .long 3161741286 + .long 0 + .long 1071644672 + .long 2140183630 + .long 3214756396 + .long 4051746225 + .long 3219929266 + .long 2147483648 + .long 1014423729 + .long 0 + .long 1071644672 + .long 2598800519 + .long 1068266419 + .long 688824739 + .long 3219823462 + .long 3758096384 + .long 3157915184 + .long 0 + .long 1071644672 + .long 2485417816 + .long 1069626316 + .long 1796544321 + .long 3219700864 + .long 536870912 + .long 1015203297 + .long 0 + .long 1071644672 + .long 2583490354 + .long 1070236281 + .long 1719614413 + .long 3219562654 + .long 536870912 + .long 1015799092 + .long 0 + .long 1071644672 + .long 1403757309 + .long 3217886718 + .long 621354454 + .long 3219410163 + .long 536870912 + .long 3160934250 + .long 0 + .long 1072693248 + .long 1539668340 + .long 3217396327 + .long 967731400 + .long 3219244859 + .long 536870912 + .long 3163235805 + .long 0 + .long 1072693248 + .long 1945768569 + .long 3216915048 + .long 939980347 + .long 3219008349 + .long 536870912 + .long 3160280457 + .long 0 + .long 1072693248 + .long 2255197647 + .long 3216211105 + .long 2796464483 + .long 3218636258 + .long 3758096384 + .long 1013394669 + .long 0 + .long 1072693248 + .long 2476548698 + .long 3215330282 + .long 785751814 + .long 3218248710 + .long 2684354560 + .long 1014354573 + .long 0 + .long 1072693248 + .long 18115067 + .long 3214126342 + .long 1013556747 + .long 3217619128 + .long 3221225472 + .long 1013083417 + .long 0 + .long 1072693248 + .long 393047345 + .long 3212032302 + .long 3156849708 + .long 3216578470 + .long 3758096384 + .long 1010706200 + .long 0 + .long 1072693248 + .type Ctable,@object + .size Ctable,2048 + .align 16 +SC_2: + .long 286331153 + .long 1065423121 + .long 1431655765 + .long 1067799893 + .type SC_2,@object + .size SC_2,16 + .align 16 +SC_3: + .long 436314138 + .long 3207201184 + .long 381774871 + .long 3210133868 + .type SC_3,@object + .size SC_3,16 + .align 16 +SC_1: + .long 1431655765 + .long 3217380693 + .long 0 + .long 3219128320 + .type SC_1,@object + .size SC_1,16 + .align 16 +PI_INV_TABLE: + .long 0 + .long 0 + .long 2734261102 + .long 1313084713 + .long 4230436817 + .long 4113882560 + .long 3680671129 + .long 1011060801 + .long 4266746795 + .long 3736847713 + .long 3072618042 + .long 1112396512 + .long 105459434 + .long 164729372 + .long 4263373596 + .long 2972297022 + .long 3900847605 + .long 784024708 + .long 3919343654 + .long 3026157121 + .long 965858873 + .long 2203269620 + .long 2625920907 + .long 3187222587 + .long 536385535 + .long 3724908559 + .long 4012839307 + .long 1510632735 + .long 1832287951 + .long 667617719 + .long 1330003814 + .long 2657085997 + .long 1965537991 + .long 3957715323 + .long 1023883767 + .long 2320667370 + .long 1811636145 + .long 529358088 + .long 1443049542 + .long 4235946923 + .long 4040145953 + .type PI_INV_TABLE,@object + .size PI_INV_TABLE,164 + .space 12, 0x00 # pad + .align 16 +PI_4: + .long 1073741824 + .long 1072243195 + .long 407279769 + .long 1046758445 + .type PI_4,@object + .size PI_4,16 + .align 8 +PI32INV: + .long 1841940611 + .long 1076125488 + .type PI32INV,@object + .size PI32INV,8 + .align 8 +SHIFTER: + .long 0 + .long 1127743488 + .type SHIFTER,@object + .size SHIFTER,8 + .align 8 +SIGN_MASK: + .long 0 + .long 2147483648 + .type SIGN_MASK,@object + .size SIGN_MASK,8 + .align 8 +P_3: + .long 771977331 + .long 996350346 + .type P_3,@object + .size P_3,8 + .align 8 +ALL_ONES: + .long 4294967295 + .long 1072693247 + .type ALL_ONES,@object + .size ALL_ONES,8 + .align 8 +TWO_POW_55: + .long 0 + .long 1130364928 + .type TWO_POW_55,@object + .size TWO_POW_55,8 + .align 8 +TWO_POW_M55: + .long 0 + .long 1015021568 + .type TWO_POW_M55,@object + .size TWO_POW_M55,8 + .align 8 +P_1: + .long 1413480448 + .long 1069097467 + .type P_1,@object + .size P_1,8 + .align 8 +NEG_ZERO: + .long 0 + .long 2147483648 + .type NEG_ZERO,@object + .size NEG_ZERO,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000002c + .4byte 0x0000001c + .4byte ..___tag_value_sin.1-. + .4byte ..___tag_value_sin.9-..___tag_value_sin.1 + .2byte 0x0400 + .4byte ..___tag_value_sin.3-..___tag_value_sin.1 + .4byte 0x0283100e + .byte 0x04 + .4byte ..___tag_value_sin.5-..___tag_value_sin.3 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_sin.6-..___tag_value_sin.5 + .4byte 0x04c3100e + .4byte ..___tag_value_sin.8-..___tag_value_sin.6 + .2byte 0x080e +# End diff --git a/libm/x86_64/s_tan.S b/libm/x86_64/s_tan.S new file mode 100644 index 0000000..74cb044 --- /dev/null +++ b/libm/x86_64/s_tan.S @@ -0,0 +1,2239 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// Polynomials coefficients and other constants. +// +// Note that in this algorithm, there is a different polynomial for +// each breakpoint, so there are 32 sets of polynomial coefficients +// as well as 32 instances of the other constants. +// +// The polynomial coefficients and constants are offset from the start +// of the main block as follows: +// +// 0: c8 | c0 +// 16: c9 | c1 +// 32: c10 | c2 +// 48: c11 | c3 +// 64: c12 | c4 +// 80: c13 | c5 +// 96: c14 | c6 +// 112: c15 | c7 +// 128: T_hi +// 136: T_lo +// 144: Sigma +// 152: T_hl +// 160: Tau +// 168: Mask +// 176: (end of block) +// +// The total table size is therefore 5632 bytes. +// +// Note that c0 and c1 are always zero. We could try storing +// other constants here, and just loading the low part of the +// SIMD register in these cases, after ensuring the high part +// is zero. +// +// The higher terms of the polynomial are computed in the *low* +// part of the SIMD register. This is so we can overlap the +// multiplication by r^8 and the unpacking of the other part. +// +// The constants are: +// T_hi + T_lo = accurate constant term in power series +// Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit) +// Tau = multiplier for the reciprocal, always -1 or 0 +// +// The basic reconstruction formula using these constants is: +// +// High = tau * recip_hi + t_hi +// Med = (sgn * r + t_hl * r)_hi +// Low = (sgn * r + t_hl * r)_lo + +// tau * recip_lo + T_lo + (T_hl + sigma) * c + pol +// +// where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15 +// +// (c0 = c1 = 0, but using them keeps SIMD regularity) +// +// We then do a compensated sum High + Med, add the low parts together +// and then do the final sum. +// +// Here recip_hi + recip_lo is an accurate reciprocal of the remainder +// modulo pi/2 +// +// Special cases: +// tan(NaN) = quiet NaN, and raise invalid exception +// tan(INF) = NaN and raise invalid exception +// tan(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin tan +ENTRY(tan) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_tan.1: + pushq %rbx +..___tag_value_tan.3: + subq $16, %rsp +..___tag_value_tan.5: + movsd %xmm0, 8(%rsp) +..B1.2: + pextrw $3, %xmm0, %eax + andl $32767, %eax + subl $16314, %eax + cmpl $270, %eax + ja .L_2TAG_PACKET_0.0.1 + movapd ONEHALF(%rip), %xmm5 + movapd MUL16(%rip), %xmm6 + unpcklpd %xmm0, %xmm0 + movapd sign_mask(%rip), %xmm4 + andpd %xmm0, %xmm4 + movapd PI32INV(%rip), %xmm1 + mulpd %xmm0, %xmm1 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + movapd %xmm1, %xmm7 + unpckhpd %xmm7, %xmm7 + cvttsd2si %xmm7, %edx + cvttpd2dq %xmm1, %xmm1 + cvtdq2pd %xmm1, %xmm1 + mulpd %xmm6, %xmm1 + movapd P_1(%rip), %xmm3 + movq QQ_2(%rip), %xmm5 + addq $469248, %rdx + movapd P_2(%rip), %xmm4 + mulpd %xmm1, %xmm3 + andq $31, %rdx + mulsd %xmm1, %xmm5 + movq %rdx, %rcx + mulpd %xmm1, %xmm4 + shlq $1, %rcx + subpd %xmm3, %xmm0 + mulpd P_3(%rip), %xmm1 + addq %rcx, %rdx + shlq $2, %rcx + addq %rcx, %rdx + addsd %xmm0, %xmm5 + movapd %xmm0, %xmm2 + subpd %xmm4, %xmm0 + movq ONE(%rip), %xmm6 + shlq $4, %rdx + lea Ctable(%rip), %rax + andpd MASK_35(%rip), %xmm5 + movapd %xmm0, %xmm3 + addq %rdx, %rax + subpd %xmm0, %xmm2 + unpckhpd %xmm0, %xmm0 + divsd %xmm5, %xmm6 + subpd %xmm4, %xmm2 + movapd 16(%rax), %xmm7 + subsd %xmm5, %xmm3 + mulpd %xmm0, %xmm7 + subpd %xmm1, %xmm2 + movapd 48(%rax), %xmm1 + mulpd %xmm0, %xmm1 + movapd 96(%rax), %xmm4 + mulpd %xmm0, %xmm4 + addsd %xmm3, %xmm2 + movapd %xmm0, %xmm3 + mulpd %xmm0, %xmm0 + addpd (%rax), %xmm7 + addpd 32(%rax), %xmm1 + mulpd %xmm0, %xmm1 + addpd 80(%rax), %xmm4 + addpd %xmm1, %xmm7 + movapd 112(%rax), %xmm1 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm0 + addpd %xmm1, %xmm4 + movapd 64(%rax), %xmm1 + mulpd %xmm0, %xmm1 + addpd %xmm1, %xmm7 + movapd %xmm3, %xmm1 + mulpd %xmm0, %xmm3 + mulsd %xmm0, %xmm0 + mulpd 144(%rax), %xmm1 + mulpd %xmm3, %xmm4 + movq %xmm1, %xmm3 + addpd %xmm4, %xmm7 + movq %xmm1, %xmm4 + mulsd %xmm7, %xmm0 + unpckhpd %xmm7, %xmm7 + addsd %xmm7, %xmm0 + unpckhpd %xmm1, %xmm1 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + movq %xmm2, %xmm4 + movq 144(%rax), %xmm7 + unpckhpd %xmm2, %xmm2 + addsd 152(%rax), %xmm7 + mulsd %xmm2, %xmm7 + addsd 136(%rax), %xmm7 + addsd %xmm1, %xmm7 + addsd %xmm7, %xmm0 + movq ONE(%rip), %xmm7 + mulsd %xmm6, %xmm4 + movq 168(%rax), %xmm2 + andpd %xmm6, %xmm2 + mulsd %xmm2, %xmm5 + mulsd 160(%rax), %xmm6 + subsd %xmm5, %xmm7 + subsd 128(%rax), %xmm2 + subsd %xmm4, %xmm7 + mulsd %xmm6, %xmm7 + movq %xmm3, %xmm4 + subsd %xmm2, %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm4 + addsd %xmm4, %xmm0 + subsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_0.0.1: + jg .L_2TAG_PACKET_1.0.1 + pextrw $3, %xmm0, %eax + movl %eax, %edx + andl $32752, %eax + je .L_2TAG_PACKET_2.0.1 + andl $32767, %edx + cmpl $15904, %edx + jb .L_2TAG_PACKET_3.0.1 + movq %xmm0, %xmm2 + movq %xmm0, %xmm3 + movq Q_11(%rip), %xmm1 + mulsd %xmm0, %xmm2 + mulsd %xmm2, %xmm3 + mulsd %xmm2, %xmm1 + addsd Q_9(%rip), %xmm1 + mulsd %xmm2, %xmm1 + addsd Q_7(%rip), %xmm1 + mulsd %xmm2, %xmm1 + addsd Q_5(%rip), %xmm1 + mulsd %xmm2, %xmm1 + addsd Q_3(%rip), %xmm1 + mulsd %xmm3, %xmm1 + addsd %xmm1, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_3.0.1: + movq TWO_POW_55(%rip), %xmm3 + mulsd %xmm0, %xmm3 + addsd %xmm3, %xmm0 + mulsd TWO_POW_M55(%rip), %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_2.0.1: + movq %xmm0, %xmm1 + mulsd %xmm1, %xmm1 + jmp ..B1.4 +.L_2TAG_PACKET_1.0.1: + pextrw $3, %xmm0, %eax + andl $32752, %eax + cmpl $32752, %eax + je .L_2TAG_PACKET_4.0.1 + pextrw $3, %xmm0, %ecx + andl $32752, %ecx + subl $16224, %ecx + shrl $7, %ecx + andl $65532, %ecx + lea PI_INV_TABLE(%rip), %r11 + addq %r11, %rcx + movd %xmm0, %rax + movl 20(%rcx), %r10d + movl 24(%rcx), %r8d + movl %eax, %edx + shrq $21, %rax + orl $-2147483648, %eax + shrl $11, %eax + movl %r10d, %r9d + imulq %rdx, %r10 + imulq %rax, %r9 + imulq %rax, %r8 + movl 16(%rcx), %esi + movl 12(%rcx), %edi + movl %r10d, %r11d + shrq $32, %r10 + addq %r10, %r9 + addq %r8, %r11 + movl %r11d, %r8d + shrq $32, %r11 + addq %r11, %r9 + movl %esi, %r10d + imulq %rdx, %rsi + imulq %rax, %r10 + movl %edi, %r11d + imulq %rdx, %rdi + movl %esi, %ebx + shrq $32, %rsi + addq %rbx, %r9 + movl %r9d, %ebx + shrq $32, %r9 + addq %rsi, %r10 + addq %r9, %r10 + shlq $32, %rbx + orq %rbx, %r8 + imulq %rax, %r11 + movl 8(%rcx), %r9d + movl 4(%rcx), %esi + movl %edi, %ebx + shrq $32, %rdi + addq %rbx, %r10 + movl %r10d, %ebx + shrq $32, %r10 + addq %rdi, %r11 + addq %r10, %r11 + movq %r9, %rdi + imulq %rdx, %r9 + imulq %rax, %rdi + movl %r9d, %r10d + shrq $32, %r9 + addq %r10, %r11 + movl %r11d, %r10d + shrq $32, %r11 + addq %r9, %rdi + addq %r11, %rdi + movq %rsi, %r9 + imulq %rdx, %rsi + imulq %rax, %r9 + shlq $32, %r10 + orq %rbx, %r10 + movl (%rcx), %eax + movl %esi, %r11d + shrq $32, %rsi + addq %r11, %rdi + movl %edi, %r11d + shrq $32, %rdi + addq %rsi, %r9 + addq %rdi, %r9 + imulq %rax, %rdx + pextrw $3, %xmm0, %ebx + lea PI_INV_TABLE(%rip), %rdi + subq %rdi, %rcx + addl %ecx, %ecx + addl %ecx, %ecx + addl %ecx, %ecx + addl $19, %ecx + movl $32768, %esi + andl %ebx, %esi + shrl $4, %ebx + andl $2047, %ebx + subl $1023, %ebx + subl %ebx, %ecx + addq %rdx, %r9 + movl %ecx, %edx + addl $32, %edx + cmpl $0, %ecx + jl .L_2TAG_PACKET_5.0.1 + negl %ecx + addl $29, %ecx + shll %cl, %r9d + movl %r9d, %edi + andl $1073741823, %r9d + testl $536870912, %r9d + jne .L_2TAG_PACKET_6.0.1 + shrl %cl, %r9d + movl $0, %ebx + shlq $32, %r9 + orq %r11, %r9 +.L_2TAG_PACKET_7.0.1: +.L_2TAG_PACKET_8.0.1: + cmpq $0, %r9 + je .L_2TAG_PACKET_9.0.1 +.L_2TAG_PACKET_10.0.1: + bsr %r9, %r11 + movl $29, %ecx + subl %r11d, %ecx + jle .L_2TAG_PACKET_11.0.1 + shlq %cl, %r9 + movq %r10, %rax + shlq %cl, %r10 + addl %ecx, %edx + negl %ecx + addl $64, %ecx + shrq %cl, %rax + shrq %cl, %r8 + orq %rax, %r9 + orq %r8, %r10 +.L_2TAG_PACKET_12.0.1: + cvtsi2sdq %r9, %xmm0 + shrq $1, %r10 + cvtsi2sdq %r10, %xmm3 + xorpd %xmm4, %xmm4 + shll $4, %edx + negl %edx + addl $16368, %edx + orl %esi, %edx + xorl %ebx, %edx + pinsrw $3, %edx, %xmm4 + movq PI_4(%rip), %xmm2 + movq 8+PI_4(%rip), %xmm7 + xorpd %xmm5, %xmm5 + subl $1008, %edx + pinsrw $3, %edx, %xmm5 + mulsd %xmm4, %xmm0 + shll $16, %esi + sarl $31, %esi + mulsd %xmm5, %xmm3 + movq %xmm0, %xmm1 + mulsd %xmm2, %xmm0 + shrl $30, %edi + addsd %xmm3, %xmm1 + mulsd %xmm2, %xmm3 + addl %esi, %edi + xorl %esi, %edi + mulsd %xmm1, %xmm7 + movl %edi, %eax + addsd %xmm3, %xmm7 + movq %xmm0, %xmm2 + addsd %xmm7, %xmm0 + subsd %xmm0, %xmm2 + addsd %xmm2, %xmm7 + movapd PI32INV(%rip), %xmm1 + movddup %xmm0, %xmm0 + movapd sign_mask(%rip), %xmm4 + andpd %xmm0, %xmm4 + mulpd %xmm0, %xmm1 + movddup %xmm7, %xmm7 + movapd ONEHALF(%rip), %xmm5 + movapd MUL16(%rip), %xmm6 + orps %xmm4, %xmm5 + addpd %xmm5, %xmm1 + movapd %xmm1, %xmm5 + unpckhpd %xmm5, %xmm5 + cvttsd2si %xmm5, %edx + cvttpd2dq %xmm1, %xmm1 + cvtdq2pd %xmm1, %xmm1 + mulpd %xmm6, %xmm1 + movapd P_1(%rip), %xmm3 + movq QQ_2(%rip), %xmm5 + shll $4, %eax + addl $469248, %edx + movapd P_2(%rip), %xmm4 + mulpd %xmm1, %xmm3 + addl %eax, %edx + andl $31, %edx + mulsd %xmm1, %xmm5 + movl %edx, %ecx + mulpd %xmm1, %xmm4 + shll $1, %ecx + subpd %xmm3, %xmm0 + mulpd P_3(%rip), %xmm1 + addl %ecx, %edx + shll $2, %ecx + addl %ecx, %edx + addsd %xmm0, %xmm5 + movapd %xmm0, %xmm2 + subpd %xmm4, %xmm0 + movq ONE(%rip), %xmm6 + shll $4, %edx + lea Ctable(%rip), %rax + andpd MASK_35(%rip), %xmm5 + movapd %xmm0, %xmm3 + addq %rdx, %rax + subpd %xmm0, %xmm2 + unpckhpd %xmm0, %xmm0 + divsd %xmm5, %xmm6 + subpd %xmm4, %xmm2 + subsd %xmm5, %xmm3 + subpd %xmm1, %xmm2 + movapd 48(%rax), %xmm1 + addpd %xmm7, %xmm2 + movapd 16(%rax), %xmm7 + mulpd %xmm0, %xmm7 + movapd 96(%rax), %xmm4 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm4 + addsd %xmm3, %xmm2 + movapd %xmm0, %xmm3 + mulpd %xmm0, %xmm0 + addpd (%rax), %xmm7 + addpd 32(%rax), %xmm1 + mulpd %xmm0, %xmm1 + addpd 80(%rax), %xmm4 + addpd %xmm1, %xmm7 + movapd 112(%rax), %xmm1 + mulpd %xmm0, %xmm1 + mulpd %xmm0, %xmm0 + addpd %xmm1, %xmm4 + movapd 64(%rax), %xmm1 + mulpd %xmm0, %xmm1 + addpd %xmm1, %xmm7 + movapd %xmm3, %xmm1 + mulpd %xmm0, %xmm3 + mulsd %xmm0, %xmm0 + mulpd 144(%rax), %xmm1 + mulpd %xmm3, %xmm4 + movq %xmm1, %xmm3 + addpd %xmm4, %xmm7 + movq %xmm1, %xmm4 + mulsd %xmm7, %xmm0 + unpckhpd %xmm7, %xmm7 + addsd %xmm7, %xmm0 + unpckhpd %xmm1, %xmm1 + addsd %xmm1, %xmm3 + subsd %xmm3, %xmm4 + addsd %xmm4, %xmm1 + movq %xmm2, %xmm4 + movq 144(%rax), %xmm7 + unpckhpd %xmm2, %xmm2 + addsd 152(%rax), %xmm7 + mulsd %xmm2, %xmm7 + addsd 136(%rax), %xmm7 + addsd %xmm1, %xmm7 + addsd %xmm7, %xmm0 + movq ONE(%rip), %xmm7 + mulsd %xmm6, %xmm4 + movq 168(%rax), %xmm2 + andpd %xmm6, %xmm2 + mulsd %xmm2, %xmm5 + mulsd 160(%rax), %xmm6 + subsd %xmm5, %xmm7 + subsd 128(%rax), %xmm2 + subsd %xmm4, %xmm7 + mulsd %xmm6, %xmm7 + movq %xmm3, %xmm4 + subsd %xmm2, %xmm3 + addsd %xmm3, %xmm2 + subsd %xmm2, %xmm4 + addsd %xmm4, %xmm0 + subsd %xmm7, %xmm0 + addsd %xmm3, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_9.0.1: + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + movq $0, %r8 + cmpq $0, %r9 + jne .L_2TAG_PACKET_10.0.1 + addl $64, %edx + movq %r10, %r9 + movq %r8, %r10 + cmpq $0, %r9 + jne .L_2TAG_PACKET_10.0.1 + jmp .L_2TAG_PACKET_12.0.1 +.L_2TAG_PACKET_11.0.1: + je .L_2TAG_PACKET_12.0.1 + negl %ecx + shrq %cl, %r10 + movq %r9, %rax + shrq %cl, %r9 + subl %ecx, %edx + negl %ecx + addl $64, %ecx + shlq %cl, %rax + orq %rax, %r10 + jmp .L_2TAG_PACKET_12.0.1 +.L_2TAG_PACKET_5.0.1: + notl %ecx + shlq $32, %r9 + orq %r11, %r9 + shlq %cl, %r9 + movq %r9, %rdi + testl $-2147483648, %r9d + jne .L_2TAG_PACKET_13.0.1 + shrl %cl, %r9d + movl $0, %ebx + shrq $2, %rdi + jmp .L_2TAG_PACKET_8.0.1 +.L_2TAG_PACKET_6.0.1: + shrl %cl, %r9d + movl $1073741824, %ebx + shrl %cl, %ebx + shlq $32, %r9 + orq %r11, %r9 + shlq $32, %rbx + addl $1073741824, %edi + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + jmp .L_2TAG_PACKET_7.0.1 +.L_2TAG_PACKET_13.0.1: + shrl %cl, %r9d + movq $0x100000000, %rbx + shrq %cl, %rbx + movq $0, %rcx + movq $0, %r11 + subq %r8, %rcx + sbbq %r10, %r11 + sbbq %r9, %rbx + movq %rcx, %r8 + movq %r11, %r10 + movq %rbx, %r9 + movl $32768, %ebx + shrq $2, %rdi + addl $1073741824, %edi + jmp .L_2TAG_PACKET_8.0.1 +.L_2TAG_PACKET_4.0.1: + movq 8(%rsp), %xmm0 + mulsd NEG_ZERO(%rip), %xmm0 + movq %xmm0, (%rsp) +.L_2TAG_PACKET_14.0.1: +..B1.4: + addq $16, %rsp +..___tag_value_tan.6: + popq %rbx +..___tag_value_tan.8: + ret +..___tag_value_tan.9: +END(tan) +# -- End tan + .section .rodata, "a" + .align 16 + .align 16 +ONEHALF: + .long 0 + .long 1071644672 + .long 0 + .long 1071644672 + .type ONEHALF,@object + .size ONEHALF,16 + .align 16 +MUL16: + .long 0 + .long 1076887552 + .long 0 + .long 1072693248 + .type MUL16,@object + .size MUL16,16 + .align 16 +sign_mask: + .long 0 + .long 2147483648 + .long 0 + .long 2147483648 + .type sign_mask,@object + .size sign_mask,16 + .align 16 +PI32INV: + .long 1841940611 + .long 1071931184 + .long 1841940611 + .long 1076125488 + .type PI32INV,@object + .size PI32INV,16 + .align 16 +P_1: + .long 1413758976 + .long 1069097467 + .long 1413742592 + .long 1069097467 + .type P_1,@object + .size P_1,16 + .align 16 +P_2: + .long 1734819840 + .long 3174229945 + .long 1280049152 + .long 1028033571 + .type P_2,@object + .size P_2,16 + .align 16 +P_3: + .long 923219018 + .long 984130272 + .long 57701189 + .long 988383790 + .type P_3,@object + .size P_3,16 + .align 16 +Ctable: + .long 0 + .long 0 + .long 0 + .long 0 + .long 2284589306 + .long 1066820852 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1441186365 + .long 1065494243 + .long 1431655765 + .long 1070945621 + .long 0 + .long 0 + .long 0 + .long 0 + .long 236289504 + .long 1064135997 + .long 286331153 + .long 1069617425 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1160476131 + .long 1062722102 + .long 463583772 + .long 1068212666 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1313038235 + .long 1066745731 + .long 0 + .long 0 + .long 1013878342 + .long 1067152618 + .long 0 + .long 0 + .long 3663426833 + .long 1065725283 + .long 3693284251 + .long 1069118808 + .long 650852232 + .long 1065882376 + .long 1996245381 + .long 1071000265 + .long 2008746170 + .long 1064664197 + .long 3055842593 + .long 1068578846 + .long 1495406348 + .long 1064652437 + .long 2269530157 + .long 1069711235 + .long 285563696 + .long 1063576465 + .long 1046897440 + .long 1067705865 + .long 233429731 + .long 1063453151 + .long 522045958 + .long 1068476590 + .long 2354785698 + .long 1069102779 + .long 1317599141 + .long 1012432133 + .long 0 + .long 1072693248 + .long 2828230105 + .long 1065606626 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1512545955 + .long 1068119047 + .long 0 + .long 0 + .long 1127048698 + .long 1067909459 + .long 0 + .long 0 + .long 2300200450 + .long 1067254767 + .long 3593250296 + .long 1070233561 + .long 3009365544 + .long 1066902117 + .long 1127373050 + .long 1071173457 + .long 3046103305 + .long 1066371299 + .long 24583402 + .long 1069723988 + .long 4082511758 + .long 1065914199 + .long 3223889699 + .long 1070020367 + .long 548927984 + .long 1065415756 + .long 558065897 + .long 1068949418 + .long 680073315 + .long 1064940726 + .long 388873200 + .long 1068944270 + .long 3763679576 + .long 1070167541 + .long 1497360404 + .long 1009710547 + .long 0 + .long 1072693248 + .long 64931152 + .long 1067729411 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2467582782 + .long 1069256389 + .long 0 + .long 0 + .long 162150096 + .long 1068946420 + .long 0 + .long 0 + .long 3702794237 + .long 1068579152 + .long 3631919291 + .long 1070936926 + .long 3456821413 + .long 1068217218 + .long 2031366438 + .long 1071495745 + .long 1596664020 + .long 1067799281 + .long 1509038701 + .long 1070601643 + .long 583171477 + .long 1067510148 + .long 3785344682 + .long 1070618476 + .long 2402036048 + .long 1067075736 + .long 3233018412 + .long 1069913186 + .long 411280568 + .long 1066710556 + .long 1065584192 + .long 1069747896 + .long 895247324 + .long 1070819848 + .long 500078909 + .long 3161288781 + .long 0 + .long 1072693248 + .long 729983843 + .long 1068994194 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1458794562 + .long 1070398550 + .long 0 + .long 0 + .long 2857777489 + .long 1070137637 + .long 0 + .long 0 + .long 1024359517 + .long 1069876531 + .long 2616040238 + .long 1071582937 + .long 1609024636 + .long 1069675088 + .long 2529240549 + .long 1071836633 + .long 1510128600 + .long 1069440113 + .long 2251697184 + .long 1071253687 + .long 1262761453 + .long 1069142850 + .long 1263091857 + .long 1071190461 + .long 3043383486 + .long 1068885191 + .long 2476932470 + .long 1070842002 + .long 3659995028 + .long 1068669200 + .long 855891755 + .long 1070696894 + .long 2583490354 + .long 1071284857 + .long 3062633575 + .long 1014008623 + .long 0 + .long 1072693248 + .long 2550940471 + .long 1069938201 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3422807297 + .long 1071640847 + .long 0 + .long 0 + .long 1151658053 + .long 1071494715 + .long 0 + .long 0 + .long 929607071 + .long 1071346340 + .long 1037049034 + .long 1072037305 + .long 2786928657 + .long 1071215282 + .long 1447406859 + .long 1072265209 + .long 3490952107 + .long 1071090851 + .long 3205232916 + .long 1071968658 + .long 1297344304 + .long 1070977120 + .long 1066110976 + .long 1071946035 + .long 3803721480 + .long 1070871082 + .long 1496754229 + .long 1071807201 + .long 2982550683 + .long 1070773243 + .long 4014441989 + .long 1071736222 + .long 419968236 + .long 1071717047 + .long 3451266538 + .long 3163444811 + .long 0 + .long 1072693248 + .long 2960267235 + .long 1070745841 + .long 0 + .long 0 + .long 0 + .long 0 + .long 724322768 + .long 1072881308 + .long 0 + .long 0 + .long 643153048 + .long 1072905816 + .long 0 + .long 0 + .long 4285079458 + .long 1072928558 + .long 3912524733 + .long 1072622983 + .long 118362272 + .long 1072952754 + .long 4107767972 + .long 1072827408 + .long 2689502883 + .long 1072976922 + .long 946523347 + .long 1072772766 + .long 573204189 + .long 1073001761 + .long 581531518 + .long 1072826391 + .long 1386236526 + .long 1073026959 + .long 3718905905 + .long 1072832823 + .long 1145558140 + .long 1073052673 + .long 513572637 + .long 1072861969 + .long 716700048 + .long 1071997368 + .long 547126769 + .long 1015523525 + .long 0 + .long 1072693248 + .long 1097907398 + .long 1071420120 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3349892442 + .long 1074290212 + .long 0 + .long 0 + .long 3913197405 + .long 1074501181 + .long 0 + .long 0 + .long 2494034522 + .long 1074739170 + .long 1264738763 + .long 1073084804 + .long 1520293906 + .long 1074899632 + .long 1958936600 + .long 1073411493 + .long 2133649635 + .long 1075052171 + .long 4270740730 + .long 1073574708 + .long 1728930189 + .long 1075224844 + .long 1303998552 + .long 1073799186 + .long 618611933 + .long 1075420255 + .long 1769828046 + .long 1073938542 + .long 2200537986 + .long 1075641421 + .long 433361110 + .long 1074105369 + .long 719595600 + .long 1072317184 + .long 294527206 + .long 3162140088 + .long 0 + .long 1073741824 + .long 3811788216 + .long 3218400550 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1704352102 + .long 1075943001 + .long 0 + .long 0 + .long 2284589306 + .long 1076258036 + .long 0 + .long 0 + .long 2211264291 + .long 1076659010 + .long 0 + .long 1073741824 + .long 1441186365 + .long 1077028579 + .long 1431655765 + .long 1074091349 + .long 876943673 + .long 1077353622 + .long 2863311531 + .long 1074440874 + .long 236289504 + .long 1077767485 + .long 286331153 + .long 1074860305 + .long 2805473311 + .long 1078115278 + .long 95443718 + .long 1075163227 + .long 1160476131 + .long 1078450742 + .long 463583772 + .long 1075552698 + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 0 + .long 1073741824 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1330165971 + .long 3207850745 + .long 0 + .long 0 + .long 217536623 + .long 1059109098 + .long 0 + .long 0 + .long 3492120849 + .long 3205151475 + .long 602185705 + .long 3215678092 + .long 760422958 + .long 1056312597 + .long 555127889 + .long 1067545266 + .long 3139784124 + .long 3202470837 + .long 3690544014 + .long 3213150171 + .long 95707915 + .long 1053635428 + .long 4003114407 + .long 1064581412 + .long 2034926231 + .long 3199711161 + .long 3759536023 + .long 3210559989 + .long 3826928214 + .long 1050893819 + .long 3837960785 + .long 1061790379 + .long 1526325248 + .long 3217967566 + .long 2356426521 + .long 1025423456 + .long 0 + .long 0 + .long 457728975 + .long 1071088276 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1398462608 + .long 3207303968 + .long 0 + .long 0 + .long 26205983 + .long 1058461213 + .long 0 + .long 0 + .long 56226238 + .long 3204528612 + .long 2754706541 + .long 3215359511 + .long 2187799823 + .long 1055634437 + .long 790323742 + .long 1067402587 + .long 1372385848 + .long 3201651479 + .long 4097292716 + .long 3212856302 + .long 3348210357 + .long 1052830099 + .long 2442796466 + .long 1064337602 + .long 862608142 + .long 3198830754 + .long 170296152 + .long 3210060867 + .long 3755571428 + .long 1049933343 + .long 3614866008 + .long 1061361670 + .long 719978496 + .long 3217669096 + .long 1998842465 + .long 3174703977 + .long 0 + .long 0 + .long 3749156607 + .long 1071048258 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3120498638 + .long 3206749304 + .long 0 + .long 0 + .long 2773578114 + .long 1058009312 + .long 0 + .long 0 + .long 2030783676 + .long 3203817873 + .long 2223654598 + .long 3215071936 + .long 2976134650 + .long 1054987244 + .long 706390066 + .long 1067217386 + .long 4258437615 + .long 3200900378 + .long 1066252975 + .long 3212391267 + .long 815777514 + .long 1051989462 + .long 3202745457 + .long 1064010682 + .long 2493556375 + .long 3198004753 + .long 1046243251 + .long 3209678971 + .long 2593078846 + .long 1049017717 + .long 2763962276 + .long 1060970161 + .long 701480960 + .long 3217377742 + .long 3205862232 + .long 3174660915 + .long 0 + .long 0 + .long 2267016812 + .long 1071015664 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 2107155798 + .long 3206166872 + .long 0 + .long 0 + .long 2642992129 + .long 1057424578 + .long 0 + .long 0 + .long 1936992811 + .long 3203204426 + .long 1485063559 + .long 3214682643 + .long 1432914553 + .long 1054319398 + .long 3996381654 + .long 1067075828 + .long 2833029256 + .long 3200223545 + .long 2866066872 + .long 3211982662 + .long 2432888737 + .long 1051234178 + .long 3669764559 + .long 1063748136 + .long 2458496952 + .long 3197170774 + .long 1948234989 + .long 3209098147 + .long 2843698787 + .long 1048163519 + .long 3398041407 + .long 1060559728 + .long 2829230080 + .long 3217092115 + .long 1034046433 + .long 3174271903 + .long 0 + .long 0 + .long 298675305 + .long 1070989821 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 437603223 + .long 3205589761 + .long 0 + .long 0 + .long 759330352 + .long 1057048511 + .long 0 + .long 0 + .long 3107463368 + .long 3202507988 + .long 3144465176 + .long 3214191500 + .long 2290961810 + .long 1053841035 + .long 1618153340 + .long 1066971547 + .long 3836869393 + .long 3199400272 + .long 584032116 + .long 3211469261 + .long 1245704358 + .long 1050626462 + .long 4247487438 + .long 1063561943 + .long 1669034927 + .long 3196274812 + .long 3844233498 + .long 3208626322 + .long 2706958524 + .long 1047411374 + .long 3857199098 + .long 1060281647 + .long 3593904128 + .long 3216590719 + .long 3267547836 + .long 3172163321 + .long 0 + .long 0 + .long 4076712227 + .long 1070970214 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3290090340 + .long 3204793485 + .long 0 + .long 0 + .long 3685760367 + .long 1056668370 + .long 0 + .long 0 + .long 2655163949 + .long 3201674917 + .long 628750575 + .long 3213566872 + .long 680140505 + .long 1053299777 + .long 2954464709 + .long 1066900026 + .long 803201619 + .long 3198516435 + .long 1466315631 + .long 3210837162 + .long 1611220163 + .long 1049972438 + .long 2766187256 + .long 1063437894 + .long 1804579484 + .long 3195331491 + .long 3695969289 + .long 3207854418 + .long 2617238373 + .long 1046675948 + .long 3095830084 + .long 1060095334 + .long 3789570048 + .long 3216034914 + .long 23826559 + .long 3172048060 + .long 0 + .long 0 + .long 3870939386 + .long 1070956467 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1571758758 + .long 3203672535 + .long 0 + .long 0 + .long 113026373 + .long 1056416381 + .long 0 + .long 0 + .long 1913766298 + .long 3200523326 + .long 2507068734 + .long 3212502004 + .long 4000648818 + .long 1053003803 + .long 2446607349 + .long 1066858259 + .long 912662124 + .long 3197333001 + .long 1349489537 + .long 3209765608 + .long 3412972607 + .long 1049641401 + .long 1721283327 + .long 1063366855 + .long 1466691883 + .long 3194116746 + .long 3852528092 + .long 3206760861 + .long 285443293 + .long 1046158380 + .long 1758739894 + .long 1059895449 + .long 1858781184 + .long 3214984212 + .long 3447575948 + .long 1024675855 + .long 0 + .long 0 + .long 2242038011 + .long 1070948320 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 0 + .long 0 + .long 0 + .long 0 + .long 737611454 + .long 1056336527 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3594790527 + .long 1052911621 + .long 381774871 + .long 1066844524 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3303051618 + .long 1049456050 + .long 3154187623 + .long 1063343722 + .long 0 + .long 0 + .long 0 + .long 0 + .long 528061788 + .long 1045944910 + .long 2469719819 + .long 1059831159 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1431655765 + .long 1070945621 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1571758758 + .long 1056188887 + .long 0 + .long 0 + .long 113026373 + .long 1056416381 + .long 0 + .long 0 + .long 1913766298 + .long 1053039678 + .long 2507068734 + .long 1065018356 + .long 4000648818 + .long 1053003803 + .long 2446607349 + .long 1066858259 + .long 912662124 + .long 1049849353 + .long 1349489537 + .long 1062281960 + .long 3412972607 + .long 1049641401 + .long 1721283327 + .long 1063366855 + .long 1466691883 + .long 1046633098 + .long 3852528092 + .long 1059277213 + .long 285443293 + .long 1046158380 + .long 1758739894 + .long 1059895449 + .long 1858781184 + .long 1067500564 + .long 3447575948 + .long 3172159503 + .long 0 + .long 0 + .long 2242038011 + .long 1070948320 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3290090340 + .long 1057309837 + .long 0 + .long 0 + .long 3685760367 + .long 1056668370 + .long 0 + .long 0 + .long 2655163949 + .long 1054191269 + .long 628750575 + .long 1066083224 + .long 680140505 + .long 1053299777 + .long 2954464709 + .long 1066900026 + .long 803201619 + .long 1051032787 + .long 1466315631 + .long 1063353514 + .long 1611220163 + .long 1049972438 + .long 2766187256 + .long 1063437894 + .long 1804579484 + .long 1047847843 + .long 3695969289 + .long 1060370770 + .long 2617238373 + .long 1046675948 + .long 3095830084 + .long 1060095334 + .long 3789570048 + .long 1068551266 + .long 23826559 + .long 1024564412 + .long 0 + .long 0 + .long 3870939386 + .long 1070956467 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 437603223 + .long 1058106113 + .long 0 + .long 0 + .long 759330352 + .long 1057048511 + .long 0 + .long 0 + .long 3107463368 + .long 1055024340 + .long 3144465176 + .long 1066707852 + .long 2290961810 + .long 1053841035 + .long 1618153340 + .long 1066971547 + .long 3836869393 + .long 1051916624 + .long 584032116 + .long 1063985613 + .long 1245704358 + .long 1050626462 + .long 4247487438 + .long 1063561943 + .long 1669034927 + .long 1048791164 + .long 3844233498 + .long 1061142674 + .long 2706958524 + .long 1047411374 + .long 3857199098 + .long 1060281647 + .long 3593904128 + .long 1069107071 + .long 3267547836 + .long 1024679673 + .long 0 + .long 0 + .long 4076712227 + .long 1070970214 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 2107155798 + .long 1058683224 + .long 0 + .long 0 + .long 2642992129 + .long 1057424578 + .long 0 + .long 0 + .long 1936992811 + .long 1055720778 + .long 1485063559 + .long 1067198995 + .long 1432914553 + .long 1054319398 + .long 3996381654 + .long 1067075828 + .long 2833029256 + .long 1052739897 + .long 2866066872 + .long 1064499014 + .long 2432888737 + .long 1051234178 + .long 3669764559 + .long 1063748136 + .long 2458496952 + .long 1049687126 + .long 1948234989 + .long 1061614499 + .long 2843698787 + .long 1048163519 + .long 3398041407 + .long 1060559728 + .long 2829230080 + .long 1069608467 + .long 1034046433 + .long 1026788255 + .long 0 + .long 0 + .long 298675305 + .long 1070989821 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 3120498638 + .long 1059265656 + .long 0 + .long 0 + .long 2773578114 + .long 1058009312 + .long 0 + .long 0 + .long 2030783676 + .long 1056334225 + .long 2223654598 + .long 1067588288 + .long 2976134650 + .long 1054987244 + .long 706390066 + .long 1067217386 + .long 4258437615 + .long 1053416730 + .long 1066252975 + .long 1064907619 + .long 815777514 + .long 1051989462 + .long 3202745457 + .long 1064010682 + .long 2493556375 + .long 1050521105 + .long 1046243251 + .long 1062195323 + .long 2593078846 + .long 1049017717 + .long 2763962276 + .long 1060970161 + .long 701480960 + .long 1069894094 + .long 3205862232 + .long 1027177267 + .long 0 + .long 0 + .long 2267016812 + .long 1071015664 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1398462608 + .long 1059820320 + .long 0 + .long 0 + .long 26205983 + .long 1058461213 + .long 0 + .long 0 + .long 56226238 + .long 1057044964 + .long 2754706541 + .long 1067875863 + .long 2187799823 + .long 1055634437 + .long 790323742 + .long 1067402587 + .long 1372385848 + .long 1054167831 + .long 4097292716 + .long 1065372654 + .long 3348210357 + .long 1052830099 + .long 2442796466 + .long 1064337602 + .long 862608142 + .long 1051347106 + .long 170296152 + .long 1062577219 + .long 3755571428 + .long 1049933343 + .long 3614866008 + .long 1061361670 + .long 719978496 + .long 1070185448 + .long 1998842465 + .long 1027220329 + .long 0 + .long 0 + .long 3749156607 + .long 1071048258 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1330165971 + .long 1060367097 + .long 0 + .long 0 + .long 217536623 + .long 1059109098 + .long 0 + .long 0 + .long 3492120849 + .long 1057667827 + .long 602185705 + .long 1068194444 + .long 760422958 + .long 1056312597 + .long 555127889 + .long 1067545266 + .long 3139784124 + .long 1054987189 + .long 3690544014 + .long 1065666523 + .long 95707915 + .long 1053635428 + .long 4003114407 + .long 1064581412 + .long 2034926231 + .long 1052227513 + .long 3759536023 + .long 1063076341 + .long 3826928214 + .long 1050893819 + .long 3837960785 + .long 1061790379 + .long 1526325248 + .long 1070483918 + .long 2356426521 + .long 3172907104 + .long 0 + .long 0 + .long 457728975 + .long 1071088276 + .long 0 + .long 1072693248 + .long 0 + .long 4294967288 + .long 1704352102 + .long 3223426649 + .long 0 + .long 0 + .long 2284589306 + .long 1076258036 + .long 0 + .long 0 + .long 2211264291 + .long 3224142658 + .long 0 + .long 3221225472 + .long 1441186365 + .long 1077028579 + .long 1431655765 + .long 1074091349 + .long 876943673 + .long 3224837270 + .long 2863311531 + .long 3221924522 + .long 236289504 + .long 1077767485 + .long 286331153 + .long 1074860305 + .long 2805473311 + .long 3225598926 + .long 95443718 + .long 3222646875 + .long 1160476131 + .long 1078450742 + .long 463583772 + .long 1075552698 + .long 0 + .long 3220176896 + .long 0 + .long 0 + .long 0 + .long 1073741824 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3349892442 + .long 3221773860 + .long 0 + .long 0 + .long 3913197405 + .long 1074501181 + .long 0 + .long 0 + .long 2494034522 + .long 3222222818 + .long 1264738763 + .long 3220568452 + .long 1520293906 + .long 1074899632 + .long 1958936600 + .long 1073411493 + .long 2133649635 + .long 3222535819 + .long 4270740730 + .long 3221058356 + .long 1728930189 + .long 1075224844 + .long 1303998552 + .long 1073799186 + .long 618611933 + .long 3222903903 + .long 1769828046 + .long 3221422190 + .long 2200537986 + .long 1075641421 + .long 433361110 + .long 1074105369 + .long 719595600 + .long 3219800832 + .long 294527206 + .long 1014656440 + .long 0 + .long 1073741824 + .long 3811788216 + .long 3218400550 + .long 0 + .long 0 + .long 0 + .long 0 + .long 724322768 + .long 3220364956 + .long 0 + .long 0 + .long 643153048 + .long 1072905816 + .long 0 + .long 0 + .long 4285079458 + .long 3220412206 + .long 3912524733 + .long 3220106631 + .long 118362272 + .long 1072952754 + .long 4107767972 + .long 1072827408 + .long 2689502883 + .long 3220460570 + .long 946523347 + .long 3220256414 + .long 573204189 + .long 1073001761 + .long 581531518 + .long 1072826391 + .long 1386236526 + .long 3220510607 + .long 3718905905 + .long 3220316471 + .long 1145558140 + .long 1073052673 + .long 513572637 + .long 1072861969 + .long 716700048 + .long 3219481016 + .long 547126769 + .long 3163007173 + .long 0 + .long 1072693248 + .long 1097907398 + .long 1071420120 + .long 0 + .long 0 + .long 0 + .long 0 + .long 3422807297 + .long 3219124495 + .long 0 + .long 0 + .long 1151658053 + .long 1071494715 + .long 0 + .long 0 + .long 929607071 + .long 3218829988 + .long 1037049034 + .long 3219520953 + .long 2786928657 + .long 1071215282 + .long 1447406859 + .long 1072265209 + .long 3490952107 + .long 3218574499 + .long 3205232916 + .long 3219452306 + .long 1297344304 + .long 1070977120 + .long 1066110976 + .long 1071946035 + .long 3803721480 + .long 3218354730 + .long 1496754229 + .long 3219290849 + .long 2982550683 + .long 1070773243 + .long 4014441989 + .long 1071736222 + .long 419968236 + .long 3219200695 + .long 3451266538 + .long 1015961163 + .long 0 + .long 1072693248 + .long 2960267235 + .long 1070745841 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1458794562 + .long 3217882198 + .long 0 + .long 0 + .long 2857777489 + .long 1070137637 + .long 0 + .long 0 + .long 1024359517 + .long 3217360179 + .long 2616040238 + .long 3219066585 + .long 1609024636 + .long 1069675088 + .long 2529240549 + .long 1071836633 + .long 1510128600 + .long 3216923761 + .long 2251697184 + .long 3218737335 + .long 1262761453 + .long 1069142850 + .long 1263091857 + .long 1071190461 + .long 3043383486 + .long 3216368839 + .long 2476932470 + .long 3218325650 + .long 3659995028 + .long 1068669200 + .long 855891755 + .long 1070696894 + .long 2583490354 + .long 3218768505 + .long 3062633575 + .long 3161492271 + .long 0 + .long 1072693248 + .long 2550940471 + .long 1069938201 + .long 0 + .long 0 + .long 0 + .long 0 + .long 2467582782 + .long 3216740037 + .long 0 + .long 0 + .long 162150096 + .long 1068946420 + .long 0 + .long 0 + .long 3702794237 + .long 3216062800 + .long 3631919291 + .long 3218420574 + .long 3456821413 + .long 1068217218 + .long 2031366438 + .long 1071495745 + .long 1596664020 + .long 3215282929 + .long 1509038701 + .long 3218085291 + .long 583171477 + .long 1067510148 + .long 3785344682 + .long 1070618476 + .long 2402036048 + .long 3214559384 + .long 3233018412 + .long 3217396834 + .long 411280568 + .long 1066710556 + .long 1065584192 + .long 1069747896 + .long 895247324 + .long 3218303496 + .long 500078909 + .long 1013805133 + .long 0 + .long 1072693248 + .long 729983843 + .long 1068994194 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1512545955 + .long 3215602695 + .long 0 + .long 0 + .long 1127048698 + .long 1067909459 + .long 0 + .long 0 + .long 2300200450 + .long 3214738415 + .long 3593250296 + .long 3217717209 + .long 3009365544 + .long 1066902117 + .long 1127373050 + .long 1071173457 + .long 3046103305 + .long 3213854947 + .long 24583402 + .long 3217207636 + .long 4082511758 + .long 1065914199 + .long 3223889699 + .long 1070020367 + .long 548927984 + .long 3212899404 + .long 558065897 + .long 3216433066 + .long 680073315 + .long 1064940726 + .long 388873200 + .long 1068944270 + .long 3763679576 + .long 3217651189 + .long 1497360404 + .long 3157194195 + .long 0 + .long 1072693248 + .long 64931152 + .long 1067729411 + .long 0 + .long 0 + .long 0 + .long 0 + .long 1313038235 + .long 3214229379 + .long 0 + .long 0 + .long 1013878342 + .long 1067152618 + .long 0 + .long 0 + .long 3663426833 + .long 3213208931 + .long 3693284251 + .long 3216602456 + .long 650852232 + .long 1065882376 + .long 1996245381 + .long 1071000265 + .long 2008746170 + .long 3212147845 + .long 3055842593 + .long 3216062494 + .long 1495406348 + .long 1064652437 + .long 2269530157 + .long 1069711235 + .long 285563696 + .long 3211060113 + .long 1046897440 + .long 3215189513 + .long 233429731 + .long 1063453151 + .long 522045958 + .long 1068476590 + .long 2354785698 + .long 3216586427 + .long 1317599141 + .long 3159915781 + .long 0 + .long 1072693248 + .long 2828230105 + .long 1065606626 + .long 0 + .long 0 + .long 0 + .long 0 + .type Ctable,@object + .size Ctable,5632 + .align 16 +MASK_35: + .long 4294705152 + .long 4294967295 + .long 0 + .long 0 + .type MASK_35,@object + .size MASK_35,16 + .align 16 +Q_11: + .long 3103673719 + .long 1065509018 + .type Q_11,@object + .size Q_11,8 + .space 8, 0x00 # pad + .align 16 +Q_9: + .long 3213130307 + .long 1066820768 + .type Q_9,@object + .size Q_9,8 + .space 8, 0x00 # pad + .align 16 +Q_7: + .long 1388628139 + .long 1068212666 + .type Q_7,@object + .size Q_7,8 + .space 8, 0x00 # pad + .align 16 +Q_5: + .long 285812550 + .long 1069617425 + .type Q_5,@object + .size Q_5,8 + .space 8, 0x00 # pad + .align 16 +Q_3: + .long 1431655954 + .long 1070945621 + .type Q_3,@object + .size Q_3,8 + .space 8, 0x00 # pad + .align 16 +PI_INV_TABLE: + .long 0 + .long 0 + .long 2734261102 + .long 1313084713 + .long 4230436817 + .long 4113882560 + .long 3680671129 + .long 1011060801 + .long 4266746795 + .long 3736847713 + .long 3072618042 + .long 1112396512 + .long 105459434 + .long 164729372 + .long 4263373596 + .long 2972297022 + .long 3900847605 + .long 784024708 + .long 3919343654 + .long 3026157121 + .long 965858873 + .long 2203269620 + .long 2625920907 + .long 3187222587 + .long 536385535 + .long 3724908559 + .long 4012839307 + .long 1510632735 + .long 1832287951 + .long 667617719 + .long 1330003814 + .long 2657085997 + .long 1965537991 + .long 3957715323 + .long 1023883767 + .long 2320667370 + .long 1811636145 + .long 529358088 + .long 1443049542 + .long 4235946923 + .long 4040145953 + .type PI_INV_TABLE,@object + .size PI_INV_TABLE,164 + .space 12, 0x00 # pad + .align 16 +PI_4: + .long 0 + .long 1072243195 + .long 1175561766 + .long 1048908043 + .type PI_4,@object + .size PI_4,16 + .align 8 +QQ_2: + .long 1734816687 + .long 1026746297 + .type QQ_2,@object + .size QQ_2,8 + .align 8 +ONE: + .long 0 + .long 1072693248 + .type ONE,@object + .size ONE,8 + .align 8 +TWO_POW_55: + .long 0 + .long 1130364928 + .type TWO_POW_55,@object + .size TWO_POW_55,8 + .align 8 +TWO_POW_M55: + .long 0 + .long 1015021568 + .type TWO_POW_M55,@object + .size TWO_POW_M55,8 + .align 4 +NEG_ZERO: + .long 0 + .long 2147483648 + .type NEG_ZERO,@object + .size NEG_ZERO,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000002c + .4byte 0x0000001c + .4byte ..___tag_value_tan.1-. + .4byte ..___tag_value_tan.9-..___tag_value_tan.1 + .2byte 0x0400 + .4byte ..___tag_value_tan.3-..___tag_value_tan.1 + .4byte 0x0283100e + .byte 0x04 + .4byte ..___tag_value_tan.5-..___tag_value_tan.3 + .2byte 0x200e + .byte 0x04 + .4byte ..___tag_value_tan.6-..___tag_value_tan.5 + .4byte 0x04c3100e + .4byte ..___tag_value_tan.8-..___tag_value_tan.6 + .2byte 0x080e +# End diff --git a/libm/x86_64/s_tanh.S b/libm/x86_64/s_tanh.S new file mode 100644 index 0000000..2c8f9bf --- /dev/null +++ b/libm/x86_64/s_tanh.S @@ -0,0 +1,1392 @@ +/* +Copyright (c) 2014, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/******************************************************************************/ +// ALGORITHM DESCRIPTION +// --------------------- +// +// tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x))=(1-exp(-2*x))/(1+exp(-2*x)) +// +// Let |x|=xH+xL (upper 26 bits, lower 27 bits) +// log2(e) rounded to 26 bits (high part) plus a double precision low part is +// L2EH+L2EL (upper 26, lower 53 bits) +// +// Let xH*L2EH=k+f+r`, where (k+f)*2^8*2=int(xH*L2EH*2^9), +// f=0.b1 b2 ... b8, k integer +// 2^{-f} is approximated as Tn[f]+Dn[f] +// Tn stores the high 53 bits, Dn stores (2^{-f}-Tn[f]) rounded to double precision +// +// r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-9}+2^{-14}, +// for |x| in [23/64,3*2^7) +// e^{-2*|x|}=2^{-k-f}*2^{-r} ~ 2^{-k}*(Tn+Dn)*(1+p)=(T0+D0)*(1+p) +// +// For |x| in [2^{-4},2^5): +// 2^{-r}-1 ~ p=c1*r+c2*r^2+..+c5*r^5 +// Let R=1/(1+T0+p*T0), truncated to 35 significant bits +// R=1/(1+T0+D0+p*(T0+D0))*(1+eps), |eps|<2^{-33} +// 1+T0+D0+p*(T0+D0)=KH+KL, where +// KH=(1+T0+c1*r*T0)_high (leading 17 bits) +// KL=T0_low+D0+(c1*r*T0)_low+c1*r*D0+(c2*r^2+..c5*r^5)*T0 +// eps ~ (R*KH-1)+R*KL +// 1/(1+T0+D0+p*(T0+D0)) ~ R-R*eps +// The result is approximated as (1-T0-D0-(T0+D0)*p)*(R-R*eps) +// 1-T0-D0-(T0+D0)*p=-((KH-2)+KL) +// The result is formed as +// (KH-2)*R+(-(KH-2)*R*eps+(KL*R-KL*R*eps)), with the correct sign +// set at the end +// +// For |x| in [2^{-64},2^{-4}): +// A Taylor series expansion is used (x+p3*x^3+..+p13*x^{13}) +// +// For |x|<2^{-64}: x is returned +// +// For |x|>=2^32: return +/-1 +// +// Special cases: +// tanh(NaN) = quiet NaN, and raise invalid exception +// tanh(INF) = that INF +// tanh(+/-0) = +/-0 +// +/******************************************************************************/ + +#include +# -- Begin tanh +ENTRY(tanh) +# parameter 1: %xmm0 +..B1.1: +..___tag_value_tanh.1: + pushq %rsi +..___tag_value_tanh.3: +..B1.2: + movsd HALFMASK(%rip), %xmm3 + xorpd %xmm4, %xmm4 + movsd L2E(%rip), %xmm1 + movsd 8+L2E(%rip), %xmm2 + movl $32768, %eax + pinsrw $3, %eax, %xmm4 + movsd Shifter(%rip), %xmm6 + pextrw $3, %xmm0, %ecx + andpd %xmm0, %xmm3 + andnpd %xmm0, %xmm4 + pshufd $68, %xmm4, %xmm5 + movl $32768, %edx + andl %ecx, %edx + andl $32767, %ecx + subl $16304, %ecx + cmpl $144, %ecx + jae .L_2TAG_PACKET_0.0.1 + subsd %xmm3, %xmm4 + mulsd %xmm1, %xmm3 + mulsd %xmm5, %xmm2 + cvtsd2si %xmm3, %eax + movq %xmm3, %xmm7 + addsd %xmm6, %xmm3 + mulsd %xmm4, %xmm1 + movsd ONEMASK(%rip), %xmm4 + subsd %xmm6, %xmm3 + xorpd %xmm0, %xmm0 + addsd %xmm1, %xmm2 + subsd %xmm3, %xmm7 + movapd cv(%rip), %xmm6 + addsd %xmm7, %xmm2 + movl $255, %ecx + andl %eax, %ecx + addl %ecx, %ecx + lea T2_neg_f(%rip), %r8 + movapd (%r8,%rcx,8), %xmm5 + shrl $4, %eax + andl $65520, %eax + subl $16368, %eax + negl %eax + pinsrw $3, %eax, %xmm0 + movapd 16+cv(%rip), %xmm1 + pshufd $68, %xmm0, %xmm0 + mulpd %xmm5, %xmm0 + movsd 32+cv(%rip), %xmm7 + pshufd $68, %xmm2, %xmm2 + movq %xmm4, %xmm5 + addsd %xmm0, %xmm4 + mulpd %xmm2, %xmm6 + mulsd %xmm2, %xmm7 + mulpd %xmm2, %xmm2 + addpd %xmm6, %xmm1 + mulsd %xmm2, %xmm2 + movsd ONEMASK(%rip), %xmm3 + mulpd %xmm2, %xmm1 + pshufd $78, %xmm1, %xmm6 + addsd %xmm6, %xmm1 + movq %xmm1, %xmm6 + addsd %xmm7, %xmm1 + mulsd %xmm0, %xmm1 + addsd %xmm4, %xmm1 + andpd MASK3(%rip), %xmm4 + divsd %xmm1, %xmm5 + subsd %xmm4, %xmm3 + pshufd $238, %xmm0, %xmm1 + addsd %xmm0, %xmm3 + movq %xmm4, %xmm2 + addsd %xmm1, %xmm3 + mulsd %xmm7, %xmm1 + mulsd %xmm0, %xmm7 + addsd %xmm1, %xmm3 + addsd %xmm7, %xmm4 + movsd RMASK(%rip), %xmm1 + mulsd %xmm0, %xmm6 + andpd MASK3(%rip), %xmm4 + addsd %xmm6, %xmm3 + movq %xmm4, %xmm6 + subsd %xmm4, %xmm2 + addsd %xmm7, %xmm2 + movsd ONEMASK(%rip), %xmm7 + andpd %xmm1, %xmm5 + addsd %xmm2, %xmm3 + mulsd %xmm5, %xmm4 + xorpd %xmm2, %xmm2 + mulsd %xmm5, %xmm3 + subsd TWOMASK(%rip), %xmm6 + subsd %xmm7, %xmm4 + xorl $32768, %edx + pinsrw $3, %edx, %xmm2 + addsd %xmm3, %xmm4 + mulsd %xmm5, %xmm6 + movq %xmm3, %xmm1 + mulsd %xmm4, %xmm3 + movq %xmm6, %xmm0 + mulsd %xmm4, %xmm6 + subsd %xmm3, %xmm1 + subsd %xmm6, %xmm1 + addsd %xmm1, %xmm0 + xorpd %xmm2, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_0.0.1: + addl $960, %ecx + cmpl $1104, %ecx + jae .L_2TAG_PACKET_1.0.1 + movapd pv(%rip), %xmm2 + pshufd $68, %xmm0, %xmm1 + movapd 16+pv(%rip), %xmm3 + mulpd %xmm1, %xmm1 + movapd 32+pv(%rip), %xmm4 + mulpd %xmm1, %xmm2 + pshufd $68, %xmm1, %xmm5 + addpd %xmm3, %xmm2 + mulsd %xmm5, %xmm5 + mulpd %xmm1, %xmm2 + mulsd %xmm5, %xmm5 + addpd %xmm4, %xmm2 + mulpd %xmm5, %xmm2 + pshufd $238, %xmm2, %xmm5 + addsd %xmm5, %xmm2 + mulsd %xmm0, %xmm2 + addsd %xmm2, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_1.0.1: + addl $15344, %ecx + cmpl $16448, %ecx + jae .L_2TAG_PACKET_2.0.1 + cmpl $16, %ecx + jb .L_2TAG_PACKET_3.0.1 + xorpd %xmm2, %xmm2 + movl $17392, %eax + pinsrw $3, %eax, %xmm2 + mulsd %xmm0, %xmm2 + addsd %xmm0, %xmm2 + jmp ..B1.4 +.L_2TAG_PACKET_3.0.1: + movq %xmm0, %xmm2 + mulsd %xmm2, %xmm2 + jmp ..B1.4 +.L_2TAG_PACKET_2.0.1: + cmpl $32752, %ecx + jae .L_2TAG_PACKET_4.0.1 + xorpd %xmm2, %xmm2 + movl $15344, %ecx + pinsrw $3, %ecx, %xmm2 + movq %xmm2, %xmm3 + mulsd %xmm2, %xmm2 + addsd %xmm3, %xmm2 +.L_2TAG_PACKET_5.0.1: + xorpd %xmm0, %xmm0 + orl $16368, %edx + pinsrw $3, %edx, %xmm0 + jmp ..B1.4 +.L_2TAG_PACKET_4.0.1: + movq %xmm0, %xmm2 + movd %xmm0, %eax + psrlq $20, %xmm2 + movd %xmm2, %ecx + orl %eax, %ecx + cmpl $0, %ecx + je .L_2TAG_PACKET_5.0.1 + addsd %xmm0, %xmm0 + movq %xmm0, (%rsp) +.L_2TAG_PACKET_6.0.1: +..B1.4: + popq %rcx +..___tag_value_tanh.4: + ret +..___tag_value_tanh.5: +END(tanh) +# -- End tanh + .section .rodata, "a" + .align 16 + .align 16 +L2E: + .long 1610612736 + .long 1082594631 + .long 4166901572 + .long 1055174155 + .type L2E,@object + .size L2E,16 + .align 16 +Shifter: + .long 0 + .long 1127743488 + .long 0 + .long 3275227136 + .type Shifter,@object + .size Shifter,16 + .align 16 +cv: + .long 3884607281 + .long 3168131199 + .long 3607404735 + .long 3190582024 + .long 1874480759 + .long 1032041131 + .long 4286760334 + .long 1053736893 + .long 4277811695 + .long 3211144770 + .long 0 + .long 0 + .type cv,@object + .size cv,48 + .align 16 +T2_neg_f: + .long 0 + .long 1072693248 + .long 0 + .long 0 + .long 1797923801 + .long 1072687577 + .long 1950547427 + .long 1013229059 + .long 730821105 + .long 1072681922 + .long 2523232743 + .long 1012067188 + .long 915592468 + .long 1072676282 + .long 352947894 + .long 3161024371 + .long 2174652632 + .long 1072670657 + .long 4087714590 + .long 1014450259 + .long 35929225 + .long 1072665048 + .long 2809788041 + .long 3159436968 + .long 2912730644 + .long 1072659453 + .long 3490067722 + .long 3163405074 + .long 2038973688 + .long 1072653874 + .long 892941374 + .long 1016046459 + .long 1533953344 + .long 1072648310 + .long 769171851 + .long 1015665633 + .long 1222472308 + .long 1072642761 + .long 1054357470 + .long 3161021018 + .long 929806999 + .long 1072637227 + .long 3205336643 + .long 1015259557 + .long 481706282 + .long 1072631708 + .long 1696079173 + .long 3162710528 + .long 3999357479 + .long 1072626203 + .long 2258941616 + .long 1015924724 + .long 2719515920 + .long 1072620714 + .long 2760332941 + .long 1015137933 + .long 764307441 + .long 1072615240 + .long 3021057420 + .long 3163329523 + .long 2256325230 + .long 1072609780 + .long 580117746 + .long 1015317295 + .long 2728693978 + .long 1072604335 + .long 396109971 + .long 3163462691 + .long 2009970496 + .long 1072598905 + .long 2159039665 + .long 3162572948 + .long 4224142467 + .long 1072593489 + .long 3389820386 + .long 1015207202 + .long 610758006 + .long 1072588089 + .long 1965209397 + .long 3161866232 + .long 3884662774 + .long 1072582702 + .long 2158611599 + .long 1014210185 + .long 991358482 + .long 1072577331 + .long 838715019 + .long 3163157668 + .long 351641897 + .long 1072571974 + .long 2172261526 + .long 3163010599 + .long 1796832535 + .long 1072566631 + .long 3176955716 + .long 3160585513 + .long 863738719 + .long 1072561303 + .long 1326992220 + .long 3162613197 + .long 1679558232 + .long 1072555989 + .long 2390342287 + .long 3163333970 + .long 4076975200 + .long 1072550689 + .long 2029000899 + .long 1015208535 + .long 3594158869 + .long 1072545404 + .long 2456521700 + .long 3163256561 + .long 64696965 + .long 1072540134 + .long 1768797490 + .long 1015816960 + .long 1912561781 + .long 1072534877 + .long 3147495102 + .long 1015678253 + .long 382305176 + .long 1072529635 + .long 2347622376 + .long 3162578625 + .long 3898795731 + .long 1072524406 + .long 1249994144 + .long 1011869818 + .long 3707479175 + .long 1072519192 + .long 3613079303 + .long 1014164738 + .long 3939148246 + .long 1072513992 + .long 3210352148 + .long 1015274323 + .long 135105010 + .long 1072508807 + .long 1906148728 + .long 3163375739 + .long 721996136 + .long 1072503635 + .long 563754734 + .long 1015371318 + .long 1242007932 + .long 1072498477 + .long 1132034716 + .long 3163339831 + .long 1532734324 + .long 1072493333 + .long 3094216535 + .long 3163162857 + .long 1432208378 + .long 1072488203 + .long 1401068914 + .long 3162363963 + .long 778901109 + .long 1072483087 + .long 2248183955 + .long 3161268751 + .long 3706687593 + .long 1072477984 + .long 3521726940 + .long 1013253067 + .long 1464976603 + .long 1072472896 + .long 3507292405 + .long 3161977534 + .long 2483480501 + .long 1072467821 + .long 1216371780 + .long 1013034172 + .long 2307442995 + .long 1072462760 + .long 3190117721 + .long 3162404539 + .long 777507147 + .long 1072457713 + .long 4282924205 + .long 1015187533 + .long 2029714210 + .long 1072452679 + .long 613660079 + .long 1015099143 + .long 1610600570 + .long 1072447659 + .long 3766732298 + .long 1015760183 + .long 3657065772 + .long 1072442652 + .long 399025623 + .long 3162957078 + .long 3716502172 + .long 1072437659 + .long 2303740125 + .long 1014042725 + .long 1631695677 + .long 1072432680 + .long 2717633076 + .long 3162344026 + .long 1540824585 + .long 1072427714 + .long 1064017011 + .long 3163487690 + .long 3287523847 + .long 1072422761 + .long 1625971539 + .long 3157009955 + .long 2420883922 + .long 1072417822 + .long 2049810052 + .long 1014119888 + .long 3080351519 + .long 1072412896 + .long 3379126788 + .long 3157218001 + .long 815859274 + .long 1072407984 + .long 240396590 + .long 3163487443 + .long 4062661092 + .long 1072403084 + .long 1422616006 + .long 3163255318 + .long 4076559943 + .long 1072398198 + .long 2119478331 + .long 3160758351 + .long 703710506 + .long 1072393326 + .long 1384660846 + .long 1015195891 + .long 2380618042 + .long 1072388466 + .long 3149557219 + .long 3163320799 + .long 364333489 + .long 1072383620 + .long 3923737744 + .long 3161421373 + .long 3092190715 + .long 1072378786 + .long 814012168 + .long 3159523422 + .long 1822067026 + .long 1072373966 + .long 1241994956 + .long 1015340290 + .long 697153126 + .long 1072369159 + .long 1283515429 + .long 3163283189 + .long 3861050111 + .long 1072364364 + .long 254893773 + .long 3162813180 + .long 2572866477 + .long 1072359583 + .long 878562433 + .long 1015521741 + .long 977020788 + .long 1072354815 + .long 3065100517 + .long 1015541563 + .long 3218338682 + .long 1072350059 + .long 3404164304 + .long 3162477108 + .long 557149882 + .long 1072345317 + .long 3672720709 + .long 1014537265 + .long 1434058175 + .long 1072340587 + .long 251133233 + .long 1015085769 + .long 1405169241 + .long 1072335870 + .long 2998539689 + .long 3162830951 + .long 321958744 + .long 1072331166 + .long 3401933767 + .long 1015794558 + .long 2331271250 + .long 1072326474 + .long 812057446 + .long 1012207446 + .long 2990417245 + .long 1072321795 + .long 3683467745 + .long 3163369326 + .long 2152073944 + .long 1072317129 + .long 1486860576 + .long 3163203456 + .long 3964284211 + .long 1072312475 + .long 2111583915 + .long 1015427164 + .long 3985553595 + .long 1072307834 + .long 4002146062 + .long 1015834136 + .long 2069751141 + .long 1072303206 + .long 1562170675 + .long 3162724681 + .long 2366108318 + .long 1072298590 + .long 2867985102 + .long 3161762254 + .long 434316067 + .long 1072293987 + .long 2028358766 + .long 1013458122 + .long 424392917 + .long 1072289396 + .long 2749202995 + .long 3162838718 + .long 2191782032 + .long 1072284817 + .long 2960257726 + .long 1013742662 + .long 1297350157 + .long 1072280251 + .long 1308022040 + .long 3163412558 + .long 1892288442 + .long 1072275697 + .long 2446255666 + .long 3162600381 + .long 3833209506 + .long 1072271155 + .long 2722920684 + .long 1013754842 + .long 2682146384 + .long 1072266626 + .long 2082178513 + .long 3163363419 + .long 2591453363 + .long 1072262109 + .long 2132396182 + .long 3159074198 + .long 3418903055 + .long 1072257604 + .long 2527457337 + .long 3160820604 + .long 727685349 + .long 1072253112 + .long 2038246809 + .long 3162358742 + .long 2966275557 + .long 1072248631 + .long 2176155324 + .long 3159842759 + .long 1403662306 + .long 1072244163 + .long 2788809599 + .long 3161671007 + .long 194117574 + .long 1072239707 + .long 777528612 + .long 3163412089 + .long 3492293770 + .long 1072235262 + .long 2248032210 + .long 1015386826 + .long 2568320822 + .long 1072230830 + .long 2732824428 + .long 1014352915 + .long 1577608921 + .long 1072226410 + .long 1875489510 + .long 3162968394 + .long 380978316 + .long 1072222002 + .long 854188970 + .long 3160462686 + .long 3134592888 + .long 1072217605 + .long 4232266862 + .long 1015991134 + .long 1110089947 + .long 1072213221 + .long 1451641639 + .long 1015474673 + .long 2759350287 + .long 1072208848 + .long 1148526634 + .long 1015894933 + .long 3649726105 + .long 1072204487 + .long 4085036346 + .long 1015649474 + .long 3643909174 + .long 1072200138 + .long 3537586109 + .long 1014354647 + .long 2604962541 + .long 1072195801 + .long 2614425274 + .long 3163539192 + .long 396319521 + .long 1072191476 + .long 4172420816 + .long 3159074632 + .long 1176749997 + .long 1072187162 + .long 2738998779 + .long 3162035844 + .long 515457527 + .long 1072182860 + .long 836709333 + .long 1015651226 + .long 2571947539 + .long 1072178569 + .long 3558159064 + .long 3163376669 + .long 2916157145 + .long 1072174290 + .long 219487565 + .long 1015309367 + .long 1413356050 + .long 1072170023 + .long 1651349291 + .long 3162668166 + .long 2224145553 + .long 1072165767 + .long 3482522030 + .long 3161489169 + .long 919555682 + .long 1072161523 + .long 3121969534 + .long 1012948226 + .long 1660913392 + .long 1072157290 + .long 4218599604 + .long 1015135707 + .long 19972402 + .long 1072153069 + .long 3507899862 + .long 1016009292 + .long 158781403 + .long 1072148859 + .long 2221464712 + .long 3163286453 + .long 1944781191 + .long 1072144660 + .long 3993278767 + .long 3161724279 + .long 950803702 + .long 1072140473 + .long 1655364926 + .long 1015237032 + .long 1339972927 + .long 1072136297 + .long 167908909 + .long 1015572152 + .long 2980802057 + .long 1072132132 + .long 378619896 + .long 1015773303 + .long 1447192521 + .long 1072127979 + .long 1462857171 + .long 3162514521 + .long 903334909 + .long 1072123837 + .long 1636462108 + .long 1015039997 + .long 1218806132 + .long 1072119706 + .long 1818613052 + .long 3162548441 + .long 2263535754 + .long 1072115586 + .long 752233586 + .long 3162639008 + .long 3907805044 + .long 1072111477 + .long 2257091225 + .long 3161550407 + .long 1727278727 + .long 1072107380 + .long 3562710623 + .long 1011471940 + .long 4182873220 + .long 1072103293 + .long 629542646 + .long 3161996303 + .long 2555984613 + .long 1072099218 + .long 2652555442 + .long 3162552692 + .long 1013258799 + .long 1072095154 + .long 1748797611 + .long 3160129082 + .long 3721688645 + .long 1072091100 + .long 3069276937 + .long 1015839401 + .long 1963711167 + .long 1072087058 + .long 1744767757 + .long 3160574294 + .long 4201977662 + .long 1072083026 + .long 748330254 + .long 1013594357 + .long 1719614413 + .long 1072079006 + .long 330458198 + .long 3163282740 + .long 2979960120 + .long 1072074996 + .long 2599109725 + .long 1014498493 + .long 3561793907 + .long 1072070997 + .long 1157054053 + .long 1011890350 + .long 3339203574 + .long 1072067009 + .long 1483497780 + .long 3162408754 + .long 2186617381 + .long 1072063032 + .long 2270764084 + .long 3163272713 + .long 4273770423 + .long 1072059065 + .long 3383180809 + .long 3163218901 + .long 885834528 + .long 1072055110 + .long 1973258547 + .long 3162261564 + .long 488188413 + .long 1072051165 + .long 3199821029 + .long 1015564048 + .long 2956612997 + .long 1072047230 + .long 2118169751 + .long 3162735553 + .long 3872257780 + .long 1072043306 + .long 1253592103 + .long 1015958334 + .long 3111574537 + .long 1072039393 + .long 2606161479 + .long 3162759746 + .long 551349105 + .long 1072035491 + .long 3821916050 + .long 3162106589 + .long 363667784 + .long 1072031599 + .long 813753950 + .long 1015785209 + .long 2425981843 + .long 1072027717 + .long 2830390851 + .long 3163346599 + .long 2321106615 + .long 1072023846 + .long 2171176610 + .long 1009535771 + .long 4222122499 + .long 1072019985 + .long 1277378074 + .long 3163256737 + .long 3712504873 + .long 1072016135 + .long 88491949 + .long 1015427660 + .long 671025100 + .long 1072012296 + .long 3832014351 + .long 3163022030 + .long 3566716925 + .long 1072008466 + .long 1536826856 + .long 1014142433 + .long 3689071823 + .long 1072004647 + .long 2321004996 + .long 3162552716 + .long 917841882 + .long 1072000839 + .long 18715565 + .long 1015659308 + .long 3723038930 + .long 1071997040 + .long 378465264 + .long 3162569582 + .long 3395129871 + .long 1071993252 + .long 4025345435 + .long 3162335388 + .long 4109806887 + .long 1071989474 + .long 422403966 + .long 1014469229 + .long 1453150082 + .long 1071985707 + .long 498154669 + .long 3161488062 + .long 3896463087 + .long 1071981949 + .long 1139797873 + .long 3161233805 + .long 2731501122 + .long 1071978202 + .long 1774031855 + .long 3162470021 + .long 2135241198 + .long 1071974465 + .long 1236747871 + .long 1013589147 + .long 1990012071 + .long 1071970738 + .long 3529070563 + .long 3162813193 + .long 2178460671 + .long 1071967021 + .long 777878098 + .long 3162842493 + .long 2583551245 + .long 1071963314 + .long 3161094195 + .long 1015606491 + .long 3088564500 + .long 1071959617 + .long 1762311517 + .long 1015045673 + .long 3577096743 + .long 1071955930 + .long 2951496418 + .long 1013793687 + .long 3933059031 + .long 1071952253 + .long 2133366768 + .long 3161531832 + .long 4040676318 + .long 1071948586 + .long 4090609238 + .long 1015663458 + .long 3784486610 + .long 1071944929 + .long 1581883040 + .long 3161698953 + .long 3049340112 + .long 1071941282 + .long 3062915824 + .long 1013170595 + .long 1720398391 + .long 1071937645 + .long 3980678963 + .long 3163300080 + .long 3978100823 + .long 1071934017 + .long 3513027190 + .long 1015845963 + .long 1118294578 + .long 1071930400 + .long 2197495694 + .long 3159909401 + .long 1617004845 + .long 1071926792 + .long 82804944 + .long 1010342778 + .long 1065662932 + .long 1071923194 + .long 2533670915 + .long 1014530238 + .long 3645941911 + .long 1071919605 + .long 3814685081 + .long 3161573341 + .long 654919306 + .long 1071916027 + .long 3232961757 + .long 3163047469 + .long 569847338 + .long 1071912458 + .long 472945272 + .long 3159290729 + .long 3278348324 + .long 1071908898 + .long 3069497416 + .long 1014750712 + .long 78413852 + .long 1071905349 + .long 4183226867 + .long 3163017251 + .long 3743175029 + .long 1071901808 + .long 2072812490 + .long 3162175075 + .long 1276261410 + .long 1071898278 + .long 300981948 + .long 1014684169 + .long 1156440435 + .long 1071894757 + .long 2351451249 + .long 1013967056 + .long 3272845541 + .long 1071891245 + .long 928852419 + .long 3163488248 + .long 3219942644 + .long 1071887743 + .long 3798990616 + .long 1015368806 + .long 887463927 + .long 1071884251 + .long 3596744163 + .long 3160794166 + .long 460407023 + .long 1071880768 + .long 4237175092 + .long 3163138469 + .long 1829099622 + .long 1071877294 + .long 1016661181 + .long 3163461005 + .long 589198666 + .long 1071873830 + .long 2664346172 + .long 3163157962 + .long 926591435 + .long 1071870375 + .long 3208833762 + .long 3162913514 + .long 2732492859 + .long 1071866929 + .long 2691479646 + .long 3162255684 + .long 1603444721 + .long 1071863493 + .long 1548633640 + .long 3162201326 + .long 1726216749 + .long 1071860066 + .long 2466808228 + .long 3161676405 + .long 2992903935 + .long 1071856648 + .long 2218154406 + .long 1015228193 + .long 1000925746 + .long 1071853240 + .long 1018491672 + .long 3163309544 + .long 4232894513 + .long 1071849840 + .long 2383938684 + .long 1014668519 + .long 3991843581 + .long 1071846450 + .long 4092853457 + .long 1014585763 + .long 171030293 + .long 1071843070 + .long 3526460132 + .long 1014428778 + .long 1253935211 + .long 1071839698 + .long 1395382931 + .long 3159702613 + .long 2839424854 + .long 1071836335 + .long 1171596163 + .long 1013041679 + .long 526652809 + .long 1071832982 + .long 4223459736 + .long 1015879375 + .long 2799960843 + .long 1071829637 + .long 1423655381 + .long 1015022151 + .long 964107055 + .long 1071826302 + .long 2800439588 + .long 3162833221 + .long 3504003472 + .long 1071822975 + .long 3594001060 + .long 3157330652 + .long 1724976915 + .long 1071819658 + .long 420909223 + .long 3163117379 + .long 4112506593 + .long 1071816349 + .long 2947355221 + .long 1014371048 + .long 1972484976 + .long 1071813050 + .long 675290301 + .long 3161640050 + .long 3790955393 + .long 1071809759 + .long 2352942462 + .long 3163180090 + .long 874372905 + .long 1071806478 + .long 100263788 + .long 1015940732 + .long 1709341917 + .long 1071803205 + .long 2571168217 + .long 1014152499 + .long 1897844341 + .long 1071799941 + .long 1254300460 + .long 1015275938 + .long 1337108031 + .long 1071796686 + .long 3203724452 + .long 1014677845 + .long 4219606026 + .long 1071793439 + .long 2434574742 + .long 1014681548 + .long 1853186616 + .long 1071790202 + .long 3066496371 + .long 1015656574 + .long 2725843665 + .long 1071786973 + .long 1433917087 + .long 1014838523 + .long 2440944790 + .long 1071783753 + .long 2492769774 + .long 1014147454 + .long 897099801 + .long 1071780542 + .long 754756297 + .long 1015241005 + .long 2288159958 + .long 1071777339 + .long 2169144469 + .long 1014876021 + .long 2218315341 + .long 1071774145 + .long 2694295388 + .long 3163288868 + .long 586995997 + .long 1071770960 + .long 41662348 + .long 3162627992 + .long 1588871207 + .long 1071767783 + .long 143439582 + .long 3162963416 + .long 828946858 + .long 1071764615 + .long 10642492 + .long 1015939438 + .long 2502433899 + .long 1071761455 + .long 2148595913 + .long 1015023991 + .long 2214878420 + .long 1071758304 + .long 892270087 + .long 3163116422 + .long 4162030108 + .long 1071755161 + .long 2763428480 + .long 1015529349 + .long 3949972341 + .long 1071752027 + .long 2068408548 + .long 1014913868 + .long 1480023343 + .long 1071748902 + .long 2247196168 + .long 1015327453 + .long 948735466 + .long 1071745785 + .long 3516338028 + .long 3162574883 + .long 2257959872 + .long 1071742676 + .long 3802946148 + .long 1012964927 + .long 1014845819 + .long 1071739576 + .long 3117910646 + .long 3161559105 + .long 1416741826 + .long 1071736484 + .long 2196380210 + .long 1011413563 + .long 3366293073 + .long 1071733400 + .long 3119426314 + .long 1014120554 + .long 2471440686 + .long 1071730325 + .long 968836267 + .long 3162214888 + .long 2930322912 + .long 1071727258 + .long 2599499422 + .long 3162714047 + .long 351405227 + .long 1071724200 + .long 3125337328 + .long 3159822479 + .long 3228316108 + .long 1071721149 + .long 3010241991 + .long 3158422804 + .long 2875075254 + .long 1071718107 + .long 4144233330 + .long 3163333716 + .long 3490863953 + .long 1071715073 + .long 960797498 + .long 3162948880 + .long 685187902 + .long 1071712048 + .long 378731989 + .long 1014843115 + .long 2952712987 + .long 1071709030 + .long 3293494651 + .long 3160120301 + .long 1608493509 + .long 1071706021 + .long 3159622171 + .long 3162807737 + .long 852742562 + .long 1071703020 + .long 667253586 + .long 1009793559 + .long 590962156 + .long 1071700027 + .long 3829346666 + .long 3163275597 + .long 728909815 + .long 1071697042 + .long 383930225 + .long 1015029468 + .long 1172597893 + .long 1071694065 + .long 114433263 + .long 1015347593 + .long 1828292879 + .long 1071691096 + .long 1255956747 + .long 1015588398 + .long 2602514713 + .long 1071688135 + .long 2268929336 + .long 1014354284 + .long 3402036099 + .long 1071685182 + .long 405889334 + .long 1015105656 + .long 4133881824 + .long 1071682237 + .long 2148155345 + .long 3162931299 + .long 410360776 + .long 1071679301 + .long 1269990655 + .long 1011975870 + .long 728934454 + .long 1071676372 + .long 1413842688 + .long 1014178612 + .long 702412510 + .long 1071673451 + .long 3803266087 + .long 3162280415 + .long 238821257 + .long 1071670538 + .long 1469694871 + .long 3162884987 + .long 3541402996 + .long 1071667632 + .long 2759177317 + .long 1014854626 + .long 1928746161 + .long 1071664735 + .long 983617676 + .long 1014285177 + .long 3899555717 + .long 1071661845 + .long 427280750 + .long 3162546972 + .long 772914124 + .long 1071658964 + .long 4004372762 + .long 1012230161 + .long 1048019041 + .long 1071656090 + .long 1398474845 + .long 3160510595 + .long 339411585 + .long 1071653224 + .long 264588982 + .long 3161636657 + .long 2851812149 + .long 1071650365 + .long 2595802551 + .long 1015767337 + .long 4200250559 + .long 1071647514 + .long 2808127345 + .long 3161781938 + .type T2_neg_f,@object + .size T2_neg_f,4096 + .space 512, 0x00 # pad + .align 16 +MASK3: + .long 0 + .long 4294967280 + .long 0 + .long 4294967280 + .type MASK3,@object + .size MASK3,16 + .align 16 +RMASK: + .long 4294705152 + .long 4294967295 + .long 4294705152 + .long 4294967295 + .type RMASK,@object + .size RMASK,16 + .align 16 +pv: + .long 236289503 + .long 1064135997 + .long 463583772 + .long 3215696314 + .long 1441186365 + .long 3212977891 + .long 286331153 + .long 1069617425 + .long 2284589306 + .long 1066820852 + .long 1431655765 + .long 3218429269 + .type pv,@object + .size pv,48 + .align 4 +HALFMASK: + .long 4160749568 + .long 2147483647 + .type HALFMASK,@object + .size HALFMASK,8 + .align 4 +ONEMASK: + .long 0 + .long 1072693248 + .type ONEMASK,@object + .size ONEMASK,8 + .align 4 +TWOMASK: + .long 0 + .long 1073741824 + .type TWOMASK,@object + .size TWOMASK,8 + .data + .section .note.GNU-stack, "" +// -- Begin DWARF2 SEGMENT .eh_frame + .section .eh_frame,"a",@progbits +.eh_frame_seg: + .align 1 + .4byte 0x00000014 + .8byte 0x00527a0100000000 + .8byte 0x08070c1b01107801 + .4byte 0x00000190 + .4byte 0x0000001c + .4byte 0x0000001c + .4byte ..___tag_value_tanh.1-. + .4byte ..___tag_value_tanh.5-..___tag_value_tanh.1 + .2byte 0x0400 + .4byte ..___tag_value_tanh.3-..___tag_value_tanh.1 + .2byte 0x100e + .byte 0x04 + .4byte ..___tag_value_tanh.4-..___tag_value_tanh.3 + .2byte 0x080e + .byte 0x00 +# End -- cgit v1.1