From bfff8b1becd7d01c074177df7196ab327cd8c844 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 1 Jan 2017 00:14:16 +0000 Subject: Update copyright dates with scripts/update-copyrights. --- sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S') diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S index 4403cf3ef0..8e74232ba3 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S @@ -1,5 +1,5 @@ /* sqrtf function. PowerPC32 version. - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or -- cgit v1.2.3 From f67d78192c1be9d56d3a6f3fda4e0a70ae48c44d Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Tue, 13 Dec 2016 22:42:51 -0200 Subject: Move wrappers to libm-compat-calls-auto This commit moves one step towards the deprecation of wrappers that use _LIB_VERSION / matherr / __kernel_standard functionality, by adding the suffix '_compat' to their filenames and adjusting Makefiles and #includes accordingly. New template wrappers that do not use such functionality will be added by future patches and will be first used by the float128 wrappers. --- ChangeLog | 402 ++ math/Makefile | 18 +- math/w_acos.c | 42 - math/w_acos_compat.c | 42 + math/w_acosf.c | 38 - math/w_acosf_compat.c | 38 + math/w_acosh.c | 37 - math/w_acosh_compat.c | 37 + math/w_acoshf.c | 33 - math/w_acoshf_compat.c | 33 + math/w_acoshl.c | 33 - math/w_acoshl_compat.c | 33 + math/w_acosl.c | 38 - math/w_acosl_compat.c | 38 + math/w_asin.c | 42 - math/w_asin_compat.c | 42 + math/w_asinf.c | 38 - math/w_asinf_compat.c | 38 + math/w_asinl.c | 38 - math/w_asinl_compat.c | 38 + math/w_atan2.c | 45 - math/w_atan2_compat.c | 45 + math/w_atan2f.c | 41 - math/w_atan2f_compat.c | 41 + math/w_atan2l.c | 41 - math/w_atan2l_compat.c | 41 + math/w_atanh.c | 40 - math/w_atanh_compat.c | 40 + math/w_atanhf.c | 36 - math/w_atanhf_compat.c | 36 + math/w_atanhl.c | 36 - math/w_atanhl_compat.c | 36 + math/w_cosh.c | 34 - math/w_cosh_compat.c | 34 + math/w_coshf.c | 34 - math/w_coshf_compat.c | 34 + math/w_coshl.c | 35 - math/w_coshl_compat.c | 35 + math/w_exp10.c | 46 - math/w_exp10_compat.c | 46 + math/w_exp10f.c | 40 - math/w_exp10f_compat.c | 40 + math/w_exp10l.c | 40 - math/w_exp10l_compat.c | 40 + math/w_exp2.c | 23 - math/w_exp2_compat.c | 23 + math/w_exp2f.c | 19 - math/w_exp2f_compat.c | 19 + math/w_exp2l.c | 19 - math/w_exp2l_compat.c | 19 + math/w_fmod.c | 37 - math/w_fmod_compat.c | 37 + math/w_fmodf.c | 33 - math/w_fmodf_compat.c | 33 + math/w_fmodl.c | 33 - math/w_fmodl_compat.c | 33 + math/w_hypot.c | 35 - math/w_hypot_compat.c | 35 + math/w_hypotf.c | 35 - math/w_hypotf_compat.c | 35 + math/w_hypotl.c | 36 - math/w_hypotl_compat.c | 36 + math/w_j0.c | 68 - math/w_j0_compat.c | 68 + math/w_j0f.c | 63 - math/w_j0f_compat.c | 63 + math/w_j0l.c | 64 - math/w_j0l_compat.c | 64 + math/w_j1.c | 68 - math/w_j1_compat.c | 68 + math/w_j1f.c | 63 - math/w_j1f_compat.c | 63 + math/w_j1l.c | 64 - math/w_j1l_compat.c | 64 + math/w_jn.c | 68 - math/w_jn_compat.c | 68 + math/w_jnf.c | 63 - math/w_jnf_compat.c | 63 + math/w_jnl.c | 91 - math/w_jnl_compat.c | 91 + math/w_log.c | 48 - math/w_log10.c | 48 - math/w_log10_compat.c | 48 + math/w_log10f.c | 44 - math/w_log10f_compat.c | 44 + math/w_log10l.c | 44 - math/w_log10l_compat.c | 44 + math/w_log2.c | 48 - math/w_log2_compat.c | 48 + math/w_log2f.c | 44 - math/w_log2f_compat.c | 44 + math/w_log2l.c | 44 - math/w_log2l_compat.c | 44 + math/w_log_compat.c | 48 + math/w_logf.c | 44 - math/w_logf_compat.c | 44 + math/w_logl.c | 44 - math/w_logl_compat.c | 44 + math/w_pow.c | 64 - math/w_pow_compat.c | 64 + math/w_powf.c | 60 - math/w_powf_compat.c | 60 + math/w_powl.c | 60 - math/w_powl_compat.c | 60 + math/w_remainder.c | 40 - math/w_remainder_compat.c | 40 + math/w_remainderf.c | 35 - math/w_remainderf_compat.c | 35 + math/w_remainderl.c | 35 - math/w_remainderl_compat.c | 35 + math/w_scalb.c | 80 - math/w_scalb_compat.c | 80 + math/w_scalbf.c | 76 - math/w_scalbf_compat.c | 76 + math/w_scalbl.c | 76 - math/w_scalbl_compat.c | 76 + math/w_sinh.c | 34 - math/w_sinh_compat.c | 34 + math/w_sinhf.c | 33 - math/w_sinhf_compat.c | 33 + math/w_sinhl.c | 34 - math/w_sinhl_compat.c | 34 + math/w_sqrt.c | 36 - math/w_sqrt_compat.c | 36 + math/w_sqrtf.c | 32 - math/w_sqrtf_compat.c | 32 + math/w_sqrtl.c | 32 - math/w_sqrtl_compat.c | 32 + math/w_tgamma.c | 46 - math/w_tgamma_compat.c | 46 + math/w_tgammaf.c | 44 - math/w_tgammaf_compat.c | 44 + math/w_tgammal.c | 45 - math/w_tgammal_compat.c | 45 + sysdeps/i386/fpu/w_sqrt.c | 8 - sysdeps/i386/fpu/w_sqrt_compat.c | 8 + sysdeps/ia64/fpu/w_acos.c | 1 - sysdeps/ia64/fpu/w_acos_compat.c | 1 + sysdeps/ia64/fpu/w_acosf.c | 1 - sysdeps/ia64/fpu/w_acosf_compat.c | 1 + sysdeps/ia64/fpu/w_acosh.c | 1 - sysdeps/ia64/fpu/w_acosh_compat.c | 1 + sysdeps/ia64/fpu/w_acoshf.c | 1 - sysdeps/ia64/fpu/w_acoshf_compat.c | 1 + sysdeps/ia64/fpu/w_acoshl.c | 1 - sysdeps/ia64/fpu/w_acoshl_compat.c | 1 + sysdeps/ia64/fpu/w_acosl.c | 1 - sysdeps/ia64/fpu/w_acosl_compat.c | 1 + sysdeps/ia64/fpu/w_asin.c | 1 - sysdeps/ia64/fpu/w_asin_compat.c | 1 + sysdeps/ia64/fpu/w_asinf.c | 1 - sysdeps/ia64/fpu/w_asinf_compat.c | 1 + sysdeps/ia64/fpu/w_asinl.c | 1 - sysdeps/ia64/fpu/w_asinl_compat.c | 1 + sysdeps/ia64/fpu/w_atan2.c | 1 - sysdeps/ia64/fpu/w_atan2_compat.c | 1 + sysdeps/ia64/fpu/w_atan2f.c | 1 - sysdeps/ia64/fpu/w_atan2f_compat.c | 1 + sysdeps/ia64/fpu/w_atan2l.c | 1 - sysdeps/ia64/fpu/w_atan2l_compat.c | 1 + sysdeps/ia64/fpu/w_atanh.c | 1 - sysdeps/ia64/fpu/w_atanh_compat.c | 1 + sysdeps/ia64/fpu/w_atanhf.c | 1 - sysdeps/ia64/fpu/w_atanhf_compat.c | 1 + sysdeps/ia64/fpu/w_atanhl.c | 1 - sysdeps/ia64/fpu/w_atanhl_compat.c | 1 + sysdeps/ia64/fpu/w_cosh.c | 1 - sysdeps/ia64/fpu/w_cosh_compat.c | 1 + sysdeps/ia64/fpu/w_coshf.c | 1 - sysdeps/ia64/fpu/w_coshf_compat.c | 1 + sysdeps/ia64/fpu/w_coshl.c | 1 - sysdeps/ia64/fpu/w_coshl_compat.c | 1 + sysdeps/ia64/fpu/w_exp10.c | 1 - sysdeps/ia64/fpu/w_exp10_compat.c | 1 + sysdeps/ia64/fpu/w_exp10f.c | 1 - sysdeps/ia64/fpu/w_exp10f_compat.c | 1 + sysdeps/ia64/fpu/w_exp10l.c | 1 - sysdeps/ia64/fpu/w_exp10l_compat.c | 1 + sysdeps/ia64/fpu/w_exp2.c | 1 - sysdeps/ia64/fpu/w_exp2_compat.c | 1 + sysdeps/ia64/fpu/w_exp2f.c | 1 - sysdeps/ia64/fpu/w_exp2f_compat.c | 1 + sysdeps/ia64/fpu/w_exp2l.c | 1 - sysdeps/ia64/fpu/w_exp2l_compat.c | 1 + sysdeps/ia64/fpu/w_fmod.c | 1 - sysdeps/ia64/fpu/w_fmod_compat.c | 1 + sysdeps/ia64/fpu/w_fmodf.c | 1 - sysdeps/ia64/fpu/w_fmodf_compat.c | 1 + sysdeps/ia64/fpu/w_fmodl.c | 1 - sysdeps/ia64/fpu/w_fmodl_compat.c | 1 + sysdeps/ia64/fpu/w_hypot.c | 1 - sysdeps/ia64/fpu/w_hypot_compat.c | 1 + sysdeps/ia64/fpu/w_hypotf.c | 1 - sysdeps/ia64/fpu/w_hypotf_compat.c | 1 + sysdeps/ia64/fpu/w_hypotl.c | 1 - sysdeps/ia64/fpu/w_hypotl_compat.c | 1 + sysdeps/ia64/fpu/w_log.c | 1 - sysdeps/ia64/fpu/w_log10.c | 1 - sysdeps/ia64/fpu/w_log10_compat.c | 1 + sysdeps/ia64/fpu/w_log10f.c | 1 - sysdeps/ia64/fpu/w_log10f_compat.c | 1 + sysdeps/ia64/fpu/w_log10l.c | 1 - sysdeps/ia64/fpu/w_log10l_compat.c | 1 + sysdeps/ia64/fpu/w_log2.c | 1 - sysdeps/ia64/fpu/w_log2_compat.c | 1 + sysdeps/ia64/fpu/w_log2f.c | 1 - sysdeps/ia64/fpu/w_log2f_compat.c | 1 + sysdeps/ia64/fpu/w_log2l.c | 1 - sysdeps/ia64/fpu/w_log2l_compat.c | 1 + sysdeps/ia64/fpu/w_log_compat.c | 1 + sysdeps/ia64/fpu/w_logf.c | 1 - sysdeps/ia64/fpu/w_logf_compat.c | 1 + sysdeps/ia64/fpu/w_logl.c | 1 - sysdeps/ia64/fpu/w_logl_compat.c | 1 + sysdeps/ia64/fpu/w_pow.c | 1 - sysdeps/ia64/fpu/w_pow_compat.c | 1 + sysdeps/ia64/fpu/w_powf.c | 1 - sysdeps/ia64/fpu/w_powf_compat.c | 1 + sysdeps/ia64/fpu/w_powl.c | 1 - sysdeps/ia64/fpu/w_powl_compat.c | 1 + sysdeps/ia64/fpu/w_remainder.c | 1 - sysdeps/ia64/fpu/w_remainder_compat.c | 1 + sysdeps/ia64/fpu/w_remainderf.c | 1 - sysdeps/ia64/fpu/w_remainderf_compat.c | 1 + sysdeps/ia64/fpu/w_remainderl.c | 1 - sysdeps/ia64/fpu/w_remainderl_compat.c | 1 + sysdeps/ia64/fpu/w_scalb.c | 1 - sysdeps/ia64/fpu/w_scalb_compat.c | 1 + sysdeps/ia64/fpu/w_scalbf.c | 1 - sysdeps/ia64/fpu/w_scalbf_compat.c | 1 + sysdeps/ia64/fpu/w_scalbl.c | 1 - sysdeps/ia64/fpu/w_scalbl_compat.c | 1 + sysdeps/ia64/fpu/w_sinh.c | 1 - sysdeps/ia64/fpu/w_sinh_compat.c | 1 + sysdeps/ia64/fpu/w_sinhf.c | 1 - sysdeps/ia64/fpu/w_sinhf_compat.c | 1 + sysdeps/ia64/fpu/w_sinhl.c | 1 - sysdeps/ia64/fpu/w_sinhl_compat.c | 1 + sysdeps/ia64/fpu/w_sqrt.c | 1 - sysdeps/ia64/fpu/w_sqrt_compat.c | 1 + sysdeps/ia64/fpu/w_sqrtf.c | 1 - sysdeps/ia64/fpu/w_sqrtf_compat.c | 1 + sysdeps/ia64/fpu/w_sqrtl.c | 1 - sysdeps/ia64/fpu/w_sqrtl_compat.c | 1 + sysdeps/ia64/fpu/w_tgamma.S | 1835 -------- sysdeps/ia64/fpu/w_tgamma_compat.S | 1835 ++++++++ sysdeps/ia64/fpu/w_tgammaf.S | 1330 ------ sysdeps/ia64/fpu/w_tgammaf_compat.S | 1330 ++++++ sysdeps/ia64/fpu/w_tgammal.S | 4487 -------------------- sysdeps/ia64/fpu/w_tgammal_compat.S | 4487 ++++++++++++++++++++ sysdeps/ieee754/ldbl-opt/w_acos.c | 5 - sysdeps/ieee754/ldbl-opt/w_acos_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_acosh.c | 5 - sysdeps/ieee754/ldbl-opt/w_acosh_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_acoshl.c | 5 - sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_acosl.c | 5 - sysdeps/ieee754/ldbl-opt/w_acosl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_asin.c | 5 - sysdeps/ieee754/ldbl-opt/w_asin_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_asinl.c | 5 - sysdeps/ieee754/ldbl-opt/w_asinl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_atan2.c | 5 - sysdeps/ieee754/ldbl-opt/w_atan2_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_atan2l.c | 5 - sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_atanh.c | 5 - sysdeps/ieee754/ldbl-opt/w_atanh_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_atanhl.c | 5 - sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_cosh.c | 5 - sysdeps/ieee754/ldbl-opt/w_cosh_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_coshl.c | 5 - sysdeps/ieee754/ldbl-opt/w_coshl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_exp10.c | 6 - sysdeps/ieee754/ldbl-opt/w_exp10_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_exp10l.c | 6 - sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_fmod.c | 5 - sysdeps/ieee754/ldbl-opt/w_fmod_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_fmodl.c | 5 - sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_hypot.c | 5 - sysdeps/ieee754/ldbl-opt/w_hypot_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_hypotl.c | 5 - sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_j0.c | 6 - sysdeps/ieee754/ldbl-opt/w_j0_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_j0l.c | 6 - sysdeps/ieee754/ldbl-opt/w_j0l_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_j1.c | 6 - sysdeps/ieee754/ldbl-opt/w_j1_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_j1l.c | 6 - sysdeps/ieee754/ldbl-opt/w_j1l_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_jn.c | 6 - sysdeps/ieee754/ldbl-opt/w_jn_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_jnl.c | 6 - sysdeps/ieee754/ldbl-opt/w_jnl_compat.c | 6 + sysdeps/ieee754/ldbl-opt/w_log.c | 5 - sysdeps/ieee754/ldbl-opt/w_log10.c | 5 - sysdeps/ieee754/ldbl-opt/w_log10_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_log10l.c | 5 - sysdeps/ieee754/ldbl-opt/w_log10l_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_log2.c | 5 - sysdeps/ieee754/ldbl-opt/w_log2_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_log2l.c | 5 - sysdeps/ieee754/ldbl-opt/w_log2l_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_log_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_logl.c | 5 - sysdeps/ieee754/ldbl-opt/w_logl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_pow.c | 5 - sysdeps/ieee754/ldbl-opt/w_pow_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_powl.c | 5 - sysdeps/ieee754/ldbl-opt/w_powl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_remainder.c | 7 - sysdeps/ieee754/ldbl-opt/w_remainder_compat.c | 7 + sysdeps/ieee754/ldbl-opt/w_remainderl.c | 7 - sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c | 7 + sysdeps/ieee754/ldbl-opt/w_scalb.c | 5 - sysdeps/ieee754/ldbl-opt/w_scalb_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_scalbl.c | 5 - sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_sinh.c | 5 - sysdeps/ieee754/ldbl-opt/w_sinh_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_sinhl.c | 5 - sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_sqrt.c | 5 - sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_sqrtl.c | 5 - sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_tgamma.c | 5 - sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c | 5 + sysdeps/ieee754/ldbl-opt/w_tgammal.c | 5 - sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c | 5 + sysdeps/powerpc/nofpu/Makefile | 10 +- .../powerpc32/power4/fpu/multiarch/Makefile | 5 +- .../powerpc32/power4/fpu/multiarch/w_sqrt-power5.S | 31 - .../powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S | 31 - .../powerpc32/power4/fpu/multiarch/w_sqrt.c | 40 - .../power4/fpu/multiarch/w_sqrt_compat-power5.S | 31 + .../power4/fpu/multiarch/w_sqrt_compat-ppc32.S | 31 + .../powerpc32/power4/fpu/multiarch/w_sqrt_compat.c | 40 + .../power4/fpu/multiarch/w_sqrtf-power5.S | 26 - .../powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S | 26 - .../powerpc32/power4/fpu/multiarch/w_sqrtf.c | 32 - .../power4/fpu/multiarch/w_sqrtf_compat-power5.S | 26 + .../power4/fpu/multiarch/w_sqrtf_compat-ppc32.S | 26 + .../power4/fpu/multiarch/w_sqrtf_compat.c | 32 + sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S | 109 - .../powerpc/powerpc32/power4/fpu/w_sqrt_compat.S | 108 + sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S | 101 - .../powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S | 100 + sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S | 107 - .../powerpc/powerpc32/power5/fpu/w_sqrt_compat.S | 106 + sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S | 99 - .../powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S | 98 + sysdeps/sparc/sparc32/fpu/w_sqrt.S | 53 - sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S | 53 + sysdeps/sparc/sparc32/fpu/w_sqrtf.S | 51 - sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S | 51 + .../sparc/sparc32/sparcv9/fpu/multiarch/Makefile | 3 +- .../sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S | 49 - .../sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S | 12 - .../sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S | 49 + .../sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S | 12 + .../sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S | 47 - .../sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S | 12 - .../sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S | 47 + .../sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S | 12 + sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S | 51 - sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S | 51 + sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S | 50 - sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S | 50 + sysdeps/sparc/sparc64/fpu/w_sqrt.S | 48 - sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S | 48 + sysdeps/sparc/sparc64/fpu/w_sqrtf.S | 48 - sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S | 48 + 377 files changed, 12339 insertions(+), 11931 deletions(-) delete mode 100644 math/w_acos.c create mode 100644 math/w_acos_compat.c delete mode 100644 math/w_acosf.c create mode 100644 math/w_acosf_compat.c delete mode 100644 math/w_acosh.c create mode 100644 math/w_acosh_compat.c delete mode 100644 math/w_acoshf.c create mode 100644 math/w_acoshf_compat.c delete mode 100644 math/w_acoshl.c create mode 100644 math/w_acoshl_compat.c delete mode 100644 math/w_acosl.c create mode 100644 math/w_acosl_compat.c delete mode 100644 math/w_asin.c create mode 100644 math/w_asin_compat.c delete mode 100644 math/w_asinf.c create mode 100644 math/w_asinf_compat.c delete mode 100644 math/w_asinl.c create mode 100644 math/w_asinl_compat.c delete mode 100644 math/w_atan2.c create mode 100644 math/w_atan2_compat.c delete mode 100644 math/w_atan2f.c create mode 100644 math/w_atan2f_compat.c delete mode 100644 math/w_atan2l.c create mode 100644 math/w_atan2l_compat.c delete mode 100644 math/w_atanh.c create mode 100644 math/w_atanh_compat.c delete mode 100644 math/w_atanhf.c create mode 100644 math/w_atanhf_compat.c delete mode 100644 math/w_atanhl.c create mode 100644 math/w_atanhl_compat.c delete mode 100644 math/w_cosh.c create mode 100644 math/w_cosh_compat.c delete mode 100644 math/w_coshf.c create mode 100644 math/w_coshf_compat.c delete mode 100644 math/w_coshl.c create mode 100644 math/w_coshl_compat.c delete mode 100644 math/w_exp10.c create mode 100644 math/w_exp10_compat.c delete mode 100644 math/w_exp10f.c create mode 100644 math/w_exp10f_compat.c delete mode 100644 math/w_exp10l.c create mode 100644 math/w_exp10l_compat.c delete mode 100644 math/w_exp2.c create mode 100644 math/w_exp2_compat.c delete mode 100644 math/w_exp2f.c create mode 100644 math/w_exp2f_compat.c delete mode 100644 math/w_exp2l.c create mode 100644 math/w_exp2l_compat.c delete mode 100644 math/w_fmod.c create mode 100644 math/w_fmod_compat.c delete mode 100644 math/w_fmodf.c create mode 100644 math/w_fmodf_compat.c delete mode 100644 math/w_fmodl.c create mode 100644 math/w_fmodl_compat.c delete mode 100644 math/w_hypot.c create mode 100644 math/w_hypot_compat.c delete mode 100644 math/w_hypotf.c create mode 100644 math/w_hypotf_compat.c delete mode 100644 math/w_hypotl.c create mode 100644 math/w_hypotl_compat.c delete mode 100644 math/w_j0.c create mode 100644 math/w_j0_compat.c delete mode 100644 math/w_j0f.c create mode 100644 math/w_j0f_compat.c delete mode 100644 math/w_j0l.c create mode 100644 math/w_j0l_compat.c delete mode 100644 math/w_j1.c create mode 100644 math/w_j1_compat.c delete mode 100644 math/w_j1f.c create mode 100644 math/w_j1f_compat.c delete mode 100644 math/w_j1l.c create mode 100644 math/w_j1l_compat.c delete mode 100644 math/w_jn.c create mode 100644 math/w_jn_compat.c delete mode 100644 math/w_jnf.c create mode 100644 math/w_jnf_compat.c delete mode 100644 math/w_jnl.c create mode 100644 math/w_jnl_compat.c delete mode 100644 math/w_log.c delete mode 100644 math/w_log10.c create mode 100644 math/w_log10_compat.c delete mode 100644 math/w_log10f.c create mode 100644 math/w_log10f_compat.c delete mode 100644 math/w_log10l.c create mode 100644 math/w_log10l_compat.c delete mode 100644 math/w_log2.c create mode 100644 math/w_log2_compat.c delete mode 100644 math/w_log2f.c create mode 100644 math/w_log2f_compat.c delete mode 100644 math/w_log2l.c create mode 100644 math/w_log2l_compat.c create mode 100644 math/w_log_compat.c delete mode 100644 math/w_logf.c create mode 100644 math/w_logf_compat.c delete mode 100644 math/w_logl.c create mode 100644 math/w_logl_compat.c delete mode 100644 math/w_pow.c create mode 100644 math/w_pow_compat.c delete mode 100644 math/w_powf.c create mode 100644 math/w_powf_compat.c delete mode 100644 math/w_powl.c create mode 100644 math/w_powl_compat.c delete mode 100644 math/w_remainder.c create mode 100644 math/w_remainder_compat.c delete mode 100644 math/w_remainderf.c create mode 100644 math/w_remainderf_compat.c delete mode 100644 math/w_remainderl.c create mode 100644 math/w_remainderl_compat.c delete mode 100644 math/w_scalb.c create mode 100644 math/w_scalb_compat.c delete mode 100644 math/w_scalbf.c create mode 100644 math/w_scalbf_compat.c delete mode 100644 math/w_scalbl.c create mode 100644 math/w_scalbl_compat.c delete mode 100644 math/w_sinh.c create mode 100644 math/w_sinh_compat.c delete mode 100644 math/w_sinhf.c create mode 100644 math/w_sinhf_compat.c delete mode 100644 math/w_sinhl.c create mode 100644 math/w_sinhl_compat.c delete mode 100644 math/w_sqrt.c create mode 100644 math/w_sqrt_compat.c delete mode 100644 math/w_sqrtf.c create mode 100644 math/w_sqrtf_compat.c delete mode 100644 math/w_sqrtl.c create mode 100644 math/w_sqrtl_compat.c delete mode 100644 math/w_tgamma.c create mode 100644 math/w_tgamma_compat.c delete mode 100644 math/w_tgammaf.c create mode 100644 math/w_tgammaf_compat.c delete mode 100644 math/w_tgammal.c create mode 100644 math/w_tgammal_compat.c delete mode 100644 sysdeps/i386/fpu/w_sqrt.c create mode 100644 sysdeps/i386/fpu/w_sqrt_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acos.c create mode 100644 sysdeps/ia64/fpu/w_acos_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acosf.c create mode 100644 sysdeps/ia64/fpu/w_acosf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acosh.c create mode 100644 sysdeps/ia64/fpu/w_acosh_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acoshf.c create mode 100644 sysdeps/ia64/fpu/w_acoshf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acoshl.c create mode 100644 sysdeps/ia64/fpu/w_acoshl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_acosl.c create mode 100644 sysdeps/ia64/fpu/w_acosl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_asin.c create mode 100644 sysdeps/ia64/fpu/w_asin_compat.c delete mode 100644 sysdeps/ia64/fpu/w_asinf.c create mode 100644 sysdeps/ia64/fpu/w_asinf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_asinl.c create mode 100644 sysdeps/ia64/fpu/w_asinl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atan2.c create mode 100644 sysdeps/ia64/fpu/w_atan2_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atan2f.c create mode 100644 sysdeps/ia64/fpu/w_atan2f_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atan2l.c create mode 100644 sysdeps/ia64/fpu/w_atan2l_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atanh.c create mode 100644 sysdeps/ia64/fpu/w_atanh_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atanhf.c create mode 100644 sysdeps/ia64/fpu/w_atanhf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_atanhl.c create mode 100644 sysdeps/ia64/fpu/w_atanhl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_cosh.c create mode 100644 sysdeps/ia64/fpu/w_cosh_compat.c delete mode 100644 sysdeps/ia64/fpu/w_coshf.c create mode 100644 sysdeps/ia64/fpu/w_coshf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_coshl.c create mode 100644 sysdeps/ia64/fpu/w_coshl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp10.c create mode 100644 sysdeps/ia64/fpu/w_exp10_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp10f.c create mode 100644 sysdeps/ia64/fpu/w_exp10f_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp10l.c create mode 100644 sysdeps/ia64/fpu/w_exp10l_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp2.c create mode 100644 sysdeps/ia64/fpu/w_exp2_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp2f.c create mode 100644 sysdeps/ia64/fpu/w_exp2f_compat.c delete mode 100644 sysdeps/ia64/fpu/w_exp2l.c create mode 100644 sysdeps/ia64/fpu/w_exp2l_compat.c delete mode 100644 sysdeps/ia64/fpu/w_fmod.c create mode 100644 sysdeps/ia64/fpu/w_fmod_compat.c delete mode 100644 sysdeps/ia64/fpu/w_fmodf.c create mode 100644 sysdeps/ia64/fpu/w_fmodf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_fmodl.c create mode 100644 sysdeps/ia64/fpu/w_fmodl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_hypot.c create mode 100644 sysdeps/ia64/fpu/w_hypot_compat.c delete mode 100644 sysdeps/ia64/fpu/w_hypotf.c create mode 100644 sysdeps/ia64/fpu/w_hypotf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_hypotl.c create mode 100644 sysdeps/ia64/fpu/w_hypotl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log.c delete mode 100644 sysdeps/ia64/fpu/w_log10.c create mode 100644 sysdeps/ia64/fpu/w_log10_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log10f.c create mode 100644 sysdeps/ia64/fpu/w_log10f_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log10l.c create mode 100644 sysdeps/ia64/fpu/w_log10l_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log2.c create mode 100644 sysdeps/ia64/fpu/w_log2_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log2f.c create mode 100644 sysdeps/ia64/fpu/w_log2f_compat.c delete mode 100644 sysdeps/ia64/fpu/w_log2l.c create mode 100644 sysdeps/ia64/fpu/w_log2l_compat.c create mode 100644 sysdeps/ia64/fpu/w_log_compat.c delete mode 100644 sysdeps/ia64/fpu/w_logf.c create mode 100644 sysdeps/ia64/fpu/w_logf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_logl.c create mode 100644 sysdeps/ia64/fpu/w_logl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_pow.c create mode 100644 sysdeps/ia64/fpu/w_pow_compat.c delete mode 100644 sysdeps/ia64/fpu/w_powf.c create mode 100644 sysdeps/ia64/fpu/w_powf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_powl.c create mode 100644 sysdeps/ia64/fpu/w_powl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_remainder.c create mode 100644 sysdeps/ia64/fpu/w_remainder_compat.c delete mode 100644 sysdeps/ia64/fpu/w_remainderf.c create mode 100644 sysdeps/ia64/fpu/w_remainderf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_remainderl.c create mode 100644 sysdeps/ia64/fpu/w_remainderl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_scalb.c create mode 100644 sysdeps/ia64/fpu/w_scalb_compat.c delete mode 100644 sysdeps/ia64/fpu/w_scalbf.c create mode 100644 sysdeps/ia64/fpu/w_scalbf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_scalbl.c create mode 100644 sysdeps/ia64/fpu/w_scalbl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sinh.c create mode 100644 sysdeps/ia64/fpu/w_sinh_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sinhf.c create mode 100644 sysdeps/ia64/fpu/w_sinhf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sinhl.c create mode 100644 sysdeps/ia64/fpu/w_sinhl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sqrt.c create mode 100644 sysdeps/ia64/fpu/w_sqrt_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sqrtf.c create mode 100644 sysdeps/ia64/fpu/w_sqrtf_compat.c delete mode 100644 sysdeps/ia64/fpu/w_sqrtl.c create mode 100644 sysdeps/ia64/fpu/w_sqrtl_compat.c delete mode 100644 sysdeps/ia64/fpu/w_tgamma.S create mode 100644 sysdeps/ia64/fpu/w_tgamma_compat.S delete mode 100644 sysdeps/ia64/fpu/w_tgammaf.S create mode 100644 sysdeps/ia64/fpu/w_tgammaf_compat.S delete mode 100644 sysdeps/ia64/fpu/w_tgammal.S create mode 100644 sysdeps/ia64/fpu/w_tgammal_compat.S delete mode 100644 sysdeps/ieee754/ldbl-opt/w_acos.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_acos_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_acosh.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_acosh_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_acoshl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_acosl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_acosl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_asin.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_asin_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_asinl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_asinl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_atan2.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_atan2_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_atan2l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_atanh.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_atanh_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_atanhl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_cosh.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_cosh_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_coshl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_coshl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_exp10.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_exp10_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_exp10l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_fmod.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_fmod_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_fmodl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_hypot.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_hypot_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_hypotl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_j0.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_j0_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_j0l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_j0l_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_j1.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_j1_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_j1l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_j1l_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_jn.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_jn_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_jnl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_jnl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_log.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_log10.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_log10_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_log10l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_log10l_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_log2.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_log2_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_log2l.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_log2l_compat.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_log_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_logl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_logl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_pow.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_pow_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_powl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_powl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_remainder.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_remainder_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_remainderl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_scalb.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_scalb_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_scalbl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_sinh.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_sinh_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_sinhl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_sqrt.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_sqrtl.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_tgamma.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c delete mode 100644 sysdeps/ieee754/ldbl-opt/w_tgammal.c create mode 100644 sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S delete mode 100644 sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S create mode 100644 sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S delete mode 100644 sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S create mode 100644 sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S delete mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrt.S create mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S delete mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrtf.S create mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S delete mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrt.S create mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S delete mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrtf.S create mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S (limited to 'sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S') diff --git a/ChangeLog b/ChangeLog index 7ab73a7814..0c48f22b62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,405 @@ +2017-01-04 Gabriel F. T. Gomes + + * math/Makefile (libm-calls): Move wrappers... + (libm-compat-call-auto): Here. + (libm-routines): Add items in libm-compat-calls-auto. + * sysdeps/powerpc/nofpu/Makefile: Add suffix ("_compat") to + the filenames of the wrappers that have been renamed. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise. + + * math/w_acos.c: Add _compat suffix to filename. + * math/w_acosf.c: Likewise. + * math/w_acosh.c: Likewise. + * math/w_acoshf.c: Likewise. + * math/w_acoshl.c: Likewise. + * math/w_acosl.c: Likewise. + * math/w_asin.c: Likewise. + * math/w_asinf.c: Likewise. + * math/w_asinl.c: Likewise. + * math/w_atan2.c: Likewise. + * math/w_atan2f.c: Likewise. + * math/w_atan2l.c: Likewise. + * math/w_atanh.c: Likewise. + * math/w_atanhf.c: Likewise. + * math/w_atanhl.c: Likewise. + * math/w_cosh.c: Likewise. + * math/w_coshf.c: Likewise. + * math/w_coshl.c: Likewise. + * math/w_exp10.c: Likewise. + * math/w_exp10f.c: Likewise. + * math/w_exp10l.c: Likewise. + * math/w_exp2.c: Likewise. + * math/w_exp2f.c: Likewise. + * math/w_exp2l.c: Likewise. + * math/w_fmod.c: Likewise. + * math/w_fmodf.c: Likewise. + * math/w_fmodl.c: Likewise. + * math/w_hypot.c: Likewise. + * math/w_hypotf.c: Likewise. + * math/w_hypotl.c: Likewise. + * math/w_j0.c: Likewise. + * math/w_j0f.c: Likewise. + * math/w_j0l.c: Likewise. + * math/w_j1.c: Likewise. + * math/w_j1f.c: Likewise. + * math/w_j1l.c: Likewise. + * math/w_jn.c: Likewise. + * math/w_jnf.c: Likewise. + * math/w_jnl.c: Likewise. + * math/w_log10.c: Likewise. + * math/w_log10f.c: Likewise. + * math/w_log10l.c: Likewise. + * math/w_log2.c: Likewise. + * math/w_log2f.c: Likewise. + * math/w_log2l.c: Likewise. + * math/w_log.c: Likewise. + * math/w_logf.c: Likewise. + * math/w_logl.c: Likewise. + * math/w_pow.c: Likewise. + * math/w_powf.c: Likewise. + * math/w_powl.c: Likewise. + * math/w_remainder.c: Likewise. + * math/w_remainderf.c: Likewise. + * math/w_remainderl.c: Likewise. + * math/w_scalb.c: Likewise. + * math/w_scalbf.c: Likewise. + * math/w_scalbl.c: Likewise. + * math/w_sinh.c: Likewise. + * math/w_sinhf.c: Likewise. + * math/w_sinhl.c: Likewise. + * math/w_sqrt.c: Likewise. + * math/w_sqrtf.c: Likewise. + * math/w_sqrtl.c: Likewise. + * math/w_tgamma.c: Likewise. + * math/w_tgammaf.c: Likewise. + * math/w_tgammal.c: Likewise. + + * math/w_acos_compat.c: New file copied from above and + adjusted for new #includes path + * math/w_acosf_compat.c: Likewise. + * math/w_acosh_compat.c: Likewise. + * math/w_acoshf_compat.c: Likewise. + * math/w_acoshl_compat.c: Likewise. + * math/w_acosl_compat.c: Likewise. + * math/w_asin_compat.c: Likewise. + * math/w_asinf_compat.c: Likewise. + * math/w_asinl_compat.c: Likewise. + * math/w_atan2_compat.c: Likewise. + * math/w_atan2f_compat.c: Likewise. + * math/w_atan2l_compat.c: Likewise. + * math/w_atanh_compat.c: Likewise. + * math/w_atanhf_compat.c: Likewise. + * math/w_atanhl_compat.c: Likewise. + * math/w_cosh_compat.c: Likewise. + * math/w_coshf_compat.c: Likewise. + * math/w_coshl_compat.c: Likewise. + * math/w_exp10_compat.c: Likewise. + * math/w_exp10f_compat.c: Likewise. + * math/w_exp10l_compat.c: Likewise. + * math/w_exp2_compat.c: Likewise. + * math/w_exp2f_compat.c: Likewise. + * math/w_exp2l_compat.c: Likewise. + * math/w_fmod_compat.c: Likewise. + * math/w_fmodf_compat.c: Likewise. + * math/w_fmodl_compat.c: Likewise. + * math/w_hypot_compat.c: Likewise. + * math/w_hypotf_compat.c: Likewise. + * math/w_hypotl_compat.c: Likewise. + * math/w_j0_compat.c: Likewise. + * math/w_j0f_compat.c: Likewise. + * math/w_j0l_compat.c: Likewise. + * math/w_j1_compat.c: Likewise. + * math/w_j1f_compat.c: Likewise. + * math/w_j1l_compat.c: Likewise. + * math/w_jn_compat.c: Likewise. + * math/w_jnf_compat.c: Likewise. + * math/w_jnl_compat.c: Likewise. + * math/w_log10_compat.c: Likewise. + * math/w_log10f_compat.c: Likewise. + * math/w_log10l_compat.c: Likewise. + * math/w_log2_compat.c: Likewise. + * math/w_log2f_compat.c: Likewise. + * math/w_log2l_compat.c: Likewise. + * math/w_log_compat.c: Likewise. + * math/w_logf_compat.c: Likewise. + * math/w_logl_compat.c: Likewise. + * math/w_pow_compat.c: Likewise. + * math/w_powf_compat.c: Likewise. + * math/w_powl_compat.c: Likewise. + * math/w_remainder_compat.c: Likewise. + * math/w_remainderf_compat.c: Likewise. + * math/w_remainderl_compat.c: Likewise. + * math/w_scalb_compat.c: Likewise. + * math/w_scalbf_compat.c: Likewise. + * math/w_scalbl_compat.c: Likewise. + * math/w_sinh_compat.c: Likewise. + * math/w_sinhf_compat.c: Likewise. + * math/w_sinhl_compat.c: Likewise. + * math/w_sqrt_compat.c: Likewise. + * math/w_sqrtf_compat.c: Likewise. + * math/w_sqrtl_compat.c: Likewise. + * math/w_tgamma_compat.c: Likewise. + * math/w_tgammaf_compat.c: Likewise. + * math/w_tgammal_compat.c: Likewise. + + * sysdeps/i386/fpu/w_sqrt.c: Add _compat suffix to filename. + * sysdeps/ia64/fpu/w_sqrtl.c: Likewise. + * sysdeps/ia64/fpu/w_acosl.c: Likewise. + * sysdeps/ia64/fpu/w_sqrtf.c: Likewise. + * sysdeps/ia64/fpu/w_sqrt.c: Likewise. + * sysdeps/ia64/fpu/w_sinhl.c: Likewise. + * sysdeps/ia64/fpu/w_acosf.c: Likewise. + * sysdeps/ia64/fpu/w_sinhf.c: Likewise. + * sysdeps/ia64/fpu/w_sinh.c: Likewise. + * sysdeps/ia64/fpu/w_scalbl.c: Likewise. + * sysdeps/ia64/fpu/w_scalbf.c: Likewise. + * sysdeps/ia64/fpu/w_scalb.c: Likewise. + * sysdeps/ia64/fpu/w_remainderl.c: Likewise. + * sysdeps/ia64/fpu/w_remainderf.c: Likewise. + * sysdeps/ia64/fpu/w_remainder.c: Likewise. + * sysdeps/ia64/fpu/w_powl.c: Likewise. + * sysdeps/ia64/fpu/w_powf.c: Likewise. + * sysdeps/ia64/fpu/w_pow.c: Likewise. + * sysdeps/ia64/fpu/w_logl.c: Likewise. + * sysdeps/ia64/fpu/w_logf.c: Likewise. + * sysdeps/ia64/fpu/w_log2l.c: Likewise. + * sysdeps/ia64/fpu/w_log2f.c: Likewise. + * sysdeps/ia64/fpu/w_log2.c: Likewise. + * sysdeps/ia64/fpu/w_log10l.c: Likewise. + * sysdeps/ia64/fpu/w_log10f.c: Likewise. + * sysdeps/ia64/fpu/w_log10.c: Likewise. + * sysdeps/ia64/fpu/w_log.c: Likewise. + * sysdeps/ia64/fpu/w_hypotl.c: Likewise. + * sysdeps/ia64/fpu/w_hypotf.c: Likewise. + * sysdeps/ia64/fpu/w_hypot.c: Likewise. + * sysdeps/ia64/fpu/w_fmodl.c: Likewise. + * sysdeps/ia64/fpu/w_fmodf.c: Likewise. + * sysdeps/ia64/fpu/w_fmod.c: Likewise. + * sysdeps/ia64/fpu/w_exp2l.c: Likewise. + * sysdeps/ia64/fpu/w_exp2f.c: Likewise. + * sysdeps/ia64/fpu/w_exp2.c: Likewise. + * sysdeps/ia64/fpu/w_exp10l.c: Likewise. + * sysdeps/ia64/fpu/w_exp10f.c: Likewise. + * sysdeps/ia64/fpu/w_exp10.c: Likewise. + * sysdeps/ia64/fpu/w_coshl.c: Likewise. + * sysdeps/ia64/fpu/w_coshf.c: Likewise. + * sysdeps/ia64/fpu/w_cosh.c: Likewise. + * sysdeps/ia64/fpu/w_atanhl.c: Likewise. + * sysdeps/ia64/fpu/w_atanhf.c: Likewise. + * sysdeps/ia64/fpu/w_atanh.c: Likewise. + * sysdeps/ia64/fpu/w_atan2l.c: Likewise. + * sysdeps/ia64/fpu/w_atan2f.c: Likewise. + * sysdeps/ia64/fpu/w_atan2.c: Likewise. + * sysdeps/ia64/fpu/w_asinl.c: Likewise. + * sysdeps/ia64/fpu/w_asinf.c: Likewise. + * sysdeps/ia64/fpu/w_asin.c: Likewise. + * sysdeps/ia64/fpu/w_acoshl.c: Likewise. + * sysdeps/ia64/fpu/w_acoshf.c: Likewise. + * sysdeps/ia64/fpu/w_acosh.c: Likewise. + * sysdeps/ia64/fpu/w_acos.c: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acos.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acosh.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acoshl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acosl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_asin.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_asinl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atan2.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atan2l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atanh.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atanhl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_cosh.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_coshl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_exp10.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_exp10l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_fmod.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_fmodl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_hypot.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_hypotl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j0.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j0l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j1.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j1l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_jn.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_jnl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log10.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log10l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log2.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log2l.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_logl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_pow.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_powl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_remainder.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_remainderl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_scalb.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_scalbl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sinh.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sinhl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sqrt.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sqrtl.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_tgamma.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_tgammal.c: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S: Likewise. + * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S: Likewise. + * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S: Likewise. + * sysdeps/sparc/sparc32/fpu/w_sqrt.S: Likewise. + * sysdeps/sparc/sparc32/fpu/w_sqrtf.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S: Likewise. + * sysdeps/sparc/sparc64/fpu/w_sqrt.S: Likewise. + * sysdeps/sparc/sparc64/fpu/w_sqrtf.S: Likewise. + + * sysdeps/i386/fpu/w_sqrt_compat.c: New file copied from above + and adjusted for new #includes path + * sysdeps/ia64/fpu/w_acos_compat.c: Likewise. + * sysdeps/ia64/fpu/w_acosf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_acosh_compat.c: Likewise. + * sysdeps/ia64/fpu/w_acoshf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_acoshl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_acosl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_asin_compat.c: Likewise. + * sysdeps/ia64/fpu/w_asinf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_asinl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atan2_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atan2f_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atan2l_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atanh_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atanhf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_atanhl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_cosh_compat.c: Likewise. + * sysdeps/ia64/fpu/w_coshf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_coshl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp10_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp10f_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp10l_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp2_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp2f_compat.c: Likewise. + * sysdeps/ia64/fpu/w_exp2l_compat.c: Likewise. + * sysdeps/ia64/fpu/w_fmod_compat.c: Likewise. + * sysdeps/ia64/fpu/w_fmodf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_fmodl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_hypot_compat.c: Likewise. + * sysdeps/ia64/fpu/w_hypotf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_hypotl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log10_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log10f_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log10l_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log2_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log2f_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log2l_compat.c: Likewise. + * sysdeps/ia64/fpu/w_log_compat.c: Likewise. + * sysdeps/ia64/fpu/w_logf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_logl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_pow_compat.c: Likewise. + * sysdeps/ia64/fpu/w_powf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_powl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_remainder_compat.c: Likewise. + * sysdeps/ia64/fpu/w_remainderf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_remainderl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_scalb_compat.c: Likewise. + * sysdeps/ia64/fpu/w_scalbf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_scalbl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sinh_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sinhf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sinhl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sqrt_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sqrtf_compat.c: Likewise. + * sysdeps/ia64/fpu/w_sqrtl_compat.c: Likewise. + * sysdeps/ia64/fpu/w_tgamma_compat.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf_compat.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal_compat.S: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acos_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acosh_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_acosl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_asin_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_asinl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atan2_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atanh_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_cosh_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_coshl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_exp10_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_fmod_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_hypot_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j0_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j0l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j1_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_j1l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_jn_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_jnl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log10_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log10l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log2_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log2l_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_log_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_logl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_pow_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_powl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_remainder_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_scalb_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sinh_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c: Likewise. + * sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c: + Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S: Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S: Likewise. + * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S: Likewise. + * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S: Likewise. + * sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S: Likewise. + * sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S: + Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S: + Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S: + Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S: + Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S: Likewise. + * sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S: Likewise. + * sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S: Likewise. + 2017-01-04 Joseph Myers * sysdeps/microblaze/bits/setjmp.h (__jmp_buf): Give struct tag diff --git a/math/Makefile b/math/Makefile index d15b58e1cf..0ee46480e2 100644 --- a/math/Makefile +++ b/math/Makefile @@ -65,19 +65,26 @@ libm-calls = \ s_ceilF s_cosF s_erfF s_expm1F s_fabsF \ s_floorF s_log1pF s_logbF \ s_nextafterF s_nexttowardF s_rintF s_scalblnF \ - s_significandF s_sinF s_tanF s_tanhF w_acosF w_acoshF w_asinF \ - w_atan2F w_atanhF w_coshF w_expF w_exp2F w_exp10F w_fmodF \ - w_tgammaF w_hypotF w_j0F w_j1F w_jnF w_lgammaF w_lgammaF_r \ - w_logF w_log10F w_powF w_remainderF w_scalbF w_sinhF w_sqrtF \ + s_significandF s_sinF s_tanF s_tanhF \ + w_expF \ + w_lgammaF w_lgammaF_r \ s_fpclassifyF s_truncF \ s_remquoF e_log2F e_exp2F s_roundF s_nearbyintF s_sincosF \ - s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F w_log2F \ + s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F \ s_issignalingF $(calls:s_%=m_%) x2y2m1F \ gamma_productF lgamma_negF lgamma_productF \ s_nextupF s_totalorderF s_totalordermagF s_getpayloadF \ s_setpayloadF s_setpayloadsigF s_roundevenF s_fromfpF s_ufromfpF \ s_fromfpxF s_ufromfpxF $(gen-libm-calls) +libm-compat-calls-auto = \ + w_acosF_compat w_acoshF_compat w_asinF_compat w_atan2F_compat \ + w_atanhF_compat w_coshF_compat w_exp2F_compat w_exp10F_compat \ + w_fmodF_compat w_hypotF_compat w_j0F_compat w_j1F_compat \ + w_jnF_compat w_log2F_compat w_log10F_compat w_logF_compat \ + w_powF_compat w_remainderF_compat w_scalbF_compat \ + w_sinhF_compat w_sqrtF_compat w_tgammaF_compat + libm-compat-calls-ldouble-yes = w_lgamma_compatl k_standardl libm-compat-calls = w_lgamma_compatf w_lgamma_compat k_standard k_standardf \ $(libm-compat-calls-ldouble-$(long-double-fcts)) @@ -116,6 +123,7 @@ type-float-routines := k_rem_pio2f type-foreach = $(foreach t,$(types),$(subst F,$(type-$(t)-suffix),$(1))) libm-routines = $(strip $(libm-support) $(libm-compat-calls) \ + $(call type-foreach, $(libm-compat-calls-auto)) \ $(call type-foreach, $(libm-calls)) \ $(foreach t, $(types), $(type-$(t)-routines))) \ diff --git a/math/w_acos.c b/math/w_acos.c deleted file mode 100644 index e6fbdf139c..0000000000 --- a/math/w_acos.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper acos */ -double -__acos (double x) -{ - if (__builtin_expect (isgreater (fabs (x), 1.0), 0) - && _LIB_VERSION != _IEEE_) - { - /* acos(|x|>1) */ - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 1); - } - - return __ieee754_acos (x); -} -weak_alias (__acos, acos) -#ifdef NO_LONG_DOUBLE -strong_alias (__acos, __acosl) -weak_alias (__acos, acosl) -#endif diff --git a/math/w_acos_compat.c b/math/w_acos_compat.c new file mode 100644 index 0000000000..e6fbdf139c --- /dev/null +++ b/math/w_acos_compat.c @@ -0,0 +1,42 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper acos */ +double +__acos (double x) +{ + if (__builtin_expect (isgreater (fabs (x), 1.0), 0) + && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 1); + } + + return __ieee754_acos (x); +} +weak_alias (__acos, acos) +#ifdef NO_LONG_DOUBLE +strong_alias (__acos, __acosl) +weak_alias (__acos, acosl) +#endif diff --git a/math/w_acosf.c b/math/w_acosf.c deleted file mode 100644 index f389da19ba..0000000000 --- a/math/w_acosf.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper acosf */ -float -__acosf (float x) -{ - if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) - && _LIB_VERSION != _IEEE_) - { - /* acos(|x|>1) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 101); - } - - return __ieee754_acosf (x); -} -weak_alias (__acosf, acosf) diff --git a/math/w_acosf_compat.c b/math/w_acosf_compat.c new file mode 100644 index 0000000000..f389da19ba --- /dev/null +++ b/math/w_acosf_compat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper acosf */ +float +__acosf (float x) +{ + if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) + && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 101); + } + + return __ieee754_acosf (x); +} +weak_alias (__acosf, acosf) diff --git a/math/w_acosh.c b/math/w_acosh.c deleted file mode 100644 index 286ea86b89..0000000000 --- a/math/w_acosh.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper acosh */ -double -__acosh (double x) -{ - if (__builtin_expect (isless (x, 1.0), 0) && _LIB_VERSION != _IEEE_) - /* acosh(x<1) */ - return __kernel_standard (x, x, 29); - - return __ieee754_acosh (x); -} -weak_alias (__acosh, acosh) -#ifdef NO_LONG_DOUBLE -strong_alias (__acosh, __acoshl) -weak_alias (__acosh, acoshl) -#endif diff --git a/math/w_acosh_compat.c b/math/w_acosh_compat.c new file mode 100644 index 0000000000..286ea86b89 --- /dev/null +++ b/math/w_acosh_compat.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper acosh */ +double +__acosh (double x) +{ + if (__builtin_expect (isless (x, 1.0), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard (x, x, 29); + + return __ieee754_acosh (x); +} +weak_alias (__acosh, acosh) +#ifdef NO_LONG_DOUBLE +strong_alias (__acosh, __acoshl) +weak_alias (__acosh, acoshl) +#endif diff --git a/math/w_acoshf.c b/math/w_acoshf.c deleted file mode 100644 index 801a52edf0..0000000000 --- a/math/w_acoshf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper acoshf */ -float -__acoshf (float x) -{ - if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_) - /* acosh(x<1) */ - return __kernel_standard_f (x, x, 129); - - return __ieee754_acoshf (x); -} -weak_alias (__acoshf, acoshf) diff --git a/math/w_acoshf_compat.c b/math/w_acoshf_compat.c new file mode 100644 index 0000000000..801a52edf0 --- /dev/null +++ b/math/w_acoshf_compat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper acoshf */ +float +__acoshf (float x) +{ + if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard_f (x, x, 129); + + return __ieee754_acoshf (x); +} +weak_alias (__acoshf, acoshf) diff --git a/math/w_acoshl.c b/math/w_acoshl.c deleted file mode 100644 index 310f3c9954..0000000000 --- a/math/w_acoshl.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper acosl */ -long double -__acoshl (long double x) -{ - if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_) - /* acosh(x<1) */ - return __kernel_standard_l (x, x, 229); - - return __ieee754_acoshl (x); -} -weak_alias (__acoshl, acoshl) diff --git a/math/w_acoshl_compat.c b/math/w_acoshl_compat.c new file mode 100644 index 0000000000..310f3c9954 --- /dev/null +++ b/math/w_acoshl_compat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper acosl */ +long double +__acoshl (long double x) +{ + if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard_l (x, x, 229); + + return __ieee754_acoshl (x); +} +weak_alias (__acoshl, acoshl) diff --git a/math/w_acosl.c b/math/w_acosl.c deleted file mode 100644 index eaccc6646d..0000000000 --- a/math/w_acosl.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper acosl */ -long double -__acosl (long double x) -{ - if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) - && _LIB_VERSION != _IEEE_) - { - /* acos(|x|>1) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 201); - } - - return __ieee754_acosl (x); -} -weak_alias (__acosl, acosl) diff --git a/math/w_acosl_compat.c b/math/w_acosl_compat.c new file mode 100644 index 0000000000..eaccc6646d --- /dev/null +++ b/math/w_acosl_compat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper acosl */ +long double +__acosl (long double x) +{ + if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) + && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 201); + } + + return __ieee754_acosl (x); +} +weak_alias (__acosl, acosl) diff --git a/math/w_asin.c b/math/w_asin.c deleted file mode 100644 index b2ad6323ed..0000000000 --- a/math/w_asin.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper asin */ -double -__asin (double x) -{ - if (__builtin_expect (isgreater (fabs (x), 1.0), 0) - && _LIB_VERSION != _IEEE_) - { - /* asin(|x|>1) */ - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 2); - } - - return __ieee754_asin (x); -} -weak_alias (__asin, asin) -#ifdef NO_LONG_DOUBLE -strong_alias (__asin, __asinl) -weak_alias (__asin, asinl) -#endif diff --git a/math/w_asin_compat.c b/math/w_asin_compat.c new file mode 100644 index 0000000000..b2ad6323ed --- /dev/null +++ b/math/w_asin_compat.c @@ -0,0 +1,42 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper asin */ +double +__asin (double x) +{ + if (__builtin_expect (isgreater (fabs (x), 1.0), 0) + && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 2); + } + + return __ieee754_asin (x); +} +weak_alias (__asin, asin) +#ifdef NO_LONG_DOUBLE +strong_alias (__asin, __asinl) +weak_alias (__asin, asinl) +#endif diff --git a/math/w_asinf.c b/math/w_asinf.c deleted file mode 100644 index 0d0ee98f98..0000000000 --- a/math/w_asinf.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper asinf */ -float -__asinf (float x) -{ - if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) - && _LIB_VERSION != _IEEE_) - { - /* asin(|x|>1) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 102); - } - - return __ieee754_asinf (x); -} -weak_alias (__asinf, asinf) diff --git a/math/w_asinf_compat.c b/math/w_asinf_compat.c new file mode 100644 index 0000000000..0d0ee98f98 --- /dev/null +++ b/math/w_asinf_compat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper asinf */ +float +__asinf (float x) +{ + if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) + && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 102); + } + + return __ieee754_asinf (x); +} +weak_alias (__asinf, asinf) diff --git a/math/w_asinl.c b/math/w_asinl.c deleted file mode 100644 index a02fa1e04c..0000000000 --- a/math/w_asinl.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper asinl */ -long double -__asinl (long double x) -{ - if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) - && _LIB_VERSION != _IEEE_) - { - /* asin(|x|>1) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 202); - } - - return __ieee754_asinl (x); -} -weak_alias (__asinl, asinl) diff --git a/math/w_asinl_compat.c b/math/w_asinl_compat.c new file mode 100644 index 0000000000..a02fa1e04c --- /dev/null +++ b/math/w_asinl_compat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper asinl */ +long double +__asinl (long double x) +{ + if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) + && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 202); + } + + return __ieee754_asinl (x); +} +weak_alias (__asinl, asinl) diff --git a/math/w_atan2.c b/math/w_atan2.c deleted file mode 100644 index cceb602258..0000000000 --- a/math/w_atan2.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* - * wrapper atan2(y,x) - */ - -#include -#include -#include - - -double -__atan2 (double y, double x) -{ - double z; - - if (__builtin_expect (x == 0.0 && y == 0.0, 0) && _LIB_VERSION == _SVID_) - return __kernel_standard (y, x, 3); /* atan2(+-0,+-0) */ - - z = __ieee754_atan2 (y, x); - if (__glibc_unlikely (z == 0.0 && y != 0.0 && isfinite (x))) - __set_errno (ERANGE); - return z; -} -weak_alias (__atan2, atan2) -#ifdef NO_LONG_DOUBLE -strong_alias (__atan2, __atan2l) -weak_alias (__atan2, atan2l) -#endif diff --git a/math/w_atan2_compat.c b/math/w_atan2_compat.c new file mode 100644 index 0000000000..cceb602258 --- /dev/null +++ b/math/w_atan2_compat.c @@ -0,0 +1,45 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* + * wrapper atan2(y,x) + */ + +#include +#include +#include + + +double +__atan2 (double y, double x) +{ + double z; + + if (__builtin_expect (x == 0.0 && y == 0.0, 0) && _LIB_VERSION == _SVID_) + return __kernel_standard (y, x, 3); /* atan2(+-0,+-0) */ + + z = __ieee754_atan2 (y, x); + if (__glibc_unlikely (z == 0.0 && y != 0.0 && isfinite (x))) + __set_errno (ERANGE); + return z; +} +weak_alias (__atan2, atan2) +#ifdef NO_LONG_DOUBLE +strong_alias (__atan2, __atan2l) +weak_alias (__atan2, atan2l) +#endif diff --git a/math/w_atan2f.c b/math/w_atan2f.c deleted file mode 100644 index 8343893e74..0000000000 --- a/math/w_atan2f.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* - * wrapper atan2f(y,x) - */ - -#include -#include -#include - - -float -__atan2f (float y, float x) -{ - float z; - - if (__builtin_expect (x == 0.0f && y == 0.0f, 0) && _LIB_VERSION == _SVID_) - return __kernel_standard_f (y, x, 103); /* atan2(+-0,+-0) */ - - z = __ieee754_atan2f (y, x); - if (__glibc_unlikely (z == 0.0f && y != 0.0f && isfinite (x))) - __set_errno (ERANGE); - return z; -} -weak_alias (__atan2f, atan2f) diff --git a/math/w_atan2f_compat.c b/math/w_atan2f_compat.c new file mode 100644 index 0000000000..8343893e74 --- /dev/null +++ b/math/w_atan2f_compat.c @@ -0,0 +1,41 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* + * wrapper atan2f(y,x) + */ + +#include +#include +#include + + +float +__atan2f (float y, float x) +{ + float z; + + if (__builtin_expect (x == 0.0f && y == 0.0f, 0) && _LIB_VERSION == _SVID_) + return __kernel_standard_f (y, x, 103); /* atan2(+-0,+-0) */ + + z = __ieee754_atan2f (y, x); + if (__glibc_unlikely (z == 0.0f && y != 0.0f && isfinite (x))) + __set_errno (ERANGE); + return z; +} +weak_alias (__atan2f, atan2f) diff --git a/math/w_atan2l.c b/math/w_atan2l.c deleted file mode 100644 index b7b29ff6c3..0000000000 --- a/math/w_atan2l.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* - * wrapper atan2l(y,x) - */ - -#include -#include -#include - - -long double -__atan2l (long double y, long double x) -{ - long double z; - - if (__builtin_expect (x == 0.0L && y == 0.0L, 0) && _LIB_VERSION == _SVID_) - return __kernel_standard_l (y, x, 203); /* atan2(+-0,+-0) */ - - z = __ieee754_atan2l (y, x); - if (__glibc_unlikely (z == 0.0L && y != 0.0L && isfinite (x))) - __set_errno (ERANGE); - return z; -} -weak_alias (__atan2l, atan2l) diff --git a/math/w_atan2l_compat.c b/math/w_atan2l_compat.c new file mode 100644 index 0000000000..b7b29ff6c3 --- /dev/null +++ b/math/w_atan2l_compat.c @@ -0,0 +1,41 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* + * wrapper atan2l(y,x) + */ + +#include +#include +#include + + +long double +__atan2l (long double y, long double x) +{ + long double z; + + if (__builtin_expect (x == 0.0L && y == 0.0L, 0) && _LIB_VERSION == _SVID_) + return __kernel_standard_l (y, x, 203); /* atan2(+-0,+-0) */ + + z = __ieee754_atan2l (y, x); + if (__glibc_unlikely (z == 0.0L && y != 0.0L && isfinite (x))) + __set_errno (ERANGE); + return z; +} +weak_alias (__atan2l, atan2l) diff --git a/math/w_atanh.c b/math/w_atanh.c deleted file mode 100644 index 456dcb34e7..0000000000 --- a/math/w_atanh.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper atanh */ -double -__atanh (double x) -{ - if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0) - && _LIB_VERSION != _IEEE_) - return __kernel_standard (x, x, - fabs (x) > 1.0 - ? 30 /* atanh(|x|>1) */ - : 31); /* atanh(|x|==1) */ - - return __ieee754_atanh (x); -} -weak_alias (__atanh, atanh) -#ifdef NO_LONG_DOUBLE -strong_alias (__atanh, __atanhl) -weak_alias (__atanh, atanhl) -#endif diff --git a/math/w_atanh_compat.c b/math/w_atanh_compat.c new file mode 100644 index 0000000000..456dcb34e7 --- /dev/null +++ b/math/w_atanh_compat.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper atanh */ +double +__atanh (double x) +{ + if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0) + && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, + fabs (x) > 1.0 + ? 30 /* atanh(|x|>1) */ + : 31); /* atanh(|x|==1) */ + + return __ieee754_atanh (x); +} +weak_alias (__atanh, atanh) +#ifdef NO_LONG_DOUBLE +strong_alias (__atanh, __atanhl) +weak_alias (__atanh, atanhl) +#endif diff --git a/math/w_atanhf.c b/math/w_atanhf.c deleted file mode 100644 index dd14145c1c..0000000000 --- a/math/w_atanhf.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper atanhf */ -float -__atanhf (float x) -{ - if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_f (x, x, - fabsf (x) > 1.0f - ? 130 /* atanh(|x|>1) */ - : 131); /* atanh(|x|==1) */ - - return __ieee754_atanhf (x); -} -weak_alias (__atanhf, atanhf) diff --git a/math/w_atanhf_compat.c b/math/w_atanhf_compat.c new file mode 100644 index 0000000000..dd14145c1c --- /dev/null +++ b/math/w_atanhf_compat.c @@ -0,0 +1,36 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper atanhf */ +float +__atanhf (float x) +{ + if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, + fabsf (x) > 1.0f + ? 130 /* atanh(|x|>1) */ + : 131); /* atanh(|x|==1) */ + + return __ieee754_atanhf (x); +} +weak_alias (__atanhf, atanhf) diff --git a/math/w_atanhl.c b/math/w_atanhl.c deleted file mode 100644 index 37e8da598a..0000000000 --- a/math/w_atanhl.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper atanhl */ -long double -__atanhl (long double x) -{ - if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_l (x, x, - fabsl (x) > 1.0L - ? 230 /* atanh(|x|>1) */ - : 231); /* atanh(|x|==1) */ - - return __ieee754_atanhl (x); -} -weak_alias (__atanhl, atanhl) diff --git a/math/w_atanhl_compat.c b/math/w_atanhl_compat.c new file mode 100644 index 0000000000..37e8da598a --- /dev/null +++ b/math/w_atanhl_compat.c @@ -0,0 +1,36 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper atanhl */ +long double +__atanhl (long double x) +{ + if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_l (x, x, + fabsl (x) > 1.0L + ? 230 /* atanh(|x|>1) */ + : 231); /* atanh(|x|==1) */ + + return __ieee754_atanhl (x); +} +weak_alias (__atanhl, atanhl) diff --git a/math/w_cosh.c b/math/w_cosh.c deleted file mode 100644 index 0771434ec1..0000000000 --- a/math/w_cosh.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Optimizations bu Ulrich Drepper , 2011 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper cosh(x) - */ - -#include -#include - -double -__cosh (double x) -{ - double z = __ieee754_cosh (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard (x, x, 5); /* cosh overflow */ - - return z; -} -weak_alias (__cosh, cosh) -#ifdef NO_LONG_DOUBLE -strong_alias (__cosh, __coshl) -weak_alias (__cosh, coshl) -#endif diff --git a/math/w_cosh_compat.c b/math/w_cosh_compat.c new file mode 100644 index 0000000000..0771434ec1 --- /dev/null +++ b/math/w_cosh_compat.c @@ -0,0 +1,34 @@ +/* Optimizations bu Ulrich Drepper , 2011 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper cosh(x) + */ + +#include +#include + +double +__cosh (double x) +{ + double z = __ieee754_cosh (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 5); /* cosh overflow */ + + return z; +} +weak_alias (__cosh, cosh) +#ifdef NO_LONG_DOUBLE +strong_alias (__cosh, __coshl) +weak_alias (__cosh, coshl) +#endif diff --git a/math/w_coshf.c b/math/w_coshf.c deleted file mode 100644 index dc7fb53ba3..0000000000 --- a/math/w_coshf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* w_coshf.c -- float version of w_cosh.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - * Optimizations by Ulrich Drepper , 2011. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper coshf(x) - */ - -#include -#include - -float -__coshf (float x) -{ - float z = __ieee754_coshf (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_f (x, x, 105); /* cosh overflow */ - - return z; -} -weak_alias (__coshf, coshf) diff --git a/math/w_coshf_compat.c b/math/w_coshf_compat.c new file mode 100644 index 0000000000..dc7fb53ba3 --- /dev/null +++ b/math/w_coshf_compat.c @@ -0,0 +1,34 @@ +/* w_coshf.c -- float version of w_cosh.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + * Optimizations by Ulrich Drepper , 2011. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper coshf(x) + */ + +#include +#include + +float +__coshf (float x) +{ + float z = __ieee754_coshf (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 105); /* cosh overflow */ + + return z; +} +weak_alias (__coshf, coshf) diff --git a/math/w_coshl.c b/math/w_coshl.c deleted file mode 100644 index 27f0a4f4c3..0000000000 --- a/math/w_coshl.c +++ /dev/null @@ -1,35 +0,0 @@ -/* w_acoshl.c -- long double version of w_acosh.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - * Optimizations bu Ulrich Drepper , 2011. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper coshl(x) - */ - -#include -#include - -long double -__coshl (long double x) -{ - long double z = __ieee754_coshl (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_l (x, x, 205); /* cosh overflow */ - - return z; -} -weak_alias (__coshl, coshl) diff --git a/math/w_coshl_compat.c b/math/w_coshl_compat.c new file mode 100644 index 0000000000..27f0a4f4c3 --- /dev/null +++ b/math/w_coshl_compat.c @@ -0,0 +1,35 @@ +/* w_acoshl.c -- long double version of w_acosh.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + * Optimizations bu Ulrich Drepper , 2011. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper coshl(x) + */ + +#include +#include + +long double +__coshl (long double x) +{ + long double z = __ieee754_coshl (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_l (x, x, 205); /* cosh overflow */ + + return z; +} +weak_alias (__coshl, coshl) diff --git a/math/w_exp10.c b/math/w_exp10.c deleted file mode 100644 index 1ba9279e8b..0000000000 --- a/math/w_exp10.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - - -/* - * wrapper exp10(x) - */ - -#include -#include - -double -__exp10 (double x) -{ - double z = __ieee754_exp10 (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */ - return __kernel_standard (x, x, 46 + !!signbit (x)); - - return z; -} -weak_alias (__exp10, exp10) -strong_alias (__exp10, __pow10) -weak_alias (__pow10, pow10) -#ifdef NO_LONG_DOUBLE -strong_alias (__exp10, __exp10l) -weak_alias (__exp10, exp10l) -strong_alias (__exp10l, __pow10l) -weak_alias (__pow10l, pow10l) -#endif diff --git a/math/w_exp10_compat.c b/math/w_exp10_compat.c new file mode 100644 index 0000000000..1ba9279e8b --- /dev/null +++ b/math/w_exp10_compat.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + + +/* + * wrapper exp10(x) + */ + +#include +#include + +double +__exp10 (double x) +{ + double z = __ieee754_exp10 (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */ + return __kernel_standard (x, x, 46 + !!signbit (x)); + + return z; +} +weak_alias (__exp10, exp10) +strong_alias (__exp10, __pow10) +weak_alias (__pow10, pow10) +#ifdef NO_LONG_DOUBLE +strong_alias (__exp10, __exp10l) +weak_alias (__exp10, exp10l) +strong_alias (__exp10l, __pow10l) +weak_alias (__pow10l, pow10l) +#endif diff --git a/math/w_exp10f.c b/math/w_exp10f.c deleted file mode 100644 index 7993945900..0000000000 --- a/math/w_exp10f.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - - -/* - * wrapper exp10f(x) - */ - -#include -#include - -float -__exp10f (float x) -{ - float z = __ieee754_exp10f (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */ - return __kernel_standard_f (x, x, 146 + !!signbit (x)); - - return z; -} -weak_alias (__exp10f, exp10f) -strong_alias (__exp10f, __pow10f) -weak_alias (__pow10f, pow10f) diff --git a/math/w_exp10f_compat.c b/math/w_exp10f_compat.c new file mode 100644 index 0000000000..7993945900 --- /dev/null +++ b/math/w_exp10f_compat.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + + +/* + * wrapper exp10f(x) + */ + +#include +#include + +float +__exp10f (float x) +{ + float z = __ieee754_exp10f (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */ + return __kernel_standard_f (x, x, 146 + !!signbit (x)); + + return z; +} +weak_alias (__exp10f, exp10f) +strong_alias (__exp10f, __pow10f) +weak_alias (__pow10f, pow10f) diff --git a/math/w_exp10l.c b/math/w_exp10l.c deleted file mode 100644 index 27344686c3..0000000000 --- a/math/w_exp10l.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - - -/* - * wrapper exp10l(x) - */ - -#include -#include - -long double -__exp10l (long double x) -{ - long double z = __ieee754_exp10l (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */ - return __kernel_standard_l (x, x, 246 + !!signbit (x)); - - return z; -} -weak_alias (__exp10l, exp10l) -strong_alias (__exp10l, __pow10l) -weak_alias (__pow10l, pow10l) diff --git a/math/w_exp10l_compat.c b/math/w_exp10l_compat.c new file mode 100644 index 0000000000..27344686c3 --- /dev/null +++ b/math/w_exp10l_compat.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + + +/* + * wrapper exp10l(x) + */ + +#include +#include + +long double +__exp10l (long double x) +{ + long double z = __ieee754_exp10l (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */ + return __kernel_standard_l (x, x, 246 + !!signbit (x)); + + return z; +} +weak_alias (__exp10l, exp10l) +strong_alias (__exp10l, __pow10l) +weak_alias (__pow10l, pow10l) diff --git a/math/w_exp2.c b/math/w_exp2.c deleted file mode 100644 index ca17f9ea63..0000000000 --- a/math/w_exp2.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * wrapper exp2(x) - */ - -#include -#include - -double -__exp2 (double x) -{ - double z = __ieee754_exp2 (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp2 overflow: 44, exp2 underflow: 45 */ - return __kernel_standard (x, x, 44 + !!signbit (x)); - - return z; -} -weak_alias (__exp2, exp2) -#ifdef NO_LONG_DOUBLE -strong_alias (__exp2, __exp2l) -weak_alias (__exp2, exp2l) -#endif diff --git a/math/w_exp2_compat.c b/math/w_exp2_compat.c new file mode 100644 index 0000000000..ca17f9ea63 --- /dev/null +++ b/math/w_exp2_compat.c @@ -0,0 +1,23 @@ +/* + * wrapper exp2(x) + */ + +#include +#include + +double +__exp2 (double x) +{ + double z = __ieee754_exp2 (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp2 overflow: 44, exp2 underflow: 45 */ + return __kernel_standard (x, x, 44 + !!signbit (x)); + + return z; +} +weak_alias (__exp2, exp2) +#ifdef NO_LONG_DOUBLE +strong_alias (__exp2, __exp2l) +weak_alias (__exp2, exp2l) +#endif diff --git a/math/w_exp2f.c b/math/w_exp2f.c deleted file mode 100644 index 61cbd6cda1..0000000000 --- a/math/w_exp2f.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * wrapper exp2f(x) - */ - -#include -#include - -float -__exp2f (float x) -{ - float z = __ieee754_exp2f (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp2 overflow: 144, exp2 underflow: 145 */ - return __kernel_standard_f (x, x, 144 + !!signbit (x)); - - return z; -} -weak_alias (__exp2f, exp2f) diff --git a/math/w_exp2f_compat.c b/math/w_exp2f_compat.c new file mode 100644 index 0000000000..61cbd6cda1 --- /dev/null +++ b/math/w_exp2f_compat.c @@ -0,0 +1,19 @@ +/* + * wrapper exp2f(x) + */ + +#include +#include + +float +__exp2f (float x) +{ + float z = __ieee754_exp2f (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp2 overflow: 144, exp2 underflow: 145 */ + return __kernel_standard_f (x, x, 144 + !!signbit (x)); + + return z; +} +weak_alias (__exp2f, exp2f) diff --git a/math/w_exp2l.c b/math/w_exp2l.c deleted file mode 100644 index 47aed3cb83..0000000000 --- a/math/w_exp2l.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * wrapper exp2l(x) - */ - -#include -#include - -long double -__exp2l (long double x) -{ - long double z = __ieee754_exp2l (x); - if (__builtin_expect (!isfinite (z) || z == 0, 0) - && isfinite (x) && _LIB_VERSION != _IEEE_) - /* exp2 overflow: 244, exp2 underflow: 245 */ - return __kernel_standard_l (x, x, 244 + !!signbit (x)); - - return z; -} -weak_alias (__exp2l, exp2l) diff --git a/math/w_exp2l_compat.c b/math/w_exp2l_compat.c new file mode 100644 index 0000000000..47aed3cb83 --- /dev/null +++ b/math/w_exp2l_compat.c @@ -0,0 +1,19 @@ +/* + * wrapper exp2l(x) + */ + +#include +#include + +long double +__exp2l (long double x) +{ + long double z = __ieee754_exp2l (x); + if (__builtin_expect (!isfinite (z) || z == 0, 0) + && isfinite (x) && _LIB_VERSION != _IEEE_) + /* exp2 overflow: 244, exp2 underflow: 245 */ + return __kernel_standard_l (x, x, 244 + !!signbit (x)); + + return z; +} +weak_alias (__exp2l, exp2l) diff --git a/math/w_fmod.c b/math/w_fmod.c deleted file mode 100644 index 746550a33c..0000000000 --- a/math/w_fmod.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* wrapper fmod */ -double -__fmod (double x, double y) -{ - if (__builtin_expect (isinf (x) || y == 0.0, 0) - && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) - /* fmod(+-Inf,y) or fmod(x,0) */ - return __kernel_standard (x, y, 27); - - return __ieee754_fmod (x, y); -} -weak_alias (__fmod, fmod) -#ifdef NO_LONG_DOUBLE -strong_alias (__fmod, __fmodl) -weak_alias (__fmod, fmodl) -#endif diff --git a/math/w_fmod_compat.c b/math/w_fmod_compat.c new file mode 100644 index 0000000000..746550a33c --- /dev/null +++ b/math/w_fmod_compat.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* wrapper fmod */ +double +__fmod (double x, double y) +{ + if (__builtin_expect (isinf (x) || y == 0.0, 0) + && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) + /* fmod(+-Inf,y) or fmod(x,0) */ + return __kernel_standard (x, y, 27); + + return __ieee754_fmod (x, y); +} +weak_alias (__fmod, fmod) +#ifdef NO_LONG_DOUBLE +strong_alias (__fmod, __fmodl) +weak_alias (__fmod, fmodl) +#endif diff --git a/math/w_fmodf.c b/math/w_fmodf.c deleted file mode 100644 index 45ece587c8..0000000000 --- a/math/w_fmodf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* wrapper fmodf */ -float -__fmodf (float x, float y) -{ - if (__builtin_expect (isinf (x) || y == 0.0f, 0) - && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) - /* fmod(+-Inf,y) or fmod(x,0) */ - return __kernel_standard_f (x, y, 127); - - return __ieee754_fmodf (x, y); -} -weak_alias (__fmodf, fmodf) diff --git a/math/w_fmodf_compat.c b/math/w_fmodf_compat.c new file mode 100644 index 0000000000..45ece587c8 --- /dev/null +++ b/math/w_fmodf_compat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* wrapper fmodf */ +float +__fmodf (float x, float y) +{ + if (__builtin_expect (isinf (x) || y == 0.0f, 0) + && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) + /* fmod(+-Inf,y) or fmod(x,0) */ + return __kernel_standard_f (x, y, 127); + + return __ieee754_fmodf (x, y); +} +weak_alias (__fmodf, fmodf) diff --git a/math/w_fmodl.c b/math/w_fmodl.c deleted file mode 100644 index 1f385bdbae..0000000000 --- a/math/w_fmodl.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* wrapper fmodl */ -long double -__fmodl (long double x, long double y) -{ - if (__builtin_expect (isinf (x) || y == 0.0L, 0) - && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) - /* fmod(+-Inf,y) or fmod(x,0) */ - return __kernel_standard_l (x, y, 227); - - return __ieee754_fmodl (x, y); -} -weak_alias (__fmodl, fmodl) diff --git a/math/w_fmodl_compat.c b/math/w_fmodl_compat.c new file mode 100644 index 0000000000..1f385bdbae --- /dev/null +++ b/math/w_fmodl_compat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* wrapper fmodl */ +long double +__fmodl (long double x, long double y) +{ + if (__builtin_expect (isinf (x) || y == 0.0L, 0) + && _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x)) + /* fmod(+-Inf,y) or fmod(x,0) */ + return __kernel_standard_l (x, y, 227); + + return __ieee754_fmodl (x, y); +} +weak_alias (__fmodl, fmodl) diff --git a/math/w_hypot.c b/math/w_hypot.c deleted file mode 100644 index 7c662c8e40..0000000000 --- a/math/w_hypot.c +++ /dev/null @@ -1,35 +0,0 @@ -/* @(#)w_hypot.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper hypot(x,y) - */ - -#include -#include - - -double -__hypot (double x, double y) -{ - double z = __ieee754_hypot(x,y); - if(__builtin_expect(!isfinite(z), 0) - && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) - return __kernel_standard(x, y, 4); /* hypot overflow */ - - return z; -} -weak_alias (__hypot, hypot) -#ifdef NO_LONG_DOUBLE -strong_alias (__hypot, __hypotl) -weak_alias (__hypot, hypotl) -#endif diff --git a/math/w_hypot_compat.c b/math/w_hypot_compat.c new file mode 100644 index 0000000000..7c662c8e40 --- /dev/null +++ b/math/w_hypot_compat.c @@ -0,0 +1,35 @@ +/* @(#)w_hypot.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper hypot(x,y) + */ + +#include +#include + + +double +__hypot (double x, double y) +{ + double z = __ieee754_hypot(x,y); + if(__builtin_expect(!isfinite(z), 0) + && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) + return __kernel_standard(x, y, 4); /* hypot overflow */ + + return z; +} +weak_alias (__hypot, hypot) +#ifdef NO_LONG_DOUBLE +strong_alias (__hypot, __hypotl) +weak_alias (__hypot, hypotl) +#endif diff --git a/math/w_hypotf.c b/math/w_hypotf.c deleted file mode 100644 index 0ecacae715..0000000000 --- a/math/w_hypotf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* w_hypotf.c -- float version of w_hypot.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper hypotf(x,y) - */ - -#include -#include - - -float -__hypotf(float x, float y) -{ - float z = __ieee754_hypotf(x,y); - if(__builtin_expect(!isfinite(z), 0) - && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) - /* hypot overflow */ - return __kernel_standard_f(x, y, 104); - - return z; -} -weak_alias (__hypotf, hypotf) diff --git a/math/w_hypotf_compat.c b/math/w_hypotf_compat.c new file mode 100644 index 0000000000..0ecacae715 --- /dev/null +++ b/math/w_hypotf_compat.c @@ -0,0 +1,35 @@ +/* w_hypotf.c -- float version of w_hypot.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper hypotf(x,y) + */ + +#include +#include + + +float +__hypotf(float x, float y) +{ + float z = __ieee754_hypotf(x,y); + if(__builtin_expect(!isfinite(z), 0) + && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) + /* hypot overflow */ + return __kernel_standard_f(x, y, 104); + + return z; +} +weak_alias (__hypotf, hypotf) diff --git a/math/w_hypotl.c b/math/w_hypotl.c deleted file mode 100644 index c784fa2c64..0000000000 --- a/math/w_hypotl.c +++ /dev/null @@ -1,36 +0,0 @@ -/* w_hypotl.c -- long double version of w_hypot.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper hypotl(x,y) - */ - -#include -#include - - -long double -__hypotl(long double x, long double y) -{ - long double z; - z = __ieee754_hypotl(x,y); - if(__builtin_expect(!isfinite(z), 0) - && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) - return __kernel_standard_l(x, y, 204); /* hypot overflow */ - - return z; -} -weak_alias (__hypotl, hypotl) diff --git a/math/w_hypotl_compat.c b/math/w_hypotl_compat.c new file mode 100644 index 0000000000..c784fa2c64 --- /dev/null +++ b/math/w_hypotl_compat.c @@ -0,0 +1,36 @@ +/* w_hypotl.c -- long double version of w_hypot.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper hypotl(x,y) + */ + +#include +#include + + +long double +__hypotl(long double x, long double y) +{ + long double z; + z = __ieee754_hypotl(x,y); + if(__builtin_expect(!isfinite(z), 0) + && isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_) + return __kernel_standard_l(x, y, 204); /* hypot overflow */ + + return z; +} +weak_alias (__hypotl, hypotl) diff --git a/math/w_j0.c b/math/w_j0.c deleted file mode 100644 index e7b56f2412..0000000000 --- a/math/w_j0.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j0 */ -double -j0 (double x) -{ - if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j0(|x|>X_TLOSS) */ - return __kernel_standard (x, x, 34); - - return __ieee754_j0 (x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (j0, j0l) -#endif - - -/* wrapper y0 */ -double -y0 (double x) -{ - if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0) - { - /* d = zero/(x-x) */ - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 9); - } - else if (x == 0.0) - { - /* d = -one/(x-x) */ - __feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (x, x, 8); - } - else if (_LIB_VERSION != _POSIX_) - /* y0(x>X_TLOSS) */ - return __kernel_standard (x, x, 35); - } - - return __ieee754_y0 (x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (y0, y0l) -#endif diff --git a/math/w_j0_compat.c b/math/w_j0_compat.c new file mode 100644 index 0000000000..e7b56f2412 --- /dev/null +++ b/math/w_j0_compat.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j0 */ +double +j0 (double x) +{ + if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 34); + + return __ieee754_j0 (x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (j0, j0l) +#endif + + +/* wrapper y0 */ +double +y0 (double x) +{ + if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { + /* d = zero/(x-x) */ + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 9); + } + else if (x == 0.0) + { + /* d = -one/(x-x) */ + __feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (x, x, 8); + } + else if (_LIB_VERSION != _POSIX_) + /* y0(x>X_TLOSS) */ + return __kernel_standard (x, x, 35); + } + + return __ieee754_y0 (x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (y0, y0l) +#endif diff --git a/math/w_j0f.c b/math/w_j0f.c deleted file mode 100644 index 34220b90b8..0000000000 --- a/math/w_j0f.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j0f */ -float -j0f (float x) -{ - if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j0(|x|>X_TLOSS) */ - return __kernel_standard_f (x, x, 134); - - return __ieee754_j0f (x); -} - - -/* wrapper y0f */ -float -y0f (float x) -{ - if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0f) - { - /* d = zero/(x-x) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 109); - } - else if (x == 0.0f) - { - /* d = -one/(x-x) */ - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (x, x, 108); - } - else if (_LIB_VERSION != _POSIX_) - /* y0(x>X_TLOSS) */ - return __kernel_standard_f (x, x, 135); - } - - return __ieee754_y0f (x); -} diff --git a/math/w_j0f_compat.c b/math/w_j0f_compat.c new file mode 100644 index 0000000000..34220b90b8 --- /dev/null +++ b/math/w_j0f_compat.c @@ -0,0 +1,63 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j0f */ +float +j0f (float x) +{ + if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard_f (x, x, 134); + + return __ieee754_j0f (x); +} + + +/* wrapper y0f */ +float +y0f (float x) +{ + if (__builtin_expect (islessequal (x, 0.0f) + || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) + { + /* d = zero/(x-x) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 109); + } + else if (x == 0.0f) + { + /* d = -one/(x-x) */ + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (x, x, 108); + } + else if (_LIB_VERSION != _POSIX_) + /* y0(x>X_TLOSS) */ + return __kernel_standard_f (x, x, 135); + } + + return __ieee754_y0f (x); +} diff --git a/math/w_j0l.c b/math/w_j0l.c deleted file mode 100644 index e03fa1d223..0000000000 --- a/math/w_j0l.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j0l */ -long double -__j0l (long double x) -{ - if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j0(|x|>X_TLOSS) */ - return __kernel_standard_l (x, x, 234); - - return __ieee754_j0l (x); -} -weak_alias (__j0l, j0l) - - -/* wrapper y0l */ -long double -__y0l (long double x) -{ - if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0L) - { - /* d = zero/(x-x) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 209); - } - else if (x == 0.0L) - { - /* d = -one/(x-x) */ - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_l (x, x, 208); - } - else if (_LIB_VERSION != _POSIX_) - /* y0(x>X_TLOSS) */ - return __kernel_standard_l (x, x, 235); - } - - return __ieee754_y0l (x); -} -weak_alias (__y0l, y0l) diff --git a/math/w_j0l_compat.c b/math/w_j0l_compat.c new file mode 100644 index 0000000000..e03fa1d223 --- /dev/null +++ b/math/w_j0l_compat.c @@ -0,0 +1,64 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j0l */ +long double +__j0l (long double x) +{ + if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard_l (x, x, 234); + + return __ieee754_j0l (x); +} +weak_alias (__j0l, j0l) + + +/* wrapper y0l */ +long double +__y0l (long double x) +{ + if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0L) + { + /* d = zero/(x-x) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 209); + } + else if (x == 0.0L) + { + /* d = -one/(x-x) */ + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_l (x, x, 208); + } + else if (_LIB_VERSION != _POSIX_) + /* y0(x>X_TLOSS) */ + return __kernel_standard_l (x, x, 235); + } + + return __ieee754_y0l (x); +} +weak_alias (__y0l, y0l) diff --git a/math/w_j1.c b/math/w_j1.c deleted file mode 100644 index efbe8df5e0..0000000000 --- a/math/w_j1.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j1 */ -double -j1 (double x) -{ - if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j1(|x|>X_TLOSS) */ - return __kernel_standard (x, x, 36); - - return __ieee754_j1 (x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (j1, j1l) -#endif - - -/* wrapper y1 */ -double -y1 (double x) -{ - if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0) - { - /* d = zero/(x-x) */ - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 11); - } - else if (x == 0.0) - { - /* d = -one/(x-x) */ - __feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (x, x, 10); - } - else if (_LIB_VERSION != _POSIX_) - /* y1(x>X_TLOSS) */ - return __kernel_standard (x, x, 37); - } - - return __ieee754_y1 (x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (y1, y1l) -#endif diff --git a/math/w_j1_compat.c b/math/w_j1_compat.c new file mode 100644 index 0000000000..efbe8df5e0 --- /dev/null +++ b/math/w_j1_compat.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j1 */ +double +j1 (double x) +{ + if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 36); + + return __ieee754_j1 (x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (j1, j1l) +#endif + + +/* wrapper y1 */ +double +y1 (double x) +{ + if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { + /* d = zero/(x-x) */ + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 11); + } + else if (x == 0.0) + { + /* d = -one/(x-x) */ + __feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (x, x, 10); + } + else if (_LIB_VERSION != _POSIX_) + /* y1(x>X_TLOSS) */ + return __kernel_standard (x, x, 37); + } + + return __ieee754_y1 (x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (y1, y1l) +#endif diff --git a/math/w_j1f.c b/math/w_j1f.c deleted file mode 100644 index 7558685946..0000000000 --- a/math/w_j1f.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j1f */ -float -j1f (float x) -{ - if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j1(|x|>X_TLOSS) */ - return __kernel_standard_f (x, x, 136); - - return __ieee754_j1f (x); -} - - -/* wrapper y1f */ -float -y1f (float x) -{ - if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0f) - { - /* d = zero/(x-x) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 111); - } - else if (x == 0.0f) - { - /* d = -one/(x-x) */ - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (x, x, 110); - } - else if (_LIB_VERSION != _POSIX_) - /* y1(x>X_TLOSS) */ - return __kernel_standard_f (x, x, 137); - } - - return __ieee754_y1f (x); -} diff --git a/math/w_j1f_compat.c b/math/w_j1f_compat.c new file mode 100644 index 0000000000..7558685946 --- /dev/null +++ b/math/w_j1f_compat.c @@ -0,0 +1,63 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j1f */ +float +j1f (float x) +{ + if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard_f (x, x, 136); + + return __ieee754_j1f (x); +} + + +/* wrapper y1f */ +float +y1f (float x) +{ + if (__builtin_expect (islessequal (x, 0.0f) + || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) + { + /* d = zero/(x-x) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 111); + } + else if (x == 0.0f) + { + /* d = -one/(x-x) */ + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (x, x, 110); + } + else if (_LIB_VERSION != _POSIX_) + /* y1(x>X_TLOSS) */ + return __kernel_standard_f (x, x, 137); + } + + return __ieee754_y1f (x); +} diff --git a/math/w_j1l.c b/math/w_j1l.c deleted file mode 100644 index f35261dd2a..0000000000 --- a/math/w_j1l.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper j1l */ -long double -__j1l (long double x) -{ - if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* j1(|x|>X_TLOSS) */ - return __kernel_standard_l (x, x, 236); - - return __ieee754_j1l (x); -} -weak_alias (__j1l, j1l) - - -/* wrapper y1l */ -long double -__y1l (long double x) -{ - if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0L) - { - /* d = zero/(x-x) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 211); - } - else if (x == 0.0L) - { - /* d = -one/(x-x) */ - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_l (x, x, 210); - } - else if (_LIB_VERSION != _POSIX_) - /* y1(x>X_TLOSS) */ - return __kernel_standard_l (x, x, 237); - } - - return __ieee754_y1l (x); -} -weak_alias (__y1l, y1l) diff --git a/math/w_j1l_compat.c b/math/w_j1l_compat.c new file mode 100644 index 0000000000..f35261dd2a --- /dev/null +++ b/math/w_j1l_compat.c @@ -0,0 +1,64 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper j1l */ +long double +__j1l (long double x) +{ + if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard_l (x, x, 236); + + return __ieee754_j1l (x); +} +weak_alias (__j1l, j1l) + + +/* wrapper y1l */ +long double +__y1l (long double x) +{ + if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0L) + { + /* d = zero/(x-x) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 211); + } + else if (x == 0.0L) + { + /* d = -one/(x-x) */ + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_l (x, x, 210); + } + else if (_LIB_VERSION != _POSIX_) + /* y1(x>X_TLOSS) */ + return __kernel_standard_l (x, x, 237); + } + + return __ieee754_y1l (x); +} +weak_alias (__y1l, y1l) diff --git a/math/w_jn.c b/math/w_jn.c deleted file mode 100644 index 9321bf5e7d..0000000000 --- a/math/w_jn.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper jn */ -double -jn (int n, double x) -{ - if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* jn(n,|x|>X_TLOSS) */ - return __kernel_standard (n, x, 38); - - return __ieee754_jn (n, x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (jn, jnl) -#endif - - -/* wrapper yn */ -double -yn (int n, double x) -{ - if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0) - { - /* d = zero/(x-x) */ - __feraiseexcept (FE_INVALID); - return __kernel_standard (n, x, 13); - } - else if (x == 0.0) - { - /* d = -one/(x-x) */ - __feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (n, x, 12); - } - else if (_LIB_VERSION != _POSIX_) - /* yn(n,x>X_TLOSS) */ - return __kernel_standard (n, x, 39); - } - - return __ieee754_yn (n, x); -} -#ifdef NO_LONG_DOUBLE -weak_alias (yn, ynl) -#endif diff --git a/math/w_jn_compat.c b/math/w_jn_compat.c new file mode 100644 index 0000000000..9321bf5e7d --- /dev/null +++ b/math/w_jn_compat.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper jn */ +double +jn (int n, double x) +{ + if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* jn(n,|x|>X_TLOSS) */ + return __kernel_standard (n, x, 38); + + return __ieee754_jn (n, x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (jn, jnl) +#endif + + +/* wrapper yn */ +double +yn (int n, double x) +{ + if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { + /* d = zero/(x-x) */ + __feraiseexcept (FE_INVALID); + return __kernel_standard (n, x, 13); + } + else if (x == 0.0) + { + /* d = -one/(x-x) */ + __feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (n, x, 12); + } + else if (_LIB_VERSION != _POSIX_) + /* yn(n,x>X_TLOSS) */ + return __kernel_standard (n, x, 39); + } + + return __ieee754_yn (n, x); +} +#ifdef NO_LONG_DOUBLE +weak_alias (yn, ynl) +#endif diff --git a/math/w_jnf.c b/math/w_jnf.c deleted file mode 100644 index 9752b2a8c5..0000000000 --- a/math/w_jnf.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper jnf */ -float -jnf (int n, float x) -{ - if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) - /* jn(n,|x|>X_TLOSS) */ - return __kernel_standard_f (n, x, 138); - - return __ieee754_jnf (n, x); -} - - -/* wrapper ynf */ -float -ynf (int n, float x) -{ - if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) - { - if (x < 0.0f) - { - /* d = zero/(x-x) */ - feraiseexcept (FE_INVALID); - return __kernel_standard_f (n, x, 113); - } - else if (x == 0.0) - { - /* d = -one/(x-x) */ - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (n, x, 112); - } - else if (_LIB_VERSION != _POSIX_) - /* yn(n,x>X_TLOSS) */ - return __kernel_standard_f (n, x, 139); - } - - return __ieee754_ynf (n, x); -} diff --git a/math/w_jnf_compat.c b/math/w_jnf_compat.c new file mode 100644 index 0000000000..9752b2a8c5 --- /dev/null +++ b/math/w_jnf_compat.c @@ -0,0 +1,63 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper jnf */ +float +jnf (int n, float x) +{ + if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) + /* jn(n,|x|>X_TLOSS) */ + return __kernel_standard_f (n, x, 138); + + return __ieee754_jnf (n, x); +} + + +/* wrapper ynf */ +float +ynf (int n, float x) +{ + if (__builtin_expect (islessequal (x, 0.0f) + || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) + { + /* d = zero/(x-x) */ + feraiseexcept (FE_INVALID); + return __kernel_standard_f (n, x, 113); + } + else if (x == 0.0) + { + /* d = -one/(x-x) */ + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (n, x, 112); + } + else if (_LIB_VERSION != _POSIX_) + /* yn(n,x>X_TLOSS) */ + return __kernel_standard_f (n, x, 139); + } + + return __ieee754_ynf (n, x); +} diff --git a/math/w_jnl.c b/math/w_jnl.c deleted file mode 100644 index d17b047956..0000000000 --- a/math/w_jnl.c +++ /dev/null @@ -1,91 +0,0 @@ -/* w_jnl.c -- long double version of w_jn.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: $"; -#endif - -/* - * wrapper jn(int n, double x), yn(int n, double x) - * floating point Bessel's function of the 1st and 2nd kind - * of order n - * - * Special cases: - * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal; - * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal. - * Note 2. About jn(n,x), yn(n,x) - * For n=0, j0(x) is called, - * for n=1, j1(x) is called, - * for nx, a continued fraction approximation to - * j(n,x)/j(n-1,x) is evaluated and then backward - * recursion is used starting from a supposed value - * for j(n,x). The resulting value of j(0,x) is - * compared with the actual value to correct the - * supposed value of j(n,x). - * - * yn(n,x) is similar in all respects, except - * that forward recursion is used for all - * values of n>1. - * - */ - -#include -#include - -long double __jnl(int n, long double x) /* wrapper jnl */ -{ -#ifdef _IEEE_LIBM - return __ieee754_jnl(n,x); -#else - long double z; - z = __ieee754_jnl(n,x); - if (_LIB_VERSION == _IEEE_ - || _LIB_VERSION == _POSIX_ - || isnan(x)) - return z; - if(fabsl(x)>X_TLOSS) { - return __kernel_standard_l((double)n,x,238); /* jn(|x|>X_TLOSS,n) */ - } else - return z; -#endif -} -weak_alias (__jnl, jnl) - -long double __ynl(int n, long double x) /* wrapper ynl */ -{ -#ifdef _IEEE_LIBM - return __ieee754_ynl(n,x); -#else - long double z; - z = __ieee754_ynl(n,x); - if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; - if(x <= 0.0){ - if(x==0.0) - /* d= -one/(x-x); */ - return __kernel_standard_l((double)n,x,212); - else - /* d = zero/(x-x); */ - return __kernel_standard_l((double)n,x,213); - } - if(x>X_TLOSS && _LIB_VERSION != _POSIX_) { - return __kernel_standard_l((double)n,x,239); /* yn(x>X_TLOSS,n) */ - } else - return z; -#endif -} -weak_alias (__ynl, ynl) diff --git a/math/w_jnl_compat.c b/math/w_jnl_compat.c new file mode 100644 index 0000000000..d17b047956 --- /dev/null +++ b/math/w_jnl_compat.c @@ -0,0 +1,91 @@ +/* w_jnl.c -- long double version of w_jn.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#if defined(LIBM_SCCS) && !defined(lint) +static char rcsid[] = "$NetBSD: $"; +#endif + +/* + * wrapper jn(int n, double x), yn(int n, double x) + * floating point Bessel's function of the 1st and 2nd kind + * of order n + * + * Special cases: + * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal; + * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal. + * Note 2. About jn(n,x), yn(n,x) + * For n=0, j0(x) is called, + * for n=1, j1(x) is called, + * for nx, a continued fraction approximation to + * j(n,x)/j(n-1,x) is evaluated and then backward + * recursion is used starting from a supposed value + * for j(n,x). The resulting value of j(0,x) is + * compared with the actual value to correct the + * supposed value of j(n,x). + * + * yn(n,x) is similar in all respects, except + * that forward recursion is used for all + * values of n>1. + * + */ + +#include +#include + +long double __jnl(int n, long double x) /* wrapper jnl */ +{ +#ifdef _IEEE_LIBM + return __ieee754_jnl(n,x); +#else + long double z; + z = __ieee754_jnl(n,x); + if (_LIB_VERSION == _IEEE_ + || _LIB_VERSION == _POSIX_ + || isnan(x)) + return z; + if(fabsl(x)>X_TLOSS) { + return __kernel_standard_l((double)n,x,238); /* jn(|x|>X_TLOSS,n) */ + } else + return z; +#endif +} +weak_alias (__jnl, jnl) + +long double __ynl(int n, long double x) /* wrapper ynl */ +{ +#ifdef _IEEE_LIBM + return __ieee754_ynl(n,x); +#else + long double z; + z = __ieee754_ynl(n,x); + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; + if(x <= 0.0){ + if(x==0.0) + /* d= -one/(x-x); */ + return __kernel_standard_l((double)n,x,212); + else + /* d = zero/(x-x); */ + return __kernel_standard_l((double)n,x,213); + } + if(x>X_TLOSS && _LIB_VERSION != _POSIX_) { + return __kernel_standard_l((double)n,x,239); /* yn(x>X_TLOSS,n) */ + } else + return z; +#endif +} +weak_alias (__ynl, ynl) diff --git a/math/w_log.c b/math/w_log.c deleted file mode 100644 index 4b470695ae..0000000000 --- a/math/w_log.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log(x) */ -double -__log (double x) -{ - if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0) - { - __feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (x, x, 16); /* log(0) */ - } - else - { - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 17); /* log(x<0) */ - } - } - - return __ieee754_log (x); -} -weak_alias (__log, log) -#ifdef NO_LONG_DOUBLE -strong_alias (__log, __logl) -weak_alias (__log, logl) -#endif diff --git a/math/w_log10.c b/math/w_log10.c deleted file mode 100644 index 9704ba9cdc..0000000000 --- a/math/w_log10.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log10(x) */ -double -__log10 (double x) -{ - if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0) - { - __feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (x, x, 18); /* log10(0) */ - } - else - { - __feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 19); /* log10(x<0) */ - } - } - - return __ieee754_log10 (x); -} -weak_alias (__log10, log10) -#ifdef NO_LONG_DOUBLE -strong_alias (__log10, __log10l) -weak_alias (__log10, log10l) -#endif diff --git a/math/w_log10_compat.c b/math/w_log10_compat.c new file mode 100644 index 0000000000..9704ba9cdc --- /dev/null +++ b/math/w_log10_compat.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log10(x) */ +double +__log10 (double x) +{ + if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { + __feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (x, x, 18); /* log10(0) */ + } + else + { + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 19); /* log10(x<0) */ + } + } + + return __ieee754_log10 (x); +} +weak_alias (__log10, log10) +#ifdef NO_LONG_DOUBLE +strong_alias (__log10, __log10l) +weak_alias (__log10, log10l) +#endif diff --git a/math/w_log10f.c b/math/w_log10f.c deleted file mode 100644 index f8921fe285..0000000000 --- a/math/w_log10f.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log10f(x) */ -float -__log10f (float x) -{ - if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0f) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (x, x, 118); /* log10(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 119); /* log10(x<0) */ - } - } - - return __ieee754_log10f (x); -} -weak_alias (__log10f, log10f) diff --git a/math/w_log10f_compat.c b/math/w_log10f_compat.c new file mode 100644 index 0000000000..f8921fe285 --- /dev/null +++ b/math/w_log10f_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log10f(x) */ +float +__log10f (float x) +{ + if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0f) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (x, x, 118); /* log10(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 119); /* log10(x<0) */ + } + } + + return __ieee754_log10f (x); +} +weak_alias (__log10f, log10f) diff --git a/math/w_log10l.c b/math/w_log10l.c deleted file mode 100644 index cfb514a8ab..0000000000 --- a/math/w_log10l.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log10l(x) */ -long double -__log10l (long double x) -{ - if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0L) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_l (x, x, 218); /* log10(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 219); /* log10(x<0) */ - } - } - - return __ieee754_log10l (x); -} -weak_alias (__log10l, log10l) diff --git a/math/w_log10l_compat.c b/math/w_log10l_compat.c new file mode 100644 index 0000000000..cfb514a8ab --- /dev/null +++ b/math/w_log10l_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log10l(x) */ +long double +__log10l (long double x) +{ + if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_l (x, x, 218); /* log10(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 219); /* log10(x<0) */ + } + } + + return __ieee754_log10l (x); +} +weak_alias (__log10l, log10l) diff --git a/math/w_log2.c b/math/w_log2.c deleted file mode 100644 index b8e842d5be..0000000000 --- a/math/w_log2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log2(x) */ -double -__log2 (double x) -{ - if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard (x, x, 48); /* log2(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard (x, x, 49); /* log2(x<0) */ - } - } - - return __ieee754_log2 (x); -} -weak_alias (__log2, log2) -#ifdef NO_LONG_DOUBLE -strong_alias (__log2, __log2l) -weak_alias (__log2, log2l) -#endif diff --git a/math/w_log2_compat.c b/math/w_log2_compat.c new file mode 100644 index 0000000000..b8e842d5be --- /dev/null +++ b/math/w_log2_compat.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log2(x) */ +double +__log2 (double x) +{ + if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (x, x, 48); /* log2(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 49); /* log2(x<0) */ + } + } + + return __ieee754_log2 (x); +} +weak_alias (__log2, log2) +#ifdef NO_LONG_DOUBLE +strong_alias (__log2, __log2l) +weak_alias (__log2, log2l) +#endif diff --git a/math/w_log2f.c b/math/w_log2f.c deleted file mode 100644 index 357cc0afe9..0000000000 --- a/math/w_log2f.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log2f(x) */ -float -__log2f (float x) -{ - if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (x, x, 148); /* log2(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 149); /* log2(x<0) */ - } - } - - return __ieee754_log2f (x); -} -weak_alias (__log2f, log2f) diff --git a/math/w_log2f_compat.c b/math/w_log2f_compat.c new file mode 100644 index 0000000000..357cc0afe9 --- /dev/null +++ b/math/w_log2f_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log2f(x) */ +float +__log2f (float x) +{ + if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (x, x, 148); /* log2(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 149); /* log2(x<0) */ + } + } + + return __ieee754_log2f (x); +} +weak_alias (__log2f, log2f) diff --git a/math/w_log2l.c b/math/w_log2l.c deleted file mode 100644 index 3d9994e055..0000000000 --- a/math/w_log2l.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper log2l(x) */ -long double -__log2l (long double x) -{ - if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0L) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_l (x, x, 248); /* log2(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 249); /* log2(x<0) */ - } - } - - return __ieee754_log2l (x); -} -weak_alias (__log2l, log2l) diff --git a/math/w_log2l_compat.c b/math/w_log2l_compat.c new file mode 100644 index 0000000000..3d9994e055 --- /dev/null +++ b/math/w_log2l_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log2l(x) */ +long double +__log2l (long double x) +{ + if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_l (x, x, 248); /* log2(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 249); /* log2(x<0) */ + } + } + + return __ieee754_log2l (x); +} +weak_alias (__log2l, log2l) diff --git a/math/w_log_compat.c b/math/w_log_compat.c new file mode 100644 index 0000000000..4b470695ae --- /dev/null +++ b/math/w_log_compat.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper log(x) */ +double +__log (double x) +{ + if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { + __feraiseexcept (FE_DIVBYZERO); + return __kernel_standard (x, x, 16); /* log(0) */ + } + else + { + __feraiseexcept (FE_INVALID); + return __kernel_standard (x, x, 17); /* log(x<0) */ + } + } + + return __ieee754_log (x); +} +weak_alias (__log, log) +#ifdef NO_LONG_DOUBLE +strong_alias (__log, __logl) +weak_alias (__log, logl) +#endif diff --git a/math/w_logf.c b/math/w_logf.c deleted file mode 100644 index 8b0f4fc9d1..0000000000 --- a/math/w_logf.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper logf(x) */ -float -__logf (float x) -{ - if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0f) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_f (x, x, 116); /* log(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_f (x, x, 117); /* log(x<0) */ - } - } - - return __ieee754_logf (x); -} -weak_alias (__logf, logf) diff --git a/math/w_logf_compat.c b/math/w_logf_compat.c new file mode 100644 index 0000000000..8b0f4fc9d1 --- /dev/null +++ b/math/w_logf_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper logf(x) */ +float +__logf (float x) +{ + if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0f) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_f (x, x, 116); /* log(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_f (x, x, 117); /* log(x<0) */ + } + } + + return __ieee754_logf (x); +} +weak_alias (__logf, logf) diff --git a/math/w_logl.c b/math/w_logl.c deleted file mode 100644 index 12afbe575a..0000000000 --- a/math/w_logl.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -/* wrapper logl(x) */ -long double -__logl (long double x) -{ - if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0L) - { - feraiseexcept (FE_DIVBYZERO); - return __kernel_standard_l (x, x, 216); /* log(0) */ - } - else - { - feraiseexcept (FE_INVALID); - return __kernel_standard_l (x, x, 217); /* log(x<0) */ - } - } - - return __ieee754_logl (x); -} -weak_alias (__logl, logl) diff --git a/math/w_logl_compat.c b/math/w_logl_compat.c new file mode 100644 index 0000000000..12afbe575a --- /dev/null +++ b/math/w_logl_compat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +/* wrapper logl(x) */ +long double +__logl (long double x) +{ + if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { + feraiseexcept (FE_DIVBYZERO); + return __kernel_standard_l (x, x, 216); /* log(0) */ + } + else + { + feraiseexcept (FE_INVALID); + return __kernel_standard_l (x, x, 217); /* log(x<0) */ + } + } + + return __ieee754_logl (x); +} +weak_alias (__logl, logl) diff --git a/math/w_pow.c b/math/w_pow.c deleted file mode 100644 index 0e24b755b2..0000000000 --- a/math/w_pow.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper pow */ -double -__pow (double x, double y) -{ - double z = __ieee754_pow (x, y); - if (__glibc_unlikely (!isfinite (z))) - { - if (_LIB_VERSION != _IEEE_) - { - if (isfinite (x) && isfinite (y)) - { - if (isnan (z)) - /* pow neg**non-int */ - return __kernel_standard (x, y, 24); - else if (x == 0.0 && y < 0.0) - { - if (signbit (x) && signbit (z)) - /* pow(-0.0,negative) */ - return __kernel_standard (x, y, 23); - else - /* pow(+0.0,negative) */ - return __kernel_standard (x, y, 43); - } - else - /* pow overflow */ - return __kernel_standard (x, y, 21); - } - } - } - else if (__builtin_expect (z == 0.0, 0) - && isfinite (x) && x != 0 && isfinite (y) - && _LIB_VERSION != _IEEE_) - /* pow underflow */ - return __kernel_standard (x, y, 22); - - return z; -} -weak_alias (__pow, pow) -#ifdef NO_LONG_DOUBLE -strong_alias (__pow, __powl) -weak_alias (__pow, powl) -#endif diff --git a/math/w_pow_compat.c b/math/w_pow_compat.c new file mode 100644 index 0000000000..0e24b755b2 --- /dev/null +++ b/math/w_pow_compat.c @@ -0,0 +1,64 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper pow */ +double +__pow (double x, double y) +{ + double z = __ieee754_pow (x, y); + if (__glibc_unlikely (!isfinite (z))) + { + if (_LIB_VERSION != _IEEE_) + { + if (isfinite (x) && isfinite (y)) + { + if (isnan (z)) + /* pow neg**non-int */ + return __kernel_standard (x, y, 24); + else if (x == 0.0 && y < 0.0) + { + if (signbit (x) && signbit (z)) + /* pow(-0.0,negative) */ + return __kernel_standard (x, y, 23); + else + /* pow(+0.0,negative) */ + return __kernel_standard (x, y, 43); + } + else + /* pow overflow */ + return __kernel_standard (x, y, 21); + } + } + } + else if (__builtin_expect (z == 0.0, 0) + && isfinite (x) && x != 0 && isfinite (y) + && _LIB_VERSION != _IEEE_) + /* pow underflow */ + return __kernel_standard (x, y, 22); + + return z; +} +weak_alias (__pow, pow) +#ifdef NO_LONG_DOUBLE +strong_alias (__pow, __powl) +weak_alias (__pow, powl) +#endif diff --git a/math/w_powf.c b/math/w_powf.c deleted file mode 100644 index 7e3b015001..0000000000 --- a/math/w_powf.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper powf */ -float -__powf (float x, float y) -{ - float z = __ieee754_powf (x, y); - if (__glibc_unlikely (!isfinite (z))) - { - if (_LIB_VERSION != _IEEE_) - { - if (isfinite (x) && isfinite (y)) - { - if (isnan (z)) - /* pow neg**non-int */ - return __kernel_standard_f (x, y, 124); - else if (x == 0.0f && y < 0.0f) - { - if (signbit (x) && signbit (z)) - /* pow(-0.0,negative) */ - return __kernel_standard_f (x, y, 123); - else - /* pow(+0.0,negative) */ - return __kernel_standard_f (x, y, 143); - } - else - /* pow overflow */ - return __kernel_standard_f (x, y, 121); - } - } - } - else if (__builtin_expect (z == 0.0f, 0) - && isfinite (x) && x != 0 && isfinite (y) - && _LIB_VERSION != _IEEE_) - /* pow underflow */ - return __kernel_standard_f (x, y, 122); - - return z; -} -weak_alias (__powf, powf) diff --git a/math/w_powf_compat.c b/math/w_powf_compat.c new file mode 100644 index 0000000000..7e3b015001 --- /dev/null +++ b/math/w_powf_compat.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper powf */ +float +__powf (float x, float y) +{ + float z = __ieee754_powf (x, y); + if (__glibc_unlikely (!isfinite (z))) + { + if (_LIB_VERSION != _IEEE_) + { + if (isfinite (x) && isfinite (y)) + { + if (isnan (z)) + /* pow neg**non-int */ + return __kernel_standard_f (x, y, 124); + else if (x == 0.0f && y < 0.0f) + { + if (signbit (x) && signbit (z)) + /* pow(-0.0,negative) */ + return __kernel_standard_f (x, y, 123); + else + /* pow(+0.0,negative) */ + return __kernel_standard_f (x, y, 143); + } + else + /* pow overflow */ + return __kernel_standard_f (x, y, 121); + } + } + } + else if (__builtin_expect (z == 0.0f, 0) + && isfinite (x) && x != 0 && isfinite (y) + && _LIB_VERSION != _IEEE_) + /* pow underflow */ + return __kernel_standard_f (x, y, 122); + + return z; +} +weak_alias (__powf, powf) diff --git a/math/w_powl.c b/math/w_powl.c deleted file mode 100644 index 60a89c2b42..0000000000 --- a/math/w_powl.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper powl */ -long double -__powl (long double x, long double y) -{ - long double z = __ieee754_powl (x, y); - if (__glibc_unlikely (!isfinite (z))) - { - if (_LIB_VERSION != _IEEE_) - { - if (isfinite (x) && isfinite (y)) - { - if (isnan (z)) - /* pow neg**non-int */ - return __kernel_standard_l (x, y, 224); - else if (x == 0.0L && y < 0.0L) - { - if (signbit (x) && signbit (z)) - /* pow(-0.0,negative) */ - return __kernel_standard_l (x, y, 223); - else - /* pow(+0.0,negative) */ - return __kernel_standard_l (x, y, 243); - } - else - /* pow overflow */ - return __kernel_standard_l (x, y, 221); - } - } - } - else if (__builtin_expect (z == 0.0L, 0) - && isfinite (x) && x != 0 && isfinite (y) - && _LIB_VERSION != _IEEE_) - /* pow underflow */ - return __kernel_standard_l (x, y, 222); - - return z; -} -weak_alias (__powl, powl) diff --git a/math/w_powl_compat.c b/math/w_powl_compat.c new file mode 100644 index 0000000000..60a89c2b42 --- /dev/null +++ b/math/w_powl_compat.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper powl */ +long double +__powl (long double x, long double y) +{ + long double z = __ieee754_powl (x, y); + if (__glibc_unlikely (!isfinite (z))) + { + if (_LIB_VERSION != _IEEE_) + { + if (isfinite (x) && isfinite (y)) + { + if (isnan (z)) + /* pow neg**non-int */ + return __kernel_standard_l (x, y, 224); + else if (x == 0.0L && y < 0.0L) + { + if (signbit (x) && signbit (z)) + /* pow(-0.0,negative) */ + return __kernel_standard_l (x, y, 223); + else + /* pow(+0.0,negative) */ + return __kernel_standard_l (x, y, 243); + } + else + /* pow overflow */ + return __kernel_standard_l (x, y, 221); + } + } + } + else if (__builtin_expect (z == 0.0L, 0) + && isfinite (x) && x != 0 && isfinite (y) + && _LIB_VERSION != _IEEE_) + /* pow underflow */ + return __kernel_standard_l (x, y, 222); + + return z; +} +weak_alias (__powl, powl) diff --git a/math/w_remainder.c b/math/w_remainder.c deleted file mode 100644 index 66445901f6..0000000000 --- a/math/w_remainder.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper remainder */ -double -__remainder (double x, double y) -{ - if (((__builtin_expect (y == 0.0, 0) && ! isnan (x)) - || (__builtin_expect (isinf (x), 0) && ! isnan (y))) - && _LIB_VERSION != _IEEE_) - return __kernel_standard (x, y, 28); /* remainder domain */ - - return __ieee754_remainder (x, y); -} -weak_alias (__remainder, remainder) -weak_alias (__remainder, drem) -#ifdef NO_LONG_DOUBLE -strong_alias (__remainder, __remainderl) -weak_alias (__remainder, remainderl) -weak_alias (__remainder, dreml) -#endif diff --git a/math/w_remainder_compat.c b/math/w_remainder_compat.c new file mode 100644 index 0000000000..66445901f6 --- /dev/null +++ b/math/w_remainder_compat.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper remainder */ +double +__remainder (double x, double y) +{ + if (((__builtin_expect (y == 0.0, 0) && ! isnan (x)) + || (__builtin_expect (isinf (x), 0) && ! isnan (y))) + && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, y, 28); /* remainder domain */ + + return __ieee754_remainder (x, y); +} +weak_alias (__remainder, remainder) +weak_alias (__remainder, drem) +#ifdef NO_LONG_DOUBLE +strong_alias (__remainder, __remainderl) +weak_alias (__remainder, remainderl) +weak_alias (__remainder, dreml) +#endif diff --git a/math/w_remainderf.c b/math/w_remainderf.c deleted file mode 100644 index 1db246a1c3..0000000000 --- a/math/w_remainderf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper remainderf */ -float -__remainderf (float x, float y) -{ - if (((__builtin_expect (y == 0.0f, 0) && ! isnan (x)) - || (__builtin_expect (isinf (x), 0) && ! isnan (y))) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_f (x, y, 128); /* remainder domain */ - - return __ieee754_remainderf (x, y); -} -weak_alias (__remainderf, remainderf) -weak_alias (__remainderf, dremf) diff --git a/math/w_remainderf_compat.c b/math/w_remainderf_compat.c new file mode 100644 index 0000000000..1db246a1c3 --- /dev/null +++ b/math/w_remainderf_compat.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper remainderf */ +float +__remainderf (float x, float y) +{ + if (((__builtin_expect (y == 0.0f, 0) && ! isnan (x)) + || (__builtin_expect (isinf (x), 0) && ! isnan (y))) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, y, 128); /* remainder domain */ + + return __ieee754_remainderf (x, y); +} +weak_alias (__remainderf, remainderf) +weak_alias (__remainderf, dremf) diff --git a/math/w_remainderl.c b/math/w_remainderl.c deleted file mode 100644 index 2fc40f1992..0000000000 --- a/math/w_remainderl.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper remainderl */ -long double -__remainderl (long double x, long double y) -{ - if (((__builtin_expect (y == 0.0L, 0) && ! isnan (x)) - || (__builtin_expect (isinf (x), 0) && ! isnan (y))) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_l (x, y, 228); /* remainder domain */ - - return __ieee754_remainderl (x, y); -} -weak_alias (__remainderl, remainderl) -weak_alias (__remainderl, dreml) diff --git a/math/w_remainderl_compat.c b/math/w_remainderl_compat.c new file mode 100644 index 0000000000..2fc40f1992 --- /dev/null +++ b/math/w_remainderl_compat.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper remainderl */ +long double +__remainderl (long double x, long double y) +{ + if (((__builtin_expect (y == 0.0L, 0) && ! isnan (x)) + || (__builtin_expect (isinf (x), 0) && ! isnan (y))) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_l (x, y, 228); /* remainder domain */ + + return __ieee754_remainderl (x, y); +} +weak_alias (__remainderl, remainderl) +weak_alias (__remainderl, dreml) diff --git a/math/w_scalb.c b/math/w_scalb.c deleted file mode 100644 index 8354115512..0000000000 --- a/math/w_scalb.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -static double -__attribute__ ((noinline)) -sysv_scalb (double x, double fn) -{ - double z = __ieee754_scalb (x, fn); - - if (__glibc_unlikely (isinf (z))) - { - if (isfinite (x)) - return __kernel_standard (x, fn, 32); /* scalb overflow */ - else - __set_errno (ERANGE); - } - else if (__builtin_expect (z == 0.0, 0) && z != x) - return __kernel_standard (x, fn, 33); /* scalb underflow */ - - return z; -} - - -/* Wrapper scalb */ -double -__scalb (double x, double fn) -{ - if (__glibc_unlikely (_LIB_VERSION == _SVID_)) - return sysv_scalb (x, fn); - else - { - double z = __ieee754_scalb (x, fn); - - if (__glibc_unlikely (!isfinite (z) || z == 0.0)) - { - if (isnan (z)) - { - if (!isnan (x) && !isnan (fn)) - __set_errno (EDOM); - } - else if (isinf (z)) - { - if (!isinf (x) && !isinf (fn)) - __set_errno (ERANGE); - } - else - { - /* z == 0. */ - if (x != 0.0 && !isinf (fn)) - __set_errno (ERANGE); - } - } - return z; - } -} -weak_alias (__scalb, scalb) -#ifdef NO_LONG_DOUBLE -strong_alias (__scalb, __scalbl) -weak_alias (__scalb, scalbl) -#endif diff --git a/math/w_scalb_compat.c b/math/w_scalb_compat.c new file mode 100644 index 0000000000..8354115512 --- /dev/null +++ b/math/w_scalb_compat.c @@ -0,0 +1,80 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +static double +__attribute__ ((noinline)) +sysv_scalb (double x, double fn) +{ + double z = __ieee754_scalb (x, fn); + + if (__glibc_unlikely (isinf (z))) + { + if (isfinite (x)) + return __kernel_standard (x, fn, 32); /* scalb overflow */ + else + __set_errno (ERANGE); + } + else if (__builtin_expect (z == 0.0, 0) && z != x) + return __kernel_standard (x, fn, 33); /* scalb underflow */ + + return z; +} + + +/* Wrapper scalb */ +double +__scalb (double x, double fn) +{ + if (__glibc_unlikely (_LIB_VERSION == _SVID_)) + return sysv_scalb (x, fn); + else + { + double z = __ieee754_scalb (x, fn); + + if (__glibc_unlikely (!isfinite (z) || z == 0.0)) + { + if (isnan (z)) + { + if (!isnan (x) && !isnan (fn)) + __set_errno (EDOM); + } + else if (isinf (z)) + { + if (!isinf (x) && !isinf (fn)) + __set_errno (ERANGE); + } + else + { + /* z == 0. */ + if (x != 0.0 && !isinf (fn)) + __set_errno (ERANGE); + } + } + return z; + } +} +weak_alias (__scalb, scalb) +#ifdef NO_LONG_DOUBLE +strong_alias (__scalb, __scalbl) +weak_alias (__scalb, scalbl) +#endif diff --git a/math/w_scalbf.c b/math/w_scalbf.c deleted file mode 100644 index fe93f0ac64..0000000000 --- a/math/w_scalbf.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -static float -__attribute__ ((noinline)) -sysv_scalbf (float x, float fn) -{ - float z = __ieee754_scalbf (x, fn); - - if (__glibc_unlikely (isinf (z))) - { - if (isfinite (x)) - return __kernel_standard_f (x, fn, 132); /* scalb overflow */ - else - __set_errno (ERANGE); - } - else if (__builtin_expect (z == 0.0f, 0) && z != x) - return __kernel_standard_f (x, fn, 133); /* scalb underflow */ - - return z; -} - - -/* Wrapper scalbf */ -float -__scalbf (float x, float fn) -{ - if (__glibc_unlikely (_LIB_VERSION == _SVID_)) - return sysv_scalbf (x, fn); - else - { - float z = __ieee754_scalbf (x, fn); - - if (__glibc_unlikely (!isfinite (z) || z == 0.0f)) - { - if (isnan (z)) - { - if (!isnan (x) && !isnan (fn)) - __set_errno (EDOM); - } - else if (isinf (z)) - { - if (!isinf (x) && !isinf (fn)) - __set_errno (ERANGE); - } - else - { - /* z == 0. */ - if (x != 0.0f && !isinf (fn)) - __set_errno (ERANGE); - } - } - return z; - } -} -weak_alias (__scalbf, scalbf) diff --git a/math/w_scalbf_compat.c b/math/w_scalbf_compat.c new file mode 100644 index 0000000000..fe93f0ac64 --- /dev/null +++ b/math/w_scalbf_compat.c @@ -0,0 +1,76 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +static float +__attribute__ ((noinline)) +sysv_scalbf (float x, float fn) +{ + float z = __ieee754_scalbf (x, fn); + + if (__glibc_unlikely (isinf (z))) + { + if (isfinite (x)) + return __kernel_standard_f (x, fn, 132); /* scalb overflow */ + else + __set_errno (ERANGE); + } + else if (__builtin_expect (z == 0.0f, 0) && z != x) + return __kernel_standard_f (x, fn, 133); /* scalb underflow */ + + return z; +} + + +/* Wrapper scalbf */ +float +__scalbf (float x, float fn) +{ + if (__glibc_unlikely (_LIB_VERSION == _SVID_)) + return sysv_scalbf (x, fn); + else + { + float z = __ieee754_scalbf (x, fn); + + if (__glibc_unlikely (!isfinite (z) || z == 0.0f)) + { + if (isnan (z)) + { + if (!isnan (x) && !isnan (fn)) + __set_errno (EDOM); + } + else if (isinf (z)) + { + if (!isinf (x) && !isinf (fn)) + __set_errno (ERANGE); + } + else + { + /* z == 0. */ + if (x != 0.0f && !isinf (fn)) + __set_errno (ERANGE); + } + } + return z; + } +} +weak_alias (__scalbf, scalbf) diff --git a/math/w_scalbl.c b/math/w_scalbl.c deleted file mode 100644 index 62645d4848..0000000000 --- a/math/w_scalbl.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -static long double -__attribute__ ((noinline)) -sysv_scalbl (long double x, long double fn) -{ - long double z = __ieee754_scalbl (x, fn); - - if (__glibc_unlikely (isinf (z))) - { - if (isfinite (x)) - return __kernel_standard_l (x, fn, 232); /* scalb overflow */ - else - __set_errno (ERANGE); - } - else if (__builtin_expect (z == 0.0L, 0) && z != x) - return __kernel_standard_l (x, fn, 233); /* scalb underflow */ - - return z; -} - - -/* Wrapper scalbl */ -long double -__scalbl (long double x, long double fn) -{ - if (__glibc_unlikely (_LIB_VERSION == _SVID_)) - return sysv_scalbl (x, fn); - else - { - long double z = __ieee754_scalbl (x, fn); - - if (__glibc_unlikely (!isfinite (z) || z == 0.0L)) - { - if (isnan (z)) - { - if (!isnan (x) && !isnan (fn)) - __set_errno (EDOM); - } - else if (isinf (z)) - { - if (!isinf (x) && !isinf (fn)) - __set_errno (ERANGE); - } - else - { - /* z == 0. */ - if (x != 0.0L && !isinf (fn)) - __set_errno (ERANGE); - } - } - return z; - } -} -weak_alias (__scalbl, scalbl) diff --git a/math/w_scalbl_compat.c b/math/w_scalbl_compat.c new file mode 100644 index 0000000000..62645d4848 --- /dev/null +++ b/math/w_scalbl_compat.c @@ -0,0 +1,76 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + + +static long double +__attribute__ ((noinline)) +sysv_scalbl (long double x, long double fn) +{ + long double z = __ieee754_scalbl (x, fn); + + if (__glibc_unlikely (isinf (z))) + { + if (isfinite (x)) + return __kernel_standard_l (x, fn, 232); /* scalb overflow */ + else + __set_errno (ERANGE); + } + else if (__builtin_expect (z == 0.0L, 0) && z != x) + return __kernel_standard_l (x, fn, 233); /* scalb underflow */ + + return z; +} + + +/* Wrapper scalbl */ +long double +__scalbl (long double x, long double fn) +{ + if (__glibc_unlikely (_LIB_VERSION == _SVID_)) + return sysv_scalbl (x, fn); + else + { + long double z = __ieee754_scalbl (x, fn); + + if (__glibc_unlikely (!isfinite (z) || z == 0.0L)) + { + if (isnan (z)) + { + if (!isnan (x) && !isnan (fn)) + __set_errno (EDOM); + } + else if (isinf (z)) + { + if (!isinf (x) && !isinf (fn)) + __set_errno (ERANGE); + } + else + { + /* z == 0. */ + if (x != 0.0L && !isinf (fn)) + __set_errno (ERANGE); + } + } + return z; + } +} +weak_alias (__scalbl, scalbl) diff --git a/math/w_sinh.c b/math/w_sinh.c deleted file mode 100644 index 51daf2ff35..0000000000 --- a/math/w_sinh.c +++ /dev/null @@ -1,34 +0,0 @@ -/* @(#)w_sinh.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper sinh(x) - */ - -#include -#include - -double -__sinh (double x) -{ - double z = __ieee754_sinh (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard (x, x, 25); /* sinh overflow */ - - return z; -} -weak_alias (__sinh, sinh) -#ifdef NO_LONG_DOUBLE -strong_alias (__sinh, __sinhl) -weak_alias (__sinh, sinhl) -#endif diff --git a/math/w_sinh_compat.c b/math/w_sinh_compat.c new file mode 100644 index 0000000000..51daf2ff35 --- /dev/null +++ b/math/w_sinh_compat.c @@ -0,0 +1,34 @@ +/* @(#)w_sinh.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper sinh(x) + */ + +#include +#include + +double +__sinh (double x) +{ + double z = __ieee754_sinh (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 25); /* sinh overflow */ + + return z; +} +weak_alias (__sinh, sinh) +#ifdef NO_LONG_DOUBLE +strong_alias (__sinh, __sinhl) +weak_alias (__sinh, sinhl) +#endif diff --git a/math/w_sinhf.c b/math/w_sinhf.c deleted file mode 100644 index 0e530b1600..0000000000 --- a/math/w_sinhf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* w_sinhf.c -- float version of w_sinh.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper sinhf(x) - */ - -#include -#include - -float -__sinhf (float x) -{ - float z = __ieee754_sinhf (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_f (x, x, 125); /* sinhf overflow */ - - return z; -} -weak_alias (__sinhf, sinhf) diff --git a/math/w_sinhf_compat.c b/math/w_sinhf_compat.c new file mode 100644 index 0000000000..0e530b1600 --- /dev/null +++ b/math/w_sinhf_compat.c @@ -0,0 +1,33 @@ +/* w_sinhf.c -- float version of w_sinh.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper sinhf(x) + */ + +#include +#include + +float +__sinhf (float x) +{ + float z = __ieee754_sinhf (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 125); /* sinhf overflow */ + + return z; +} +weak_alias (__sinhf, sinhf) diff --git a/math/w_sinhl.c b/math/w_sinhl.c deleted file mode 100644 index 7df7c0614f..0000000000 --- a/math/w_sinhl.c +++ /dev/null @@ -1,34 +0,0 @@ -/* w_sinhl.c -- long double version of w_sinh.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * wrapper sinhl(x) - */ - -#include -#include - -long double -__sinhl (long double x) -{ - long double z = __ieee754_sinhl (x); - if (__builtin_expect (!isfinite (z), 0) && isfinite (x) - && _LIB_VERSION != _IEEE_) - return __kernel_standard_l (x, x, 225); /* sinh overflow */ - - return z; -} -weak_alias (__sinhl, sinhl) diff --git a/math/w_sinhl_compat.c b/math/w_sinhl_compat.c new file mode 100644 index 0000000000..7df7c0614f --- /dev/null +++ b/math/w_sinhl_compat.c @@ -0,0 +1,34 @@ +/* w_sinhl.c -- long double version of w_sinh.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper sinhl(x) + */ + +#include +#include + +long double +__sinhl (long double x) +{ + long double z = __ieee754_sinhl (x); + if (__builtin_expect (!isfinite (z), 0) && isfinite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard_l (x, x, 225); /* sinh overflow */ + + return z; +} +weak_alias (__sinhl, sinhl) diff --git a/math/w_sqrt.c b/math/w_sqrt.c deleted file mode 100644 index 018da82e7a..0000000000 --- a/math/w_sqrt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper sqrt */ -double -__sqrt (double x) -{ - if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_) - return __kernel_standard (x, x, 26); /* sqrt(negative) */ - - return __ieee754_sqrt (x); -} -weak_alias (__sqrt, sqrt) -#ifdef NO_LONG_DOUBLE -strong_alias (__sqrt, __sqrtl) -weak_alias (__sqrt, sqrtl) -#endif diff --git a/math/w_sqrt_compat.c b/math/w_sqrt_compat.c new file mode 100644 index 0000000000..018da82e7a --- /dev/null +++ b/math/w_sqrt_compat.c @@ -0,0 +1,36 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper sqrt */ +double +__sqrt (double x) +{ + if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 26); /* sqrt(negative) */ + + return __ieee754_sqrt (x); +} +weak_alias (__sqrt, sqrt) +#ifdef NO_LONG_DOUBLE +strong_alias (__sqrt, __sqrtl) +weak_alias (__sqrt, sqrtl) +#endif diff --git a/math/w_sqrtf.c b/math/w_sqrtf.c deleted file mode 100644 index de5b42d8f6..0000000000 --- a/math/w_sqrtf.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper sqrtf */ -float -__sqrtf (float x) -{ - if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) - return __kernel_standard_f (x, x, 126); /* sqrt(negative) */ - - return __ieee754_sqrtf (x); -} -weak_alias (__sqrtf, sqrtf) diff --git a/math/w_sqrtf_compat.c b/math/w_sqrtf_compat.c new file mode 100644 index 0000000000..de5b42d8f6 --- /dev/null +++ b/math/w_sqrtf_compat.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper sqrtf */ +float +__sqrtf (float x) +{ + if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 126); /* sqrt(negative) */ + + return __ieee754_sqrtf (x); +} +weak_alias (__sqrtf, sqrtf) diff --git a/math/w_sqrtl.c b/math/w_sqrtl.c deleted file mode 100644 index b4663b71e0..0000000000 --- a/math/w_sqrtl.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - - -/* wrapper sqrtl */ -long double -__sqrtl (long double x) -{ - if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) - return __kernel_standard_l (x, x, 226); /* sqrt(negative) */ - - return __ieee754_sqrtl (x); -} -weak_alias (__sqrtl, sqrtl) diff --git a/math/w_sqrtl_compat.c b/math/w_sqrtl_compat.c new file mode 100644 index 0000000000..b4663b71e0 --- /dev/null +++ b/math/w_sqrtl_compat.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + + +/* wrapper sqrtl */ +long double +__sqrtl (long double x) +{ + if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard_l (x, x, 226); /* sqrt(negative) */ + + return __ieee754_sqrtl (x); +} +weak_alias (__sqrtl, sqrtl) diff --git a/math/w_tgamma.c b/math/w_tgamma.c deleted file mode 100644 index 99b60298ca..0000000000 --- a/math/w_tgamma.c +++ /dev/null @@ -1,46 +0,0 @@ -/* @(#)w_gamma.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* double gamma(double x) - * Return the logarithm of the Gamma function of x or the Gamma function of x, - * depending on the library mode. - */ - -#include -#include -#include - -double -__tgamma(double x) -{ - int local_signgam; - double y = __ieee754_gamma_r(x,&local_signgam); - - if(__glibc_unlikely (!isfinite (y) || y == 0) - && (isfinite (x) || (isinf (x) && x < 0.0)) - && _LIB_VERSION != _IEEE_) { - if (x == 0.0) - return __kernel_standard(x,x,50); /* tgamma pole */ - else if(__floor(x)==x&&x<0.0) - return __kernel_standard(x,x,41); /* tgamma domain */ - else if (y == 0) - __set_errno (ERANGE); /* tgamma underflow */ - else - return __kernel_standard(x,x,40); /* tgamma overflow */ - } - return local_signgam < 0 ? -y : y; -} -weak_alias (__tgamma, tgamma) -#ifdef NO_LONG_DOUBLE -strong_alias (__tgamma, __tgammal) -weak_alias (__tgamma, tgammal) -#endif diff --git a/math/w_tgamma_compat.c b/math/w_tgamma_compat.c new file mode 100644 index 0000000000..99b60298ca --- /dev/null +++ b/math/w_tgamma_compat.c @@ -0,0 +1,46 @@ +/* @(#)w_gamma.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* double gamma(double x) + * Return the logarithm of the Gamma function of x or the Gamma function of x, + * depending on the library mode. + */ + +#include +#include +#include + +double +__tgamma(double x) +{ + int local_signgam; + double y = __ieee754_gamma_r(x,&local_signgam); + + if(__glibc_unlikely (!isfinite (y) || y == 0) + && (isfinite (x) || (isinf (x) && x < 0.0)) + && _LIB_VERSION != _IEEE_) { + if (x == 0.0) + return __kernel_standard(x,x,50); /* tgamma pole */ + else if(__floor(x)==x&&x<0.0) + return __kernel_standard(x,x,41); /* tgamma domain */ + else if (y == 0) + __set_errno (ERANGE); /* tgamma underflow */ + else + return __kernel_standard(x,x,40); /* tgamma overflow */ + } + return local_signgam < 0 ? -y : y; +} +weak_alias (__tgamma, tgamma) +#ifdef NO_LONG_DOUBLE +strong_alias (__tgamma, __tgammal) +weak_alias (__tgamma, tgammal) +#endif diff --git a/math/w_tgammaf.c b/math/w_tgammaf.c deleted file mode 100644 index dfce894cc8..0000000000 --- a/math/w_tgammaf.c +++ /dev/null @@ -1,44 +0,0 @@ -/* w_gammaf.c -- float version of w_gamma.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include -#include -#include - -float -__tgammaf(float x) -{ - int local_signgam; - float y = __ieee754_gammaf_r(x,&local_signgam); - - if(__glibc_unlikely (!isfinite (y) || y == 0) - && (isfinite (x) || (isinf (x) && x < 0.0)) - && _LIB_VERSION != _IEEE_) { - if (x == (float)0.0) - /* tgammaf pole */ - return __kernel_standard_f(x, x, 150); - else if(__floorf(x)==x&&x<0.0f) - /* tgammaf domain */ - return __kernel_standard_f(x, x, 141); - else if (y == 0) - /* tgammaf underflow */ - __set_errno (ERANGE); - else - /* tgammaf overflow */ - return __kernel_standard_f(x, x, 140); - } - return local_signgam < 0 ? - y : y; -} -weak_alias (__tgammaf, tgammaf) diff --git a/math/w_tgammaf_compat.c b/math/w_tgammaf_compat.c new file mode 100644 index 0000000000..dfce894cc8 --- /dev/null +++ b/math/w_tgammaf_compat.c @@ -0,0 +1,44 @@ +/* w_gammaf.c -- float version of w_gamma.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +#include +#include + +float +__tgammaf(float x) +{ + int local_signgam; + float y = __ieee754_gammaf_r(x,&local_signgam); + + if(__glibc_unlikely (!isfinite (y) || y == 0) + && (isfinite (x) || (isinf (x) && x < 0.0)) + && _LIB_VERSION != _IEEE_) { + if (x == (float)0.0) + /* tgammaf pole */ + return __kernel_standard_f(x, x, 150); + else if(__floorf(x)==x&&x<0.0f) + /* tgammaf domain */ + return __kernel_standard_f(x, x, 141); + else if (y == 0) + /* tgammaf underflow */ + __set_errno (ERANGE); + else + /* tgammaf overflow */ + return __kernel_standard_f(x, x, 140); + } + return local_signgam < 0 ? - y : y; +} +weak_alias (__tgammaf, tgammaf) diff --git a/math/w_tgammal.c b/math/w_tgammal.c deleted file mode 100644 index 50de8cf906..0000000000 --- a/math/w_tgammal.c +++ /dev/null @@ -1,45 +0,0 @@ -/* w_gammal.c -- long double version of w_gamma.c. - * Conversion to long double by Ulrich Drepper, - * Cygnus Support, drepper@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* long double gammal(double x) - * Return the Gamma function of x. - */ - -#include -#include -#include - -long double -__tgammal(long double x) -{ - int local_signgam; - long double y = __ieee754_gammal_r(x,&local_signgam); - - if(__glibc_unlikely (!isfinite (y) || y == 0) - && (isfinite (x) || (isinf (x) && x < 0.0)) - && _LIB_VERSION != _IEEE_) { - if(x==0.0) - return __kernel_standard_l(x,x,250); /* tgamma pole */ - else if(__floorl(x)==x&&x<0.0L) - return __kernel_standard_l(x,x,241); /* tgamma domain */ - else if (y == 0) - __set_errno (ERANGE); /* tgamma underflow */ - else - return __kernel_standard_l(x,x,240); /* tgamma overflow */ - } - return local_signgam < 0 ? - y : y; -} -weak_alias (__tgammal, tgammal) diff --git a/math/w_tgammal_compat.c b/math/w_tgammal_compat.c new file mode 100644 index 0000000000..50de8cf906 --- /dev/null +++ b/math/w_tgammal_compat.c @@ -0,0 +1,45 @@ +/* w_gammal.c -- long double version of w_gamma.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* long double gammal(double x) + * Return the Gamma function of x. + */ + +#include +#include +#include + +long double +__tgammal(long double x) +{ + int local_signgam; + long double y = __ieee754_gammal_r(x,&local_signgam); + + if(__glibc_unlikely (!isfinite (y) || y == 0) + && (isfinite (x) || (isinf (x) && x < 0.0)) + && _LIB_VERSION != _IEEE_) { + if(x==0.0) + return __kernel_standard_l(x,x,250); /* tgamma pole */ + else if(__floorl(x)==x&&x<0.0L) + return __kernel_standard_l(x,x,241); /* tgamma domain */ + else if (y == 0) + __set_errno (ERANGE); /* tgamma underflow */ + else + return __kernel_standard_l(x,x,240); /* tgamma overflow */ + } + return local_signgam < 0 ? - y : y; +} +weak_alias (__tgammal, tgammal) diff --git a/sysdeps/i386/fpu/w_sqrt.c b/sysdeps/i386/fpu/w_sqrt.c deleted file mode 100644 index 19b5074179..0000000000 --- a/sysdeps/i386/fpu/w_sqrt.c +++ /dev/null @@ -1,8 +0,0 @@ -/* The inline __ieee754_sqrt is not correctly rounding; it's OK for - most internal uses in glibc, but not for sqrt itself. */ -#define __ieee754_sqrt __avoid_ieee754_sqrt -#include -#include -#undef __ieee754_sqrt -extern double __ieee754_sqrt (double); -#include diff --git a/sysdeps/i386/fpu/w_sqrt_compat.c b/sysdeps/i386/fpu/w_sqrt_compat.c new file mode 100644 index 0000000000..ddd36d0964 --- /dev/null +++ b/sysdeps/i386/fpu/w_sqrt_compat.c @@ -0,0 +1,8 @@ +/* The inline __ieee754_sqrt is not correctly rounding; it's OK for + most internal uses in glibc, but not for sqrt itself. */ +#define __ieee754_sqrt __avoid_ieee754_sqrt +#include +#include +#undef __ieee754_sqrt +extern double __ieee754_sqrt (double); +#include diff --git a/sysdeps/ia64/fpu/w_acos.c b/sysdeps/ia64/fpu/w_acos.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_acos.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acos_compat.c b/sysdeps/ia64/fpu/w_acos_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acos_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosf.c b/sysdeps/ia64/fpu/w_acosf.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/ia64/fpu/w_acosf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosf_compat.c b/sysdeps/ia64/fpu/w_acosf_compat.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosh.c b/sysdeps/ia64/fpu/w_acosh.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_acosh.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosh_compat.c b/sysdeps/ia64/fpu/w_acosh_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosh_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshf.c b/sysdeps/ia64/fpu/w_acoshf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_acoshf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshf_compat.c b/sysdeps/ia64/fpu/w_acoshf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshl.c b/sysdeps/ia64/fpu/w_acoshl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_acoshl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshl_compat.c b/sysdeps/ia64/fpu/w_acoshl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosl.c b/sysdeps/ia64/fpu/w_acosl.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/ia64/fpu/w_acosl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosl_compat.c b/sysdeps/ia64/fpu/w_acosl_compat.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asin.c b/sysdeps/ia64/fpu/w_asin.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_asin.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asin_compat.c b/sysdeps/ia64/fpu/w_asin_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asin_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinf.c b/sysdeps/ia64/fpu/w_asinf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_asinf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinf_compat.c b/sysdeps/ia64/fpu/w_asinf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinl.c b/sysdeps/ia64/fpu/w_asinl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_asinl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinl_compat.c b/sysdeps/ia64/fpu/w_asinl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2.c b/sysdeps/ia64/fpu/w_atan2.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atan2.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2_compat.c b/sysdeps/ia64/fpu/w_atan2_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2f.c b/sysdeps/ia64/fpu/w_atan2f.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atan2f.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2f_compat.c b/sysdeps/ia64/fpu/w_atan2f_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2f_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2l.c b/sysdeps/ia64/fpu/w_atan2l.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atan2l.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2l_compat.c b/sysdeps/ia64/fpu/w_atan2l_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2l_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanh.c b/sysdeps/ia64/fpu/w_atanh.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atanh.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanh_compat.c b/sysdeps/ia64/fpu/w_atanh_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanh_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhf.c b/sysdeps/ia64/fpu/w_atanhf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atanhf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhf_compat.c b/sysdeps/ia64/fpu/w_atanhf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhl.c b/sysdeps/ia64/fpu/w_atanhl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_atanhl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhl_compat.c b/sysdeps/ia64/fpu/w_atanhl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_cosh.c b/sysdeps/ia64/fpu/w_cosh.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_cosh.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_cosh_compat.c b/sysdeps/ia64/fpu/w_cosh_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_cosh_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshf.c b/sysdeps/ia64/fpu/w_coshf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_coshf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshf_compat.c b/sysdeps/ia64/fpu/w_coshf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshl.c b/sysdeps/ia64/fpu/w_coshl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_coshl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshl_compat.c b/sysdeps/ia64/fpu/w_coshl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10.c b/sysdeps/ia64/fpu/w_exp10.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp10.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10_compat.c b/sysdeps/ia64/fpu/w_exp10_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10f.c b/sysdeps/ia64/fpu/w_exp10f.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp10f.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10f_compat.c b/sysdeps/ia64/fpu/w_exp10f_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10f_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10l.c b/sysdeps/ia64/fpu/w_exp10l.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp10l.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10l_compat.c b/sysdeps/ia64/fpu/w_exp10l_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10l_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2.c b/sysdeps/ia64/fpu/w_exp2.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp2.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2_compat.c b/sysdeps/ia64/fpu/w_exp2_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2f.c b/sysdeps/ia64/fpu/w_exp2f.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp2f.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2f_compat.c b/sysdeps/ia64/fpu/w_exp2f_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2f_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2l.c b/sysdeps/ia64/fpu/w_exp2l.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_exp2l.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2l_compat.c b/sysdeps/ia64/fpu/w_exp2l_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2l_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmod.c b/sysdeps/ia64/fpu/w_fmod.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_fmod.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmod_compat.c b/sysdeps/ia64/fpu/w_fmod_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmod_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodf.c b/sysdeps/ia64/fpu/w_fmodf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_fmodf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodf_compat.c b/sysdeps/ia64/fpu/w_fmodf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodl.c b/sysdeps/ia64/fpu/w_fmodl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_fmodl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodl_compat.c b/sysdeps/ia64/fpu/w_fmodl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypot.c b/sysdeps/ia64/fpu/w_hypot.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_hypot.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypot_compat.c b/sysdeps/ia64/fpu/w_hypot_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypot_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotf.c b/sysdeps/ia64/fpu/w_hypotf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_hypotf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotf_compat.c b/sysdeps/ia64/fpu/w_hypotf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotl.c b/sysdeps/ia64/fpu/w_hypotl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_hypotl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotl_compat.c b/sysdeps/ia64/fpu/w_hypotl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log.c b/sysdeps/ia64/fpu/w_log.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10.c b/sysdeps/ia64/fpu/w_log10.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log10.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10_compat.c b/sysdeps/ia64/fpu/w_log10_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10f.c b/sysdeps/ia64/fpu/w_log10f.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log10f.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10f_compat.c b/sysdeps/ia64/fpu/w_log10f_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10f_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10l.c b/sysdeps/ia64/fpu/w_log10l.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log10l.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10l_compat.c b/sysdeps/ia64/fpu/w_log10l_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10l_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2.c b/sysdeps/ia64/fpu/w_log2.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log2.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2_compat.c b/sysdeps/ia64/fpu/w_log2_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2f.c b/sysdeps/ia64/fpu/w_log2f.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log2f.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2f_compat.c b/sysdeps/ia64/fpu/w_log2f_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2f_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2l.c b/sysdeps/ia64/fpu/w_log2l.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_log2l.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2l_compat.c b/sysdeps/ia64/fpu/w_log2l_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2l_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log_compat.c b/sysdeps/ia64/fpu/w_log_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logf.c b/sysdeps/ia64/fpu/w_logf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_logf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logf_compat.c b/sysdeps/ia64/fpu/w_logf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_logf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logl.c b/sysdeps/ia64/fpu/w_logl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_logl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logl_compat.c b/sysdeps/ia64/fpu/w_logl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_logl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_pow.c b/sysdeps/ia64/fpu/w_pow.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_pow.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_pow_compat.c b/sysdeps/ia64/fpu/w_pow_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_pow_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powf.c b/sysdeps/ia64/fpu/w_powf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_powf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powf_compat.c b/sysdeps/ia64/fpu/w_powf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_powf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powl.c b/sysdeps/ia64/fpu/w_powl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_powl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powl_compat.c b/sysdeps/ia64/fpu/w_powl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_powl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainder.c b/sysdeps/ia64/fpu/w_remainder.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_remainder.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainder_compat.c b/sysdeps/ia64/fpu/w_remainder_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainder_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderf.c b/sysdeps/ia64/fpu/w_remainderf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_remainderf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderf_compat.c b/sysdeps/ia64/fpu/w_remainderf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderl.c b/sysdeps/ia64/fpu/w_remainderl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_remainderl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderl_compat.c b/sysdeps/ia64/fpu/w_remainderl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalb.c b/sysdeps/ia64/fpu/w_scalb.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_scalb.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalb_compat.c b/sysdeps/ia64/fpu/w_scalb_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalb_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbf.c b/sysdeps/ia64/fpu/w_scalbf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_scalbf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbf_compat.c b/sysdeps/ia64/fpu/w_scalbf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalbf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbl.c b/sysdeps/ia64/fpu/w_scalbl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_scalbl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbl_compat.c b/sysdeps/ia64/fpu/w_scalbl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalbl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinh.c b/sysdeps/ia64/fpu/w_sinh.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sinh.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinh_compat.c b/sysdeps/ia64/fpu/w_sinh_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinh_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhf.c b/sysdeps/ia64/fpu/w_sinhf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sinhf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhf_compat.c b/sysdeps/ia64/fpu/w_sinhf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhl.c b/sysdeps/ia64/fpu/w_sinhl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sinhl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhl_compat.c b/sysdeps/ia64/fpu/w_sinhl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrt.c b/sysdeps/ia64/fpu/w_sqrt.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sqrt.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrt_compat.c b/sysdeps/ia64/fpu/w_sqrt_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrt_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtf.c b/sysdeps/ia64/fpu/w_sqrtf.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sqrtf.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtf_compat.c b/sysdeps/ia64/fpu/w_sqrtf_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtf_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtl.c b/sysdeps/ia64/fpu/w_sqrtl.c deleted file mode 100644 index 41254ae60a..0000000000 --- a/sysdeps/ia64/fpu/w_sqrtl.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtl_compat.c b/sysdeps/ia64/fpu/w_sqrtl_compat.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtl_compat.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_tgamma.S b/sysdeps/ia64/fpu/w_tgamma.S deleted file mode 100644 index 867815cf46..0000000000 --- a/sysdeps/ia64/fpu/w_tgamma.S +++ /dev/null @@ -1,1835 +0,0 @@ -.file "tgamma.s" - - -// Copyright (c) 2001 - 2005, Intel Corporation -// All rights reserved. -// -// Contributed 2001 by the Intel Numerics Group, Intel Corporation -// -// 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. -// -// * The name of Intel Corporation may not 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 INTEL OR ITS -// 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. -// -// Intel Corporation is the author of this code,and requests that all -// problem reports or change requests be submitted to it directly at -// http://www.intel.com/software/products/opensource/libraries/num.htm. -// -//********************************************************************* -// -// History: -// 10/12/01 Initial version -// 05/20/02 Cleaned up namespace and sf0 syntax -// 02/10/03 Reordered header: .section, .global, .proc, .align -// 04/04/03 Changed error codes for overflow and negative integers -// 04/10/03 Changed code for overflow near zero handling -// 03/31/05 Reformatted delimiters between data tables -// -//********************************************************************* -// -//********************************************************************* -// -// Function: tgamma(x) computes the principle value of the GAMMA -// function of x. -// -//********************************************************************* -// -// Resources Used: -// -// Floating-Point Registers: f8-f15 -// f33-f87 -// -// General Purpose Registers: -// r8-r11 -// r14-r28 -// r32-r36 -// r37-r40 (Used to pass arguments to error handling routine) -// -// Predicate Registers: p6-p15 -// -//********************************************************************* -// -// IEEE Special Conditions: -// -// tgamma(+inf) = +inf -// tgamma(-inf) = QNaN -// tgamma(+/-0) = +/-inf -// tgamma(x<0, x - integer) = QNaN -// tgamma(SNaN) = QNaN -// tgamma(QNaN) = QNaN -// -//********************************************************************* -// -// Overview -// -// The method consists of three cases. -// -// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; -// else if 0 < x < 2 use case tgamma_from_0_to_2; -// else if -(i+1) < x < -i, i = 0...184 use case tgamma_negatives; -// -// Case 2 <= x < OVERFLOW_BOUNDARY -// ------------------------------- -// Here we use algorithm based on the recursive formula -// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval -// [2; OVERFLOW_BOUNDARY] into intervals [16*n; 16*(n+1)] and -// approximate GAMMA(x) by polynomial of 22th degree on each -// [16*n; 16*n+1], recursive formula is used to expand GAMMA(x) -// to [16*n; 16*n+1]. In other words we need to find n, i and r -// such that x = 16 * n + i + r where n and i are integer numbers -// and r is fractional part of x. So GAMMA(x) = GAMMA(16*n+i+r) = -// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = -// = (x-1)*(x-2)*...*(x-i)*GAMMA(16*n+r) ~ -// ~ (x-1)*(x-2)*...*(x-i)*P22n(r). -// -// Step 1: Reduction -// ----------------- -// N = [x] with truncate -// r = x - N, note 0 <= r < 1 -// -// n = N & ~0xF - index of table that contains coefficient of -// polynomial approximation -// i = N & 0xF - is used in recursive formula -// -// -// Step 2: Approximation -// --------------------- -// We use factorized minimax approximation polynomials -// P22n(r) = A22*(r^2+C01(n)*R+C00(n))* -// *(r^2+C11(n)*R+C10(n))*...*(r^2+CA1(n)*R+CA0(n)) -// -// Step 3: Recursion -// ----------------- -// In case when i > 0 we need to multiply P22n(r) by product -// R(i)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions -// we can calculate R as follow: -// R(i) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is -// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* -// *(i-1) if i is odd. In both cases we need to calculate -// R2(i) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = -// = (x^2-3*x+2)*(x^2-7*x+12)*...*((x^2+x)+2*j*(2*(j-1)+(1-2*x))) = -// = (RA+2*(2-RB))*(RA+4*(4-RB))*...*(RA+2*j*(2*(j-1)+RB)) -// where j = 1..[i/2], RA = x^2+x, RB = 1-2*x. -// -// Step 4: Reconstruction -// ---------------------- -// Reconstruction is just simple multiplication i.e. -// GAMMA(x) = P22n(r)*R(i) -// -// Case 0 < x < 2 -// -------------- -// To calculate GAMMA(x) on this interval we do following -// if 1 <= x < 1.25 than GAMMA(x) = P15(x-1) -// if 1.25 <= x < 1.5 than GAMMA(x) = P15(x-x_min) where -// x_min is point of local minimum on [1; 2] interval. -// if 1.5 <= x < 2.0 than GAMMA(x) = P15(x-1.5) -// and -// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x -// -// Case -(i+1) < x < -i, i = 0...184 -// ---------------------------------- -// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and -// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of -// GAMMA(x) is described above. -// -// Step 1: Reduction -// ----------------- -// Note that period of sin(PI*x) is 2 and range reduction for -// sin(PI*x) is like to range reduction for GAMMA(x) -// i.e r = x - [x] with exception of cases -// when r > 0.5 (in such cases r = 1 - (x - [x])). -// -// Step 2: Approximation -// --------------------- -// To approximate sin(PI*x)/PI = sin(PI*(2*n+r))/PI = -// = (-1)^n*sin(PI*r)/PI Taylor series is used. -// sin(PI*r)/PI ~ S21(r). -// -// Step 3: Division -// ---------------- -// To calculate 1/(x*GAMMA(x)*S21(r)) we use frcpa instruction -// with following Newton-Raphson interations. -// -// -//********************************************************************* - -GR_Sig = r8 -GR_TAG = r8 -GR_ad_Data = r9 -GR_SigRqLin = r10 -GR_iSig = r11 -GR_ExpOf1 = r11 -GR_ExpOf8 = r11 - - -GR_Sig2 = r14 -GR_Addr_Mask1 = r15 -GR_Sign_Exp = r16 -GR_Tbl_Offs = r17 -GR_Addr_Mask2 = r18 -GR_ad_Co = r19 -GR_Bit2 = r19 -GR_ad_Ce = r20 -GR_ad_Co7 = r21 -GR_NzOvfBound = r21 -GR_ad_Ce7 = r22 -GR_Tbl_Ind = r23 -GR_Tbl_16xInd = r24 -GR_ExpOf025 = r24 -GR_ExpOf05 = r25 -GR_0x30033 = r26 -GR_10 = r26 -GR_12 = r27 -GR_185 = r27 -GR_14 = r28 -GR_2 = r28 -GR_fpsr = r28 - -GR_SAVE_B0 = r33 -GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 -GR_SAVE_SP = r36 - -GR_Parameter_X = r37 -GR_Parameter_Y = r38 -GR_Parameter_RESULT = r39 -GR_Parameter_TAG = r40 - - - -FR_X = f10 -FR_Y = f1 // tgamma is single argument function -FR_RESULT = f8 - -FR_AbsX = f9 -FR_NormX = f9 -FR_r02 = f11 -FR_AbsXp1 = f12 -FR_X2pX = f13 -FR_1m2X = f14 -FR_Rq1 = f14 -FR_Xt = f15 - -FR_r = f33 -FR_OvfBound = f34 -FR_Xmin = f35 -FR_2 = f36 -FR_Rcp1 = f36 -FR_Rcp3 = f36 -FR_4 = f37 -FR_5 = f38 -FR_6 = f39 -FR_8 = f40 -FR_10 = f41 -FR_12 = f42 -FR_14 = f43 -FR_GAMMA = f43 -FR_05 = f44 - -FR_Rq2 = f45 -FR_Rq3 = f46 -FR_Rq4 = f47 -FR_Rq5 = f48 -FR_Rq6 = f49 -FR_Rq7 = f50 -FR_RqLin = f51 - -FR_InvAn = f52 - -FR_C01 = f53 -FR_A15 = f53 -FR_C11 = f54 -FR_A14 = f54 -FR_C21 = f55 -FR_A13 = f55 -FR_C31 = f56 -FR_A12 = f56 -FR_C41 = f57 -FR_A11 = f57 -FR_C51 = f58 -FR_A10 = f58 -FR_C61 = f59 -FR_A9 = f59 -FR_C71 = f60 -FR_A8 = f60 -FR_C81 = f61 -FR_A7 = f61 -FR_C91 = f62 -FR_A6 = f62 -FR_CA1 = f63 -FR_A5 = f63 -FR_C00 = f64 -FR_A4 = f64 -FR_rs2 = f64 -FR_C10 = f65 -FR_A3 = f65 -FR_rs3 = f65 -FR_C20 = f66 -FR_A2 = f66 -FR_rs4 = f66 -FR_C30 = f67 -FR_A1 = f67 -FR_rs7 = f67 -FR_C40 = f68 -FR_A0 = f68 -FR_rs8 = f68 -FR_C50 = f69 -FR_r2 = f69 -FR_C60 = f70 -FR_r3 = f70 -FR_C70 = f71 -FR_r4 = f71 -FR_C80 = f72 -FR_r7 = f72 -FR_C90 = f73 -FR_r8 = f73 -FR_CA0 = f74 -FR_An = f75 - -FR_S21 = f76 -FR_S19 = f77 -FR_Rcp0 = f77 -FR_Rcp2 = f77 -FR_S17 = f78 -FR_S15 = f79 -FR_S13 = f80 -FR_S11 = f81 -FR_S9 = f82 -FR_S7 = f83 -FR_S5 = f84 -FR_S3 = f85 - -FR_iXt = f86 -FR_rs = f87 - - -// Data tables -//============================================================== -RODATA -.align 16 - -LOCAL_OBJECT_START(tgamma_data) -data8 0x406573FAE561F648 // overflow boundary (171.624376956302739927196) -data8 0x3FDD8B618D5AF8FE // point of local minium (0.461632144968362356785) -// -//[2; 3] -data8 0xEF0E85C9AE40ABE2,0x00004000 // C01 -data8 0xCA2049DDB4096DD8,0x00004000 // C11 -data8 0x99A203B4DC2D1A8C,0x00004000 // C21 -data8 0xBF5D9D9C0C295570,0x00003FFF // C31 -data8 0xE8DD037DEB833BAB,0x00003FFD // C41 -data8 0xB6AE39A2A36AA03A,0x0000BFFE // C51 -data8 0x804960DC2850277B,0x0000C000 // C61 -data8 0xD9F3973841C09F80,0x0000C000 // C71 -data8 0x9C198A676F8A2239,0x0000C001 // C81 -data8 0xC98B7DAE02BE3226,0x0000C001 // C91 -data8 0xE9CAF31AC69301BA,0x0000C001 // CA1 -data8 0xFBBDD58608A0D172,0x00004000 // C00 -data8 0xFDD0316D1E078301,0x00004000 // C10 -data8 0x8630B760468C15E4,0x00004001 // C20 -data8 0x93EDE20E47D9152E,0x00004001 // C30 -data8 0xA86F3A38C77D6B19,0x00004001 // C40 -//[16; 17] -data8 0xF87F757F365EE813,0x00004000 // C01 -data8 0xECA84FBA92759DA4,0x00004000 // C11 -data8 0xD4E0A55E07A8E913,0x00004000 // C21 -data8 0xB0EB45E94C8A5F7B,0x00004000 // C31 -data8 0x8050D6B4F7C8617D,0x00004000 // C41 -data8 0x8471B111AA691E5A,0x00003FFF // C51 -data8 0xADAF462AF96585C9,0x0000BFFC // C61 -data8 0xD327C7A587A8C32B,0x0000BFFF // C71 -data8 0xDEF5192B4CF5E0F1,0x0000C000 // C81 -data8 0xBADD64BB205AEF02,0x0000C001 // C91 -data8 0x9330A24AA67D6860,0x0000C002 // CA1 -data8 0xF57EEAF36D8C47BE,0x00004000 // C00 -data8 0x807092E12A251B38,0x00004001 // C10 -data8 0x8C458F80DEE7ED1C,0x00004001 // C20 -data8 0x9F30C731DC77F1A6,0x00004001 // C30 -data8 0xBAC4E7E099C3A373,0x00004001 // C40 -//[32; 33] -data8 0xC3059A415F142DEF,0x00004000 // C01 -data8 0xB9C1DAC24664587A,0x00004000 // C11 -data8 0xA7101D910992FFB2,0x00004000 // C21 -data8 0x8A9522B8E4AA0AB4,0x00004000 // C31 -data8 0xC76A271E4BA95DCC,0x00003FFF // C41 -data8 0xC5D6DE2A38DB7FF2,0x00003FFE // C51 -data8 0xDBA42086997818B2,0x0000BFFC // C61 -data8 0xB8EDDB1424C1C996,0x0000BFFF // C71 -data8 0xBF7372FB45524B5D,0x0000C000 // C81 -data8 0xA03DDE759131580A,0x0000C001 // C91 -data8 0xFDA6FC4022C1FFE3,0x0000C001 // CA1 -data8 0x9759ABF797B2533D,0x00004000 // C00 -data8 0x9FA160C6CF18CEC5,0x00004000 // C10 -data8 0xB0EFF1E3530E0FCD,0x00004000 // C20 -data8 0xCCD60D5C470165D1,0x00004000 // C30 -data8 0xF5E53F6307B0B1C1,0x00004000 // C40 -//[48; 49] -data8 0xAABE577FBCE37F5E,0x00004000 // C01 -data8 0xA274CAEEB5DF7172,0x00004000 // C11 -data8 0x91B90B6646C1B924,0x00004000 // C21 -data8 0xF06718519CA256D9,0x00003FFF // C31 -data8 0xAA9EE181C0E30263,0x00003FFF // C41 -data8 0xA07BDB5325CB28D2,0x00003FFE // C51 -data8 0x86C8B873204F9219,0x0000BFFD // C61 -data8 0xB0192C5D3E4787D6,0x0000BFFF // C71 -data8 0xB1E0A6263D4C19EF,0x0000C000 // C81 -data8 0x93BA32A118EAC9AE,0x0000C001 // C91 -data8 0xE942A39CD9BEE887,0x0000C001 // CA1 -data8 0xE838B0957B0D3D0D,0x00003FFF // C00 -data8 0xF60E0F00074FCF34,0x00003FFF // C10 -data8 0x89869936AE00C2A5,0x00004000 // C20 -data8 0xA0FE4E8AA611207F,0x00004000 // C30 -data8 0xC3B1229CFF1DDAFE,0x00004000 // C40 -//[64; 65] -data8 0x9C00DDF75CDC6183,0x00004000 // C01 -data8 0x9446AE9C0F6A833E,0x00004000 // C11 -data8 0x84ABC5083310B774,0x00004000 // C21 -data8 0xD9BA3A0977B1ED83,0x00003FFF // C31 -data8 0x989B18C99411D300,0x00003FFF // C41 -data8 0x886E66402318CE6F,0x00003FFE // C51 -data8 0x99028C2468F18F38,0x0000BFFD // C61 -data8 0xAB72D17DCD40CCE1,0x0000BFFF // C71 -data8 0xA9D9AC9BE42C2EF9,0x0000C000 // C81 -data8 0x8C11D983AA177AD2,0x0000C001 // C91 -data8 0xDC779E981C1F0F06,0x0000C001 // CA1 -data8 0xC1FD4AC85965E8D6,0x00003FFF // C00 -data8 0xCE3D2D909D389EC2,0x00003FFF // C10 -data8 0xE7F79980AD06F5D8,0x00003FFF // C20 -data8 0x88DD9F73C8680B5D,0x00004000 // C30 -data8 0xA7D6CB2CB2D46F9D,0x00004000 // C40 -//[80; 81] -data8 0x91C7FF4E993430D0,0x00004000 // C01 -data8 0x8A6E7AB83E45A7E9,0x00004000 // C11 -data8 0xF72D6382E427BEA9,0x00003FFF // C21 -data8 0xC9E2E4F9B3B23ED6,0x00003FFF // C31 -data8 0x8BEFEF56AE05D775,0x00003FFF // C41 -data8 0xEE9666AB6A185560,0x00003FFD // C51 -data8 0xA6AFAF5CEFAEE04D,0x0000BFFD // C61 -data8 0xA877EAFEF1F9C880,0x0000BFFF // C71 -data8 0xA45BD433048ECA15,0x0000C000 // C81 -data8 0x86BD1636B774CC2E,0x0000C001 // C91 -data8 0xD3721BE006E10823,0x0000C001 // CA1 -data8 0xA97EFABA91854208,0x00003FFF // C00 -data8 0xB4AF0AEBB3F97737,0x00003FFF // C10 -data8 0xCC38241936851B0B,0x00003FFF // C20 -data8 0xF282A6261006EA84,0x00003FFF // C30 -data8 0x95B8E9DB1BD45BAF,0x00004000 // C40 -//[96; 97] -data8 0x8A1FA3171B35A106,0x00004000 // C01 -data8 0x830D5B8843890F21,0x00004000 // C11 -data8 0xE98B0F1616677A23,0x00003FFF // C21 -data8 0xBDF8347F5F67D4EC,0x00003FFF // C31 -data8 0x825F15DE34EC055D,0x00003FFF // C41 -data8 0xD4846186B8AAC7BE,0x00003FFD // C51 -data8 0xB161093AB14919B1,0x0000BFFD // C61 -data8 0xA65758EEA4800EF4,0x0000BFFF // C71 -data8 0xA046B67536FA329C,0x0000C000 // C81 -data8 0x82BBEC1BCB9E9068,0x0000C001 // C91 -data8 0xCC9DE2B23BA91B0B,0x0000C001 // CA1 -data8 0x983B16148AF77F94,0x00003FFF // C00 -data8 0xA2A4D8EE90FEE5DD,0x00003FFF // C10 -data8 0xB89446FA37FF481C,0x00003FFF // C20 -data8 0xDC5572648485FB01,0x00003FFF // C30 -data8 0x88CD5D7DB976129A,0x00004000 // C40 -//[112; 113] -data8 0x8417098FD62AC5E3,0x00004000 // C01 -data8 0xFA7896486B779CBB,0x00003FFF // C11 -data8 0xDEC98B14AF5EEBD1,0x00003FFF // C21 -data8 0xB48E153C6BF0B5A3,0x00003FFF // C31 -data8 0xF597B038BC957582,0x00003FFE // C41 -data8 0xBFC6F0884A415694,0x00003FFD // C51 -data8 0xBA075A1392BDB5E5,0x0000BFFD // C61 -data8 0xA4B79E01B44C7DB4,0x0000BFFF // C71 -data8 0x9D12FA7711BFAB0F,0x0000C000 // C81 -data8 0xFF24C47C8E108AB4,0x0000C000 // C91 -data8 0xC7325EC86562606A,0x0000C001 // CA1 -data8 0x8B47DCD9E1610938,0x00003FFF // C00 -data8 0x9518B111B70F88B8,0x00003FFF // C10 -data8 0xA9CC197206F68682,0x00003FFF // C20 -data8 0xCB98294CC0D7A6A6,0x00003FFF // C30 -data8 0xFE09493EA9165181,0x00003FFF // C40 -//[128; 129] -data8 0xFE53D03442270D90,0x00003FFF // C01 -data8 0xF0F857BAEC1993E4,0x00003FFF // C11 -data8 0xD5FF6D70DBBC2FD3,0x00003FFF // C21 -data8 0xACDAA5F4988B1074,0x00003FFF // C31 -data8 0xE92E069F8AD75B54,0x00003FFE // C41 -data8 0xAEBB64645BD94234,0x00003FFD // C51 -data8 0xC13746249F39B43C,0x0000BFFD // C61 -data8 0xA36B74F5B6297A1F,0x0000BFFF // C71 -data8 0x9A77860DF180F6E5,0x0000C000 // C81 -data8 0xF9F8457D84410A0C,0x0000C000 // C91 -data8 0xC2BF44C649EB8597,0x0000C001 // CA1 -data8 0x81225E7489BCDC0E,0x00003FFF // C00 -data8 0x8A788A09CE0EED11,0x00003FFF // C10 -data8 0x9E2E6F86D1B1D89C,0x00003FFF // C20 -data8 0xBE6866B21CF6CCB5,0x00003FFF // C30 -data8 0xEE94426EC1486AAE,0x00003FFF // C40 -//[144; 145] -data8 0xF6113E09732A6497,0x00003FFF // C01 -data8 0xE900D45931B04FC8,0x00003FFF // C11 -data8 0xCE9FD58F745EBA5D,0x00003FFF // C21 -data8 0xA663A9636C864C86,0x00003FFF // C31 -data8 0xDEBF5315896CE629,0x00003FFE // C41 -data8 0xA05FEA415EBD7737,0x00003FFD // C51 -data8 0xC750F112BD9C4031,0x0000BFFD // C61 -data8 0xA2593A35C51C6F6C,0x0000BFFF // C71 -data8 0x9848E1DA7FB40C8C,0x0000C000 // C81 -data8 0xF59FEE87A5759A4B,0x0000C000 // C91 -data8 0xBF00203909E45A1D,0x0000C001 // CA1 -data8 0xF1D8E157200127E5,0x00003FFE // C00 -data8 0x81DD5397CB08D487,0x00003FFF // C10 -data8 0x94C1DC271A8B766F,0x00003FFF // C20 -data8 0xB3AFAF9B5D6EDDCF,0x00003FFF // C30 -data8 0xE1FB4C57CA81BE1E,0x00003FFF // C40 -//[160; 161] -data8 0xEEFFE5122AC72FFD,0x00003FFF // C01 -data8 0xE22F70BB52AD54B3,0x00003FFF // C11 -data8 0xC84FF021FE993EEA,0x00003FFF // C21 -data8 0xA0DA2208EB5B2752,0x00003FFF // C31 -data8 0xD5CDD2FCF8AD2DF5,0x00003FFE // C41 -data8 0x940BEC6DCD811A59,0x00003FFD // C51 -data8 0xCC954EF4FD4EBB81,0x0000BFFD // C61 -data8 0xA1712E29A8C04554,0x0000BFFF // C71 -data8 0x966B55DFB243521A,0x0000C000 // C81 -data8 0xF1E6A2B9CEDD0C4C,0x0000C000 // C91 -data8 0xBBC87BCC031012DB,0x0000C001 // CA1 -data8 0xE43974E6D2818583,0x00003FFE // C00 -data8 0xF5702A516B64C5B7,0x00003FFE // C10 -data8 0x8CEBCB1B32E19471,0x00003FFF // C20 -data8 0xAAC10F05BB77E0AF,0x00003FFF // C30 -data8 0xD776EFCAB205CC58,0x00003FFF // C40 -//[176; 177] -data8 0xE8DA614119811E5D,0x00003FFF // C01 -data8 0xDC415E0288B223D8,0x00003FFF // C11 -data8 0xC2D2243E44EC970E,0x00003FFF // C21 -data8 0x9C086664B5307BEA,0x00003FFF // C31 -data8 0xCE03D7A08B461156,0x00003FFE // C41 -data8 0x894BE3BAAAB66ADC,0x00003FFD // C51 -data8 0xD131EDD71A702D4D,0x0000BFFD // C61 -data8 0xA0A907CDDBE10898,0x0000BFFF // C71 -data8 0x94CC3CD9C765C808,0x0000C000 // C81 -data8 0xEEA85F237815FC0D,0x0000C000 // C91 -data8 0xB8FA04B023E43F91,0x0000C001 // CA1 -data8 0xD8B2C7D9FCBD7EF9,0x00003FFE // C00 -data8 0xE9566E93AAE7E38F,0x00003FFE // C10 -data8 0x8646E78AABEF0255,0x00003FFF // C20 -data8 0xA32AEDB62E304345,0x00003FFF // C30 -data8 0xCE83E40280EE7DF0,0x00003FFF // C40 -// -//[2; 3] -data8 0xC44FB47E90584083,0x00004001 // C50 -data8 0xE863EE77E1C45981,0x00004001 // C60 -data8 0x8AC15BE238B9D70E,0x00004002 // C70 -data8 0xA5D94B6592350EF4,0x00004002 // C80 -data8 0xC379DB3E20A148B3,0x00004002 // C90 -data8 0xDACA49B73974F6C9,0x00004002 // CA0 -data8 0x810E496A1AFEC895,0x00003FE1 // An -//[16; 17] -data8 0xE17C0357AAF3F817,0x00004001 // C50 -data8 0x8BA8804750FBFBFE,0x00004002 // C60 -data8 0xB18EAB3CB64BEBEE,0x00004002 // C70 -data8 0xE90AB7015AF1C28F,0x00004002 // C80 -data8 0xA0AB97CE9E259196,0x00004003 // C90 -data8 0xF5E0E0A000C2D720,0x00004003 // CA0 -data8 0xD97F0F87EC791954,0x00004005 // An -//[32; 33] -data8 0x980C293F3696040D,0x00004001 // C50 -data8 0xC0DBFFBB948A9A4E,0x00004001 // C60 -data8 0xFAB54625E9A588A2,0x00004001 // C70 -data8 0xA7E08176D6050FBF,0x00004002 // C80 -data8 0xEBAAEC4952270A9F,0x00004002 // C90 -data8 0xB7479CDAD20550FE,0x00004003 // CA0 -data8 0xAACD45931C3FF634,0x00004054 // An -//[48; 49] -data8 0xF5180F0000419AD5,0x00004000 // C50 -data8 0x9D507D07BFBB2273,0x00004001 // C60 -data8 0xCEB53F7A13A383E3,0x00004001 // C70 -data8 0x8BAFEF9E0A49128F,0x00004002 // C80 -data8 0xC58EF912D39E228C,0x00004002 // C90 -data8 0x9A88118422BA208E,0x00004003 // CA0 -data8 0xBD6C0E2477EC12CB,0x000040AC // An -//[64; 65] -data8 0xD410AC48BF7748DA,0x00004000 // C50 -data8 0x89399B90AFEBD931,0x00004001 // C60 -data8 0xB596DF8F77EB8560,0x00004001 // C70 -data8 0xF6D9445A047FB4A6,0x00004001 // C80 -data8 0xAF52F0DD65221357,0x00004002 // C90 -data8 0x8989B45BFC881989,0x00004003 // CA0 -data8 0xB7FCAE86E6E10D5A,0x0000410B // An -//[80; 81] -data8 0xBE759740E3B5AA84,0x00004000 // C50 -data8 0xF8037B1B07D27609,0x00004000 // C60 -data8 0xA4F6F6C7F0977D4F,0x00004001 // C70 -data8 0xE131960233BF02C4,0x00004001 // C80 -data8 0xA06DF43D3922BBE2,0x00004002 // C90 -data8 0xFC266AB27255A360,0x00004002 // CA0 -data8 0xD9F4B012EDAFEF2F,0x0000416F // An -//[96; 97] -data8 0xAEFC84CDA8E1EAA6,0x00004000 // C50 -data8 0xE5009110DB5F3C8A,0x00004000 // C60 -data8 0x98F5F48738E7B232,0x00004001 // C70 -data8 0xD17EE64E21FFDC6B,0x00004001 // C80 -data8 0x9596F7A7E36145CC,0x00004002 // C90 -data8 0xEB64DBE50E125CAF,0x00004002 // CA0 -data8 0xA090530D79E32D2E,0x000041D8 // An -//[112; 113] -data8 0xA33AEA22A16B2655,0x00004000 // C50 -data8 0xD682B93BD7D7945C,0x00004000 // C60 -data8 0x8FC854C6E6E30CC3,0x00004001 // C70 -data8 0xC5754D828AFFDC7A,0x00004001 // C80 -data8 0x8D41216B397139C2,0x00004002 // C90 -data8 0xDE78D746848116E5,0x00004002 // CA0 -data8 0xB8A297A2DC0630DB,0x00004244 // An -//[128; 129] -data8 0x99EB00F11D95E292,0x00004000 // C50 -data8 0xCB005CB911EB779A,0x00004000 // C60 -data8 0x8879AA2FDFF3A37A,0x00004001 // C70 -data8 0xBBDA538AD40CAC2C,0x00004001 // C80 -data8 0x8696D849D311B9DE,0x00004002 // C90 -data8 0xD41E1C041481199F,0x00004002 // CA0 -data8 0xEBA1A43D34EE61EE,0x000042B3 // An -//[144; 145] -data8 0x924F822578AA9F3D,0x00004000 // C50 -data8 0xC193FAF9D3B36960,0x00004000 // C60 -data8 0x827AE3A6B68ED0CA,0x00004001 // C70 -data8 0xB3F52A27EED23F0B,0x00004001 // C80 -data8 0x811A079FB3C94D79,0x00004002 // C90 -data8 0xCB94415470B6F8D2,0x00004002 // CA0 -data8 0x80A0260DCB3EC9AC,0x00004326 // An -//[160; 161] -data8 0x8BF24091E88B331D,0x00004000 // C50 -data8 0xB9ADE01187E65201,0x00004000 // C60 -data8 0xFAE4508F6E7625FE,0x00004000 // C70 -data8 0xAD516668AD6D7367,0x00004001 // C80 -data8 0xF8F5FF171154F637,0x00004001 // C90 -data8 0xC461321268990C82,0x00004002 // CA0 -data8 0xC3B693F344B0E6FE,0x0000439A // An -// -//[176; 177] -data8 0x868545EB42A258ED,0x00004000 // C50 -data8 0xB2EF04ACE8BA0E6E,0x00004000 // C60 -data8 0xF247D22C22E69230,0x00004000 // C70 -data8 0xA7A1AB93E3981A90,0x00004001 // C80 -data8 0xF10951733E2C697F,0x00004001 // C90 -data8 0xBE3359BFAD128322,0x00004002 // CA0 -data8 0x8000000000000000,0x00003fff -// -//[160; 161] for negatives -data8 0xA76DBD55B2E32D71,0x00003C63 // 1/An -// -// sin(pi*x)/pi -data8 0xBCBC4342112F52A2,0x00003FDE // S21 -data8 0xFAFCECB86536F655,0x0000BFE3 // S19 -data8 0x87E4C97F9CF09B92,0x00003FE9 // S17 -data8 0xEA124C68E704C5CB,0x0000BFED // S15 -data8 0x9BA38CFD59C8AA1D,0x00003FF2 // S13 -data8 0x99C0B552303D5B21,0x0000BFF6 // S11 -// -//[176; 177] for negatives -data8 0xBA5D5869211696FF,0x00003BEC // 1/An -// -// sin(pi*x)/pi -data8 0xD63402E79A853175,0x00003FF9 // S9 -data8 0xC354723906DB36BA,0x0000BFFC // S7 -data8 0xCFCE5A015E236291,0x00003FFE // S5 -data8 0xD28D3312983E9918,0x0000BFFF // S3 -// -// -// [1.0;1.25] -data8 0xA405530B067ECD3C,0x0000BFFC // A15 -data8 0xF5B5413F95E1C282,0x00003FFD // A14 -data8 0xC4DED71C782F76C8,0x0000BFFE // A13 -data8 0xECF7DDDFD27C9223,0x00003FFE // A12 -data8 0xFB73D31793068463,0x0000BFFE // A11 -data8 0xFF173B7E66FD1D61,0x00003FFE // A10 -data8 0xFFA5EF3959089E94,0x0000BFFE // A9 -data8 0xFF8153BD42E71A4F,0x00003FFE // A8 -data8 0xFEF9CAEE2CB5B533,0x0000BFFE // A7 -data8 0xFE3F02E5EDB6811E,0x00003FFE // A6 -data8 0xFB64074CED2658FB,0x0000BFFE // A5 -data8 0xFB52882A095B18A4,0x00003FFE // A4 -data8 0xE8508C7990A0DAC0,0x0000BFFE // A3 -data8 0xFD32C611D8A881D0,0x00003FFE // A2 -data8 0x93C467E37DB0C536,0x0000BFFE // A1 -data8 0x8000000000000000,0x00003FFF // A0 -// -// [1.25;1.5] -data8 0xD038092400619677,0x0000BFF7 // A15 -data8 0xEA6DE925E6EB8C8F,0x00003FF3 // A14 -data8 0xC53F83645D4597FC,0x0000BFF7 // A13 -data8 0xE366DB2FB27B7ECD,0x00003FF7 // A12 -data8 0xAC8FD5E11F6EEAD8,0x0000BFF8 // A11 -data8 0xFB14010FB3697785,0x00003FF8 // A10 -data8 0xB6F91CB5C371177B,0x0000BFF9 // A9 -data8 0x85A262C6F8FEEF71,0x00003FFA // A8 -data8 0xC038E6E3261568F9,0x0000BFFA // A7 -data8 0x8F4BDE8883232364,0x00003FFB // A6 -data8 0xBCFBBD5786537E9A,0x0000BFFB // A5 -data8 0xA4C08BAF0A559479,0x00003FFC // A4 -data8 0x85D74FA063E81476,0x0000BFFC // A3 -data8 0xDB629FB9BBDC1C4E,0x00003FFD // A2 -data8 0xF4F8FBC7C0C9D317,0x00003FC6 // A1 -data8 0xE2B6E4153A57746C,0x00003FFE // A0 -// -// [1.25;1.5] -data8 0x9533F9D3723B448C,0x0000BFF2 // A15 -data8 0xF1F75D3C561CBBAF,0x00003FF5 // A14 -data8 0xBA55A9A1FC883523,0x0000BFF8 // A13 -data8 0xB5D5E9E5104FA995,0x00003FFA // A12 -data8 0xFD84F35B70CD9AE2,0x0000BFFB // A11 -data8 0x87445235F4688CC5,0x00003FFD // A10 -data8 0xE7F236EBFB9F774E,0x0000BFFD // A9 -data8 0xA6605F2721F787CE,0x00003FFE // A8 -data8 0xCF579312AD7EAD72,0x0000BFFE // A7 -data8 0xE96254A2407A5EAC,0x00003FFE // A6 -data8 0xF41312A8572ED346,0x0000BFFE // A5 -data8 0xF9535027C1B1F795,0x00003FFE // A4 -data8 0xE7E82D0C613A8DE4,0x0000BFFE // A3 -data8 0xFD23CD9741B460B8,0x00003FFE // A2 -data8 0x93C30FD9781DBA88,0x0000BFFE // A1 -data8 0xFFFFF1781FDBEE84,0x00003FFE // A0 -LOCAL_OBJECT_END(tgamma_data) - - -//============================================================== -// Code -//============================================================== - -.section .text -GLOBAL_LIBM_ENTRY(tgamma) -{ .mfi - getf.exp GR_Sign_Exp = f8 - fma.s1 FR_1m2X = f8,f1,f8 // 2x - addl GR_ad_Data = @ltoff(tgamma_data), gp -} -{ .mfi - mov GR_ExpOf8 = 0x10002 // 8 - fcvt.fx.trunc.s1 FR_iXt = f8 // [x] - mov GR_ExpOf05 = 0xFFFE // 0.5 -};; -{ .mfi - getf.sig GR_Sig = f8 - fma.s1 FR_2 = f1,f1,f1 // 2 - mov GR_Addr_Mask1 = 0x780 -} -{ .mlx - setf.exp FR_8 = GR_ExpOf8 - movl GR_10 = 0x4024000000000000 -};; -{ .mfi - ld8 GR_ad_Data = [GR_ad_Data] - fcmp.lt.s1 p14,p15 = f8,f0 - tbit.z p12,p13 = GR_Sign_Exp,0x10 // p13 if x >= 2 -} -{ .mlx - and GR_Bit2 = 4,GR_Sign_Exp - movl GR_12 = 0x4028000000000000 -};; -{ .mfi - setf.d FR_10 = GR_10 - fma.s1 FR_r02 = f8,f1,f0 - extr.u GR_Tbl_Offs = GR_Sig,58,6 -} -{ .mfi -(p12) mov GR_Addr_Mask1 = r0 - fma.s1 FR_NormX = f8,f1,f0 - cmp.ne p8,p0 = GR_Bit2,r0 -};; -{ .mfi -(p8) shladd GR_Tbl_Offs = GR_Tbl_Offs,4,r0 - fclass.m p10,p0 = f8,0x1E7 // Test x for NaTVal, NaN, +/-0, +/-INF - tbit.nz p11,p0 = GR_Sign_Exp,1 -} -{ .mlx - add GR_Addr_Mask2 = GR_Addr_Mask1,GR_Addr_Mask1 - movl GR_14 = 0x402C000000000000 -};; -.pred.rel "mutex",p14,p15 -{ .mfi - setf.d FR_12 = GR_12 -(p14) fma.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| - tbit.nz p8,p9 = GR_Sign_Exp,0 -} -{ .mfi - ldfpd FR_OvfBound,FR_Xmin = [GR_ad_Data],16 -(p15) fms.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| -(p11) shladd GR_Tbl_Offs = GR_Tbl_Offs,2,r0 -};; -.pred.rel "mutex",p9,p8 -{ .mfi - setf.d FR_14 = GR_14 - fma.s1 FR_4 = FR_2,FR_2,f0 -(p8) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask1 -} -{ .mfi - setf.exp FR_05 = GR_ExpOf05 - fma.s1 FR_6 = FR_2,FR_2,FR_2 -(p9) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask2 -};; -.pred.rel "mutex",p9,p8 -{ .mfi -(p8) shladd GR_ad_Co = GR_Tbl_Offs,1,GR_ad_Data - fcvt.xf FR_Xt = FR_iXt // [x] -(p15) tbit.z.unc p11,p0 = GR_Sign_Exp,0x10 // p11 if 0 < x < 2 -} -{ .mfi -(p9) add GR_ad_Co = GR_ad_Data,GR_Tbl_Offs - fma.s1 FR_5 = FR_2,FR_2,f1 -(p15) cmp.lt.unc p7,p6 = GR_ExpOf05,GR_Sign_Exp // p7 if 0 < x < 1 -};; -{ .mfi - add GR_ad_Ce = 16,GR_ad_Co -(p11) frcpa.s1 FR_Rcp0,p0 = f1,f8 - sub GR_Tbl_Offs = GR_ad_Co,GR_ad_Data -} -{ .mfb - ldfe FR_C01 = [GR_ad_Co],32 -(p7) fms.s1 FR_r02 = FR_r02,f1,f1 - // jump if x is NaTVal, NaN, +/-0, +/-INF -(p10) br.cond.spnt tgamma_spec -};; -.pred.rel "mutex",p14,p15 -{ .mfi - ldfe FR_C11 = [GR_ad_Ce],32 -(p14) fms.s1 FR_X2pX = f8,f8,f8 // RA=x^2+|x| - shr GR_Tbl_Ind = GR_Tbl_Offs,8 -} -{ .mfb - ldfe FR_C21 = [GR_ad_Co],32 -(p15) fma.s1 FR_X2pX = f8,f8,f8 // RA=x^2+x - // jump if 0 < x < 2 -(p11) br.cond.spnt tgamma_from_0_to_2 -};; -{ .mfi - ldfe FR_C31 = [GR_ad_Ce],32 - fma.s1 FR_Rq2 = FR_2,f1,FR_1m2X // 2 + B - cmp.ltu p7,p0=0xB,GR_Tbl_Ind -} -{ .mfb - ldfe FR_C41 = [GR_ad_Co],32 - fma.s1 FR_Rq3 = FR_2,FR_2,FR_1m2X // 4 + B - // jump if GR_Tbl_Ind > 11, i.e |x| is more than 192 -(p7) br.cond.spnt tgamma_spec_res -};; -{ .mfi - ldfe FR_C51 = [GR_ad_Ce],32 - fma.s1 FR_Rq4 = FR_6,f1,FR_1m2X // 6 + B - shr GR_Tbl_Offs = GR_Tbl_Offs,1 -} -{ .mfi - ldfe FR_C61 = [GR_ad_Co],32 - fma.s1 FR_Rq5 = FR_4,FR_2,FR_1m2X // 8 + B - nop.i 0 -};; -{ .mfi - ldfe FR_C71 = [GR_ad_Ce],32 -(p14) fms.s1 FR_r = FR_Xt,f1,f8 // r = |x| - [|x|] - shr GR_Tbl_16xInd = GR_Tbl_Offs,3 -} -{ .mfi - ldfe FR_C81 = [GR_ad_Co],32 -(p15) fms.s1 FR_r = f8,f1,FR_Xt // r = x - [x] - add GR_ad_Data = 0xC00,GR_ad_Data -};; -{ .mfi - ldfe FR_C91 = [GR_ad_Ce],32 - fma.s1 FR_Rq6 = FR_5,FR_2,FR_1m2X // 10 + B -(p14) mov GR_0x30033 = 0x30033 -} -{ .mfi - ldfe FR_CA1 = [GR_ad_Co],32 - fma.s1 FR_Rq7 = FR_6,FR_2,FR_1m2X // 12 + B - sub GR_Tbl_Offs = GR_Tbl_Offs,GR_Tbl_16xInd -};; -{ .mfi - ldfe FR_C00 = [GR_ad_Ce],32 - fma.s1 FR_Rq1 = FR_Rq1,FR_2,FR_X2pX // (x-1)*(x-2) -(p13) cmp.eq.unc p8,p0 = r0,GR_Tbl_16xInd // index is 0 i.e. arg from [2;16) -} -{ .mfi - ldfe FR_C10 = [GR_ad_Co],32 -(p14) fms.s1 FR_AbsX = f0,f0,FR_NormX // absolute value of argument - add GR_ad_Co7 = GR_ad_Data,GR_Tbl_Offs -};; -{ .mfi - ldfe FR_C20 = [GR_ad_Ce],32 - fma.s1 FR_Rq2 = FR_Rq2,FR_4,FR_X2pX // (x-3)*(x-4) - add GR_ad_Ce7 = 16,GR_ad_Co7 -} -{ .mfi - ldfe FR_C30 = [GR_ad_Co],32 - fma.s1 FR_Rq3 = FR_Rq3,FR_6,FR_X2pX // (x-5)*(x-6) - nop.i 0 -};; -{ .mfi - ldfe FR_C40 = [GR_ad_Ce],32 - fma.s1 FR_Rq4 = FR_Rq4,FR_8,FR_X2pX // (x-7)*(x-8) -(p14) cmp.leu.unc p7,p0 = GR_0x30033,GR_Sign_Exp -} -{ .mfb - ldfe FR_C50 = [GR_ad_Co7],32 - fma.s1 FR_Rq5 = FR_Rq5,FR_10,FR_X2pX // (x-9)*(x-10) - // jump if x is less or equal to -2^52, i.e. x is big negative integer -(p7) br.cond.spnt tgamma_singularity -};; -{ .mfi - ldfe FR_C60 = [GR_ad_Ce7],32 - fma.s1 FR_C01 = FR_C01,f1,FR_r - add GR_ad_Ce = 0x560,GR_ad_Data -} -{ .mfi - ldfe FR_C70 = [GR_ad_Co7],32 - fma.s1 FR_rs = f0,f0,FR_r // reduced arg for sin(pi*x) - add GR_ad_Co = 0x550,GR_ad_Data -};; -{ .mfi - ldfe FR_C80 = [GR_ad_Ce7],32 - fma.s1 FR_C11 = FR_C11,f1,FR_r - nop.i 0 -} -{ .mfi - ldfe FR_C90 = [GR_ad_Co7],32 - fma.s1 FR_C21 = FR_C21,f1,FR_r - nop.i 0 -};; -.pred.rel "mutex",p12,p13 -{ .mfi -(p13) getf.sig GR_iSig = FR_iXt - fcmp.lt.s1 p11,p0 = FR_05,FR_r - mov GR_185 = 185 -} -{ .mfi - nop.m 0 - fma.s1 FR_Rq6 = FR_Rq6,FR_12,FR_X2pX // (x-11)*(x-12) - nop.i 0 -};; -{ .mfi - ldfe FR_CA0 = [GR_ad_Ce7],32 - fma.s1 FR_C31 = FR_C31,f1,FR_r -(p12) mov GR_iSig = 0 -} -{ .mfi - ldfe FR_An = [GR_ad_Co7],0x80 - fma.s1 FR_C41 = FR_C41,f1,FR_r - nop.i 0 -};; -{ .mfi -(p14) getf.sig GR_Sig = FR_r - fma.s1 FR_C51 = FR_C51,f1,FR_r -(p14) sub GR_iSig = r0,GR_iSig -} -{ .mfi - ldfe FR_S21 = [GR_ad_Co],32 - fma.s1 FR_C61 = FR_C61,f1,FR_r - nop.i 0 -};; -{ .mfi - ldfe FR_S19 = [GR_ad_Ce],32 - fma.s1 FR_C71 = FR_C71,f1,FR_r - and GR_SigRqLin = 0xF,GR_iSig -} -{ .mfi - ldfe FR_S17 = [GR_ad_Co],32 - fma.s1 FR_C81 = FR_C81,f1,FR_r - mov GR_2 = 2 -};; -{ .mfi -(p14) ldfe FR_InvAn = [GR_ad_Co7] - fma.s1 FR_C91 = FR_C91,f1,FR_r - // if significand of r is 0 tnan argument is negative integer -(p14) cmp.eq.unc p12,p0 = r0,GR_Sig -} -{ .mfb -(p8) sub GR_SigRqLin = GR_SigRqLin,GR_2 // subtract 2 if 2 <= x < 16 - fma.s1 FR_CA1 = FR_CA1,f1,FR_r - // jump if x is negative integer such that -2^52 < x < -185 -(p12) br.cond.spnt tgamma_singularity -};; -{ .mfi - setf.sig FR_Xt = GR_SigRqLin -(p11) fms.s1 FR_rs = f1,f1,FR_r -(p14) cmp.ltu.unc p7,p0 = GR_185,GR_iSig -} -{ .mfb - ldfe FR_S15 = [GR_ad_Ce],32 - fma.s1 FR_Rq7 = FR_Rq7,FR_14,FR_X2pX // (x-13)*(x-14) - // jump if x is noninteger such that -2^52 < x < -185 -(p7) br.cond.spnt tgamma_underflow -};; -{ .mfi - ldfe FR_S13 = [GR_ad_Co],48 - fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 - and GR_Sig2 = 0xE,GR_SigRqLin -} -{ .mfi - ldfe FR_S11 = [GR_ad_Ce],48 - fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 - nop.i 0 -};; -{ .mfi - ldfe FR_S9 = [GR_ad_Co],32 - fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 - // should we mul by polynomial of recursion? - cmp.eq p13,p12 = r0,GR_SigRqLin -} -{ .mfi - ldfe FR_S7 = [GR_ad_Ce],32 - fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 - nop.i 0 -};; -{ .mfi - ldfe FR_S5 = [GR_ad_Co],32 - fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 - nop.i 0 -} -{ .mfi - ldfe FR_S3 = [GR_ad_Ce],32 - fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C61 = FR_C61,FR_r,FR_C60 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C71 = FR_C71,FR_r,FR_C70 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C81 = FR_C81,FR_r,FR_C80 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C91 = FR_C91,FR_r,FR_C90 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_CA1 = FR_CA1,FR_r,FR_CA0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C01 = FR_C01,FR_C11,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C21 = FR_C21,FR_C31,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_rs2 = FR_rs,FR_rs,f0 -(p12) cmp.lt.unc p7,p0 = 2,GR_Sig2 // should mul by FR_Rq2? -};; -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,FR_C51,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p7) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 -(p12) cmp.lt.unc p9,p0 = 6,GR_Sig2 // should mul by FR_Rq4? -};; -{ .mfi - nop.m 0 - fma.s1 FR_C61 = FR_C61,FR_C71,f0 -(p15) cmp.eq p11,p0 = r0,r0 -} -{ .mfi - nop.m 0 -(p9) fma.s1 FR_Rq3 = FR_Rq3,FR_Rq4,f0 -(p12) cmp.lt.unc p8,p0 = 10,GR_Sig2 // should mul by FR_Rq6? -};; -{ .mfi - nop.m 0 - fma.s1 FR_C81 = FR_C81,FR_C91,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p8) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq6,f0 -(p14) cmp.ltu p0,p11 = 0x9,GR_Tbl_Ind -};; -{ .mfi - nop.m 0 - fcvt.xf FR_RqLin = FR_Xt - nop.i 0 -} -{ .mfi - nop.m 0 -(p11) fma.s1 FR_CA1 = FR_CA1,FR_An,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S19 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_S17 = FR_S17,FR_rs2,FR_S15 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C01 = FR_C01,FR_C21,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_rs4 = FR_rs2,FR_rs2,f0 -(p12) cmp.lt.unc p8,p0 = 4,GR_Sig2 // should mul by FR_Rq3? -};; -{ .mfi - nop.m 0 -(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq3,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_S13 = FR_S13,FR_rs2,FR_S11 -(p12) cmp.lt.unc p9,p0 = 12,GR_Sig2 // should mul by FR_Rq7? -};; -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,FR_C61,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p9) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq7,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C81 = FR_C81,FR_CA1,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_S9 = FR_S9,FR_rs2,FR_S7 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_S5 = FR_S5,FR_rs2,FR_S3 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_rs3 = FR_rs2,FR_rs,f0 -(p12) tbit.nz.unc p6,p0 = GR_SigRqLin,0 -} -{ .mfi - nop.m 0 - fma.s1 FR_rs8 = FR_rs4,FR_rs4,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_S21 = FR_S21,FR_rs4,FR_S17 - mov GR_ExpOf1 = 0x2FFFF -} -{ .mfi - nop.m 0 -(p6) fms.s1 FR_RqLin = FR_AbsX,f1,FR_RqLin -(p12) cmp.lt.unc p8,p0 = 8,GR_Sig2 // should mul by FR_Rq5? -};; -{ .mfi - nop.m 0 - fma.s1 FR_C01 = FR_C01,FR_C41,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq5,f0 -(p14) cmp.gtu.unc p7,p0 = GR_Sign_Exp,GR_ExpOf1 -};; -{ .mfi - nop.m 0 - fma.s1 FR_S13 = FR_S13,FR_rs4,FR_S9 - nop.i 0 -} -{ .mfi - nop.m 0 -(p7) fma.s1 FR_C81 = FR_C81,FR_AbsX,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_AbsXp1 = f1,f1,FR_AbsX // |x|+1 - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fcmp.lt.unc.s1 p0,p10 = FR_AbsX,FR_OvfBound // x >= overflow_boundary - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_rs7 = FR_rs4,FR_rs3,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_S5 = FR_S5,FR_rs3,FR_rs - nop.i 0 -};; -{ .mib -(p14) cmp.lt p13,p0 = r0,r0 // set p13 to 0 if x < 0 -(p12) cmp.eq.unc p8,p9 = 1,GR_SigRqLin -(p10) br.cond.spnt tgamma_spec_res -};; -{ .mfi - getf.sig GR_Sig = FR_iXt -(p6) fma.s1 FR_Rq1 = FR_Rq1,FR_RqLin,f0 - // should we mul by polynomial of recursion? -(p15) cmp.eq.unc p0,p11 = r0,GR_SigRqLin -} -{ .mfb - nop.m 0 - fma.s1 FR_GAMMA = FR_C01,FR_C81,f0 -(p11) br.cond.spnt tgamma_positives -};; -{ .mfi - nop.m 0 - fma.s1 FR_S21 = FR_S21,FR_rs8,FR_S13 - nop.i 0 -} -{ .mfb - nop.m 0 -(p13) fma.d.s0 f8 = FR_C01,FR_C81,f0 -(p13) br.ret.spnt b0 -};; -.pred.rel "mutex",p8,p9 -{ .mfi - nop.m 0 -(p9) fma.s1 FR_GAMMA = FR_GAMMA,FR_Rq1,f0 - tbit.z p6,p7 = GR_Sig,0 // p6 if sin<0, p7 if sin>0 -} -{ .mfi - nop.m 0 -(p8) fma.s1 FR_GAMMA = FR_GAMMA,FR_RqLin,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_S21 = FR_S21,FR_rs7,FR_S5 - nop.i 0 -};; -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fnma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p7) fma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 - mov GR_Sig2 = 1 -};; -{ .mfi - nop.m 0 - frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA - cmp.ltu p13,p0 = GR_Sign_Exp,GR_ExpOf1 -};; -// NR method: ineration #1 -{ .mfi -(p13) getf.exp GR_Sign_Exp = FR_AbsX - fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 // t = 1 - r0*x -(p13) shl GR_Sig2 = GR_Sig2,63 -};; -{ .mfi -(p13) getf.sig GR_Sig = FR_AbsX - nop.f 0 -(p13) mov GR_NzOvfBound = 0xFBFF -};; -{ .mfi -(p13) cmp.ltu.unc p8,p0 = GR_Sign_Exp,GR_NzOvfBound // p8 <- overflow - nop.f 0 -(p13) cmp.eq.unc p9,p0 = GR_Sign_Exp,GR_NzOvfBound -};; -{ .mfb - nop.m 0 -(p13) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags -(p8) br.cond.spnt tgamma_ovf_near_0 //tgamma_neg_overflow -};; -{ .mib - nop.m 0 -(p9) cmp.eq.unc p8,p0 = GR_Sig,GR_Sig2 -(p8) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_neg_overflow -};; -{ .mfi - nop.m 0 - fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 - nop.i 0 -};; -// NR method: ineration #2 -{ .mfi - nop.m 0 - fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 // t = 1 - r1*x - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 - nop.i 0 -};; -// NR method: ineration #3 -{ .mfi - nop.m 0 - fnma.s1 FR_Rcp3 = FR_Rcp2,FR_GAMMA,f1 // t = 1 - r2*x - nop.i 0 -} -{ .mfi - nop.m 0 -(p13) fma.s1 FR_Rcp2 = FR_Rcp2,FR_AbsXp1,f0 -(p14) cmp.ltu p10,p11 = 0x9,GR_Tbl_Ind -};; -.pred.rel "mutex",p10,p11 -{ .mfi - nop.m 0 -(p10) fma.s1 FR_GAMMA = FR_Rcp2,FR_Rcp3,FR_Rcp2 - nop.i 0 -} -{ .mfi - nop.m 0 -(p11) fma.d.s0 f8 = FR_Rcp2,FR_Rcp3,FR_Rcp2 - nop.i 0 -};; -{ .mfb - nop.m 0 -(p10) fma.d.s0 f8 = FR_GAMMA,FR_InvAn,f0 - br.ret.sptk b0 -};; - - -// here if x >= 3 -//-------------------------------------------------------------------- -.align 32 -tgamma_positives: -.pred.rel "mutex",p8,p9 -{ .mfi - nop.m 0 -(p9) fma.d.s0 f8 = FR_GAMMA,FR_Rq1,f0 - nop.i 0 -} -{ .mfb - nop.m 0 -(p8) fma.d.s0 f8 = FR_GAMMA,FR_RqLin,f0 - br.ret.sptk b0 -};; - -// here if 0 < x < 1 -//-------------------------------------------------------------------- -.align 32 -tgamma_from_0_to_2: -{ .mfi - getf.exp GR_Sign_Exp = FR_r02 - fms.s1 FR_r = FR_r02,f1,FR_Xmin - mov GR_ExpOf025 = 0xFFFD -} -{ .mfi - add GR_ad_Co = 0x1200,GR_ad_Data -(p6) fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 // t = 1 - r0*x -(p6) mov GR_Sig2 = 1 -};; -{ .mfi -(p6) getf.sig GR_Sig = FR_NormX - nop.f 0 -(p6) shl GR_Sig2 = GR_Sig2,63 -} -{ .mfi - add GR_ad_Ce = 0x1210,GR_ad_Data - nop.f 0 -(p6) mov GR_NzOvfBound = 0xFBFF -};; -{ .mfi - cmp.eq p8,p0 = GR_Sign_Exp,GR_ExpOf05 // r02 >= 1/2 - nop.f 0 - cmp.eq p9,p10 = GR_Sign_Exp,GR_ExpOf025 // r02 >= 1/4 -} -{ .mfi -(p6) cmp.ltu.unc p11,p0 = GR_Sign_Exp,GR_NzOvfBound // p11 <- overflow - nop.f 0 -(p6) cmp.eq.unc p12,p0 = GR_Sign_Exp,GR_NzOvfBound -};; -.pred.rel "mutex",p8,p9 -{ .mfi -(p8) add GR_ad_Co = 0x200,GR_ad_Co -(p6) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags -(p9) add GR_ad_Co = 0x100,GR_ad_Co -} -{ .mib -(p8) add GR_ad_Ce = 0x200,GR_ad_Ce -(p9) add GR_ad_Ce = 0x100,GR_ad_Ce -(p11) br.cond.spnt tgamma_ovf_near_0 //tgamma_spec_res -};; -{ .mfi - ldfe FR_A15 = [GR_ad_Co],32 - nop.f 0 -(p12) cmp.eq.unc p13,p0 = GR_Sig,GR_Sig2 -} -{ .mfb - ldfe FR_A14 = [GR_ad_Ce],32 - nop.f 0 -(p13) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_spec_res -};; -{ .mfi - ldfe FR_A13 = [GR_ad_Co],32 - nop.f 0 - nop.i 0 -} -{ .mfi - ldfe FR_A12 = [GR_ad_Ce],32 - nop.f 0 - nop.i 0 -};; -.pred.rel "mutex",p9,p10 -{ .mfi - ldfe FR_A11 = [GR_ad_Co],32 -(p10) fma.s1 FR_r2 = FR_r02,FR_r02,f0 - nop.i 0 -} -{ .mfi - ldfe FR_A10 = [GR_ad_Ce],32 -(p9) fma.s1 FR_r2 = FR_r,FR_r,f0 - nop.i 0 -};; -{ .mfi - ldfe FR_A9 = [GR_ad_Co],32 -(p6) fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 - nop.i 0 -} -{ .mfi - ldfe FR_A8 = [GR_ad_Ce],32 -(p10) fma.s1 FR_r = f0,f0,FR_r02 - nop.i 0 -};; -{ .mfi - ldfe FR_A7 = [GR_ad_Co],32 - nop.f 0 - nop.i 0 -} -{ .mfi - ldfe FR_A6 = [GR_ad_Ce],32 - nop.f 0 - nop.i 0 -};; -{ .mfi - ldfe FR_A5 = [GR_ad_Co],32 - nop.f 0 - nop.i 0 -} -{ .mfi - ldfe FR_A4 = [GR_ad_Ce],32 - nop.f 0 - nop.i 0 -};; -{ .mfi - ldfe FR_A3 = [GR_ad_Co],32 - nop.f 0 - nop.i 0 -} -{ .mfi - ldfe FR_A2 = [GR_ad_Ce],32 - nop.f 0 - nop.i 0 -};; -{ .mfi - ldfe FR_A1 = [GR_ad_Co],32 - fma.s1 FR_r4 = FR_r2,FR_r2,f0 - nop.i 0 -} -{ .mfi - ldfe FR_A0 = [GR_ad_Ce],32 - nop.f 0 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p6) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 // t = 1 - r1*x - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A15 = FR_A15,FR_r,FR_A14 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A11 = FR_A11,FR_r,FR_A10 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_r8 = FR_r4,FR_r4,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p6) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A15 = FR_A15,FR_r,FR_A13 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A11 = FR_A11,FR_r,FR_A9 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p6) fnma.s1 FR_Rcp3 = FR_Rcp2,FR_NormX,f1 // t = 1 - r1*x - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r,FR_A5 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A3 = FR_A3,FR_r,FR_A1 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A15 = FR_A15,FR_r,FR_A12 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A11 = FR_A11,FR_r,FR_A8 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p6) fma.s1 FR_Rcp3 = FR_Rcp2,FR_Rcp3,FR_Rcp2 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r,FR_A4 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A3 = FR_A3,FR_r,FR_A0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A15 = FR_A15,FR_r4,FR_A11 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r4,FR_A3 - nop.i 0 -};; -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fma.s1 FR_A15 = FR_A15,FR_r8,FR_A7 - nop.i 0 -} -{ .mfi - nop.m 0 -(p7) fma.d.s0 f8 = FR_A15,FR_r8,FR_A7 - nop.i 0 -};; -{ .mfb - nop.m 0 -(p6) fma.d.s0 f8 = FR_A15,FR_Rcp3,f0 - br.ret.sptk b0 -};; - -// overflow -//-------------------------------------------------------------------- -.align 32 -tgamma_ovf_near_0_boundary: -.pred.rel "mutex",p14,p15 -{ .mfi - mov GR_fpsr = ar.fpsr - nop.f 0 -(p15) mov r8 = 0x7ff -} -{ .mfi - nop.m 0 - nop.f 0 -(p14) mov r8 = 0xfff -};; -{ .mfi - nop.m 0 - nop.f 0 - shl r8 = r8,52 -};; -{ .mfi - sub r8 = r8,r0,1 - nop.f 0 - extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode -};; -.pred.rel "mutex",p14,p15 -{ .mfi - // set p8 to 0 in case of overflow and to 1 otherwise - // for negative arg: - // no overflow if rounding mode either Z or +Inf, i.e. - // GR_fpsr > 1 -(p14) cmp.lt p8,p0 = 1,GR_fpsr - nop.f 0 - // for positive arg: - // no overflow if rounding mode either Z or -Inf, i.e. - // (GR_fpsr & 1) == 0 -(p15) tbit.z p0,p8 = GR_fpsr,0 -};; -{ .mib -(p8) setf.d f8 = r8 // set result to 0x7fefffffffffffff without - // OVERFLOW flag raising - nop.i 0 -(p8) br.ret.sptk b0 -};; -.align 32 -tgamma_ovf_near_0: -{ .mfi - mov r8 = 0x1FFFE - nop.f 0 - nop.i 0 -};; -{ .mfi - setf.exp f9 = r8 - fmerge.s FR_X = f8,f8 - mov GR_TAG = 258 // overflow -};; -.pred.rel "mutex",p14,p15 -{ .mfi - nop.m 0 -(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result - nop.i 0 -} -{ .mfb - nop.m 0 -(p14) fnma.d.s0 f8 = f9,f9,f0 // Set I,O and -INF result - br.cond.sptk tgamma_libm_err -};; -// overflow or absolute value of x is too big -//-------------------------------------------------------------------- -.align 32 -tgamma_spec_res: -{ .mfi - mov GR_0x30033 = 0x30033 -(p14) fcmp.eq.unc.s1 p10,p11 = f8,FR_Xt -(p15) mov r8 = 0x1FFFE -};; -{ .mfi -(p15) setf.exp f9 = r8 - nop.f 0 - nop.i 0 -};; -{ .mfb -(p11) cmp.ltu.unc p7,p8 = GR_0x30033,GR_Sign_Exp - nop.f 0 -(p10) br.cond.spnt tgamma_singularity -};; -.pred.rel "mutex",p7,p8 -{ .mbb - nop.m 0 -(p7) br.cond.spnt tgamma_singularity -(p8) br.cond.spnt tgamma_underflow -};; -{ .mfi - nop.m 0 - fmerge.s FR_X = f8,f8 - mov GR_TAG = 258 // overflow -} -{ .mfb - nop.m 0 -(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result - br.cond.sptk tgamma_libm_err -};; - -// x is negative integer or +/-0 -//-------------------------------------------------------------------- -.align 32 -tgamma_singularity: -{ .mfi - nop.m 0 - fmerge.s FR_X = f8,f8 - mov GR_TAG = 259 // negative -} -{ .mfb - nop.m 0 - frcpa.s0 f8,p0 = f0,f0 - br.cond.sptk tgamma_libm_err -};; -// x is negative noninteger with big absolute value -//-------------------------------------------------------------------- -.align 32 -tgamma_underflow: -{ .mmi - getf.sig GR_Sig = FR_iXt - mov r11 = 0x00001 - nop.i 0 -};; -{ .mfi - setf.exp f9 = r11 - nop.f 0 - nop.i 0 -};; -{ .mfi - nop.m 0 - nop.f 0 - tbit.z p6,p7 = GR_Sig,0 -};; -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fms.d.s0 f8 = f9,f9,f9 - nop.i 0 -} -{ .mfb - nop.m 0 -(p7) fma.d.s0 f8 = f9,f9,f9 - br.ret.sptk b0 -};; - -// x for natval, nan, +/-inf or +/-0 -//-------------------------------------------------------------------- -.align 32 -tgamma_spec: -{ .mfi - nop.m 0 - fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf - nop.i 0 -};; -{ .mfi - nop.m 0 - fclass.m p7,p8 = f8,0x7 // +/-0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fmerge.s FR_X = f8,f8 - nop.i 0 -} -{ .mfb - nop.m 0 -(p6) fma.d.s0 f8 = f8,f1,f8 -(p6) br.ret.spnt b0 -};; -.pred.rel "mutex",p7,p8 -{ .mfi -(p7) mov GR_TAG = 259 // negative -(p7) frcpa.s0 f8,p0 = f1,f8 - nop.i 0 -} -{ .mib - nop.m 0 - nop.i 0 -(p8) br.cond.spnt tgamma_singularity -};; - -.align 32 -tgamma_libm_err: -{ .mfi - alloc r32 = ar.pfs,1,4,4,0 - nop.f 0 - mov GR_Parameter_TAG = GR_TAG -};; - -GLOBAL_LIBM_END(tgamma) - -LOCAL_LIBM_ENTRY(__libm_error_region) -.prologue -{ .mfi - add GR_Parameter_Y=-32,sp // Parameter 2 value - nop.f 0 -.save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs -} -{ .mfi -.fframe 64 - add sp=-64,sp // Create new stack - nop.f 0 - mov GR_SAVE_GP=gp // Save gp -};; -{ .mmi - stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack - add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 -};; -.body -{ .mib - stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 -} -{ .mib - stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y - br.call.sptk b0=__libm_error_support# // Call error handling function -};; -{ .mmi - nop.m 0 - nop.m 0 - add GR_Parameter_RESULT = 48,sp -};; -{ .mmi - ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack -.restore sp - add sp = 64,sp // Restore stack pointer - mov b0 = GR_SAVE_B0 // Restore return address -};; -{ .mib - mov gp = GR_SAVE_GP // Restore gp - mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs - br.ret.sptk b0 // Return -};; - -LOCAL_LIBM_END(__libm_error_region) -.type __libm_error_support#,@function -.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/w_tgamma_compat.S b/sysdeps/ia64/fpu/w_tgamma_compat.S new file mode 100644 index 0000000000..867815cf46 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgamma_compat.S @@ -0,0 +1,1835 @@ +.file "tgamma.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// 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. +// +// * The name of Intel Corporation may not 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 INTEL OR ITS +// 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. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 10/12/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/04/03 Changed error codes for overflow and negative integers +// 04/10/03 Changed code for overflow near zero handling +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: tgamma(x) computes the principle value of the GAMMA +// function of x. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f33-f87 +// +// General Purpose Registers: +// r8-r11 +// r14-r28 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgamma(+inf) = +inf +// tgamma(-inf) = QNaN +// tgamma(+/-0) = +/-inf +// tgamma(x<0, x - integer) = QNaN +// tgamma(SNaN) = QNaN +// tgamma(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; +// else if 0 < x < 2 use case tgamma_from_0_to_2; +// else if -(i+1) < x < -i, i = 0...184 use case tgamma_negatives; +// +// Case 2 <= x < OVERFLOW_BOUNDARY +// ------------------------------- +// Here we use algorithm based on the recursive formula +// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval +// [2; OVERFLOW_BOUNDARY] into intervals [16*n; 16*(n+1)] and +// approximate GAMMA(x) by polynomial of 22th degree on each +// [16*n; 16*n+1], recursive formula is used to expand GAMMA(x) +// to [16*n; 16*n+1]. In other words we need to find n, i and r +// such that x = 16 * n + i + r where n and i are integer numbers +// and r is fractional part of x. So GAMMA(x) = GAMMA(16*n+i+r) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(16*n+r) ~ +// ~ (x-1)*(x-2)*...*(x-i)*P22n(r). +// +// Step 1: Reduction +// ----------------- +// N = [x] with truncate +// r = x - N, note 0 <= r < 1 +// +// n = N & ~0xF - index of table that contains coefficient of +// polynomial approximation +// i = N & 0xF - is used in recursive formula +// +// +// Step 2: Approximation +// --------------------- +// We use factorized minimax approximation polynomials +// P22n(r) = A22*(r^2+C01(n)*R+C00(n))* +// *(r^2+C11(n)*R+C10(n))*...*(r^2+CA1(n)*R+CA0(n)) +// +// Step 3: Recursion +// ----------------- +// In case when i > 0 we need to multiply P22n(r) by product +// R(i)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions +// we can calculate R as follow: +// R(i) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is +// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* +// *(i-1) if i is odd. In both cases we need to calculate +// R2(i) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = +// = (x^2-3*x+2)*(x^2-7*x+12)*...*((x^2+x)+2*j*(2*(j-1)+(1-2*x))) = +// = (RA+2*(2-RB))*(RA+4*(4-RB))*...*(RA+2*j*(2*(j-1)+RB)) +// where j = 1..[i/2], RA = x^2+x, RB = 1-2*x. +// +// Step 4: Reconstruction +// ---------------------- +// Reconstruction is just simple multiplication i.e. +// GAMMA(x) = P22n(r)*R(i) +// +// Case 0 < x < 2 +// -------------- +// To calculate GAMMA(x) on this interval we do following +// if 1 <= x < 1.25 than GAMMA(x) = P15(x-1) +// if 1.25 <= x < 1.5 than GAMMA(x) = P15(x-x_min) where +// x_min is point of local minimum on [1; 2] interval. +// if 1.5 <= x < 2.0 than GAMMA(x) = P15(x-1.5) +// and +// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x +// +// Case -(i+1) < x < -i, i = 0...184 +// ---------------------------------- +// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and +// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of +// GAMMA(x) is described above. +// +// Step 1: Reduction +// ----------------- +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) +// i.e r = x - [x] with exception of cases +// when r > 0.5 (in such cases r = 1 - (x - [x])). +// +// Step 2: Approximation +// --------------------- +// To approximate sin(PI*x)/PI = sin(PI*(2*n+r))/PI = +// = (-1)^n*sin(PI*r)/PI Taylor series is used. +// sin(PI*r)/PI ~ S21(r). +// +// Step 3: Division +// ---------------- +// To calculate 1/(x*GAMMA(x)*S21(r)) we use frcpa instruction +// with following Newton-Raphson interations. +// +// +//********************************************************************* + +GR_Sig = r8 +GR_TAG = r8 +GR_ad_Data = r9 +GR_SigRqLin = r10 +GR_iSig = r11 +GR_ExpOf1 = r11 +GR_ExpOf8 = r11 + + +GR_Sig2 = r14 +GR_Addr_Mask1 = r15 +GR_Sign_Exp = r16 +GR_Tbl_Offs = r17 +GR_Addr_Mask2 = r18 +GR_ad_Co = r19 +GR_Bit2 = r19 +GR_ad_Ce = r20 +GR_ad_Co7 = r21 +GR_NzOvfBound = r21 +GR_ad_Ce7 = r22 +GR_Tbl_Ind = r23 +GR_Tbl_16xInd = r24 +GR_ExpOf025 = r24 +GR_ExpOf05 = r25 +GR_0x30033 = r26 +GR_10 = r26 +GR_12 = r27 +GR_185 = r27 +GR_14 = r28 +GR_2 = r28 +GR_fpsr = r28 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +FR_X = f10 +FR_Y = f1 // tgamma is single argument function +FR_RESULT = f8 + +FR_AbsX = f9 +FR_NormX = f9 +FR_r02 = f11 +FR_AbsXp1 = f12 +FR_X2pX = f13 +FR_1m2X = f14 +FR_Rq1 = f14 +FR_Xt = f15 + +FR_r = f33 +FR_OvfBound = f34 +FR_Xmin = f35 +FR_2 = f36 +FR_Rcp1 = f36 +FR_Rcp3 = f36 +FR_4 = f37 +FR_5 = f38 +FR_6 = f39 +FR_8 = f40 +FR_10 = f41 +FR_12 = f42 +FR_14 = f43 +FR_GAMMA = f43 +FR_05 = f44 + +FR_Rq2 = f45 +FR_Rq3 = f46 +FR_Rq4 = f47 +FR_Rq5 = f48 +FR_Rq6 = f49 +FR_Rq7 = f50 +FR_RqLin = f51 + +FR_InvAn = f52 + +FR_C01 = f53 +FR_A15 = f53 +FR_C11 = f54 +FR_A14 = f54 +FR_C21 = f55 +FR_A13 = f55 +FR_C31 = f56 +FR_A12 = f56 +FR_C41 = f57 +FR_A11 = f57 +FR_C51 = f58 +FR_A10 = f58 +FR_C61 = f59 +FR_A9 = f59 +FR_C71 = f60 +FR_A8 = f60 +FR_C81 = f61 +FR_A7 = f61 +FR_C91 = f62 +FR_A6 = f62 +FR_CA1 = f63 +FR_A5 = f63 +FR_C00 = f64 +FR_A4 = f64 +FR_rs2 = f64 +FR_C10 = f65 +FR_A3 = f65 +FR_rs3 = f65 +FR_C20 = f66 +FR_A2 = f66 +FR_rs4 = f66 +FR_C30 = f67 +FR_A1 = f67 +FR_rs7 = f67 +FR_C40 = f68 +FR_A0 = f68 +FR_rs8 = f68 +FR_C50 = f69 +FR_r2 = f69 +FR_C60 = f70 +FR_r3 = f70 +FR_C70 = f71 +FR_r4 = f71 +FR_C80 = f72 +FR_r7 = f72 +FR_C90 = f73 +FR_r8 = f73 +FR_CA0 = f74 +FR_An = f75 + +FR_S21 = f76 +FR_S19 = f77 +FR_Rcp0 = f77 +FR_Rcp2 = f77 +FR_S17 = f78 +FR_S15 = f79 +FR_S13 = f80 +FR_S11 = f81 +FR_S9 = f82 +FR_S7 = f83 +FR_S5 = f84 +FR_S3 = f85 + +FR_iXt = f86 +FR_rs = f87 + + +// Data tables +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(tgamma_data) +data8 0x406573FAE561F648 // overflow boundary (171.624376956302739927196) +data8 0x3FDD8B618D5AF8FE // point of local minium (0.461632144968362356785) +// +//[2; 3] +data8 0xEF0E85C9AE40ABE2,0x00004000 // C01 +data8 0xCA2049DDB4096DD8,0x00004000 // C11 +data8 0x99A203B4DC2D1A8C,0x00004000 // C21 +data8 0xBF5D9D9C0C295570,0x00003FFF // C31 +data8 0xE8DD037DEB833BAB,0x00003FFD // C41 +data8 0xB6AE39A2A36AA03A,0x0000BFFE // C51 +data8 0x804960DC2850277B,0x0000C000 // C61 +data8 0xD9F3973841C09F80,0x0000C000 // C71 +data8 0x9C198A676F8A2239,0x0000C001 // C81 +data8 0xC98B7DAE02BE3226,0x0000C001 // C91 +data8 0xE9CAF31AC69301BA,0x0000C001 // CA1 +data8 0xFBBDD58608A0D172,0x00004000 // C00 +data8 0xFDD0316D1E078301,0x00004000 // C10 +data8 0x8630B760468C15E4,0x00004001 // C20 +data8 0x93EDE20E47D9152E,0x00004001 // C30 +data8 0xA86F3A38C77D6B19,0x00004001 // C40 +//[16; 17] +data8 0xF87F757F365EE813,0x00004000 // C01 +data8 0xECA84FBA92759DA4,0x00004000 // C11 +data8 0xD4E0A55E07A8E913,0x00004000 // C21 +data8 0xB0EB45E94C8A5F7B,0x00004000 // C31 +data8 0x8050D6B4F7C8617D,0x00004000 // C41 +data8 0x8471B111AA691E5A,0x00003FFF // C51 +data8 0xADAF462AF96585C9,0x0000BFFC // C61 +data8 0xD327C7A587A8C32B,0x0000BFFF // C71 +data8 0xDEF5192B4CF5E0F1,0x0000C000 // C81 +data8 0xBADD64BB205AEF02,0x0000C001 // C91 +data8 0x9330A24AA67D6860,0x0000C002 // CA1 +data8 0xF57EEAF36D8C47BE,0x00004000 // C00 +data8 0x807092E12A251B38,0x00004001 // C10 +data8 0x8C458F80DEE7ED1C,0x00004001 // C20 +data8 0x9F30C731DC77F1A6,0x00004001 // C30 +data8 0xBAC4E7E099C3A373,0x00004001 // C40 +//[32; 33] +data8 0xC3059A415F142DEF,0x00004000 // C01 +data8 0xB9C1DAC24664587A,0x00004000 // C11 +data8 0xA7101D910992FFB2,0x00004000 // C21 +data8 0x8A9522B8E4AA0AB4,0x00004000 // C31 +data8 0xC76A271E4BA95DCC,0x00003FFF // C41 +data8 0xC5D6DE2A38DB7FF2,0x00003FFE // C51 +data8 0xDBA42086997818B2,0x0000BFFC // C61 +data8 0xB8EDDB1424C1C996,0x0000BFFF // C71 +data8 0xBF7372FB45524B5D,0x0000C000 // C81 +data8 0xA03DDE759131580A,0x0000C001 // C91 +data8 0xFDA6FC4022C1FFE3,0x0000C001 // CA1 +data8 0x9759ABF797B2533D,0x00004000 // C00 +data8 0x9FA160C6CF18CEC5,0x00004000 // C10 +data8 0xB0EFF1E3530E0FCD,0x00004000 // C20 +data8 0xCCD60D5C470165D1,0x00004000 // C30 +data8 0xF5E53F6307B0B1C1,0x00004000 // C40 +//[48; 49] +data8 0xAABE577FBCE37F5E,0x00004000 // C01 +data8 0xA274CAEEB5DF7172,0x00004000 // C11 +data8 0x91B90B6646C1B924,0x00004000 // C21 +data8 0xF06718519CA256D9,0x00003FFF // C31 +data8 0xAA9EE181C0E30263,0x00003FFF // C41 +data8 0xA07BDB5325CB28D2,0x00003FFE // C51 +data8 0x86C8B873204F9219,0x0000BFFD // C61 +data8 0xB0192C5D3E4787D6,0x0000BFFF // C71 +data8 0xB1E0A6263D4C19EF,0x0000C000 // C81 +data8 0x93BA32A118EAC9AE,0x0000C001 // C91 +data8 0xE942A39CD9BEE887,0x0000C001 // CA1 +data8 0xE838B0957B0D3D0D,0x00003FFF // C00 +data8 0xF60E0F00074FCF34,0x00003FFF // C10 +data8 0x89869936AE00C2A5,0x00004000 // C20 +data8 0xA0FE4E8AA611207F,0x00004000 // C30 +data8 0xC3B1229CFF1DDAFE,0x00004000 // C40 +//[64; 65] +data8 0x9C00DDF75CDC6183,0x00004000 // C01 +data8 0x9446AE9C0F6A833E,0x00004000 // C11 +data8 0x84ABC5083310B774,0x00004000 // C21 +data8 0xD9BA3A0977B1ED83,0x00003FFF // C31 +data8 0x989B18C99411D300,0x00003FFF // C41 +data8 0x886E66402318CE6F,0x00003FFE // C51 +data8 0x99028C2468F18F38,0x0000BFFD // C61 +data8 0xAB72D17DCD40CCE1,0x0000BFFF // C71 +data8 0xA9D9AC9BE42C2EF9,0x0000C000 // C81 +data8 0x8C11D983AA177AD2,0x0000C001 // C91 +data8 0xDC779E981C1F0F06,0x0000C001 // CA1 +data8 0xC1FD4AC85965E8D6,0x00003FFF // C00 +data8 0xCE3D2D909D389EC2,0x00003FFF // C10 +data8 0xE7F79980AD06F5D8,0x00003FFF // C20 +data8 0x88DD9F73C8680B5D,0x00004000 // C30 +data8 0xA7D6CB2CB2D46F9D,0x00004000 // C40 +//[80; 81] +data8 0x91C7FF4E993430D0,0x00004000 // C01 +data8 0x8A6E7AB83E45A7E9,0x00004000 // C11 +data8 0xF72D6382E427BEA9,0x00003FFF // C21 +data8 0xC9E2E4F9B3B23ED6,0x00003FFF // C31 +data8 0x8BEFEF56AE05D775,0x00003FFF // C41 +data8 0xEE9666AB6A185560,0x00003FFD // C51 +data8 0xA6AFAF5CEFAEE04D,0x0000BFFD // C61 +data8 0xA877EAFEF1F9C880,0x0000BFFF // C71 +data8 0xA45BD433048ECA15,0x0000C000 // C81 +data8 0x86BD1636B774CC2E,0x0000C001 // C91 +data8 0xD3721BE006E10823,0x0000C001 // CA1 +data8 0xA97EFABA91854208,0x00003FFF // C00 +data8 0xB4AF0AEBB3F97737,0x00003FFF // C10 +data8 0xCC38241936851B0B,0x00003FFF // C20 +data8 0xF282A6261006EA84,0x00003FFF // C30 +data8 0x95B8E9DB1BD45BAF,0x00004000 // C40 +//[96; 97] +data8 0x8A1FA3171B35A106,0x00004000 // C01 +data8 0x830D5B8843890F21,0x00004000 // C11 +data8 0xE98B0F1616677A23,0x00003FFF // C21 +data8 0xBDF8347F5F67D4EC,0x00003FFF // C31 +data8 0x825F15DE34EC055D,0x00003FFF // C41 +data8 0xD4846186B8AAC7BE,0x00003FFD // C51 +data8 0xB161093AB14919B1,0x0000BFFD // C61 +data8 0xA65758EEA4800EF4,0x0000BFFF // C71 +data8 0xA046B67536FA329C,0x0000C000 // C81 +data8 0x82BBEC1BCB9E9068,0x0000C001 // C91 +data8 0xCC9DE2B23BA91B0B,0x0000C001 // CA1 +data8 0x983B16148AF77F94,0x00003FFF // C00 +data8 0xA2A4D8EE90FEE5DD,0x00003FFF // C10 +data8 0xB89446FA37FF481C,0x00003FFF // C20 +data8 0xDC5572648485FB01,0x00003FFF // C30 +data8 0x88CD5D7DB976129A,0x00004000 // C40 +//[112; 113] +data8 0x8417098FD62AC5E3,0x00004000 // C01 +data8 0xFA7896486B779CBB,0x00003FFF // C11 +data8 0xDEC98B14AF5EEBD1,0x00003FFF // C21 +data8 0xB48E153C6BF0B5A3,0x00003FFF // C31 +data8 0xF597B038BC957582,0x00003FFE // C41 +data8 0xBFC6F0884A415694,0x00003FFD // C51 +data8 0xBA075A1392BDB5E5,0x0000BFFD // C61 +data8 0xA4B79E01B44C7DB4,0x0000BFFF // C71 +data8 0x9D12FA7711BFAB0F,0x0000C000 // C81 +data8 0xFF24C47C8E108AB4,0x0000C000 // C91 +data8 0xC7325EC86562606A,0x0000C001 // CA1 +data8 0x8B47DCD9E1610938,0x00003FFF // C00 +data8 0x9518B111B70F88B8,0x00003FFF // C10 +data8 0xA9CC197206F68682,0x00003FFF // C20 +data8 0xCB98294CC0D7A6A6,0x00003FFF // C30 +data8 0xFE09493EA9165181,0x00003FFF // C40 +//[128; 129] +data8 0xFE53D03442270D90,0x00003FFF // C01 +data8 0xF0F857BAEC1993E4,0x00003FFF // C11 +data8 0xD5FF6D70DBBC2FD3,0x00003FFF // C21 +data8 0xACDAA5F4988B1074,0x00003FFF // C31 +data8 0xE92E069F8AD75B54,0x00003FFE // C41 +data8 0xAEBB64645BD94234,0x00003FFD // C51 +data8 0xC13746249F39B43C,0x0000BFFD // C61 +data8 0xA36B74F5B6297A1F,0x0000BFFF // C71 +data8 0x9A77860DF180F6E5,0x0000C000 // C81 +data8 0xF9F8457D84410A0C,0x0000C000 // C91 +data8 0xC2BF44C649EB8597,0x0000C001 // CA1 +data8 0x81225E7489BCDC0E,0x00003FFF // C00 +data8 0x8A788A09CE0EED11,0x00003FFF // C10 +data8 0x9E2E6F86D1B1D89C,0x00003FFF // C20 +data8 0xBE6866B21CF6CCB5,0x00003FFF // C30 +data8 0xEE94426EC1486AAE,0x00003FFF // C40 +//[144; 145] +data8 0xF6113E09732A6497,0x00003FFF // C01 +data8 0xE900D45931B04FC8,0x00003FFF // C11 +data8 0xCE9FD58F745EBA5D,0x00003FFF // C21 +data8 0xA663A9636C864C86,0x00003FFF // C31 +data8 0xDEBF5315896CE629,0x00003FFE // C41 +data8 0xA05FEA415EBD7737,0x00003FFD // C51 +data8 0xC750F112BD9C4031,0x0000BFFD // C61 +data8 0xA2593A35C51C6F6C,0x0000BFFF // C71 +data8 0x9848E1DA7FB40C8C,0x0000C000 // C81 +data8 0xF59FEE87A5759A4B,0x0000C000 // C91 +data8 0xBF00203909E45A1D,0x0000C001 // CA1 +data8 0xF1D8E157200127E5,0x00003FFE // C00 +data8 0x81DD5397CB08D487,0x00003FFF // C10 +data8 0x94C1DC271A8B766F,0x00003FFF // C20 +data8 0xB3AFAF9B5D6EDDCF,0x00003FFF // C30 +data8 0xE1FB4C57CA81BE1E,0x00003FFF // C40 +//[160; 161] +data8 0xEEFFE5122AC72FFD,0x00003FFF // C01 +data8 0xE22F70BB52AD54B3,0x00003FFF // C11 +data8 0xC84FF021FE993EEA,0x00003FFF // C21 +data8 0xA0DA2208EB5B2752,0x00003FFF // C31 +data8 0xD5CDD2FCF8AD2DF5,0x00003FFE // C41 +data8 0x940BEC6DCD811A59,0x00003FFD // C51 +data8 0xCC954EF4FD4EBB81,0x0000BFFD // C61 +data8 0xA1712E29A8C04554,0x0000BFFF // C71 +data8 0x966B55DFB243521A,0x0000C000 // C81 +data8 0xF1E6A2B9CEDD0C4C,0x0000C000 // C91 +data8 0xBBC87BCC031012DB,0x0000C001 // CA1 +data8 0xE43974E6D2818583,0x00003FFE // C00 +data8 0xF5702A516B64C5B7,0x00003FFE // C10 +data8 0x8CEBCB1B32E19471,0x00003FFF // C20 +data8 0xAAC10F05BB77E0AF,0x00003FFF // C30 +data8 0xD776EFCAB205CC58,0x00003FFF // C40 +//[176; 177] +data8 0xE8DA614119811E5D,0x00003FFF // C01 +data8 0xDC415E0288B223D8,0x00003FFF // C11 +data8 0xC2D2243E44EC970E,0x00003FFF // C21 +data8 0x9C086664B5307BEA,0x00003FFF // C31 +data8 0xCE03D7A08B461156,0x00003FFE // C41 +data8 0x894BE3BAAAB66ADC,0x00003FFD // C51 +data8 0xD131EDD71A702D4D,0x0000BFFD // C61 +data8 0xA0A907CDDBE10898,0x0000BFFF // C71 +data8 0x94CC3CD9C765C808,0x0000C000 // C81 +data8 0xEEA85F237815FC0D,0x0000C000 // C91 +data8 0xB8FA04B023E43F91,0x0000C001 // CA1 +data8 0xD8B2C7D9FCBD7EF9,0x00003FFE // C00 +data8 0xE9566E93AAE7E38F,0x00003FFE // C10 +data8 0x8646E78AABEF0255,0x00003FFF // C20 +data8 0xA32AEDB62E304345,0x00003FFF // C30 +data8 0xCE83E40280EE7DF0,0x00003FFF // C40 +// +//[2; 3] +data8 0xC44FB47E90584083,0x00004001 // C50 +data8 0xE863EE77E1C45981,0x00004001 // C60 +data8 0x8AC15BE238B9D70E,0x00004002 // C70 +data8 0xA5D94B6592350EF4,0x00004002 // C80 +data8 0xC379DB3E20A148B3,0x00004002 // C90 +data8 0xDACA49B73974F6C9,0x00004002 // CA0 +data8 0x810E496A1AFEC895,0x00003FE1 // An +//[16; 17] +data8 0xE17C0357AAF3F817,0x00004001 // C50 +data8 0x8BA8804750FBFBFE,0x00004002 // C60 +data8 0xB18EAB3CB64BEBEE,0x00004002 // C70 +data8 0xE90AB7015AF1C28F,0x00004002 // C80 +data8 0xA0AB97CE9E259196,0x00004003 // C90 +data8 0xF5E0E0A000C2D720,0x00004003 // CA0 +data8 0xD97F0F87EC791954,0x00004005 // An +//[32; 33] +data8 0x980C293F3696040D,0x00004001 // C50 +data8 0xC0DBFFBB948A9A4E,0x00004001 // C60 +data8 0xFAB54625E9A588A2,0x00004001 // C70 +data8 0xA7E08176D6050FBF,0x00004002 // C80 +data8 0xEBAAEC4952270A9F,0x00004002 // C90 +data8 0xB7479CDAD20550FE,0x00004003 // CA0 +data8 0xAACD45931C3FF634,0x00004054 // An +//[48; 49] +data8 0xF5180F0000419AD5,0x00004000 // C50 +data8 0x9D507D07BFBB2273,0x00004001 // C60 +data8 0xCEB53F7A13A383E3,0x00004001 // C70 +data8 0x8BAFEF9E0A49128F,0x00004002 // C80 +data8 0xC58EF912D39E228C,0x00004002 // C90 +data8 0x9A88118422BA208E,0x00004003 // CA0 +data8 0xBD6C0E2477EC12CB,0x000040AC // An +//[64; 65] +data8 0xD410AC48BF7748DA,0x00004000 // C50 +data8 0x89399B90AFEBD931,0x00004001 // C60 +data8 0xB596DF8F77EB8560,0x00004001 // C70 +data8 0xF6D9445A047FB4A6,0x00004001 // C80 +data8 0xAF52F0DD65221357,0x00004002 // C90 +data8 0x8989B45BFC881989,0x00004003 // CA0 +data8 0xB7FCAE86E6E10D5A,0x0000410B // An +//[80; 81] +data8 0xBE759740E3B5AA84,0x00004000 // C50 +data8 0xF8037B1B07D27609,0x00004000 // C60 +data8 0xA4F6F6C7F0977D4F,0x00004001 // C70 +data8 0xE131960233BF02C4,0x00004001 // C80 +data8 0xA06DF43D3922BBE2,0x00004002 // C90 +data8 0xFC266AB27255A360,0x00004002 // CA0 +data8 0xD9F4B012EDAFEF2F,0x0000416F // An +//[96; 97] +data8 0xAEFC84CDA8E1EAA6,0x00004000 // C50 +data8 0xE5009110DB5F3C8A,0x00004000 // C60 +data8 0x98F5F48738E7B232,0x00004001 // C70 +data8 0xD17EE64E21FFDC6B,0x00004001 // C80 +data8 0x9596F7A7E36145CC,0x00004002 // C90 +data8 0xEB64DBE50E125CAF,0x00004002 // CA0 +data8 0xA090530D79E32D2E,0x000041D8 // An +//[112; 113] +data8 0xA33AEA22A16B2655,0x00004000 // C50 +data8 0xD682B93BD7D7945C,0x00004000 // C60 +data8 0x8FC854C6E6E30CC3,0x00004001 // C70 +data8 0xC5754D828AFFDC7A,0x00004001 // C80 +data8 0x8D41216B397139C2,0x00004002 // C90 +data8 0xDE78D746848116E5,0x00004002 // CA0 +data8 0xB8A297A2DC0630DB,0x00004244 // An +//[128; 129] +data8 0x99EB00F11D95E292,0x00004000 // C50 +data8 0xCB005CB911EB779A,0x00004000 // C60 +data8 0x8879AA2FDFF3A37A,0x00004001 // C70 +data8 0xBBDA538AD40CAC2C,0x00004001 // C80 +data8 0x8696D849D311B9DE,0x00004002 // C90 +data8 0xD41E1C041481199F,0x00004002 // CA0 +data8 0xEBA1A43D34EE61EE,0x000042B3 // An +//[144; 145] +data8 0x924F822578AA9F3D,0x00004000 // C50 +data8 0xC193FAF9D3B36960,0x00004000 // C60 +data8 0x827AE3A6B68ED0CA,0x00004001 // C70 +data8 0xB3F52A27EED23F0B,0x00004001 // C80 +data8 0x811A079FB3C94D79,0x00004002 // C90 +data8 0xCB94415470B6F8D2,0x00004002 // CA0 +data8 0x80A0260DCB3EC9AC,0x00004326 // An +//[160; 161] +data8 0x8BF24091E88B331D,0x00004000 // C50 +data8 0xB9ADE01187E65201,0x00004000 // C60 +data8 0xFAE4508F6E7625FE,0x00004000 // C70 +data8 0xAD516668AD6D7367,0x00004001 // C80 +data8 0xF8F5FF171154F637,0x00004001 // C90 +data8 0xC461321268990C82,0x00004002 // CA0 +data8 0xC3B693F344B0E6FE,0x0000439A // An +// +//[176; 177] +data8 0x868545EB42A258ED,0x00004000 // C50 +data8 0xB2EF04ACE8BA0E6E,0x00004000 // C60 +data8 0xF247D22C22E69230,0x00004000 // C70 +data8 0xA7A1AB93E3981A90,0x00004001 // C80 +data8 0xF10951733E2C697F,0x00004001 // C90 +data8 0xBE3359BFAD128322,0x00004002 // CA0 +data8 0x8000000000000000,0x00003fff +// +//[160; 161] for negatives +data8 0xA76DBD55B2E32D71,0x00003C63 // 1/An +// +// sin(pi*x)/pi +data8 0xBCBC4342112F52A2,0x00003FDE // S21 +data8 0xFAFCECB86536F655,0x0000BFE3 // S19 +data8 0x87E4C97F9CF09B92,0x00003FE9 // S17 +data8 0xEA124C68E704C5CB,0x0000BFED // S15 +data8 0x9BA38CFD59C8AA1D,0x00003FF2 // S13 +data8 0x99C0B552303D5B21,0x0000BFF6 // S11 +// +//[176; 177] for negatives +data8 0xBA5D5869211696FF,0x00003BEC // 1/An +// +// sin(pi*x)/pi +data8 0xD63402E79A853175,0x00003FF9 // S9 +data8 0xC354723906DB36BA,0x0000BFFC // S7 +data8 0xCFCE5A015E236291,0x00003FFE // S5 +data8 0xD28D3312983E9918,0x0000BFFF // S3 +// +// +// [1.0;1.25] +data8 0xA405530B067ECD3C,0x0000BFFC // A15 +data8 0xF5B5413F95E1C282,0x00003FFD // A14 +data8 0xC4DED71C782F76C8,0x0000BFFE // A13 +data8 0xECF7DDDFD27C9223,0x00003FFE // A12 +data8 0xFB73D31793068463,0x0000BFFE // A11 +data8 0xFF173B7E66FD1D61,0x00003FFE // A10 +data8 0xFFA5EF3959089E94,0x0000BFFE // A9 +data8 0xFF8153BD42E71A4F,0x00003FFE // A8 +data8 0xFEF9CAEE2CB5B533,0x0000BFFE // A7 +data8 0xFE3F02E5EDB6811E,0x00003FFE // A6 +data8 0xFB64074CED2658FB,0x0000BFFE // A5 +data8 0xFB52882A095B18A4,0x00003FFE // A4 +data8 0xE8508C7990A0DAC0,0x0000BFFE // A3 +data8 0xFD32C611D8A881D0,0x00003FFE // A2 +data8 0x93C467E37DB0C536,0x0000BFFE // A1 +data8 0x8000000000000000,0x00003FFF // A0 +// +// [1.25;1.5] +data8 0xD038092400619677,0x0000BFF7 // A15 +data8 0xEA6DE925E6EB8C8F,0x00003FF3 // A14 +data8 0xC53F83645D4597FC,0x0000BFF7 // A13 +data8 0xE366DB2FB27B7ECD,0x00003FF7 // A12 +data8 0xAC8FD5E11F6EEAD8,0x0000BFF8 // A11 +data8 0xFB14010FB3697785,0x00003FF8 // A10 +data8 0xB6F91CB5C371177B,0x0000BFF9 // A9 +data8 0x85A262C6F8FEEF71,0x00003FFA // A8 +data8 0xC038E6E3261568F9,0x0000BFFA // A7 +data8 0x8F4BDE8883232364,0x00003FFB // A6 +data8 0xBCFBBD5786537E9A,0x0000BFFB // A5 +data8 0xA4C08BAF0A559479,0x00003FFC // A4 +data8 0x85D74FA063E81476,0x0000BFFC // A3 +data8 0xDB629FB9BBDC1C4E,0x00003FFD // A2 +data8 0xF4F8FBC7C0C9D317,0x00003FC6 // A1 +data8 0xE2B6E4153A57746C,0x00003FFE // A0 +// +// [1.25;1.5] +data8 0x9533F9D3723B448C,0x0000BFF2 // A15 +data8 0xF1F75D3C561CBBAF,0x00003FF5 // A14 +data8 0xBA55A9A1FC883523,0x0000BFF8 // A13 +data8 0xB5D5E9E5104FA995,0x00003FFA // A12 +data8 0xFD84F35B70CD9AE2,0x0000BFFB // A11 +data8 0x87445235F4688CC5,0x00003FFD // A10 +data8 0xE7F236EBFB9F774E,0x0000BFFD // A9 +data8 0xA6605F2721F787CE,0x00003FFE // A8 +data8 0xCF579312AD7EAD72,0x0000BFFE // A7 +data8 0xE96254A2407A5EAC,0x00003FFE // A6 +data8 0xF41312A8572ED346,0x0000BFFE // A5 +data8 0xF9535027C1B1F795,0x00003FFE // A4 +data8 0xE7E82D0C613A8DE4,0x0000BFFE // A3 +data8 0xFD23CD9741B460B8,0x00003FFE // A2 +data8 0x93C30FD9781DBA88,0x0000BFFE // A1 +data8 0xFFFFF1781FDBEE84,0x00003FFE // A0 +LOCAL_OBJECT_END(tgamma_data) + + +//============================================================== +// Code +//============================================================== + +.section .text +GLOBAL_LIBM_ENTRY(tgamma) +{ .mfi + getf.exp GR_Sign_Exp = f8 + fma.s1 FR_1m2X = f8,f1,f8 // 2x + addl GR_ad_Data = @ltoff(tgamma_data), gp +} +{ .mfi + mov GR_ExpOf8 = 0x10002 // 8 + fcvt.fx.trunc.s1 FR_iXt = f8 // [x] + mov GR_ExpOf05 = 0xFFFE // 0.5 +};; +{ .mfi + getf.sig GR_Sig = f8 + fma.s1 FR_2 = f1,f1,f1 // 2 + mov GR_Addr_Mask1 = 0x780 +} +{ .mlx + setf.exp FR_8 = GR_ExpOf8 + movl GR_10 = 0x4024000000000000 +};; +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fcmp.lt.s1 p14,p15 = f8,f0 + tbit.z p12,p13 = GR_Sign_Exp,0x10 // p13 if x >= 2 +} +{ .mlx + and GR_Bit2 = 4,GR_Sign_Exp + movl GR_12 = 0x4028000000000000 +};; +{ .mfi + setf.d FR_10 = GR_10 + fma.s1 FR_r02 = f8,f1,f0 + extr.u GR_Tbl_Offs = GR_Sig,58,6 +} +{ .mfi +(p12) mov GR_Addr_Mask1 = r0 + fma.s1 FR_NormX = f8,f1,f0 + cmp.ne p8,p0 = GR_Bit2,r0 +};; +{ .mfi +(p8) shladd GR_Tbl_Offs = GR_Tbl_Offs,4,r0 + fclass.m p10,p0 = f8,0x1E7 // Test x for NaTVal, NaN, +/-0, +/-INF + tbit.nz p11,p0 = GR_Sign_Exp,1 +} +{ .mlx + add GR_Addr_Mask2 = GR_Addr_Mask1,GR_Addr_Mask1 + movl GR_14 = 0x402C000000000000 +};; +.pred.rel "mutex",p14,p15 +{ .mfi + setf.d FR_12 = GR_12 +(p14) fma.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| + tbit.nz p8,p9 = GR_Sign_Exp,0 +} +{ .mfi + ldfpd FR_OvfBound,FR_Xmin = [GR_ad_Data],16 +(p15) fms.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| +(p11) shladd GR_Tbl_Offs = GR_Tbl_Offs,2,r0 +};; +.pred.rel "mutex",p9,p8 +{ .mfi + setf.d FR_14 = GR_14 + fma.s1 FR_4 = FR_2,FR_2,f0 +(p8) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask1 +} +{ .mfi + setf.exp FR_05 = GR_ExpOf05 + fma.s1 FR_6 = FR_2,FR_2,FR_2 +(p9) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask2 +};; +.pred.rel "mutex",p9,p8 +{ .mfi +(p8) shladd GR_ad_Co = GR_Tbl_Offs,1,GR_ad_Data + fcvt.xf FR_Xt = FR_iXt // [x] +(p15) tbit.z.unc p11,p0 = GR_Sign_Exp,0x10 // p11 if 0 < x < 2 +} +{ .mfi +(p9) add GR_ad_Co = GR_ad_Data,GR_Tbl_Offs + fma.s1 FR_5 = FR_2,FR_2,f1 +(p15) cmp.lt.unc p7,p6 = GR_ExpOf05,GR_Sign_Exp // p7 if 0 < x < 1 +};; +{ .mfi + add GR_ad_Ce = 16,GR_ad_Co +(p11) frcpa.s1 FR_Rcp0,p0 = f1,f8 + sub GR_Tbl_Offs = GR_ad_Co,GR_ad_Data +} +{ .mfb + ldfe FR_C01 = [GR_ad_Co],32 +(p7) fms.s1 FR_r02 = FR_r02,f1,f1 + // jump if x is NaTVal, NaN, +/-0, +/-INF +(p10) br.cond.spnt tgamma_spec +};; +.pred.rel "mutex",p14,p15 +{ .mfi + ldfe FR_C11 = [GR_ad_Ce],32 +(p14) fms.s1 FR_X2pX = f8,f8,f8 // RA=x^2+|x| + shr GR_Tbl_Ind = GR_Tbl_Offs,8 +} +{ .mfb + ldfe FR_C21 = [GR_ad_Co],32 +(p15) fma.s1 FR_X2pX = f8,f8,f8 // RA=x^2+x + // jump if 0 < x < 2 +(p11) br.cond.spnt tgamma_from_0_to_2 +};; +{ .mfi + ldfe FR_C31 = [GR_ad_Ce],32 + fma.s1 FR_Rq2 = FR_2,f1,FR_1m2X // 2 + B + cmp.ltu p7,p0=0xB,GR_Tbl_Ind +} +{ .mfb + ldfe FR_C41 = [GR_ad_Co],32 + fma.s1 FR_Rq3 = FR_2,FR_2,FR_1m2X // 4 + B + // jump if GR_Tbl_Ind > 11, i.e |x| is more than 192 +(p7) br.cond.spnt tgamma_spec_res +};; +{ .mfi + ldfe FR_C51 = [GR_ad_Ce],32 + fma.s1 FR_Rq4 = FR_6,f1,FR_1m2X // 6 + B + shr GR_Tbl_Offs = GR_Tbl_Offs,1 +} +{ .mfi + ldfe FR_C61 = [GR_ad_Co],32 + fma.s1 FR_Rq5 = FR_4,FR_2,FR_1m2X // 8 + B + nop.i 0 +};; +{ .mfi + ldfe FR_C71 = [GR_ad_Ce],32 +(p14) fms.s1 FR_r = FR_Xt,f1,f8 // r = |x| - [|x|] + shr GR_Tbl_16xInd = GR_Tbl_Offs,3 +} +{ .mfi + ldfe FR_C81 = [GR_ad_Co],32 +(p15) fms.s1 FR_r = f8,f1,FR_Xt // r = x - [x] + add GR_ad_Data = 0xC00,GR_ad_Data +};; +{ .mfi + ldfe FR_C91 = [GR_ad_Ce],32 + fma.s1 FR_Rq6 = FR_5,FR_2,FR_1m2X // 10 + B +(p14) mov GR_0x30033 = 0x30033 +} +{ .mfi + ldfe FR_CA1 = [GR_ad_Co],32 + fma.s1 FR_Rq7 = FR_6,FR_2,FR_1m2X // 12 + B + sub GR_Tbl_Offs = GR_Tbl_Offs,GR_Tbl_16xInd +};; +{ .mfi + ldfe FR_C00 = [GR_ad_Ce],32 + fma.s1 FR_Rq1 = FR_Rq1,FR_2,FR_X2pX // (x-1)*(x-2) +(p13) cmp.eq.unc p8,p0 = r0,GR_Tbl_16xInd // index is 0 i.e. arg from [2;16) +} +{ .mfi + ldfe FR_C10 = [GR_ad_Co],32 +(p14) fms.s1 FR_AbsX = f0,f0,FR_NormX // absolute value of argument + add GR_ad_Co7 = GR_ad_Data,GR_Tbl_Offs +};; +{ .mfi + ldfe FR_C20 = [GR_ad_Ce],32 + fma.s1 FR_Rq2 = FR_Rq2,FR_4,FR_X2pX // (x-3)*(x-4) + add GR_ad_Ce7 = 16,GR_ad_Co7 +} +{ .mfi + ldfe FR_C30 = [GR_ad_Co],32 + fma.s1 FR_Rq3 = FR_Rq3,FR_6,FR_X2pX // (x-5)*(x-6) + nop.i 0 +};; +{ .mfi + ldfe FR_C40 = [GR_ad_Ce],32 + fma.s1 FR_Rq4 = FR_Rq4,FR_8,FR_X2pX // (x-7)*(x-8) +(p14) cmp.leu.unc p7,p0 = GR_0x30033,GR_Sign_Exp +} +{ .mfb + ldfe FR_C50 = [GR_ad_Co7],32 + fma.s1 FR_Rq5 = FR_Rq5,FR_10,FR_X2pX // (x-9)*(x-10) + // jump if x is less or equal to -2^52, i.e. x is big negative integer +(p7) br.cond.spnt tgamma_singularity +};; +{ .mfi + ldfe FR_C60 = [GR_ad_Ce7],32 + fma.s1 FR_C01 = FR_C01,f1,FR_r + add GR_ad_Ce = 0x560,GR_ad_Data +} +{ .mfi + ldfe FR_C70 = [GR_ad_Co7],32 + fma.s1 FR_rs = f0,f0,FR_r // reduced arg for sin(pi*x) + add GR_ad_Co = 0x550,GR_ad_Data +};; +{ .mfi + ldfe FR_C80 = [GR_ad_Ce7],32 + fma.s1 FR_C11 = FR_C11,f1,FR_r + nop.i 0 +} +{ .mfi + ldfe FR_C90 = [GR_ad_Co7],32 + fma.s1 FR_C21 = FR_C21,f1,FR_r + nop.i 0 +};; +.pred.rel "mutex",p12,p13 +{ .mfi +(p13) getf.sig GR_iSig = FR_iXt + fcmp.lt.s1 p11,p0 = FR_05,FR_r + mov GR_185 = 185 +} +{ .mfi + nop.m 0 + fma.s1 FR_Rq6 = FR_Rq6,FR_12,FR_X2pX // (x-11)*(x-12) + nop.i 0 +};; +{ .mfi + ldfe FR_CA0 = [GR_ad_Ce7],32 + fma.s1 FR_C31 = FR_C31,f1,FR_r +(p12) mov GR_iSig = 0 +} +{ .mfi + ldfe FR_An = [GR_ad_Co7],0x80 + fma.s1 FR_C41 = FR_C41,f1,FR_r + nop.i 0 +};; +{ .mfi +(p14) getf.sig GR_Sig = FR_r + fma.s1 FR_C51 = FR_C51,f1,FR_r +(p14) sub GR_iSig = r0,GR_iSig +} +{ .mfi + ldfe FR_S21 = [GR_ad_Co],32 + fma.s1 FR_C61 = FR_C61,f1,FR_r + nop.i 0 +};; +{ .mfi + ldfe FR_S19 = [GR_ad_Ce],32 + fma.s1 FR_C71 = FR_C71,f1,FR_r + and GR_SigRqLin = 0xF,GR_iSig +} +{ .mfi + ldfe FR_S17 = [GR_ad_Co],32 + fma.s1 FR_C81 = FR_C81,f1,FR_r + mov GR_2 = 2 +};; +{ .mfi +(p14) ldfe FR_InvAn = [GR_ad_Co7] + fma.s1 FR_C91 = FR_C91,f1,FR_r + // if significand of r is 0 tnan argument is negative integer +(p14) cmp.eq.unc p12,p0 = r0,GR_Sig +} +{ .mfb +(p8) sub GR_SigRqLin = GR_SigRqLin,GR_2 // subtract 2 if 2 <= x < 16 + fma.s1 FR_CA1 = FR_CA1,f1,FR_r + // jump if x is negative integer such that -2^52 < x < -185 +(p12) br.cond.spnt tgamma_singularity +};; +{ .mfi + setf.sig FR_Xt = GR_SigRqLin +(p11) fms.s1 FR_rs = f1,f1,FR_r +(p14) cmp.ltu.unc p7,p0 = GR_185,GR_iSig +} +{ .mfb + ldfe FR_S15 = [GR_ad_Ce],32 + fma.s1 FR_Rq7 = FR_Rq7,FR_14,FR_X2pX // (x-13)*(x-14) + // jump if x is noninteger such that -2^52 < x < -185 +(p7) br.cond.spnt tgamma_underflow +};; +{ .mfi + ldfe FR_S13 = [GR_ad_Co],48 + fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 + and GR_Sig2 = 0xE,GR_SigRqLin +} +{ .mfi + ldfe FR_S11 = [GR_ad_Ce],48 + fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 + nop.i 0 +};; +{ .mfi + ldfe FR_S9 = [GR_ad_Co],32 + fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 + // should we mul by polynomial of recursion? + cmp.eq p13,p12 = r0,GR_SigRqLin +} +{ .mfi + ldfe FR_S7 = [GR_ad_Ce],32 + fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 + nop.i 0 +};; +{ .mfi + ldfe FR_S5 = [GR_ad_Co],32 + fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 + nop.i 0 +} +{ .mfi + ldfe FR_S3 = [GR_ad_Ce],32 + fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C61 = FR_C61,FR_r,FR_C60 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C71 = FR_C71,FR_r,FR_C70 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_r,FR_C80 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C91 = FR_C91,FR_r,FR_C90 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_CA1 = FR_CA1,FR_r,FR_CA0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C11,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C31,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs2 = FR_rs,FR_rs,f0 +(p12) cmp.lt.unc p7,p0 = 2,GR_Sig2 // should mul by FR_Rq2? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C51,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 +(p12) cmp.lt.unc p9,p0 = 6,GR_Sig2 // should mul by FR_Rq4? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C61 = FR_C61,FR_C71,f0 +(p15) cmp.eq p11,p0 = r0,r0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq3 = FR_Rq3,FR_Rq4,f0 +(p12) cmp.lt.unc p8,p0 = 10,GR_Sig2 // should mul by FR_Rq6? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_C91,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq6,f0 +(p14) cmp.ltu p0,p11 = 0x9,GR_Tbl_Ind +};; +{ .mfi + nop.m 0 + fcvt.xf FR_RqLin = FR_Xt + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_CA1 = FR_CA1,FR_An,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S19 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S17 = FR_S17,FR_rs2,FR_S15 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs4 = FR_rs2,FR_rs2,f0 +(p12) cmp.lt.unc p8,p0 = 4,GR_Sig2 // should mul by FR_Rq3? +};; +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq3,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S13 = FR_S13,FR_rs2,FR_S11 +(p12) cmp.lt.unc p9,p0 = 12,GR_Sig2 // should mul by FR_Rq7? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C61,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq7,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_CA1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S9 = FR_S9,FR_rs2,FR_S7 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S5 = FR_S5,FR_rs2,FR_S3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rs3 = FR_rs2,FR_rs,f0 +(p12) tbit.nz.unc p6,p0 = GR_SigRqLin,0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs8 = FR_rs4,FR_rs4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs4,FR_S17 + mov GR_ExpOf1 = 0x2FFFF +} +{ .mfi + nop.m 0 +(p6) fms.s1 FR_RqLin = FR_AbsX,f1,FR_RqLin +(p12) cmp.lt.unc p8,p0 = 8,GR_Sig2 // should mul by FR_Rq5? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C41,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq5,f0 +(p14) cmp.gtu.unc p7,p0 = GR_Sign_Exp,GR_ExpOf1 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S13 = FR_S13,FR_rs4,FR_S9 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_C81 = FR_C81,FR_AbsX,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_AbsXp1 = f1,f1,FR_AbsX // |x|+1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fcmp.lt.unc.s1 p0,p10 = FR_AbsX,FR_OvfBound // x >= overflow_boundary + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rs7 = FR_rs4,FR_rs3,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S5 = FR_S5,FR_rs3,FR_rs + nop.i 0 +};; +{ .mib +(p14) cmp.lt p13,p0 = r0,r0 // set p13 to 0 if x < 0 +(p12) cmp.eq.unc p8,p9 = 1,GR_SigRqLin +(p10) br.cond.spnt tgamma_spec_res +};; +{ .mfi + getf.sig GR_Sig = FR_iXt +(p6) fma.s1 FR_Rq1 = FR_Rq1,FR_RqLin,f0 + // should we mul by polynomial of recursion? +(p15) cmp.eq.unc p0,p11 = r0,GR_SigRqLin +} +{ .mfb + nop.m 0 + fma.s1 FR_GAMMA = FR_C01,FR_C81,f0 +(p11) br.cond.spnt tgamma_positives +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs8,FR_S13 + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.d.s0 f8 = FR_C01,FR_C81,f0 +(p13) br.ret.spnt b0 +};; +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p9) fma.s1 FR_GAMMA = FR_GAMMA,FR_Rq1,f0 + tbit.z p6,p7 = GR_Sig,0 // p6 if sin<0, p7 if sin>0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_GAMMA = FR_GAMMA,FR_RqLin,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs7,FR_S5 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 + mov GR_Sig2 = 1 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA + cmp.ltu p13,p0 = GR_Sign_Exp,GR_ExpOf1 +};; +// NR method: ineration #1 +{ .mfi +(p13) getf.exp GR_Sign_Exp = FR_AbsX + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 // t = 1 - r0*x +(p13) shl GR_Sig2 = GR_Sig2,63 +};; +{ .mfi +(p13) getf.sig GR_Sig = FR_AbsX + nop.f 0 +(p13) mov GR_NzOvfBound = 0xFBFF +};; +{ .mfi +(p13) cmp.ltu.unc p8,p0 = GR_Sign_Exp,GR_NzOvfBound // p8 <- overflow + nop.f 0 +(p13) cmp.eq.unc p9,p0 = GR_Sign_Exp,GR_NzOvfBound +};; +{ .mfb + nop.m 0 +(p13) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags +(p8) br.cond.spnt tgamma_ovf_near_0 //tgamma_neg_overflow +};; +{ .mib + nop.m 0 +(p9) cmp.eq.unc p8,p0 = GR_Sig,GR_Sig2 +(p8) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_neg_overflow +};; +{ .mfi + nop.m 0 + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +};; +// NR method: ineration #2 +{ .mfi + nop.m 0 + fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +// NR method: ineration #3 +{ .mfi + nop.m 0 + fnma.s1 FR_Rcp3 = FR_Rcp2,FR_GAMMA,f1 // t = 1 - r2*x + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_Rcp2 = FR_Rcp2,FR_AbsXp1,f0 +(p14) cmp.ltu p10,p11 = 0x9,GR_Tbl_Ind +};; +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 0 +(p10) fma.s1 FR_GAMMA = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.d.s0 f8 = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p10) fma.d.s0 f8 = FR_GAMMA,FR_InvAn,f0 + br.ret.sptk b0 +};; + + +// here if x >= 3 +//-------------------------------------------------------------------- +.align 32 +tgamma_positives: +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p9) fma.d.s0 f8 = FR_GAMMA,FR_Rq1,f0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.d.s0 f8 = FR_GAMMA,FR_RqLin,f0 + br.ret.sptk b0 +};; + +// here if 0 < x < 1 +//-------------------------------------------------------------------- +.align 32 +tgamma_from_0_to_2: +{ .mfi + getf.exp GR_Sign_Exp = FR_r02 + fms.s1 FR_r = FR_r02,f1,FR_Xmin + mov GR_ExpOf025 = 0xFFFD +} +{ .mfi + add GR_ad_Co = 0x1200,GR_ad_Data +(p6) fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 // t = 1 - r0*x +(p6) mov GR_Sig2 = 1 +};; +{ .mfi +(p6) getf.sig GR_Sig = FR_NormX + nop.f 0 +(p6) shl GR_Sig2 = GR_Sig2,63 +} +{ .mfi + add GR_ad_Ce = 0x1210,GR_ad_Data + nop.f 0 +(p6) mov GR_NzOvfBound = 0xFBFF +};; +{ .mfi + cmp.eq p8,p0 = GR_Sign_Exp,GR_ExpOf05 // r02 >= 1/2 + nop.f 0 + cmp.eq p9,p10 = GR_Sign_Exp,GR_ExpOf025 // r02 >= 1/4 +} +{ .mfi +(p6) cmp.ltu.unc p11,p0 = GR_Sign_Exp,GR_NzOvfBound // p11 <- overflow + nop.f 0 +(p6) cmp.eq.unc p12,p0 = GR_Sign_Exp,GR_NzOvfBound +};; +.pred.rel "mutex",p8,p9 +{ .mfi +(p8) add GR_ad_Co = 0x200,GR_ad_Co +(p6) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags +(p9) add GR_ad_Co = 0x100,GR_ad_Co +} +{ .mib +(p8) add GR_ad_Ce = 0x200,GR_ad_Ce +(p9) add GR_ad_Ce = 0x100,GR_ad_Ce +(p11) br.cond.spnt tgamma_ovf_near_0 //tgamma_spec_res +};; +{ .mfi + ldfe FR_A15 = [GR_ad_Co],32 + nop.f 0 +(p12) cmp.eq.unc p13,p0 = GR_Sig,GR_Sig2 +} +{ .mfb + ldfe FR_A14 = [GR_ad_Ce],32 + nop.f 0 +(p13) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_spec_res +};; +{ .mfi + ldfe FR_A13 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A12 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + ldfe FR_A11 = [GR_ad_Co],32 +(p10) fma.s1 FR_r2 = FR_r02,FR_r02,f0 + nop.i 0 +} +{ .mfi + ldfe FR_A10 = [GR_ad_Ce],32 +(p9) fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +{ .mfi + ldfe FR_A9 = [GR_ad_Co],32 +(p6) fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +} +{ .mfi + ldfe FR_A8 = [GR_ad_Ce],32 +(p10) fma.s1 FR_r = f0,f0,FR_r02 + nop.i 0 +};; +{ .mfi + ldfe FR_A7 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A6 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A5 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A4 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A3 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A2 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A1 = [GR_ad_Co],32 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 + nop.i 0 +} +{ .mfi + ldfe FR_A0 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r8 = FR_r4,FR_r4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A9 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rcp3 = FR_Rcp2,FR_NormX,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A8 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_Rcp3 = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r4,FR_A11 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r4,FR_A3 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s1 FR_A15 = FR_A15,FR_r8,FR_A7 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = FR_A15,FR_r8,FR_A7 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = FR_A15,FR_Rcp3,f0 + br.ret.sptk b0 +};; + +// overflow +//-------------------------------------------------------------------- +.align 32 +tgamma_ovf_near_0_boundary: +.pred.rel "mutex",p14,p15 +{ .mfi + mov GR_fpsr = ar.fpsr + nop.f 0 +(p15) mov r8 = 0x7ff +} +{ .mfi + nop.m 0 + nop.f 0 +(p14) mov r8 = 0xfff +};; +{ .mfi + nop.m 0 + nop.f 0 + shl r8 = r8,52 +};; +{ .mfi + sub r8 = r8,r0,1 + nop.f 0 + extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode +};; +.pred.rel "mutex",p14,p15 +{ .mfi + // set p8 to 0 in case of overflow and to 1 otherwise + // for negative arg: + // no overflow if rounding mode either Z or +Inf, i.e. + // GR_fpsr > 1 +(p14) cmp.lt p8,p0 = 1,GR_fpsr + nop.f 0 + // for positive arg: + // no overflow if rounding mode either Z or -Inf, i.e. + // (GR_fpsr & 1) == 0 +(p15) tbit.z p0,p8 = GR_fpsr,0 +};; +{ .mib +(p8) setf.d f8 = r8 // set result to 0x7fefffffffffffff without + // OVERFLOW flag raising + nop.i 0 +(p8) br.ret.sptk b0 +};; +.align 32 +tgamma_ovf_near_0: +{ .mfi + mov r8 = 0x1FFFE + nop.f 0 + nop.i 0 +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 258 // overflow +};; +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fnma.d.s0 f8 = f9,f9,f0 // Set I,O and -INF result + br.cond.sptk tgamma_libm_err +};; +// overflow or absolute value of x is too big +//-------------------------------------------------------------------- +.align 32 +tgamma_spec_res: +{ .mfi + mov GR_0x30033 = 0x30033 +(p14) fcmp.eq.unc.s1 p10,p11 = f8,FR_Xt +(p15) mov r8 = 0x1FFFE +};; +{ .mfi +(p15) setf.exp f9 = r8 + nop.f 0 + nop.i 0 +};; +{ .mfb +(p11) cmp.ltu.unc p7,p8 = GR_0x30033,GR_Sign_Exp + nop.f 0 +(p10) br.cond.spnt tgamma_singularity +};; +.pred.rel "mutex",p7,p8 +{ .mbb + nop.m 0 +(p7) br.cond.spnt tgamma_singularity +(p8) br.cond.spnt tgamma_underflow +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 258 // overflow +} +{ .mfb + nop.m 0 +(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result + br.cond.sptk tgamma_libm_err +};; + +// x is negative integer or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgamma_singularity: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 259 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk tgamma_libm_err +};; +// x is negative noninteger with big absolute value +//-------------------------------------------------------------------- +.align 32 +tgamma_underflow: +{ .mmi + getf.sig GR_Sig = FR_iXt + mov r11 = 0x00001 + nop.i 0 +};; +{ .mfi + setf.exp f9 = r11 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + tbit.z p6,p7 = GR_Sig,0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.d.s0 f8 = f9,f9,f9 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = f9,f9,f9 + br.ret.sptk b0 +};; + +// x for natval, nan, +/-inf or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgamma_spec: +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = f8,f1,f8 +(p6) br.ret.spnt b0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_TAG = 259 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 +(p8) br.cond.spnt tgamma_singularity +};; + +.align 32 +tgamma_libm_err: +{ .mfi + alloc r32 = ar.pfs,1,4,4,0 + nop.f 0 + mov GR_Parameter_TAG = GR_TAG +};; + +GLOBAL_LIBM_END(tgamma) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/w_tgammaf.S b/sysdeps/ia64/fpu/w_tgammaf.S deleted file mode 100644 index 0fbd840adb..0000000000 --- a/sysdeps/ia64/fpu/w_tgammaf.S +++ /dev/null @@ -1,1330 +0,0 @@ -.file "tgammaf.s" - - -// Copyright (c) 2001 - 2005, Intel Corporation -// All rights reserved. -// -// Contributed 2001 by the Intel Numerics Group, Intel Corporation -// -// 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. -// -// * The name of Intel Corporation may not 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 INTEL OR ITS -// 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. -// -// Intel Corporation is the author of this code,and requests that all -// problem reports or change requests be submitted to it directly at -// http://www.intel.com/software/products/opensource/libraries/num.htm. -// -//********************************************************************* -// -// History: -// 11/30/01 Initial version -// 05/20/02 Cleaned up namespace and sf0 syntax -// 02/10/03 Reordered header: .section, .global, .proc, .align -// 04/04/03 Changed error codes for overflow and negative integers -// 04/10/03 Changed code for overflow near zero handling -// 12/16/03 Fixed parameter passing to/from error handling routine -// 03/31/05 Reformatted delimiters between data tables -// -//********************************************************************* -// -//********************************************************************* -// -// Function: tgammaf(x) computes the principle value of the GAMMA -// function of x. -// -//********************************************************************* -// -// Resources Used: -// -// Floating-Point Registers: f8-f15 -// f33-f75 -// -// General Purpose Registers: -// r8-r11 -// r14-r29 -// r32-r36 -// r37-r40 (Used to pass arguments to error handling routine) -// -// Predicate Registers: p6-p15 -// -//********************************************************************* -// -// IEEE Special Conditions: -// -// tgammaf(+inf) = +inf -// tgammaf(-inf) = QNaN -// tgammaf(+/-0) = +/-inf -// tgammaf(x<0, x - integer) = QNaN -// tgammaf(SNaN) = QNaN -// tgammaf(QNaN) = QNaN -// -//********************************************************************* -// -// Overview -// -// The method consists of three cases. -// -// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; -// else if 0 < x < 2 use case tgamma_from_0_to_2; -// else if -(i+1) < x < -i, i = 0...43 use case tgamma_negatives; -// -// Case 2 <= x < OVERFLOW_BOUNDARY -// ------------------------------- -// Here we use algorithm based on the recursive formula -// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval -// [2; OVERFLOW_BOUNDARY] into intervals [8*n; 8*(n+1)] and -// approximate GAMMA(x) by polynomial of 22th degree on each -// [8*n; 8*n+1], recursive formula is used to expand GAMMA(x) -// to [8*n; 8*n+1]. In other words we need to find n, i and r -// such that x = 8 * n + i + r where n and i are integer numbers -// and r is fractional part of x. So GAMMA(x) = GAMMA(8*n+i+r) = -// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = -// = (x-1)*(x-2)*...*(x-i)*GAMMA(8*n+r) ~ -// ~ (x-1)*(x-2)*...*(x-i)*P12n(r). -// -// Step 1: Reduction -// ----------------- -// N = [x] with truncate -// r = x - N, note 0 <= r < 1 -// -// n = N & ~0xF - index of table that contains coefficient of -// polynomial approximation -// i = N & 0xF - is used in recursive formula -// -// -// Step 2: Approximation -// --------------------- -// We use factorized minimax approximation polynomials -// P12n(r) = A12*(r^2+C01(n)*r+C00(n))* -// *(r^2+C11(n)*r+C10(n))*...*(r^2+C51(n)*r+C50(n)) -// -// Step 3: Recursion -// ----------------- -// In case when i > 0 we need to multiply P12n(r) by product -// R(i,x)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions -// we can calculate R as follow: -// R(i,x) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is -// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* -// *(i-1) if i is odd. In both cases we need to calculate -// R2(i,x) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = -// = ((x^2-x)+2*(1-x))*((x^2-x)+6*(2-x))*...*((x^2-x)+2*(2*j-1)*(j-x)) = -// = (RA+2*RB)*(RA+6*(1-RB))*...*(RA+2*(2*j-1)*(j-1+RB)) -// where j = 1..[i/2], RA = x^2-x, RB = 1-x. -// -// Step 4: Reconstruction -// ---------------------- -// Reconstruction is just simple multiplication i.e. -// GAMMA(x) = P12n(r)*R(i,x) -// -// Case 0 < x < 2 -// -------------- -// To calculate GAMMA(x) on this interval we do following -// if 1.0 <= x < 1.25 than GAMMA(x) = P7(x-1) -// if 1.25 <= x < 1.5 than GAMMA(x) = P7(x-x_min) where -// x_min is point of local minimum on [1; 2] interval. -// if 1.5 <= x < 1.75 than GAMMA(x) = P7(x-1.5) -// if 1.75 <= x < 2.0 than GAMMA(x) = P7(x-1.5) -// and -// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x -// -// Case -(i+1) < x < -i, i = 0...43 -// ---------------------------------- -// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and -// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of -// GAMMA(x) is described above. -// -// Step 1: Reduction -// ----------------- -// Note that period of sin(PI*x) is 2 and range reduction for -// sin(PI*x) is like to range reduction for GAMMA(x) -// i.e rs = x - round(x) and |rs| <= 0.5. -// -// Step 2: Approximation -// --------------------- -// To approximate sin(PI*x)/PI = sin(PI*(2*n+rs))/PI = -// = (-1)^n*sin(PI*rs)/PI Taylor series is used. -// sin(PI*rs)/PI ~ S17(rs). -// -// Step 3: Division -// ---------------- -// To calculate 1/x and 1/(GAMMA(x)*S12(rs)) we use frcpa -// instruction with following Newton-Raphson interations. -// -// -//********************************************************************* - -GR_ad_Data = r8 -GR_TAG = r8 -GR_SignExp = r9 -GR_Sig = r10 -GR_ArgNz = r10 -GR_RqDeg = r11 - -GR_NanBound = r14 -GR_ExpOf025 = r15 -GR_ExpOf05 = r16 -GR_ad_Co = r17 -GR_ad_Ce = r18 -GR_TblOffs = r19 -GR_Arg = r20 -GR_Exp2Ind = r21 -GR_TblOffsMask = r21 -GR_Offs = r22 -GR_OvfNzBound = r23 -GR_ZeroResBound = r24 -GR_ad_SinO = r25 -GR_ad_SinE = r26 -GR_Correction = r27 -GR_Tbl12Offs = r28 -GR_NzBound = r28 -GR_ExpOf1 = r29 -GR_fpsr = r29 - -GR_SAVE_B0 = r33 -GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 -GR_SAVE_SP = r36 - -GR_Parameter_X = r37 -GR_Parameter_Y = r38 -GR_Parameter_RESULT = r39 -GR_Parameter_TAG = r40 - - -FR_X = f10 -FR_Y = f1 -FR_RESULT = f8 - -FR_iXt = f11 -FR_Xt = f12 -FR_r = f13 -FR_r2 = f14 -FR_r4 = f15 - -FR_C01 = f33 -FR_A7 = f33 -FR_C11 = f34 -FR_A6 = f34 -FR_C21 = f35 -FR_A5 = f35 -FR_C31 = f36 -FR_A4 = f36 -FR_C41 = f37 -FR_A3 = f37 -FR_C51 = f38 -FR_A2 = f38 - -FR_C00 = f39 -FR_A1 = f39 -FR_C10 = f40 -FR_A0 = f40 -FR_C20 = f41 -FR_C30 = f42 -FR_C40 = f43 -FR_C50 = f44 -FR_An = f45 -FR_OvfBound = f46 -FR_InvAn = f47 - -FR_Multplr = f48 -FR_NormX = f49 -FR_X2mX = f50 -FR_1mX = f51 -FR_Rq0 = f51 -FR_Rq1 = f52 -FR_Rq2 = f53 -FR_Rq3 = f54 - -FR_Rcp0 = f55 -FR_Rcp1 = f56 -FR_Rcp2 = f57 - -FR_InvNormX1 = f58 -FR_InvNormX2 = f59 - -FR_rs = f60 -FR_rs2 = f61 - -FR_LocalMin = f62 -FR_10 = f63 - -FR_05 = f64 - -FR_S32 = f65 -FR_S31 = f66 -FR_S01 = f67 -FR_S11 = f68 -FR_S21 = f69 -FR_S00 = f70 -FR_S10 = f71 -FR_S20 = f72 - -FR_GAMMA = f73 -FR_2 = f74 -FR_6 = f75 - - - - -// Data tables -//============================================================== -RODATA -.align 16 -LOCAL_OBJECT_START(tgammaf_data) -data8 0x3FDD8B618D5AF8FE // local minimum (0.461632144968362356785) -data8 0x4024000000000000 // 10.0 -data8 0x3E90FC992FF39E13 // S32 -data8 0xBEC144B2760626E2 // S31 -// -//[2; 8) -data8 0x4009EFD1BA0CB3B4 // C01 -data8 0x3FFFB35378FF4822 // C11 -data8 0xC01032270413B896 // C41 -data8 0xC01F171A4C0D6827 // C51 -data8 0x40148F8E197396AC // C20 -data8 0x401C601959F1249C // C30 -data8 0x3EE21AD881741977 // An -data8 0x4041852200000000 // overflow boundary (35.04010009765625) -data8 0x3FD9CE68F695B198 // C21 -data8 0xBFF8C30AC900DA03 // C31 -data8 0x400E17D2F0535C02 // C00 -data8 0x4010689240F7FAC8 // C10 -data8 0x402563147DDCCF8D // C40 -data8 0x4033406D0480A21C // C50 -// -//[8; 16) -data8 0x4006222BAE0B793B // C01 -data8 0x4002452733473EDA // C11 -data8 0xC0010EF3326FDDB3 // C41 -data8 0xC01492B817F99C0F // C51 -data8 0x40099C905A249B75 // C20 -data8 0x4012B972AE0E533D // C30 -data8 0x3FE6F6DB91D0D4CC // An -data8 0x4041852200000000 // overflow boundary -data8 0x3FF545828F7B73C5 // C21 -data8 0xBFBBD210578764DF // C31 -data8 0x4000542098F53CFC // C00 -data8 0x40032C1309AD6C81 // C10 -data8 0x401D7331E19BD2E1 // C40 -data8 0x402A06807295EF57 // C50 -// -//[16; 24) -data8 0x4000131002867596 // C01 -data8 0x3FFAA362D5D1B6F2 // C11 -data8 0xBFFCB6985697DB6D // C41 -data8 0xC0115BEE3BFC3B3B // C51 -data8 0x3FFE62FF83456F73 // C20 -data8 0x4007E33478A114C4 // C30 -data8 0x41E9B2B73795ED57 // An -data8 0x4041852200000000 // overflow boundary -data8 0x3FEEB1F345BC2769 // C21 -data8 0xBFC3BBE6E7F3316F // C31 -data8 0x3FF14E07DA5E9983 // C00 -data8 0x3FF53B76BF81E2C0 // C10 -data8 0x4014051E0269A3DC // C40 -data8 0x40229D4227468EDB // C50 -// -//[24; 32) -data8 0x3FFAF7BD498384DE // C01 -data8 0x3FF62AD8B4D1C3D2 // C11 -data8 0xBFFABCADCD004C32 // C41 -data8 0xC00FADE97C097EC9 // C51 -data8 0x3FF6DA9ED737707E // C20 -data8 0x4002A29E9E0C782C // C30 -data8 0x44329D5B5167C6C3 // An -data8 0x4041852200000000 // overflow boundary -data8 0x3FE8943CBBB4B727 // C21 -data8 0xBFCB39D466E11756 // C31 -data8 0x3FE879AF3243D8C1 // C00 -data8 0x3FEEC7DEBB14CE1E // C10 -data8 0x401017B79BA80BCB // C40 -data8 0x401E941DC3C4DE80 // C50 -// -//[32; 40) -data8 0x3FF7ECB3A0E8FE5C // C01 -data8 0x3FF3815A8516316B // C11 -data8 0xBFF9ABD8FCC000C3 // C41 -data8 0xC00DD89969A4195B // C51 -data8 0x3FF2E43139CBF563 // C20 -data8 0x3FFF96DC3474A606 // C30 -data8 0x46AFF4CA9B0DDDF0 // An -data8 0x4041852200000000 // overflow boundary -data8 0x3FE4CE76DA1B5783 // C21 -data8 0xBFD0524DB460BC4E // C31 -data8 0x3FE35852DF14E200 // C00 -data8 0x3FE8C7610359F642 // C10 -data8 0x400BCF750EC16173 // C40 -data8 0x401AC14E02EA701C // C50 -// -//[40; 48) -data8 0x3FF5DCE4D8193097 // C01 -data8 0x3FF1B0D8C4974FFA // C11 -data8 0xBFF8FB450194CAEA // C41 -data8 0xC00C9658E030A6C4 // C51 -data8 0x3FF068851118AB46 // C20 -data8 0x3FFBF7C7BB46BF7D // C30 -data8 0x3FF0000000000000 // An -data8 0x4041852200000000 // overflow boundary -data8 0x3FE231DEB11D847A // C21 -data8 0xBFD251ECAFD7E935 // C31 -data8 0x3FE0368AE288F6BF // C00 -data8 0x3FE513AE4215A70C // C10 -data8 0x4008F960F7141B8B // C40 -data8 0x40183BA08134397B // C50 -// -//[1.0; 1.25) -data8 0xBFD9909648921868 // A7 -data8 0x3FE96FFEEEA8520F // A6 -data8 0xBFED0800D93449B8 // A3 -data8 0x3FEFA648D144911C // A2 -data8 0xBFEE3720F7720B4D // A5 -data8 0x3FEF4857A010CA3B // A4 -data8 0xBFE2788CCD545AA4 // A1 -data8 0x3FEFFFFFFFE9209E // A0 -// -//[1.25; 1.5) -data8 0xBFB421236426936C // A7 -data8 0x3FAF237514F36691 // A6 -data8 0xBFC0BADE710A10B9 // A3 -data8 0x3FDB6C5465BBEF1F // A2 -data8 0xBFB7E7F83A546EBE // A5 -data8 0x3FC496A01A545163 // A4 -data8 0xBDEE86A39D8452EB // A1 -data8 0x3FEC56DC82A39AA2 // A0 -// -//[1.5; 1.75) -data8 0xBF94730B51795867 // A7 -data8 0x3FBF4203E3816C7B // A6 -data8 0xBFE85B427DBD23E4 // A3 -data8 0x3FEE65557AB26771 // A2 -data8 0xBFD59D31BE3AB42A // A5 -data8 0x3FE3C90CC8F09147 // A4 -data8 0xBFE245971DF735B8 // A1 -data8 0x3FEFFC613AE7FBC8 // A0 -// -//[1.75; 2.0) -data8 0xBF7746A85137617E // A7 -data8 0x3FA96E37D09735F3 // A6 -data8 0xBFE3C24AC40AC0BB // A3 -data8 0x3FEC56A80A977CA5 // A2 -data8 0xBFC6F0E707560916 // A5 -data8 0x3FDB262D949175BE // A4 -data8 0xBFE1C1AEDFB25495 // A1 -data8 0x3FEFEE1E644B2022 // A0 -// -// sin(pi*x)/pi -data8 0xC026FB0D377656CC // S01 -data8 0x3FFFB15F95A22324 // S11 -data8 0x406CE58F4A41C6E7 // S10 -data8 0x404453786302C61E // S20 -data8 0xC023D59A47DBFCD3 // S21 -data8 0x405541D7ABECEFCA // S00 -// -// 1/An for [40; 48) -data8 0xCAA7576DE621FCD5, 0x3F68 -LOCAL_OBJECT_END(tgammaf_data) - -//============================================================== -// Code -//============================================================== - -.section .text -GLOBAL_LIBM_ENTRY(tgammaf) -{ .mfi - getf.exp GR_SignExp = f8 - fma.s1 FR_NormX = f8,f1,f0 - addl GR_ad_Data = @ltoff(tgammaf_data), gp -} -{ .mfi - mov GR_ExpOf05 = 0xFFFE - fcvt.fx.trunc.s1 FR_iXt = f8 // [x] - mov GR_Offs = 0 // 2 <= x < 8 -};; -{ .mfi - getf.d GR_Arg = f8 - fcmp.lt.s1 p14,p15 = f8,f0 - mov GR_Tbl12Offs = 0 -} -{ .mfi - setf.exp FR_05 = GR_ExpOf05 - fma.s1 FR_2 = f1,f1,f1 // 2 - mov GR_Correction = 0 -};; -{ .mfi - ld8 GR_ad_Data = [GR_ad_Data] - fclass.m p10,p0 = f8,0x1E7 // is x NaTVal, NaN, +/-0 or +/-INF? - tbit.z p12,p13 = GR_SignExp,16 // p13 if |x| >= 2 -} -{ .mfi - mov GR_ExpOf1 = 0xFFFF - fcvt.fx.s1 FR_rs = f8 // round(x) - and GR_Exp2Ind = 7,GR_SignExp -};; -.pred.rel "mutex",p14,p15 -{ .mfi -(p15) cmp.eq.unc p11,p0 = GR_ExpOf1,GR_SignExp // p11 if 1 <= x < 2 -(p14) fma.s1 FR_1mX = f1,f1,f8 // 1 - |x| - mov GR_Sig = 0 // if |x| < 2 -} -{ .mfi -(p13) cmp.eq.unc p7,p0 = 2,GR_Exp2Ind -(p15) fms.s1 FR_1mX = f1,f1,f8 // 1 - |x| -(p13) cmp.eq.unc p8,p0 = 3,GR_Exp2Ind -};; -.pred.rel "mutex",p7,p8 -{ .mfi -(p7) mov GR_Offs = 0x7 // 8 <= |x| < 16 - nop.f 0 -(p8) tbit.z.unc p0,p6 = GR_Arg,51 -} -{ .mib -(p13) cmp.lt.unc p9,p0 = 3,GR_Exp2Ind -(p8) mov GR_Offs = 0xE // 16 <= |x| < 32 - // jump if x is NaTVal, NaN, +/-0 or +/-INF? -(p10) br.cond.spnt tgammaf_spec_args -};; -.pred.rel "mutex",p14,p15 -.pred.rel "mutex",p6,p9 -{ .mfi -(p9) mov GR_Offs = 0x1C // 32 <= |x| -(p14) fma.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| -(p9) tbit.z.unc p0,p8 = GR_Arg,50 -} -{ .mfi - ldfpd FR_LocalMin,FR_10 = [GR_ad_Data],16 -(p15) fms.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| -(p6) add GR_Offs = 0x7,GR_Offs // 24 <= x < 32 -};; -.pred.rel "mutex",p8,p12 -{ .mfi - add GR_ad_Ce = 0x50,GR_ad_Data -(p15) fcmp.lt.unc.s1 p10,p0 = f8,f1 // p10 if 0 <= x < 1 - mov GR_OvfNzBound = 2 -} -{ .mib - ldfpd FR_S32,FR_S31 = [GR_ad_Data],16 -(p8) add GR_Offs = 0x7,GR_Offs // 40 <= |x| - // jump if 1 <= x < 2 -(p11) br.cond.spnt tgammaf_from_1_to_2 -};; -{ .mfi - shladd GR_ad_Ce = GR_Offs,4,GR_ad_Ce - fcvt.xf FR_Xt = FR_iXt // [x] -(p13) cmp.eq.unc p7,p0 = r0,GR_Offs // p7 if 2 <= |x| < 8 -} -{ .mfi - shladd GR_ad_Co = GR_Offs,4,GR_ad_Data - fma.s1 FR_6 = FR_2,FR_2,FR_2 - mov GR_ExpOf05 = 0x7FC -};; -{ .mfi -(p13) getf.sig GR_Sig = FR_iXt // if |x| >= 2 - frcpa.s1 FR_Rcp0,p0 = f1,FR_NormX -(p10) shr GR_Arg = GR_Arg,51 -} -{ .mib - ldfpd FR_C01,FR_C11 = [GR_ad_Co],16 -(p7) mov GR_Correction = 2 - // jump if 0 < x < 1 -(p10) br.cond.spnt tgammaf_from_0_to_1 -};; -{ .mfi - ldfpd FR_C21,FR_C31 = [GR_ad_Ce],16 - fma.s1 FR_Rq2 = f1,f1,FR_1mX // 2 - |x| -(p14) sub GR_Correction = r0,GR_Correction -} -{ .mfi - ldfpd FR_C41,FR_C51 = [GR_ad_Co],16 -(p14) fcvt.xf FR_rs = FR_rs -(p14) add GR_ad_SinO = 0x3A0,GR_ad_Data -};; -.pred.rel "mutex",p14,p15 -{ .mfi - ldfpd FR_C00,FR_C10 = [GR_ad_Ce],16 - nop.f 0 -(p14) sub GR_Sig = GR_Correction,GR_Sig -} -{ .mfi - ldfpd FR_C20,FR_C30 = [GR_ad_Co],16 - fma.s1 FR_Rq1 = FR_1mX,FR_2,FR_X2mX // (x-1)*(x-2) -(p15) sub GR_Sig = GR_Sig,GR_Correction -};; -{ .mfi -(p14) ldfpd FR_S01,FR_S11 = [GR_ad_SinO],16 - fma.s1 FR_Rq3 = FR_2,f1,FR_1mX // 3 - |x| - and GR_RqDeg = 0x6,GR_Sig -} -{ .mfi - ldfpd FR_C40,FR_C50 = [GR_ad_Ce],16 -(p14) fma.d.s0 FR_X = f0,f0,f8 // set deno flag - mov GR_NanBound = 0x30016 // -2^23 -};; -.pred.rel "mutex",p14,p15 -{ .mfi -(p14) add GR_ad_SinE = 0x3C0,GR_ad_Data -(p15) fms.s1 FR_r = FR_NormX,f1,FR_Xt // r = x - [x] - cmp.eq p8,p0 = 2,GR_RqDeg -} -{ .mfi - ldfpd FR_An,FR_OvfBound = [GR_ad_Co] -(p14) fms.s1 FR_r = FR_Xt,f1,FR_NormX // r = |x - [x]| - cmp.eq p9,p0 = 4,GR_RqDeg -};; -.pred.rel "mutex",p8,p9 -{ .mfi -(p14) ldfpd FR_S21,FR_S00 = [GR_ad_SinE],16 -(p8) fma.s1 FR_Rq0 = FR_2,f1,FR_1mX // (3-x) - tbit.z p0,p6 = GR_Sig,0 -} -{ .mfi -(p14) ldfpd FR_S10,FR_S20 = [GR_ad_SinO],16 -(p9) fma.s1 FR_Rq0 = FR_2,FR_2,FR_1mX // (5-x) - cmp.eq p10,p0 = 6,GR_RqDeg -};; -{ .mfi -(p14) getf.s GR_Arg = f8 -(p14) fcmp.eq.unc.s1 p13,p0 = FR_NormX,FR_Xt -(p14) mov GR_ZeroResBound = 0xC22C // -43 -} -{ .mfi -(p14) ldfe FR_InvAn = [GR_ad_SinE] -(p10) fma.s1 FR_Rq0 = FR_6,f1,FR_1mX // (7-x) - cmp.eq p7,p0 = r0,GR_RqDeg -};; -{ .mfi -(p14) cmp.ge.unc p11,p0 = GR_SignExp,GR_NanBound - fma.s1 FR_Rq2 = FR_Rq2,FR_6,FR_X2mX // (x-3)*(x-4) -(p14) shl GR_ZeroResBound = GR_ZeroResBound,16 -} -{ .mfb -(p14) mov GR_OvfNzBound = 0x802 -(p14) fms.s1 FR_rs = FR_rs,f1,FR_NormX // rs = round(x) - x - // jump if x < -2^23 i.e. x is negative integer -(p11) br.cond.spnt tgammaf_singularity -};; -{ .mfi - nop.m 0 -(p7) fma.s1 FR_Rq1 = f0,f0,f1 -(p14) shl GR_OvfNzBound = GR_OvfNzBound,20 -} -{ .mfb - nop.m 0 - fma.s1 FR_Rq3 = FR_Rq3,FR_10,FR_X2mX // (x-5)*(x-6) - // jump if x is negative integer such that -2^23 < x < 0 -(p13) br.cond.spnt tgammaf_singularity -};; -{ .mfi - nop.m 0 - fma.s1 FR_C01 = FR_C01,f1,FR_r -(p14) mov GR_ExpOf05 = 0xFFFE -} -{ .mfi -(p14) cmp.eq.unc p7,p0 = GR_Arg,GR_OvfNzBound - fma.s1 FR_C11 = FR_C11,f1,FR_r -(p14) cmp.ltu.unc p11,p0 = GR_Arg,GR_OvfNzBound -};; -{ .mfi - nop.m 0 - fma.s1 FR_C21 = FR_C21,f1,FR_r -(p14) cmp.ltu.unc p9,p0 = GR_ZeroResBound,GR_Arg -} -{ .mfb - nop.m 0 - fma.s1 FR_C31 = FR_C31,f1,FR_r - // jump if argument is close to 0 negative -(p11) br.cond.spnt tgammaf_overflow -};; -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,f1,FR_r - nop.i 0 -} -{ .mfb - nop.m 0 - fma.s1 FR_C51 = FR_C51,f1,FR_r - // jump if x is negative noninteger such that -2^23 < x < -43 -(p9) br.cond.spnt tgammaf_underflow -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_rs2 = FR_rs,FR_rs,f0 - nop.i 0 -} -{ .mfb - nop.m 0 -(p14) fma.s1 FR_S01 = FR_rs,FR_rs,FR_S01 - // jump if argument is 0x80200000 -(p7) br.cond.spnt tgammaf_overflow_near0_bound -};; -{ .mfi - nop.m 0 -(p6) fnma.s1 FR_Rq1 = FR_Rq1,FR_Rq0,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p10) fma.s1 FR_Rq2 = FR_Rq2,FR_Rq3,f0 - and GR_Sig = 0x7,GR_Sig -};; -{ .mfi - nop.m 0 - fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 - cmp.eq p6,p7 = r0,GR_Sig // p6 if |x| from one of base intervals -};; -{ .mfi - nop.m 0 - fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 -(p7) cmp.lt.unc p9,p0 = 2,GR_RqDeg -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S11 = FR_rs,FR_rs,FR_S11 - nop.i 0 -} -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S21 = FR_rs,FR_rs,FR_S21 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 - nop.i 0 -} -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,FR_S31 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p9) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 - nop.i 0 -};; -{ .mfi -(p14) getf.exp GR_SignExp = FR_rs - fma.s1 FR_C01 = FR_C01,FR_C11,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S01 = FR_S01,FR_rs2,FR_S00 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C21 = FR_C21,FR_C31,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - // NR-iteration -(p14) fnma.s1 FR_InvNormX1 = FR_Rcp0,FR_NormX,f1 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S11 = FR_S11,FR_rs2,FR_S10 -(p14) tbit.z.unc p11,p12 = GR_SignExp,17 -} -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S20 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p15) fcmp.lt.unc.s1 p0,p13 = FR_NormX,FR_OvfBound - nop.i 0 -} -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,FR_C51,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p7) fma.s1 FR_An = FR_Rq1,FR_An,f0 - nop.i 0 -};; -{ .mfb - nop.m 0 - nop.f 0 - // jump if x > 35.04010009765625 -(p13) br.cond.spnt tgammaf_overflow -};; -{ .mfi - nop.m 0 - // NR-iteration -(p14) fma.s1 FR_InvNormX1 = FR_Rcp0,FR_InvNormX1,FR_Rcp0 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S01 = FR_S01,FR_S11,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p14) fma.s1 FR_S21 = FR_S21,FR_S32,f0 - nop.i 0 -};; -{ .mfi -(p14) getf.exp GR_SignExp = FR_NormX - fma.s1 FR_C01 = FR_C01,FR_C21,f0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_C41 = FR_C41,FR_An,f0 -(p14) mov GR_ExpOf1 = 0x2FFFF -};; -{ .mfi - nop.m 0 - // NR-iteration -(p14) fnma.s1 FR_InvNormX2 = FR_InvNormX1,FR_NormX,f1 - nop.i 0 -};; -.pred.rel "mutex",p11,p12 -{ .mfi - nop.m 0 -(p12) fnma.s1 FR_S01 = FR_S01,FR_S21,f0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p11) fma.s1 FR_S01 = FR_S01,FR_S21,f0 - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p14) fma.s1 FR_GAMMA = FR_C01,FR_C41,f0 -(p14) tbit.z.unc p6,p7 = GR_Sig,0 -} -{ .mfb - nop.m 0 -(p15) fma.s.s0 f8 = FR_C01,FR_C41,f0 -(p15) br.ret.spnt b0 // exit for positives -};; -.pred.rel "mutex",p11,p12 -{ .mfi - nop.m 0 -(p12) fms.s1 FR_S01 = FR_rs,FR_S01,FR_rs - nop.i 0 -} -{ .mfi - nop.m 0 -(p11) fma.s1 FR_S01 = FR_rs,FR_S01,FR_rs - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration - fma.s1 FR_InvNormX2 = FR_InvNormX1,FR_InvNormX2,FR_InvNormX1 - cmp.eq p10,p0 = 0x23,GR_Offs -};; -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 - cmp.gtu p8,p0 = GR_SignExp,GR_ExpOf1 -} -{ .mfi - nop.m 0 -(p7) fnma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 - cmp.eq p9,p0 = GR_SignExp,GR_ExpOf1 -};; -{ .mfi - nop.m 0 - // NR-iteration - fnma.s1 FR_InvNormX1 = FR_InvNormX2,FR_NormX,f1 - nop.i 0 -} -{ .mfi - nop.m 0 -(p10) fma.s1 FR_InvNormX2 = FR_InvNormX2,FR_InvAn,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA - nop.i 0 -};; -{ .mfi - nop.m 0 - fms.s1 FR_Multplr = FR_NormX,f1,f1 // x - 1 - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration - fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 - nop.i 0 -};; -.pred.rel "mutex",p8,p9 -{ .mfi - nop.m 0 - // 1/x or 1/(An*x) -(p8) fma.s1 FR_Multplr = FR_InvNormX2,FR_InvNormX1,FR_InvNormX2 - nop.i 0 -} -{ .mfi - nop.m 0 -(p9) fma.s1 FR_Multplr = f1,f1,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration - fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration - fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 - nop.i 0 -} -{ .mfi - nop.m 0 - // NR-iteration - fma.s1 FR_Rcp1 = FR_Rcp1,FR_Multplr,f0 - nop.i 0 -};; -{ .mfb - nop.m 0 - fma.s.s0 f8 = FR_Rcp1,FR_Rcp2,FR_Rcp1 - br.ret.sptk b0 -};; - -// here if 0 < x < 1 -//-------------------------------------------------------------------- -.align 32 -tgammaf_from_0_to_1: -{ .mfi - cmp.lt p7,p0 = GR_Arg,GR_ExpOf05 - // NR-iteration - fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 - cmp.eq p8,p0 = GR_Arg,GR_ExpOf05 -} -{ .mfi - cmp.gt p9,p0 = GR_Arg,GR_ExpOf05 - fma.s1 FR_r = f0,f0,FR_NormX // reduced arg for (0;1) - mov GR_ExpOf025 = 0x7FA -};; -{ .mfi - getf.s GR_ArgNz = f8 - fma.d.s0 FR_X = f0,f0,f8 // set deno flag - shl GR_OvfNzBound = GR_OvfNzBound,20 -} -{ .mfi -(p8) mov GR_Tbl12Offs = 0x80 // 0.5 <= x < 0.75 - nop.f 0 -(p7) cmp.ge.unc p6,p0 = GR_Arg,GR_ExpOf025 -};; -.pred.rel "mutex",p6,p9 -{ .mfi -(p9) mov GR_Tbl12Offs = 0xC0 // 0.75 <= x < 1 - nop.f 0 -(p6) mov GR_Tbl12Offs = 0x40 // 0.25 <= x < 0.5 -} -{ .mfi - add GR_ad_Ce = 0x2C0,GR_ad_Data - nop.f 0 - add GR_ad_Co = 0x2A0,GR_ad_Data -};; -{ .mfi - add GR_ad_Co = GR_ad_Co,GR_Tbl12Offs - nop.f 0 - cmp.lt p12,p0 = GR_ArgNz,GR_OvfNzBound -} -{ .mib - add GR_ad_Ce = GR_ad_Ce,GR_Tbl12Offs - cmp.eq p7,p0 = GR_ArgNz,GR_OvfNzBound - // jump if argument is 0x00200000 -(p7) br.cond.spnt tgammaf_overflow_near0_bound -};; -{ .mmb - ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 - ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 - // jump if argument is close to 0 positive -(p12) br.cond.spnt tgammaf_overflow -};; -{ .mfi - ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 - // NR-iteration - fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 - nop.i 0 -} -{ .mfb - ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 - nop.f 0 - br.cond.sptk tgamma_from_0_to_2 -};; - -// here if 1 < x < 2 -//-------------------------------------------------------------------- -.align 32 -tgammaf_from_1_to_2: -{ .mfi - add GR_ad_Co = 0x2A0,GR_ad_Data - fms.s1 FR_r = f0,f0,FR_1mX - shr GR_TblOffs = GR_Arg,47 -} -{ .mfi - add GR_ad_Ce = 0x2C0,GR_ad_Data - nop.f 0 - mov GR_TblOffsMask = 0x18 -};; -{ .mfi - nop.m 0 - nop.f 0 - and GR_TblOffs = GR_TblOffs,GR_TblOffsMask -};; -{ .mfi - shladd GR_ad_Co = GR_TblOffs,3,GR_ad_Co - nop.f 0 - nop.i 0 -} -{ .mfi - shladd GR_ad_Ce = GR_TblOffs,3,GR_ad_Ce - nop.f 0 - cmp.eq p6,p7 = 8,GR_TblOffs -};; -{ .mmi - ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 - ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 - nop.i 0 -};; -{ .mmi - ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 - ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 - nop.i 0 -};; - -.align 32 -tgamma_from_0_to_2: -{ .mfi - nop.m 0 -(p6) fms.s1 FR_r = FR_r,f1,FR_LocalMin - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration -(p10) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 - nop.i 0 -};; -{ .mfi - nop.m 0 - fms.s1 FR_r2 = FR_r,FR_r,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A5 = FR_A5,FR_r,FR_A4 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_A1 = FR_A1,FR_r,FR_A0 - nop.i 0 -};; -{ .mfi - nop.m 0 - // NR-iteration -(p10) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A7 = FR_A7,FR_r2,FR_A5 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r4 = FR_r2,FR_r2,f0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fma.s1 FR_A3 = FR_A3,FR_r2,FR_A1 - nop.i 0 -};; -{ .mfi - nop.m 0 -(p10) fma.s1 FR_GAMMA = FR_A7,FR_r4,FR_A3 - nop.i 0 -} -{ .mfi - nop.m 0 -(p11) fma.s.s0 f8 = FR_A7,FR_r4,FR_A3 - nop.i 0 -};; -{ .mfb - nop.m 0 -(p10) fma.s.s0 f8 = FR_GAMMA,FR_Rcp2,f0 - br.ret.sptk b0 -};; - - -// overflow -//-------------------------------------------------------------------- -.align 32 -tgammaf_overflow_near0_bound: -.pred.rel "mutex",p14,p15 -{ .mfi - mov GR_fpsr = ar.fpsr - nop.f 0 -(p15) mov r8 = 0x7f8 -} -{ .mfi - nop.m 0 - nop.f 0 -(p14) mov r8 = 0xff8 -};; -{ .mfi - nop.m 0 - nop.f 0 - shl r8 = r8,20 -};; -{ .mfi - sub r8 = r8,r0,1 - nop.f 0 - extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode -};; -.pred.rel "mutex",p14,p15 -{ .mfi - // set p8 to 0 in case of overflow and to 1 otherwise - // for negative arg: - // no overflow if rounding mode either Z or +Inf, i.e. - // GR_fpsr > 1 -(p14) cmp.lt p8,p0 = 1,GR_fpsr - nop.f 0 - // for positive arg: - // no overflow if rounding mode either Z or -Inf, i.e. - // (GR_fpsr & 1) == 0 -(p15) tbit.z p0,p8 = GR_fpsr,0 -};; -{ .mib -(p8) setf.s f8 = r8 // set result to 0x7f7fffff without - // OVERFLOW flag raising - nop.i 0 -(p8) br.ret.sptk b0 -};; - -.align 32 -tgammaf_overflow: -{ .mfi - nop.m 0 - nop.f 0 - mov r8 = 0x1FFFE -};; -{ .mfi - setf.exp f9 = r8 - fmerge.s FR_X = f8,f8 - nop.i 0 -};; -.pred.rel "mutex",p14,p15 -{ .mfi - nop.m 0 -(p14) fnma.s.s0 f8 = f9,f9,f0 // set I,O and -INF result - mov GR_TAG = 261 // overflow -} -{ .mfb - nop.m 0 -(p15) fma.s.s0 f8 = f9,f9,f0 // set I,O and +INF result - br.cond.sptk tgammaf_libm_err -};; - -// x is negative integer or +/-0 -//-------------------------------------------------------------------- -.align 32 -tgammaf_singularity: -{ .mfi - nop.m 0 - fmerge.s FR_X = f8,f8 - mov GR_TAG = 262 // negative -} -{ .mfb - nop.m 0 - frcpa.s0 f8,p0 = f0,f0 - br.cond.sptk tgammaf_libm_err -};; -// x is negative noninteger with big absolute value -//-------------------------------------------------------------------- -.align 32 -tgammaf_underflow: -{ .mfi - mov r8 = 0x00001 - nop.f 0 - tbit.z p6,p7 = GR_Sig,0 -};; -{ .mfi - setf.exp f9 = r8 - nop.f 0 - nop.i 0 -};; -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fms.s.s0 f8 = f9,f9,f9 - nop.i 0 -} -{ .mfb - nop.m 0 -(p7) fma.s.s0 f8 = f9,f9,f9 - br.ret.sptk b0 -};; - -// x for natval, nan, +/-inf or +/-0 -//-------------------------------------------------------------------- -.align 32 -tgammaf_spec_args: -{ .mfi - nop.m 0 - fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf - nop.i 0 -};; -{ .mfi - nop.m 0 - fclass.m p7,p8 = f8,0x7 // +/-0 - nop.i 0 -};; -{ .mfi - nop.m 0 - fmerge.s FR_X = f8,f8 - nop.i 0 -} -{ .mfb - nop.m 0 -(p6) fma.s.s0 f8 = f8,f1,f8 -(p6) br.ret.spnt b0 -};; -.pred.rel "mutex",p7,p8 -{ .mfi -(p7) mov GR_TAG = 262 // negative -(p7) frcpa.s0 f8,p0 = f1,f8 - nop.i 0 -} -{ .mib - nop.m 0 - nop.i 0 -(p8) br.cond.spnt tgammaf_singularity -};; - -.align 32 -tgammaf_libm_err: -{ .mfi - alloc r32 = ar.pfs,1,4,4,0 - nop.f 0 - mov GR_Parameter_TAG = GR_TAG -};; - -GLOBAL_LIBM_END(tgammaf) - -LOCAL_LIBM_ENTRY(__libm_error_region) -.prologue -{ .mfi - add GR_Parameter_Y=-32,sp // Parameter 2 value - nop.f 0 -.save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs -} -{ .mfi -.fframe 64 - add sp=-64,sp // Create new stack - nop.f 0 - mov GR_SAVE_GP=gp // Save gp -};; -{ .mmi - stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack - add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 -};; -.body -{ .mib - stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 -} -{ .mib - stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y - br.call.sptk b0=__libm_error_support# // Call error handling function -};; -{ .mmi - nop.m 0 - nop.m 0 - add GR_Parameter_RESULT = 48,sp -};; -{ .mmi - ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack -.restore sp - add sp = 64,sp // Restore stack pointer - mov b0 = GR_SAVE_B0 // Restore return address -};; -{ .mib - mov gp = GR_SAVE_GP // Restore gp - mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs - br.ret.sptk b0 // Return -};; - -LOCAL_LIBM_END(__libm_error_region) -.type __libm_error_support#,@function -.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/w_tgammaf_compat.S b/sysdeps/ia64/fpu/w_tgammaf_compat.S new file mode 100644 index 0000000000..0fbd840adb --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammaf_compat.S @@ -0,0 +1,1330 @@ +.file "tgammaf.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// 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. +// +// * The name of Intel Corporation may not 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 INTEL OR ITS +// 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. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 11/30/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/04/03 Changed error codes for overflow and negative integers +// 04/10/03 Changed code for overflow near zero handling +// 12/16/03 Fixed parameter passing to/from error handling routine +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: tgammaf(x) computes the principle value of the GAMMA +// function of x. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f33-f75 +// +// General Purpose Registers: +// r8-r11 +// r14-r29 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgammaf(+inf) = +inf +// tgammaf(-inf) = QNaN +// tgammaf(+/-0) = +/-inf +// tgammaf(x<0, x - integer) = QNaN +// tgammaf(SNaN) = QNaN +// tgammaf(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; +// else if 0 < x < 2 use case tgamma_from_0_to_2; +// else if -(i+1) < x < -i, i = 0...43 use case tgamma_negatives; +// +// Case 2 <= x < OVERFLOW_BOUNDARY +// ------------------------------- +// Here we use algorithm based on the recursive formula +// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval +// [2; OVERFLOW_BOUNDARY] into intervals [8*n; 8*(n+1)] and +// approximate GAMMA(x) by polynomial of 22th degree on each +// [8*n; 8*n+1], recursive formula is used to expand GAMMA(x) +// to [8*n; 8*n+1]. In other words we need to find n, i and r +// such that x = 8 * n + i + r where n and i are integer numbers +// and r is fractional part of x. So GAMMA(x) = GAMMA(8*n+i+r) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(8*n+r) ~ +// ~ (x-1)*(x-2)*...*(x-i)*P12n(r). +// +// Step 1: Reduction +// ----------------- +// N = [x] with truncate +// r = x - N, note 0 <= r < 1 +// +// n = N & ~0xF - index of table that contains coefficient of +// polynomial approximation +// i = N & 0xF - is used in recursive formula +// +// +// Step 2: Approximation +// --------------------- +// We use factorized minimax approximation polynomials +// P12n(r) = A12*(r^2+C01(n)*r+C00(n))* +// *(r^2+C11(n)*r+C10(n))*...*(r^2+C51(n)*r+C50(n)) +// +// Step 3: Recursion +// ----------------- +// In case when i > 0 we need to multiply P12n(r) by product +// R(i,x)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions +// we can calculate R as follow: +// R(i,x) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is +// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* +// *(i-1) if i is odd. In both cases we need to calculate +// R2(i,x) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = +// = ((x^2-x)+2*(1-x))*((x^2-x)+6*(2-x))*...*((x^2-x)+2*(2*j-1)*(j-x)) = +// = (RA+2*RB)*(RA+6*(1-RB))*...*(RA+2*(2*j-1)*(j-1+RB)) +// where j = 1..[i/2], RA = x^2-x, RB = 1-x. +// +// Step 4: Reconstruction +// ---------------------- +// Reconstruction is just simple multiplication i.e. +// GAMMA(x) = P12n(r)*R(i,x) +// +// Case 0 < x < 2 +// -------------- +// To calculate GAMMA(x) on this interval we do following +// if 1.0 <= x < 1.25 than GAMMA(x) = P7(x-1) +// if 1.25 <= x < 1.5 than GAMMA(x) = P7(x-x_min) where +// x_min is point of local minimum on [1; 2] interval. +// if 1.5 <= x < 1.75 than GAMMA(x) = P7(x-1.5) +// if 1.75 <= x < 2.0 than GAMMA(x) = P7(x-1.5) +// and +// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x +// +// Case -(i+1) < x < -i, i = 0...43 +// ---------------------------------- +// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and +// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of +// GAMMA(x) is described above. +// +// Step 1: Reduction +// ----------------- +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) +// i.e rs = x - round(x) and |rs| <= 0.5. +// +// Step 2: Approximation +// --------------------- +// To approximate sin(PI*x)/PI = sin(PI*(2*n+rs))/PI = +// = (-1)^n*sin(PI*rs)/PI Taylor series is used. +// sin(PI*rs)/PI ~ S17(rs). +// +// Step 3: Division +// ---------------- +// To calculate 1/x and 1/(GAMMA(x)*S12(rs)) we use frcpa +// instruction with following Newton-Raphson interations. +// +// +//********************************************************************* + +GR_ad_Data = r8 +GR_TAG = r8 +GR_SignExp = r9 +GR_Sig = r10 +GR_ArgNz = r10 +GR_RqDeg = r11 + +GR_NanBound = r14 +GR_ExpOf025 = r15 +GR_ExpOf05 = r16 +GR_ad_Co = r17 +GR_ad_Ce = r18 +GR_TblOffs = r19 +GR_Arg = r20 +GR_Exp2Ind = r21 +GR_TblOffsMask = r21 +GR_Offs = r22 +GR_OvfNzBound = r23 +GR_ZeroResBound = r24 +GR_ad_SinO = r25 +GR_ad_SinE = r26 +GR_Correction = r27 +GR_Tbl12Offs = r28 +GR_NzBound = r28 +GR_ExpOf1 = r29 +GR_fpsr = r29 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +FR_iXt = f11 +FR_Xt = f12 +FR_r = f13 +FR_r2 = f14 +FR_r4 = f15 + +FR_C01 = f33 +FR_A7 = f33 +FR_C11 = f34 +FR_A6 = f34 +FR_C21 = f35 +FR_A5 = f35 +FR_C31 = f36 +FR_A4 = f36 +FR_C41 = f37 +FR_A3 = f37 +FR_C51 = f38 +FR_A2 = f38 + +FR_C00 = f39 +FR_A1 = f39 +FR_C10 = f40 +FR_A0 = f40 +FR_C20 = f41 +FR_C30 = f42 +FR_C40 = f43 +FR_C50 = f44 +FR_An = f45 +FR_OvfBound = f46 +FR_InvAn = f47 + +FR_Multplr = f48 +FR_NormX = f49 +FR_X2mX = f50 +FR_1mX = f51 +FR_Rq0 = f51 +FR_Rq1 = f52 +FR_Rq2 = f53 +FR_Rq3 = f54 + +FR_Rcp0 = f55 +FR_Rcp1 = f56 +FR_Rcp2 = f57 + +FR_InvNormX1 = f58 +FR_InvNormX2 = f59 + +FR_rs = f60 +FR_rs2 = f61 + +FR_LocalMin = f62 +FR_10 = f63 + +FR_05 = f64 + +FR_S32 = f65 +FR_S31 = f66 +FR_S01 = f67 +FR_S11 = f68 +FR_S21 = f69 +FR_S00 = f70 +FR_S10 = f71 +FR_S20 = f72 + +FR_GAMMA = f73 +FR_2 = f74 +FR_6 = f75 + + + + +// Data tables +//============================================================== +RODATA +.align 16 +LOCAL_OBJECT_START(tgammaf_data) +data8 0x3FDD8B618D5AF8FE // local minimum (0.461632144968362356785) +data8 0x4024000000000000 // 10.0 +data8 0x3E90FC992FF39E13 // S32 +data8 0xBEC144B2760626E2 // S31 +// +//[2; 8) +data8 0x4009EFD1BA0CB3B4 // C01 +data8 0x3FFFB35378FF4822 // C11 +data8 0xC01032270413B896 // C41 +data8 0xC01F171A4C0D6827 // C51 +data8 0x40148F8E197396AC // C20 +data8 0x401C601959F1249C // C30 +data8 0x3EE21AD881741977 // An +data8 0x4041852200000000 // overflow boundary (35.04010009765625) +data8 0x3FD9CE68F695B198 // C21 +data8 0xBFF8C30AC900DA03 // C31 +data8 0x400E17D2F0535C02 // C00 +data8 0x4010689240F7FAC8 // C10 +data8 0x402563147DDCCF8D // C40 +data8 0x4033406D0480A21C // C50 +// +//[8; 16) +data8 0x4006222BAE0B793B // C01 +data8 0x4002452733473EDA // C11 +data8 0xC0010EF3326FDDB3 // C41 +data8 0xC01492B817F99C0F // C51 +data8 0x40099C905A249B75 // C20 +data8 0x4012B972AE0E533D // C30 +data8 0x3FE6F6DB91D0D4CC // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FF545828F7B73C5 // C21 +data8 0xBFBBD210578764DF // C31 +data8 0x4000542098F53CFC // C00 +data8 0x40032C1309AD6C81 // C10 +data8 0x401D7331E19BD2E1 // C40 +data8 0x402A06807295EF57 // C50 +// +//[16; 24) +data8 0x4000131002867596 // C01 +data8 0x3FFAA362D5D1B6F2 // C11 +data8 0xBFFCB6985697DB6D // C41 +data8 0xC0115BEE3BFC3B3B // C51 +data8 0x3FFE62FF83456F73 // C20 +data8 0x4007E33478A114C4 // C30 +data8 0x41E9B2B73795ED57 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FEEB1F345BC2769 // C21 +data8 0xBFC3BBE6E7F3316F // C31 +data8 0x3FF14E07DA5E9983 // C00 +data8 0x3FF53B76BF81E2C0 // C10 +data8 0x4014051E0269A3DC // C40 +data8 0x40229D4227468EDB // C50 +// +//[24; 32) +data8 0x3FFAF7BD498384DE // C01 +data8 0x3FF62AD8B4D1C3D2 // C11 +data8 0xBFFABCADCD004C32 // C41 +data8 0xC00FADE97C097EC9 // C51 +data8 0x3FF6DA9ED737707E // C20 +data8 0x4002A29E9E0C782C // C30 +data8 0x44329D5B5167C6C3 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE8943CBBB4B727 // C21 +data8 0xBFCB39D466E11756 // C31 +data8 0x3FE879AF3243D8C1 // C00 +data8 0x3FEEC7DEBB14CE1E // C10 +data8 0x401017B79BA80BCB // C40 +data8 0x401E941DC3C4DE80 // C50 +// +//[32; 40) +data8 0x3FF7ECB3A0E8FE5C // C01 +data8 0x3FF3815A8516316B // C11 +data8 0xBFF9ABD8FCC000C3 // C41 +data8 0xC00DD89969A4195B // C51 +data8 0x3FF2E43139CBF563 // C20 +data8 0x3FFF96DC3474A606 // C30 +data8 0x46AFF4CA9B0DDDF0 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE4CE76DA1B5783 // C21 +data8 0xBFD0524DB460BC4E // C31 +data8 0x3FE35852DF14E200 // C00 +data8 0x3FE8C7610359F642 // C10 +data8 0x400BCF750EC16173 // C40 +data8 0x401AC14E02EA701C // C50 +// +//[40; 48) +data8 0x3FF5DCE4D8193097 // C01 +data8 0x3FF1B0D8C4974FFA // C11 +data8 0xBFF8FB450194CAEA // C41 +data8 0xC00C9658E030A6C4 // C51 +data8 0x3FF068851118AB46 // C20 +data8 0x3FFBF7C7BB46BF7D // C30 +data8 0x3FF0000000000000 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE231DEB11D847A // C21 +data8 0xBFD251ECAFD7E935 // C31 +data8 0x3FE0368AE288F6BF // C00 +data8 0x3FE513AE4215A70C // C10 +data8 0x4008F960F7141B8B // C40 +data8 0x40183BA08134397B // C50 +// +//[1.0; 1.25) +data8 0xBFD9909648921868 // A7 +data8 0x3FE96FFEEEA8520F // A6 +data8 0xBFED0800D93449B8 // A3 +data8 0x3FEFA648D144911C // A2 +data8 0xBFEE3720F7720B4D // A5 +data8 0x3FEF4857A010CA3B // A4 +data8 0xBFE2788CCD545AA4 // A1 +data8 0x3FEFFFFFFFE9209E // A0 +// +//[1.25; 1.5) +data8 0xBFB421236426936C // A7 +data8 0x3FAF237514F36691 // A6 +data8 0xBFC0BADE710A10B9 // A3 +data8 0x3FDB6C5465BBEF1F // A2 +data8 0xBFB7E7F83A546EBE // A5 +data8 0x3FC496A01A545163 // A4 +data8 0xBDEE86A39D8452EB // A1 +data8 0x3FEC56DC82A39AA2 // A0 +// +//[1.5; 1.75) +data8 0xBF94730B51795867 // A7 +data8 0x3FBF4203E3816C7B // A6 +data8 0xBFE85B427DBD23E4 // A3 +data8 0x3FEE65557AB26771 // A2 +data8 0xBFD59D31BE3AB42A // A5 +data8 0x3FE3C90CC8F09147 // A4 +data8 0xBFE245971DF735B8 // A1 +data8 0x3FEFFC613AE7FBC8 // A0 +// +//[1.75; 2.0) +data8 0xBF7746A85137617E // A7 +data8 0x3FA96E37D09735F3 // A6 +data8 0xBFE3C24AC40AC0BB // A3 +data8 0x3FEC56A80A977CA5 // A2 +data8 0xBFC6F0E707560916 // A5 +data8 0x3FDB262D949175BE // A4 +data8 0xBFE1C1AEDFB25495 // A1 +data8 0x3FEFEE1E644B2022 // A0 +// +// sin(pi*x)/pi +data8 0xC026FB0D377656CC // S01 +data8 0x3FFFB15F95A22324 // S11 +data8 0x406CE58F4A41C6E7 // S10 +data8 0x404453786302C61E // S20 +data8 0xC023D59A47DBFCD3 // S21 +data8 0x405541D7ABECEFCA // S00 +// +// 1/An for [40; 48) +data8 0xCAA7576DE621FCD5, 0x3F68 +LOCAL_OBJECT_END(tgammaf_data) + +//============================================================== +// Code +//============================================================== + +.section .text +GLOBAL_LIBM_ENTRY(tgammaf) +{ .mfi + getf.exp GR_SignExp = f8 + fma.s1 FR_NormX = f8,f1,f0 + addl GR_ad_Data = @ltoff(tgammaf_data), gp +} +{ .mfi + mov GR_ExpOf05 = 0xFFFE + fcvt.fx.trunc.s1 FR_iXt = f8 // [x] + mov GR_Offs = 0 // 2 <= x < 8 +};; +{ .mfi + getf.d GR_Arg = f8 + fcmp.lt.s1 p14,p15 = f8,f0 + mov GR_Tbl12Offs = 0 +} +{ .mfi + setf.exp FR_05 = GR_ExpOf05 + fma.s1 FR_2 = f1,f1,f1 // 2 + mov GR_Correction = 0 +};; +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fclass.m p10,p0 = f8,0x1E7 // is x NaTVal, NaN, +/-0 or +/-INF? + tbit.z p12,p13 = GR_SignExp,16 // p13 if |x| >= 2 +} +{ .mfi + mov GR_ExpOf1 = 0xFFFF + fcvt.fx.s1 FR_rs = f8 // round(x) + and GR_Exp2Ind = 7,GR_SignExp +};; +.pred.rel "mutex",p14,p15 +{ .mfi +(p15) cmp.eq.unc p11,p0 = GR_ExpOf1,GR_SignExp // p11 if 1 <= x < 2 +(p14) fma.s1 FR_1mX = f1,f1,f8 // 1 - |x| + mov GR_Sig = 0 // if |x| < 2 +} +{ .mfi +(p13) cmp.eq.unc p7,p0 = 2,GR_Exp2Ind +(p15) fms.s1 FR_1mX = f1,f1,f8 // 1 - |x| +(p13) cmp.eq.unc p8,p0 = 3,GR_Exp2Ind +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_Offs = 0x7 // 8 <= |x| < 16 + nop.f 0 +(p8) tbit.z.unc p0,p6 = GR_Arg,51 +} +{ .mib +(p13) cmp.lt.unc p9,p0 = 3,GR_Exp2Ind +(p8) mov GR_Offs = 0xE // 16 <= |x| < 32 + // jump if x is NaTVal, NaN, +/-0 or +/-INF? +(p10) br.cond.spnt tgammaf_spec_args +};; +.pred.rel "mutex",p14,p15 +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) mov GR_Offs = 0x1C // 32 <= |x| +(p14) fma.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| +(p9) tbit.z.unc p0,p8 = GR_Arg,50 +} +{ .mfi + ldfpd FR_LocalMin,FR_10 = [GR_ad_Data],16 +(p15) fms.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| +(p6) add GR_Offs = 0x7,GR_Offs // 24 <= x < 32 +};; +.pred.rel "mutex",p8,p12 +{ .mfi + add GR_ad_Ce = 0x50,GR_ad_Data +(p15) fcmp.lt.unc.s1 p10,p0 = f8,f1 // p10 if 0 <= x < 1 + mov GR_OvfNzBound = 2 +} +{ .mib + ldfpd FR_S32,FR_S31 = [GR_ad_Data],16 +(p8) add GR_Offs = 0x7,GR_Offs // 40 <= |x| + // jump if 1 <= x < 2 +(p11) br.cond.spnt tgammaf_from_1_to_2 +};; +{ .mfi + shladd GR_ad_Ce = GR_Offs,4,GR_ad_Ce + fcvt.xf FR_Xt = FR_iXt // [x] +(p13) cmp.eq.unc p7,p0 = r0,GR_Offs // p7 if 2 <= |x| < 8 +} +{ .mfi + shladd GR_ad_Co = GR_Offs,4,GR_ad_Data + fma.s1 FR_6 = FR_2,FR_2,FR_2 + mov GR_ExpOf05 = 0x7FC +};; +{ .mfi +(p13) getf.sig GR_Sig = FR_iXt // if |x| >= 2 + frcpa.s1 FR_Rcp0,p0 = f1,FR_NormX +(p10) shr GR_Arg = GR_Arg,51 +} +{ .mib + ldfpd FR_C01,FR_C11 = [GR_ad_Co],16 +(p7) mov GR_Correction = 2 + // jump if 0 < x < 1 +(p10) br.cond.spnt tgammaf_from_0_to_1 +};; +{ .mfi + ldfpd FR_C21,FR_C31 = [GR_ad_Ce],16 + fma.s1 FR_Rq2 = f1,f1,FR_1mX // 2 - |x| +(p14) sub GR_Correction = r0,GR_Correction +} +{ .mfi + ldfpd FR_C41,FR_C51 = [GR_ad_Co],16 +(p14) fcvt.xf FR_rs = FR_rs +(p14) add GR_ad_SinO = 0x3A0,GR_ad_Data +};; +.pred.rel "mutex",p14,p15 +{ .mfi + ldfpd FR_C00,FR_C10 = [GR_ad_Ce],16 + nop.f 0 +(p14) sub GR_Sig = GR_Correction,GR_Sig +} +{ .mfi + ldfpd FR_C20,FR_C30 = [GR_ad_Co],16 + fma.s1 FR_Rq1 = FR_1mX,FR_2,FR_X2mX // (x-1)*(x-2) +(p15) sub GR_Sig = GR_Sig,GR_Correction +};; +{ .mfi +(p14) ldfpd FR_S01,FR_S11 = [GR_ad_SinO],16 + fma.s1 FR_Rq3 = FR_2,f1,FR_1mX // 3 - |x| + and GR_RqDeg = 0x6,GR_Sig +} +{ .mfi + ldfpd FR_C40,FR_C50 = [GR_ad_Ce],16 +(p14) fma.d.s0 FR_X = f0,f0,f8 // set deno flag + mov GR_NanBound = 0x30016 // -2^23 +};; +.pred.rel "mutex",p14,p15 +{ .mfi +(p14) add GR_ad_SinE = 0x3C0,GR_ad_Data +(p15) fms.s1 FR_r = FR_NormX,f1,FR_Xt // r = x - [x] + cmp.eq p8,p0 = 2,GR_RqDeg +} +{ .mfi + ldfpd FR_An,FR_OvfBound = [GR_ad_Co] +(p14) fms.s1 FR_r = FR_Xt,f1,FR_NormX // r = |x - [x]| + cmp.eq p9,p0 = 4,GR_RqDeg +};; +.pred.rel "mutex",p8,p9 +{ .mfi +(p14) ldfpd FR_S21,FR_S00 = [GR_ad_SinE],16 +(p8) fma.s1 FR_Rq0 = FR_2,f1,FR_1mX // (3-x) + tbit.z p0,p6 = GR_Sig,0 +} +{ .mfi +(p14) ldfpd FR_S10,FR_S20 = [GR_ad_SinO],16 +(p9) fma.s1 FR_Rq0 = FR_2,FR_2,FR_1mX // (5-x) + cmp.eq p10,p0 = 6,GR_RqDeg +};; +{ .mfi +(p14) getf.s GR_Arg = f8 +(p14) fcmp.eq.unc.s1 p13,p0 = FR_NormX,FR_Xt +(p14) mov GR_ZeroResBound = 0xC22C // -43 +} +{ .mfi +(p14) ldfe FR_InvAn = [GR_ad_SinE] +(p10) fma.s1 FR_Rq0 = FR_6,f1,FR_1mX // (7-x) + cmp.eq p7,p0 = r0,GR_RqDeg +};; +{ .mfi +(p14) cmp.ge.unc p11,p0 = GR_SignExp,GR_NanBound + fma.s1 FR_Rq2 = FR_Rq2,FR_6,FR_X2mX // (x-3)*(x-4) +(p14) shl GR_ZeroResBound = GR_ZeroResBound,16 +} +{ .mfb +(p14) mov GR_OvfNzBound = 0x802 +(p14) fms.s1 FR_rs = FR_rs,f1,FR_NormX // rs = round(x) - x + // jump if x < -2^23 i.e. x is negative integer +(p11) br.cond.spnt tgammaf_singularity +};; +{ .mfi + nop.m 0 +(p7) fma.s1 FR_Rq1 = f0,f0,f1 +(p14) shl GR_OvfNzBound = GR_OvfNzBound,20 +} +{ .mfb + nop.m 0 + fma.s1 FR_Rq3 = FR_Rq3,FR_10,FR_X2mX // (x-5)*(x-6) + // jump if x is negative integer such that -2^23 < x < 0 +(p13) br.cond.spnt tgammaf_singularity +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,f1,FR_r +(p14) mov GR_ExpOf05 = 0xFFFE +} +{ .mfi +(p14) cmp.eq.unc p7,p0 = GR_Arg,GR_OvfNzBound + fma.s1 FR_C11 = FR_C11,f1,FR_r +(p14) cmp.ltu.unc p11,p0 = GR_Arg,GR_OvfNzBound +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,f1,FR_r +(p14) cmp.ltu.unc p9,p0 = GR_ZeroResBound,GR_Arg +} +{ .mfb + nop.m 0 + fma.s1 FR_C31 = FR_C31,f1,FR_r + // jump if argument is close to 0 negative +(p11) br.cond.spnt tgammaf_overflow +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,f1,FR_r + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 FR_C51 = FR_C51,f1,FR_r + // jump if x is negative noninteger such that -2^23 < x < -43 +(p9) br.cond.spnt tgammaf_underflow +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_rs2 = FR_rs,FR_rs,f0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fma.s1 FR_S01 = FR_rs,FR_rs,FR_S01 + // jump if argument is 0x80200000 +(p7) br.cond.spnt tgammaf_overflow_near0_bound +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rq1 = FR_Rq1,FR_Rq0,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Rq2 = FR_Rq2,FR_Rq3,f0 + and GR_Sig = 0x7,GR_Sig +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 + cmp.eq p6,p7 = r0,GR_Sig // p6 if |x| from one of base intervals +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 +(p7) cmp.lt.unc p9,p0 = 2,GR_RqDeg +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S11 = FR_rs,FR_rs,FR_S11 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_rs,FR_rs,FR_S21 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,FR_S31 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 + nop.i 0 +};; +{ .mfi +(p14) getf.exp GR_SignExp = FR_rs + fma.s1 FR_C01 = FR_C01,FR_C11,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S01 = FR_S01,FR_rs2,FR_S00 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C31,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // NR-iteration +(p14) fnma.s1 FR_InvNormX1 = FR_Rcp0,FR_NormX,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S11 = FR_S11,FR_rs2,FR_S10 +(p14) tbit.z.unc p11,p12 = GR_SignExp,17 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S20 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p15) fcmp.lt.unc.s1 p0,p13 = FR_NormX,FR_OvfBound + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C51,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_An = FR_Rq1,FR_An,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + nop.f 0 + // jump if x > 35.04010009765625 +(p13) br.cond.spnt tgammaf_overflow +};; +{ .mfi + nop.m 0 + // NR-iteration +(p14) fma.s1 FR_InvNormX1 = FR_Rcp0,FR_InvNormX1,FR_Rcp0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S01 = FR_S01,FR_S11,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_S21,FR_S32,f0 + nop.i 0 +};; +{ .mfi +(p14) getf.exp GR_SignExp = FR_NormX + fma.s1 FR_C01 = FR_C01,FR_C21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_An,f0 +(p14) mov GR_ExpOf1 = 0x2FFFF +};; +{ .mfi + nop.m 0 + // NR-iteration +(p14) fnma.s1 FR_InvNormX2 = FR_InvNormX1,FR_NormX,f1 + nop.i 0 +};; +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p12) fnma.s1 FR_S01 = FR_S01,FR_S21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_S01 = FR_S01,FR_S21,f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 FR_GAMMA = FR_C01,FR_C41,f0 +(p14) tbit.z.unc p6,p7 = GR_Sig,0 +} +{ .mfb + nop.m 0 +(p15) fma.s.s0 f8 = FR_C01,FR_C41,f0 +(p15) br.ret.spnt b0 // exit for positives +};; +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p12) fms.s1 FR_S01 = FR_rs,FR_S01,FR_rs + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_S01 = FR_rs,FR_S01,FR_rs + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_InvNormX2 = FR_InvNormX1,FR_InvNormX2,FR_InvNormX1 + cmp.eq p10,p0 = 0x23,GR_Offs +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 + cmp.gtu p8,p0 = GR_SignExp,GR_ExpOf1 +} +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 + cmp.eq p9,p0 = GR_SignExp,GR_ExpOf1 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_InvNormX1 = FR_InvNormX2,FR_NormX,f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_InvNormX2 = FR_InvNormX2,FR_InvAn,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_Multplr = FR_NormX,f1,f1 // x - 1 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 + nop.i 0 +};; +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 + // 1/x or 1/(An*x) +(p8) fma.s1 FR_Multplr = FR_InvNormX2,FR_InvNormX1,FR_InvNormX2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Multplr = f1,f1,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 + nop.i 0 +} +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp1,FR_Multplr,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.s.s0 f8 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + br.ret.sptk b0 +};; + +// here if 0 < x < 1 +//-------------------------------------------------------------------- +.align 32 +tgammaf_from_0_to_1: +{ .mfi + cmp.lt p7,p0 = GR_Arg,GR_ExpOf05 + // NR-iteration + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 + cmp.eq p8,p0 = GR_Arg,GR_ExpOf05 +} +{ .mfi + cmp.gt p9,p0 = GR_Arg,GR_ExpOf05 + fma.s1 FR_r = f0,f0,FR_NormX // reduced arg for (0;1) + mov GR_ExpOf025 = 0x7FA +};; +{ .mfi + getf.s GR_ArgNz = f8 + fma.d.s0 FR_X = f0,f0,f8 // set deno flag + shl GR_OvfNzBound = GR_OvfNzBound,20 +} +{ .mfi +(p8) mov GR_Tbl12Offs = 0x80 // 0.5 <= x < 0.75 + nop.f 0 +(p7) cmp.ge.unc p6,p0 = GR_Arg,GR_ExpOf025 +};; +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) mov GR_Tbl12Offs = 0xC0 // 0.75 <= x < 1 + nop.f 0 +(p6) mov GR_Tbl12Offs = 0x40 // 0.25 <= x < 0.5 +} +{ .mfi + add GR_ad_Ce = 0x2C0,GR_ad_Data + nop.f 0 + add GR_ad_Co = 0x2A0,GR_ad_Data +};; +{ .mfi + add GR_ad_Co = GR_ad_Co,GR_Tbl12Offs + nop.f 0 + cmp.lt p12,p0 = GR_ArgNz,GR_OvfNzBound +} +{ .mib + add GR_ad_Ce = GR_ad_Ce,GR_Tbl12Offs + cmp.eq p7,p0 = GR_ArgNz,GR_OvfNzBound + // jump if argument is 0x00200000 +(p7) br.cond.spnt tgammaf_overflow_near0_bound +};; +{ .mmb + ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 + ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 + // jump if argument is close to 0 positive +(p12) br.cond.spnt tgammaf_overflow +};; +{ .mfi + ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +} +{ .mfb + ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 + nop.f 0 + br.cond.sptk tgamma_from_0_to_2 +};; + +// here if 1 < x < 2 +//-------------------------------------------------------------------- +.align 32 +tgammaf_from_1_to_2: +{ .mfi + add GR_ad_Co = 0x2A0,GR_ad_Data + fms.s1 FR_r = f0,f0,FR_1mX + shr GR_TblOffs = GR_Arg,47 +} +{ .mfi + add GR_ad_Ce = 0x2C0,GR_ad_Data + nop.f 0 + mov GR_TblOffsMask = 0x18 +};; +{ .mfi + nop.m 0 + nop.f 0 + and GR_TblOffs = GR_TblOffs,GR_TblOffsMask +};; +{ .mfi + shladd GR_ad_Co = GR_TblOffs,3,GR_ad_Co + nop.f 0 + nop.i 0 +} +{ .mfi + shladd GR_ad_Ce = GR_TblOffs,3,GR_ad_Ce + nop.f 0 + cmp.eq p6,p7 = 8,GR_TblOffs +};; +{ .mmi + ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 + ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 + nop.i 0 +};; +{ .mmi + ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 + ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 + nop.i 0 +};; + +.align 32 +tgamma_from_0_to_2: +{ .mfi + nop.m 0 +(p6) fms.s1 FR_r = FR_r,f1,FR_LocalMin + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration +(p10) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A5,FR_r,FR_A4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A1,FR_r,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration +(p10) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r2,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r2,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_GAMMA = FR_A7,FR_r4,FR_A3 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s.s0 f8 = FR_A7,FR_r4,FR_A3 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p10) fma.s.s0 f8 = FR_GAMMA,FR_Rcp2,f0 + br.ret.sptk b0 +};; + + +// overflow +//-------------------------------------------------------------------- +.align 32 +tgammaf_overflow_near0_bound: +.pred.rel "mutex",p14,p15 +{ .mfi + mov GR_fpsr = ar.fpsr + nop.f 0 +(p15) mov r8 = 0x7f8 +} +{ .mfi + nop.m 0 + nop.f 0 +(p14) mov r8 = 0xff8 +};; +{ .mfi + nop.m 0 + nop.f 0 + shl r8 = r8,20 +};; +{ .mfi + sub r8 = r8,r0,1 + nop.f 0 + extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode +};; +.pred.rel "mutex",p14,p15 +{ .mfi + // set p8 to 0 in case of overflow and to 1 otherwise + // for negative arg: + // no overflow if rounding mode either Z or +Inf, i.e. + // GR_fpsr > 1 +(p14) cmp.lt p8,p0 = 1,GR_fpsr + nop.f 0 + // for positive arg: + // no overflow if rounding mode either Z or -Inf, i.e. + // (GR_fpsr & 1) == 0 +(p15) tbit.z p0,p8 = GR_fpsr,0 +};; +{ .mib +(p8) setf.s f8 = r8 // set result to 0x7f7fffff without + // OVERFLOW flag raising + nop.i 0 +(p8) br.ret.sptk b0 +};; + +.align 32 +tgammaf_overflow: +{ .mfi + nop.m 0 + nop.f 0 + mov r8 = 0x1FFFE +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + nop.i 0 +};; +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fnma.s.s0 f8 = f9,f9,f0 // set I,O and -INF result + mov GR_TAG = 261 // overflow +} +{ .mfb + nop.m 0 +(p15) fma.s.s0 f8 = f9,f9,f0 // set I,O and +INF result + br.cond.sptk tgammaf_libm_err +};; + +// x is negative integer or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgammaf_singularity: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 262 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk tgammaf_libm_err +};; +// x is negative noninteger with big absolute value +//-------------------------------------------------------------------- +.align 32 +tgammaf_underflow: +{ .mfi + mov r8 = 0x00001 + nop.f 0 + tbit.z p6,p7 = GR_Sig,0 +};; +{ .mfi + setf.exp f9 = r8 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s.s0 f8 = f9,f9,f9 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = f9,f9,f9 + br.ret.sptk b0 +};; + +// x for natval, nan, +/-inf or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgammaf_spec_args: +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8,f1,f8 +(p6) br.ret.spnt b0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_TAG = 262 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 +(p8) br.cond.spnt tgammaf_singularity +};; + +.align 32 +tgammaf_libm_err: +{ .mfi + alloc r32 = ar.pfs,1,4,4,0 + nop.f 0 + mov GR_Parameter_TAG = GR_TAG +};; + +GLOBAL_LIBM_END(tgammaf) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/w_tgammal.S b/sysdeps/ia64/fpu/w_tgammal.S deleted file mode 100644 index b10c5dc276..0000000000 --- a/sysdeps/ia64/fpu/w_tgammal.S +++ /dev/null @@ -1,4487 +0,0 @@ -.file "tgammal.s" - - -// Copyright (c) 2002 - 2005, Intel Corporation -// All rights reserved. -// -// Contributed 2002 by the Intel Numerics Group, Intel Corporation -// -// 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. -// -// * The name of Intel Corporation may not 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 INTEL OR ITS -// 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. -// -// Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at -// http://www.intel.com/software/products/opensource/libraries/num.htm. -// -// History -//============================================================== -// 01/16/02 Initial version -// 05/20/02 Cleaned up namespace and sf0 syntax -// 02/10/03 Reordered header: .section, .global, .proc, .align; -// used data8 for long double table values -// 03/17/03 Moved tgammal_libm_err label into .proc region -// 04/10/03 Changed error codes for overflow and negative integers -// 03/31/05 Reformatted delimiters between data tables -// -// API -//============================================================== -// long double tgammal(long double) -// -// Resources Used: -// -// Floating-Point Registers: f8-f15 -// f32-f127 -// -// General Purpose Registers: r32-r67 -// -// Predicate Registers: p6-p15 -// -//********************************************************************* -// -// IEEE Special Conditions: -// -// tgammal(+inf) = +inf -// tgammal(-inf) = QNaN -// tgammal(+/-0) = +/-inf -// tgammal(x<0, x - integer) = QNaN -// tgammal(SNaN) = QNaN -// tgammal(QNaN) = QNaN -// -//********************************************************************* -// Overview of operation -//============================================================== -// -// Algorithm description -// --------------------- -// -// There are 3 main paths in the implementation -// (and additional special values branches) -// -// 1) |X| >= 13 - Stirling formula computation -// a) Positive arguments: -// TGAMMAL(X) = exp((X-0.5)*ln(X) - X + C + S(Z)), -// where C = 0.5*ln(2*Pi) , Z = 1/Z, S(Z) - Bernulli polynomial -// (up to 'B18' term). -// Some of these calculation done in multiprecision. -// Ln returns multiprecision result too -// and exp also accepts and returns pair of values. -// -// b) Negative arguments -// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). -// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. -// Here we use polynomial of 9th degree with 2 multiprecision steps. -// Argument range reduction is: -// N = [x] with round to nearest, r = x - N, -0.5 <= r < 0.5 -// After ((X-0.5)*ln(X) - X + C + S(Z)) completed we just invert -// its result and compute exp with negative argument (1/exp(x)=exp(-x)) -// Then we multiply exp result to PI/(X*sin(PI*X)). -// -// 2) 1 <= |X| < 13 - Polynomial part -// a) Positive arguments: -// All values are splitted to such intervals as: -// #0->[2;3], #1->[3,4], #2->[5,6]... -// For even intervals we just use polynomial computation with degree 20 -// and first 6 multiprecision computations. -// Range reduction looks like -// N = [x] with truncate, r = x - N - 0.5, -0.5 <= r < 0.5 -// For odd intervals we use reccurent formula: -// TGAMMAL(X) = TGAMMA(X-1)*(X-1) -// [1;2] interval is splitted to 3 subranges: -// [1;1.25], [1.25;1.75], [1.75;2] with the same polynomial forms -// -// b) Negative arguments -// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). -// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. -// After multiplication by TGAMMAL(X) result we calculate reciprocal -// and get final result. -// -// 3) 0 < |X| < 1 - Near 0 part -// a) Here we use reccurent formula TGAMMAL(X) = TGAMMAL(X+1)/X -// TGAMMAL(X+1) calculated as shown above, -// 1/X result obtained in parallel. Then we just multiply these values. -// There is only additional separated subrange: [0;0.125] with specific -// polynomial constants set. -// -// b) Negative arguments -// TGAMMAL(-X) = PI/(TGAMMAL(X+1)*sin(PI*X)). -// There is no need to compute 1/X. - - - -RODATA - -.align 16 -LOCAL_OBJECT_START(Constants_Tgammal_log_80_Q) -// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 -data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 -data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 -data4 0xA51BE0AF,0x92492453,0x00003FFC,0x00000000 -data4 0xA0CFD29F,0xAAAAAB73,0x0000BFFC,0x00000000 -data4 0xCCCE3872,0xCCCCCCCC,0x00003FFC,0x00000000 -data4 0xFFFFB4FB,0xFFFFFFFF,0x0000BFFC,0x00000000 -data4 0xAAAAAAAB,0xAAAAAAAA,0x00003FFD,0x00000000 -data4 0x00000000,0x80000000,0x0000BFFE,0x00000000 -LOCAL_OBJECT_END(Constants_Tgammal_log_80_Q) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h1) -// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double -data4 0x00008000,0x3F800000,0x00000000,0x00000000 -data4 0x00000000,0x00000000,0x00000000,0x00000000 -data4 0x00007879,0x3F70F0F0,0x3D785196,0x00000000 -data4 0xEBA0E0D1,0x8B1D330B,0x00003FDA,0x00000000 -data4 0x000071C8,0x3F638E38,0x3DF13843,0x00000000 -data4 0x9EADD553,0xE2AF365E,0x00003FE2,0x00000000 -data4 0x00006BCB,0x3F579430,0x3E2FF9A0,0x00000000 -data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 -data4 0x00006667,0x3F4CCCC8,0x3E647FD6,0x00000000 -data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 -data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 -data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 -data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 -data4 0x457978A1,0x8718789F,0x00003FE2,0x00000000 -data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 -data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 -data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 -data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 -data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 -data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 -data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 -data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 -data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 -data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 -data4 0x00004925,0x3F124920,0x3F0F4303,0x00000000 -data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 -data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 -data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 -data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 -data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 -data4 0x00004211,0x3F042108,0x3F29516A,0x00000000 -data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 -LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h1) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h2) -// Z2 - 16 bit fixed, G2 and H2 IEEE single, h2 IEEE double -data4 0x00008000,0x3F800000,0x00000000,0x00000000 -data4 0x00000000,0x00000000,0x00000000,0x00000000 -data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 -data4 0x211398BF,0xAD08B116,0x00003FDB,0x00000000 -data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 -data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 -data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 -data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 -data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 -data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 -data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 -data4 0x049EB22F,0xD1B87D3C,0x00003FDE,0x00000000 -data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 -data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 -data4 0x00007C98,0x3F792FB0,0x3CDCFE47,0x00000000 -data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 -data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 -data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 -data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 -data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 -data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 -data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 -data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 -data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 -data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 -data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 -data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 -data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 -data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 -data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 -data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 -data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 -LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h2) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_log_80_h3_G_H) -// h3 IEEE double extended, H3 and G3 IEEE single -data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 -data4 0x9B7FAD21,0x90051030,0x00003FD8,0x3F7FF400 -data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 -data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 -data4 0xCA964D95,0xCE65C1D8,0x0000BFD8,0x3F7FDC00 -data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 -data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 -data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 -data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 -data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 -data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 -data4 0x2F053150,0xB25CA912,0x0000BFDA,0x3F7FA420 -data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 -data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 -data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 -data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 -data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 -data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 -data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 -data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 -data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 -data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 -data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 -data4 0x1F34A7EB,0x9A995A97,0x0000BFDC,0x3F7F4488 -data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 -data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 -data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 -data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 -data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 -data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 -data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 -data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 -data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here -data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D -data4 0x3A87F20B,0x3A97F68B,0x3AA7EB86,0x3AB7E101 -data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED -data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 -data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 -data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 -data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D -LOCAL_OBJECT_END(Constants_Tgammal_log_80_h3_G_H) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_stirling) -//0.5*ln(2*Pi)=9.1893853320467266954096885e-01 + 7.2239360881843238220057778e-17 -data8 0x3FED67F1C864BEB4, 0x3C94D252F2400510 -// Bernulli numbers -data8 0xAAAAAAAAAAAAAAAB, 0x00003FFB //B2 = 8.3333333333333333333333333333e-02 -data8 0xBF66C16C16C16C17 //B4 = -2.7777777777777777777777777778e-03 -data8 0x3F4A01A01A01A01A //B6 = 7.9365079365079365079365079365e-04 -data8 0xBF43813813813814 //B8 = -5.9523809523809523809523809524e-04 -data8 0x3F4B951E2B18FF23 //B10 = 8.4175084175084175084175084175e-04 -data8 0xBF5F6AB0D9993C7D //B12 = -1.9175269175269175269175269175e-03 -data8 0x3F7A41A41A41A41A //B14 = 6.4102564102564102564102564103e-03 -data8 0xBF9E4286CB0F5398 //B16 = -2.9550653594771241830065359477e-02 -data8 0x3FC6FE96381E0680 //B18 = 1.7964437236883057316493849002e-01 -data8 0x3FE0000000000000 // 0.5 -LOCAL_OBJECT_END(Constants_Tgammal_stirling) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_sin) -// Polynomial coefficients for the sin(Pi*x)/Pi, 0 <= |x| < 0.5 -//A2 = 8.1174242528335360802316245099e-01 + 5.1302254650266899774269946201e-18 -data8 0x3FE9F9CB402BC46C, 0x3C57A8B3819B7CEC -//A1 = -1.6449340668482264060656916627e+00 + -3.0210280454695477893051351574e-17 -data8 0xBFFA51A6625307D3, 0xBC816A402079D0EF -data8 0xF3AEF1FFCCE6C813, 0x0000BFE3 //A9 = -7.0921197799923779127089910470e-09 -data8 0x87D54408E6D4BB9D, 0x00003FE9 //A8 = 2.5300880778252693946712766029e-07 -data8 0xEA12033DCE7B8ED9, 0x0000BFED //A7 = -6.9758403885461690048189307819e-06 -data8 0x9BA38C952A59D1A8, 0x00003FF2 //A6 = 1.4842878710882320255092707181e-04 -data8 0x99C0B55178FF0E38, 0x0000BFF6 //A5 = -2.3460810348048124421268761990e-03 -data8 0xD63402E798FEC896, 0x00003FF9 //A4 = 2.6147847817611456327417812320e-02 -data8 0xC354723906D95E92, 0x0000BFFC //A3 = -1.9075182412208257558294507774e-01 -LOCAL_OBJECT_END(Constants_Tgammal_sin) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_Arg) -data4 0x00000000,0xB17217F4,0x00003FF2,0x00000000 // L_hi = hi part log(2)/2^12 -data4 0xF278ECE6,0xF473DE6A,0x00003FD4,0x00000000 // L_lo = lo part log(2)/2^12 -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_Arg) - -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_A) -data4 0xB1B736A0,0xAAAAAAAB,0x00003FFA,0x00000000 // A3 -data4 0x90CD6327,0xAAAAAAAB,0x00003FFC,0x00000000 // A2 -data4 0xFFFFFFFF,0xFFFFFFFF,0x00003FFD,0x00000000 // A1 -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_A) - -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T1) -data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 -data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 -data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC -data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D -data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA -data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 -data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A -data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 -data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B -data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD -data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 -data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B -data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 -data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A -data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 -data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T1) - -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T2) -data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 -data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 -data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E -data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 -data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 -data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA -data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 -data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A -data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 -data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA -data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 -data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA -data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 -data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 -data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE -data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T2) - -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W1) -data8 0x0000000000000000, 0xBE384454171EC4B4 -data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 -data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 -data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE -data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F -data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 -data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 -data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F -data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF -data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F -data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 -data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E -data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D -data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 -data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A -data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA -data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 -data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF -data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC -data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 -data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 -data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 -data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 -data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 -data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 -data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 -data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA -data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B -data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A -data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 -data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D -data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W1) - -LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W2) -data8 0x0000000000000000, 0xBE641F2537A3D7A2 -data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 -data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE -data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 -data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 -data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B -data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 -data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA -data8 0xBE56856B49BFF529, 0x3E66DD3300508651 -data8 0x3E51165FC114BC13, 0x3E53333DC453290F -data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 -data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 -data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE -data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 -data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 -data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 -data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC -data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 -data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 -data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D -data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C -data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 -data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 -data8 0xBE559725ADE45917, 0xBE68C29C042FC476 -data8 0xBE67593B01E511FA, 0xBE4A4313398801ED -data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E -data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D -data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F -data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 -data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 -data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E -data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 -LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W2) - - - -LOCAL_OBJECT_START(Constants_Tgammal_poly) - -// Polynomial coefficients for the tgammal(x), 2 <= |x| < 3 -//A5 = 2.8360780594841213109180699803e-02 + 2.2504152891014320704380000000e-19 -data8 0x3F9D0A9BC49353D2, 0x3C109AEA0F23CE2D -//A4 = 1.0967323400216015538699565468e-01 + 9.9225166000430644587276000000e-18 -data8 0x3FBC138B89492C5B, 0x3C66E138506D5652 -//A3 = 2.5387124684114281691904579930e-01 + 2.2667777637607113205546600000e-17 -data8 0x3FD03F6D2FA4F4F8, 0x3C7A2258DA8CD8B1 -data8 0xC5866457328BC39B, 0x00003FE3 //A20 = 5.7487331964156762795056629138e-09 -data8 0xE93D9F1ACD59C929, 0x0000BFE4 //A19= -1.3576396100397317396956445658e-08 -data8 0xE33389C8F6CBA813, 0x00003FE5 //A18 = 2.6449714924964597501721434271e-08 -data8 0x8FE7B25B9CD26D2A, 0x0000BFE7 //A17= -6.7011017946055513660266853311e-08 -data8 0xB89F4721BFBC15B0, 0x00003FE8 //A16 = 1.7194280320370423615174419192e-07 -data8 0xE49CBDC1874EBABA, 0x0000BFE9 //A15= -4.2582353660153782928729466776e-07 -data8 0x913AF50A336129CA, 0x00003FEB //A14 = 1.0820500665257088283172211622e-06 -data8 0xABCF0F7313B3B332, 0x0000BFEC //A13= -2.5601510627710417669568115706e-06 -//A2 = 6.5455857798133676439533701341e-01 + 1.3292075193155190798867000000e-18 -data8 0x3FE4F224D4B7E01C, 0x3C3885014A2B8319 -//A1 = 9.3473452162608550164435428087e-01 + 3.2785154201417136611642400000e-17 -data8 0x3FEDE9585F1A7093, 0x3C82E63C1B5028BF -//A0 = 1.3293403881791368004172682049e+00 + 2.2005689328949279282607500000e-16 -data8 0x3FF544FA6D47B38F, 0x3CAFB6AA9829E81F -data8 0xF3668F799997C76D, 0x00003FED //A12 = 7.2539039479124273660331538367e-06 -data8 0xD6C6BBD54CDEAEB1, 0x0000BFEE //A11= -1.2801665282681088568639378920e-05 -data8 0x809E4763B06F6883, 0x00003FF1 //A10 = 6.1329973609906572700697893187e-05 -data8 0x8443B000F8F9A71A, 0x00003FED //A9 = 3.9417864189995544394564413428e-06 -data8 0xC5C7E6D62A6991D8, 0x00003FF4 //A8 = 7.5447412886334708803357581519e-04 -data8 0xD2AF690725C62D88, 0x00003FF5 //A7 = 1.6074004848394703022110823298e-03 -data8 0xAA44E635D4B7B682, 0x00003FF8 //A6 = 1.0392403425906843901680697839e-02 -// -// Polynomial coefficients for the tgammal(x), 4 <= |x| < 5 -//A5 = 1.1600674810589555185913468449e+00 + 3.0229979112715124660731000000e-17 -data8 0x3FF28FA2EB44D22E, 0x3C816D285234C815 -//A4 = 3.1374268565470946334983182169e+00 + 1.3694868953995008497659600000e-16 -data8 0x400919734073B1E1, 0x3CA3BC83CD7E9565 -//A3 = 7.0834593993741057360580271052e+00 + 3.3899702569039156457249800000e-16 -data8 0x401C5576617B6C1F, 0x3CB86D6431213296 -data8 0xA4A5FB49C094966B, 0x00003FDA //A20 = 9.3591760106637809309720130828e-12 -data8 0xA9260DA0F51D7ED8, 0x00003FDD //A19 = 7.6919898428091669411809372180e-11 -data8 0xA16441DFB14BD6E1, 0x00003FE0 //A18 = 5.8713933014370867331213494535e-10 -data8 0x95F098D9C2234849, 0x00003FE3 //A17 = 4.3638234584169302324461091035e-09 -data8 0x8581817400E5AD2B, 0x00003FE6 //A16 = 3.1084260332429955234755367839e-08 -data8 0xE272940E373EBE15, 0x00003FE8 //A15 = 2.1089573544273993580820317236e-07 -data8 0xB6B3391145D226FB, 0x00003FEB //A14 = 1.3612217421122787182942706259e-06 -data8 0x8B9428C4DF95FCD5, 0x00003FEE //A13 = 8.3195416382628990683949003789e-06 -//A2 = 1.2665135075272345943631080445e+01 + 9.8721896915973874255877000000e-16 -data8 0x4029548C95A76F38, 0x3CD1C8BE715B8E13 -//A1 = 1.6154969393303069580269948347e+01 + 9.6850518810678379641029000000e-16 -data8 0x403027AC12FC1E1E, 0x3CD172711C15501B -//A0 = 1.1631728396567448058362970187e+01 + 8.7078125362814179268673000000e-16 -data8 0x40274371E7866C65, 0x3CCF5F8A1A5FACA0 -data8 0xC94A903114272C03, 0x00003FF0 //A12 = 4.7991576836334427243159066630e-05 -data8 0x8844262960E04BE6, 0x00003FF3 //A11 = 2.5990716419283017929486175141e-04 -data8 0xAC5418A76767678D, 0x00003FF5 //A10 = 1.3147621245497801180184809726e-03 -data8 0xCA231B6EFE959132, 0x00003FF7 //A9 = 6.1687358811367989146517222415e-03 -data8 0xDA38E39C13819D2A, 0x00003FF9 //A8 = 2.6638454961912040754759086920e-02 -data8 0xD696DF8D8389FE53, 0x00003FFB //A7 = 1.0477995539298934056097943975e-01 -data8 0xBDD5C153048BC435, 0x00003FFD //A6 = 3.7077144754791605130056406006e-01 -// -// Polynomial coefficients for the tgammal(x), 6 <= |x| < 7 -//A5 = 6.7169398121054200601065531373e+01 + 2.9481001527213915901489600000e-15 -data8 0x4050CAD76B377BA0, 0x3CEA8DDB2B2DE93E -//A4 = 1.6115104376855398982115730178e+02 + 1.3422421925418824418257300000e-14 -data8 0x406424D559BDC687, 0x3D0E397FDB5B33DC -//A3 = 3.1812194028053562533386866562e+02 + 3.9881709875858650942409600000e-14 -data8 0x4073E1F377A6CF73, 0x3D26738F63FE9C4C -data8 0xD6E1B5FF90CAABD3, 0x00003FE1 //A20 = 1.5634700199277480081025480635e-09 -data8 0xD451987B925DD37E, 0x00003FE4 //A19 = 1.2358576813211397717382327174e-08 -data8 0xBFC151B67FA58E6B, 0x00003FE7 //A18 = 8.9292951435632759686382657901e-08 -data8 0xA9034C5E1D67572E, 0x00003FEA //A17 = 6.2962205718327848327368724720e-07 -data8 0x8E40F6EAA30A71EC, 0x00003FED //A16 = 4.2394926442967995119170095258e-06 -data8 0xE3C3541B03A1C350, 0x00003FEF //A15 = 2.7151465666109594512258841637e-05 -data8 0xACE2E58436B2DDCE, 0x00003FF2 //A14 = 1.6487723793339152877117376243e-04 -data8 0xF7EAF8D8D1CAA3D1, 0x00003FF4 //A13 = 9.4573158112768812533636022369e-04 -//A2 = 4.8664351544258869353143381886e+02 + 4.7424047995944376868895400000e-14 -data8 0x407E6A4BD6D9463B, 0x3D2AB2868D79E192 -//A1 = 5.1615277644992545447166776285e+02 + 3.0901956935588717379242200000e-14 -data8 0x40802138E2DC003B, 0x3D216570FB601AEA -//A0 = 2.8788527781504433278314536437e+02 + 2.8213174117085164944959600000e-14 -data8 0x4071FE2A1911F7D6, 0x3D1FC3E4CF4DB5AF -data8 0xA72B88E48D3D1BAB, 0x00003FF7 //A12 = 5.1016252919939028020562237471e-03 -data8 0xD2EFB1067DB4FFB2, 0x00003FF9 //A11 = 2.5749059441230515023024615917e-02 -data8 0xF788AF9522205C24, 0x00003FFB //A10 = 1.2086617635601742290221382521e-01 -data8 0x861A6CE06CB29EAF, 0x00003FFE //A9 = 5.2384071807018493367136112163e-01 -data8 0x84FBDE0947718B58, 0x00004000 //A8 = 2.0778727617851237754568261869e+00 -data8 0xEEC1371E265A2C3A, 0x00004001 //A7 = 7.4610858525146049022238037342e+00 -data8 0xBF514B9BE68ED59D, 0x00004003 //A6 = 2.3914694993947572859629197920e+01 -// -// Polynomial coefficients for the tgammal(x), 8 <= |x| < 9 -//A5 = 5.8487447114416836484451778233e+03 + 4.7365465221455983144182900000e-13 -data8 0x40B6D8BEA568B6FD, 0x3D60AA4D44C2589B -//A4 = 1.2796464063087094473303295672e+04 + 1.2373341702514898266244200000e-12 -data8 0x40C8FE3B666B532D, 0x3D75C4752C5B4783 -//A3 = 2.2837606581322281272150576115e+04 + 2.6598064610627891398831000000e-13 -data8 0x40D64D66D23A7764, 0x3D52B77B3A10EA5C -data8 0xB23418F75B0BE22A, 0x00003FE9 //A20 = 3.3192989594206801808678663868e-07 -data8 0xA984A7BC8B856ED2, 0x00003FEC //A19 = 2.5260177918662350066375115788e-06 -data8 0x921A49729416372C, 0x00003FEF //A18 = 1.7416797068239475136398213598e-05 -data8 0xF5BB9415CC399CA4, 0x00003FF1 //A17 = 1.1717449586392814601938207599e-04 -data8 0xC50B91A40B81F9DF, 0x00003FF4 //A16 = 7.5166775151159345732094429036e-04 -data8 0x96002572326DB203, 0x00003FF7 //A15 = 4.5776541559407384162139204300e-03 -data8 0xD81A1A595E4157BA, 0x00003FF9 //A14 = 2.6379634345126284099420760736e-02 -data8 0x92B700D0CFECADD8, 0x00003FFC //A13 = 1.4327622675407940907282658100e-01 -//A2 = 3.1237895525940199149772524834e+04 + 3.1280450505163186432331700000e-12 -data8 0x40DE8179504C0878, 0x3D8B83BB33FBB766 -//A1 = 2.9192841741344487672904506326e+04 + 7.9300780509779689630767000000e-13 -data8 0x40DC8235DF171691, 0x3D6BE6C780EE54DF -//A0 = 1.4034407293483411194756627083e+04 + 1.4038139346291543309253700000e-12 -data8 0x40CB693422315F90, 0x3D78B23746113FCE -data8 0xBAE50807548BC711, 0x00003FFE //A12 = 7.3005724123917935346868107005e-01 -data8 0xDE28B1F57E68CFB6, 0x00004000 //A11 = 3.4712338349724065462763671443e+00 -data8 0xF4DCA5A5FF901118, 0x00004002 //A10 = 1.5303868912154033908205911714e+01 -data8 0xF85AAA1AD5E84E5E, 0x00004004 //A9 = 6.2088539523416399361048051373e+01 -data8 0xE5AA8BB1BF02934D, 0x00004006 //A8 = 2.2966619406617480799195651466e+02 -data8 0xBF6CFEFD67F59845, 0x00004008 //A7 = 7.6570306334640770654588802417e+02 -data8 0x8DB5D2F001635C29, 0x0000400A //A6 = 2.2673639984182571062068713002e+03 -// -// Polynomial coefficients for the tgammal(x), 10 <= |x| < 11 -//A5 = 7.2546009516580589115619659424e+05 + 1.0343348865365065212891728822e-10 -data8 0x412623A830B99290, 0x3DDC6E7C157611C4 -//A4 = 1.4756292870840241666883230209e+06 + 8.1516565365333844166705674775e-11 -data8 0x4136842D497E56AF, 0x3DD66837E4C3F9EE -//A3 = 2.4356116926500420086085796356e+06 + 3.5508860076560925641351069404e-10 -data8 0x4142950DD8A8C1AF, 0x3DF866C8E3DD0980 -data8 0xB7FD0D1EEAC38EB4, 0x00003FF1 //A20 = 8.7732544640091602721643775932e-05 -data8 0xA9345C64AC750AE9, 0x00003FF4 //A19 = 6.4546407626804942279126469603e-04 -data8 0x8BEABC81BE1E93C9, 0x00003FF7 //A18 = 4.2699261134524096128048819443e-03 -data8 0xE1CD281EDD7315F8, 0x00003FF9 //A17 = 2.7563646660310313164706189622e-02 -data8 0xAD8A5BA6D0FD9758, 0x00003FFC //A16 = 1.6947310643831556048460963841e-01 -data8 0xFCDDA464AD3F182E, 0x00003FFE //A15 = 9.8775699098518676937088606052e-01 -data8 0xAE0DCE2F7B60D1AE, 0x00004001 //A14 = 5.4391852309591064073782104822e+00 -data8 0xE1745D9ABEB8D1A7, 0x00004003 //A13 = 2.8181819161363002758615770457e+01 -//A2 = 3.0619656223573554307222366333e+06 + 1.0819940302945474471259520006e-10 -data8 0x41475C66CFA967E4, 0x3DDDBDDB2A27334B -//A1 = 2.6099413018962685018777847290e+06 + 3.6851882860056025385268615240e-10 -data8 0x4143E98AA6A48974, 0x3DF9530D42589AB6 -//A0 = 1.1332783889487853739410638809e+06 + 1.9339350553312096248591829758e-10 -data8 0x41314ADE639225C9, 0x3DEA946DD6C2C8D3 -data8 0x88BCFAAE71812A1C, 0x00004006 //A12 = 1.3673820009490115307300592012e+02 -data8 0x9A770F5AB540A326, 0x00004008 //A11 = 6.1786031215382040427126476507e+02 -data8 0xA170C1D2C6B413FC, 0x0000400A //A10 = 2.5830473201524594051391525170e+03 -data8 0x9AE56061CB02EB55, 0x0000400C //A9 = 9.9133441230507404119297200255e+03 -data8 0x872390769650FBE2, 0x0000400E //A8 = 3.4595564309496661629764193479e+04 -data8 0xD3E5E8D6923910C1, 0x0000400F //A7 = 1.0849181904819284819615140521e+05 -data8 0x930D70602F50B754, 0x00004011 //A6 = 3.0116351174131169193070583741e+05 -// -// Polynomial coefficients for the tgammal(x), 12 <= |x| < 13 -//A5 = 1.2249876249976964294910430908e+08 + 6.0051348061679753770848000000e-09 -data8 0x419D34BB29FFC39D, 0x3E39CAB72E01818D -//A4 = 2.3482765927605420351028442383e+08 + 1.1874729051592862323641700000e-08 -data8 0x41ABFE5F168D56FA, 0x3E4980338AA7B04B -//A3 = 3.6407329688125067949295043945e+08 + 2.6657200942150363994658700000e-08 -data8 0x41B5B35150E199A5, 0x3E5C9F79C0EB5300 -data8 0xE89AE0F8D726329D, 0x00003FF9 //A20 = 2.8394164465429105626588451540e-02 -data8 0xCF90981F86E38013, 0x00003FFC //A19 = 2.0270002071785908652476845915e-01 -data8 0xA56C658079CA8C4A, 0x00003FFF //A18 = 1.2923704984019263122675412350e+00 -data8 0x80AEF96A67C5615A, 0x00004002 //A17 = 8.0427183300456238315262463506e+00 -data8 0xBE886D7529678931, 0x00004004 //A16 = 4.7633230047847868242503413461e+01 -data8 0x858EDBA4CE2F7508, 0x00004007 //A15 = 2.6711607799594541057655957154e+02 -data8 0xB0B0A3AF388274F0, 0x00004009 //A14 = 1.4135199810126975119809102782e+03 -data8 0xDBA87137988751EF, 0x0000400B //A13 = 7.0290552818218513870879313985e+03 -//A2 = 4.2828433593031734228134155273e+08 + 3.9760422293645854535247300000e-08 -data8 0x41B98719AFEE2947, 0x3E6558A17E0D3007 -//A1 = 3.4008253676084774732589721680e+08 + 1.2558352335001093116071000000e-09 -data8 0x41B4453F68C2C6EB, 0x3E159338C5BC7EC3 -//A0 = 1.3684336546556583046913146973e+08 + 2.6786516700381562934240300000e-08 -data8 0x41A05020CAEE5EA5, 0x3E5CC3058A858579 -data8 0xFF5E3940FB4BA576, 0x0000400D //A12 = 3.2687111823895439312116108631e+04 -data8 0x8A08C124C7F74B6C, 0x00004010 //A11 = 1.4134701786994123329786229006e+05 -data8 0x89D701953540BFFB, 0x00004012 //A10 = 5.6459209892773907605385652281e+05 -data8 0xFC46344B3116C3AD, 0x00004013 //A9 = 2.0666305367147234406757715163e+06 -data8 0xD183EBD7A400151F, 0x00004015 //A8 = 6.8653979211730981618367536737e+06 -data8 0x9C083A40742112F4, 0x00004017 //A7 = 2.0451444503543981795037456447e+07 -data8 0xCD3C475B1A8B6662, 0x00004018 //A6 = 5.3801245423495149598177886823e+07 -LOCAL_OBJECT_END(Constants_Tgammal_poly) - - -LOCAL_OBJECT_START(Constants_Tgammal_poly_splitted) - -// Polynomial coefficients for the tgammal(x), 1 <= |x| < 1.25 -//A5 = -9.8199506890310417350775651357e-01+ -3.2546247786122976510752200000e-17 -data8 0xBFEF6C80EC38B509, 0xBC82C2FA7A3DE3BD -//A4 = 9.8172808683439960475425323239e-01 + 4.4847611775298520359811400000e-17 -data8 0x3FEF6A51055096B0, 0x3C89DA56DE95EFE4 -//A3 = -9.0747907608088618225394839101e-01 +-1.0244057366544064435443970000e-16 -data8 0xBFED0A118F324B62, 0xBC9D86C7B9EBCFFF -data8 0xB8E3FDAA66CC738E, 0x00003FFB //A20 = 9.0278608095877488976217714815e-02 -data8 0xA76067AE1738699C, 0x0000BFFD //A19 =-3.2690738678103132837070881737e-01 -data8 0x9D66B13718408C44, 0x00003FFE //A18 = 6.1484820933424283818320582920e-01 -data8 0xD4AC67BBB4AE5599, 0x0000BFFE //A17 =-8.3075569470082063491389474937e-01 -data8 0xF1426ED1C1488DB3, 0x00003FFE //A16 = 9.4241993542644505594957058785e-01 -data8 0xFC12EB07AA6F4B6B, 0x0000BFFE //A15 =-9.8466366707947121954333549690e-01 -data8 0xFF2B32CFE5B0DDC8, 0x00003FFE //A14 = 9.9675290656677214804168895915e-01 -data8 0xFFD8E7E6FF3662EA, 0x0000BFFE //A13 =-9.9940347089360552383472582319e-01 -//A2 = 9.8905599532797250361682017683e-01 + 5.1760162410376024240867300000e-17 -data8 0x3FEFA658C23B1578, 0x3C8DD673A61F6FE7 -//A1 = -5.7721566490153275452712478000e-01+ -1.0607935612223465065923310000e-16 -data8 0xBFE2788CFC6FB618, 0xBC9E9346622D53B7 -//A0 = 9.9999999999999988897769753748e-01 + 1.1102230245372554544790880000e-16 -data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFF51E4E -data8 0xFFF360DF628F0BC9, 0x00003FFE //A12 = 9.9980740979895815468216470840e-01 -data8 0xFFEF8F9A72B40480, 0x0000BFFE //A11 = -9.9974916001038145045939523470e-01 -data8 0xFFE037B8C7E39952, 0x00003FFE //A10 = 9.9951504002809911822597567307e-01 -data8 0xFFC01E08F348BED2, 0x0000BFFE //A9 = -9.9902522772325406705059517941e-01 -data8 0xFF83DAC83119B52C, 0x00003FFE //A8 = 9.9810569179053383842734164901e-01 -data8 0xFEF9F8AB891ABB24, 0x0000BFFE //A7 = -9.9600176036720260345608796766e-01 -data8 0xFE3F0537573C8235, 0x00003FFE //A6 = 9.9314911461918778676646301341e-01 -// -// Polynomial coefficients for the tgammal(x), 1.25 <= |x| < 1.75 -//A5 = -7.7523052299853054125655660300e-02+ -1.2693512521686721504433600000e-17 -data8 0xBFB3D88CFE50601B, 0xBC6D44ED60EE2170 -//A4 = 1.4464535904462152982041800442e-01 + 2.5426820829345729856648800000e-17 -data8 0x3FC283BD374EB2A9, 0x3C7D50AC436187C3 -//A3 = -1.0729480456477220873257039102e-01+ -6.2429894945456418196551000000e-18 -data8 0xBFBB77AC1CA2EBA5, 0xBC5CCA6BCC422D41 -data8 0xF732D2689F323283, 0x00003FF2 //A20 = 2.3574688251652899567587145422e-04 -data8 0xB6B00E23DE89D13A, 0x0000BFF3 //A19 =-3.4844916488842618776630058875e-04 -data8 0xE98396FE4A1B2799, 0x00003FF3 //A18 =4.4539265198744452020440735977e-04 -data8 0xAF8D235A640DB1A2, 0x0000BFF4 //A17 =-6.6967514303333563295261178346e-04 -data8 0x8513B736C918B261, 0x00003FF5 //A16 = 1.0152970456990865810615917715e-03 -data8 0xC790A1A2C78D8E17, 0x0000BFF5 //A15 =-1.5225598630329403515321688394e-03 -data8 0x959706CFA638CDE2, 0x00003FF6 //A14 = 2.2825614575133879623648932383e-03 -data8 0xE050A6021E129860, 0x0000BFF6 //A13 =-3.4227757733947066666295285936e-03 -//A2 = 4.1481345368830113695679528973e-01 + 3.1252439808354284892632100000e-17 -data8 0x3FDA8C4DBA620D56, 0x3C82040BCB483C76 -//A1 = 3.2338397448885010387886751460e-02 + 3.4437825798552300531443100000e-18 -data8 0x3FA08EA88EE561B1, 0x3C4FC366D6C64806 -//A0 = 8.8622692545275794095971377828e-01 + 7.2689375867553992399219000000e-17 -data8 0x3FEC5BF891B4EF6A, 0x3C94F3877D311C0C -data8 0xA8275AADC09D16FC, 0x00003FF7 //A12 = 5.1316445128621071486146117136e-03 -data8 0xFBFE2CE9215267A2, 0x0000BFF7 //A11= -7.6902121820788373000579382408e-03 -data8 0xBCC8EEAB67ECD91D, 0x00003FF8 //A10 = 1.1522515369164312742737727262e-02 -data8 0x8D1614BB97E5E8C2, 0x0000BFF9 //A9 = -1.7222443097804730395560633583e-02 -data8 0xD3A963578BE291E3, 0x00003FF9 //A8 = 2.5837606456090186343624210891e-02 -data8 0x9BA7EAE64C42FDF7, 0x0000BFFA //A7 = -3.8001935555045161419575037512e-02 -data8 0xF0115BA1A77607E7, 0x00003FFA //A6 = 5.8610303817173477119764956736e-02 -// -// Polynomial coefficients for the tgammal(x), 1.75 <= |x| < 2.0 -//A5 = 2.6698206874501426502654943818e-04 + 3.4033756836921062797887300000e-20 -data8 0x3F317F3740FE2A68, 0x3BE417093234B06E -//A4 = 7.4249010753513894345090307070e-02 + 3.9810018444482764697014200000e-18 -data8 0x3FB301FBB0F25A92, 0x3C525BEFFABB622F -//A3 = -8.1576919247086265851720554565e-02+ -5.2716624487804746360745000000e-19 -data8 0xBFB4E239984650AC, 0xBC2372F1C4F276FF -data8 0xFEF3AEE71038E9A3, 0x00003FEB //A20 = 1.8995395865421509009969188571e-06 -data8 0xA11CFA2672BF876A, 0x0000BFEB //A19 =-1.2003868221414015771269244270e-06 -data8 0xF8E107215DAE2164, 0x00003FEC //A18 = 3.7085863210303833432006027217e-06 -data8 0xBCDDD3FC011EF7D6, 0x00003FEC //A17 = 2.8143303971756051015245433043e-06 -data8 0x8683C4687FA22E68, 0x00003FEE //A16 = 8.0177018464360416764308252462e-06 -data8 0xFDA09E5D33E32968, 0x00003FEE //A15 = 1.5117372062443781157389064848e-05 -data8 0xFFB00D0CFF4089B4, 0x00003FEF //A14 = 3.0480348961227424242198174995e-05 -data8 0xFEF6C39566785085, 0x00003FF0 //A13 = 6.0788135974125244644334004947e-05 -//A2 = 4.1184033042643969357854416558e-01 + 1.2103396182129232634761000000e-18 -data8 0x3FDA5B978B96BEBF, 0x3C3653AAD0A139E4 -//A1 = -4.2278433509846713445057275749e-01+ -4.9429151528135657430413000000e-18 -data8 0xBFDB0EE6072093CE, 0xBC56CB907027554F -//A0 = 1.0000000000000000000000000000e+00 + 1.0969171200000000000000000000e-31 -data8 0x3FF0000000000000, 0x3981CC6A5B20B4D5 -data8 0xFF2B7BA9A8D68C37, 0x00003FF1 //A12 = 1.2167446884801403650547161615e-04 -data8 0xFCA53468E3692EF1, 0x00003FF2 //A11 = 2.4094136329542400976250900707e-04 -data8 0x808D698A9C993615, 0x00003FF4 //A10 = 4.9038845704938303659791698883e-04 -data8 0xF10F8E3FB8BB4AFB, 0x00003FF4 //A9 = 9.1957383840999861214472423976e-04 -data8 0x89E224E42F93F005, 0x00003FF6 //A8 = 2.1039333407187324139473634747e-03 -data8 0xBAF374824937A323, 0x00003FF6 //A7 = 2.8526458211545152218493600470e-03 -data8 0xB6BF7564F52140C6, 0x00003FF8 //A6 = 1.1154045718131014476684982178e-02 -// -// Polynomial coefficients for the tgammal(x), 0.0 <= |x| < 0.125 -//A5 = -9.8199506890314514073736518185e-01+ -5.9363811993837985890950900000e-17 -data8 0xBFEF6C80EC38B67A, 0xBC911C46B447C81F -//A4 = 9.8172808683440015986576554496e-01 + 2.7457414262802803699834200000e-17 -data8 0x3FEF6A51055096B5, 0x3C7FA7FF90ACAD1F -//A3 = -9.0747907608088618225394839101e-01 + -1.0676255850934306734701780000e-16 -data8 0xBFED0A118F324B62, 0xBC9EC5AFB633438D -data8 0x9217E83FA207CB80, 0x00003FFD //A20 = 2.8533864762086088781083621561e-01 -data8 0xA8DABFA52FDF03EC, 0x0000BFFE //A19= -6.5958783896337186303285832783e-01 -data8 0xE331ED293AF39F9B, 0x00003FFE //A18 = 8.8748056656454687449654731184e-01 -data8 0xF9163C5DDB52419D, 0x0000BFFE //A17= -9.7299554149078295602977718525e-01 -data8 0xFEC0A1C672CB9265, 0x00003FFE //A16 = 9.9512683005268190987854104489e-01 -data8 0xFFD2D65B8EA7B5F4, 0x0000BFFE //A15= -9.9931087241443958201592847861e-01 -data8 0xFFF93AA39EE53445, 0x00003FFE //A14 = 9.9989668364186884793382816496e-01 -data8 0xFFFB99A9A3F5F480, 0x0000BFFE //A13= -9.9993286506283835663204999212e-01 -//A2 = 9.8905599532797250361682017683e-01 + 5.1778575360788420716540100000e-17 -data8 0x3FEFA658C23B1578, 0x3C8DD92B45408D07 -//A1 = -5.7721566490153275452712478000e-01+ -1.0607938730998824663273110000e-16 -data8 0xBFE2788CFC6FB618, 0xBC9E9346F8FDE55B -//A0 = 9.9999999999999988897769753748e-01 + 1.1102230246251564036631420000e-16 -data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFFFFFFF -data8 0xFFF7FEBB545812C1, 0x00003FFE //A12 = 9.9987785409425126648628395084e-01 -data8 0xFFF00C02E943A3F2, 0x0000BFFE //A11= -9.9975657530855116454438747397e-01 -data8 0xFFE0420AADC53820, 0x00003FFE //A10 = 9.9951565514290485919027183699e-01 -data8 0xFFC01EB42EF27EEB, 0x0000BFFE //A9 = -9.9902526759155739377365522320e-01 -data8 0xFF83DAD0BF23FF12, 0x00003FFE //A8 = 9.9810569378236378800364235948e-01 -data8 0xFEF9F8ABDBCDB2F3, 0x0000BFFE //A7 = -9.9600176044241699109053158187e-01 -data8 0xFE3F05375988491D, 0x00003FFE //A6 = 9.9314911462127599008937257662e-01 -LOCAL_OBJECT_END(Constants_Tgammal_poly_splitted) - -.align 64 -LOCAL_OBJECT_START(Constants_Tgammal_common) -// Positive overflow value -data8 0x3FE0000000000000 // 0.5 -data8 0x3FF8000000000000 // 1.5 -data8 0x3FD0000000000000 // 0.25 -data8 0x0000000000000000 // 0 -data8 0xDB718C066B352E21, 0x00004009 // Positive overflow value -LOCAL_OBJECT_END(Constants_Tgammal_common) - - - -//======================================================= -// Lgamma registers - -// General Purpose Registers -GR_l_Log_Table = r33 -GR_l_Log_Table1 = r34 -GR_l_BIAS = r34 -GR_l_Index1 = r35 -GR_l_Index2 = r36 -GR_l_signif_Z = r37 -GR_l_X_0 = r38 -GR_l_X_1 = r39 -GR_l_X_2 = r40 -GR_l_Z_1 = r41 -GR_l_Z_2 = r42 -GR_l_N = r43 -GR_l_Index3 = r44 -GR_l_Stirling_Table = r45 -GR_l_N_Unbiased = r46 - -// Floating Point Registers -FR_l_logl_X = f8 - -FR_l_h_3 = f10 -FR_l_poly_hi = f10 -FR_l_W = f11 -FR_l_S = f12 -FR_l_GS_hi = f13 -FR_l_Y_lo = f13 -FR_l_r_cor = f14 -FR_l_G_1 = f15 -FR_l_G = f15 -FR_l_H_1 = f32 -FR_l_H = f32 -FR_l_h = f33 -FR_l_h_1 = f33 -FR_l_N = f33 -FR_l_G_2 = f34 -FR_l_H_2 = f35 -FR_l_h_2 = f36 -FR_l_G_3 = f37 -FR_l_log2_hi = f38 -FR_l_GS_lo = f39 -FR_l_H_3 = f40 -FR_l_float_N = f41 -FR_l_Q_4 = f42 -FR_l_Q_3 = f43 -FR_l_Q_2 = f44 -FR_l_Q_1 = f45 -FR_l_Q_5 = f46 -FR_l_Q_6 = f47 -FR_l_log2_lo = f48 -FR_l_r = f49 -FR_l_poly_lo = f50 -FR_l_poly = f51 -FR_l_rsq = f52 -FR_l_Y_lo_res = f53 - -FR_l_Y0 = f55 -FR_l_Q0 = f56 -FR_l_E0 = f57 -FR_l_E2 = f58 -FR_l_E1 = f59 -FR_l_Y1 = f60 -FR_l_E3 = f61 -FR_l_Y2 = f62 - -FR_l_Z = f63 -FR_l_Z2 = f64 -FR_l_Z4 = f65 -FR_l_Z8 = f66 - -FR_l_CH = f67 -FR_l_CL = f68 - -FR_l_B2 = f69 -FR_l_B4 = f70 -FR_l_B6 = f71 -FR_l_B8 = f72 -FR_l_B10 = f73 -FR_l_B12 = f74 -FR_l_B14 = f75 -FR_l_B16 = f76 -FR_l_B18 = f77 -FR_l_Half = f78 -FR_l_SS = f79 -FR_l_AbsX_m_Half = f80 -FR_l_CXH = f81 -FR_l_CXL = f82 -FR_l_SSCXH = f83 -FR_l_SSCXL = f84 -FR_l_XYH = f85 -FR_l_XYL = f86 -FR_l_Temp = f87 - -FR_l_logl_YHi = f88 -FR_l_logl_YLo = f89 - -FR_l_SignedXYH = f123 - -FR_l_AbsX = f127 - - - -//======================================================= -// Negative part registers - -// General Purpose Registers -GR_n_sin_Table = r47 -GR_n_XN = r48 - -// Float point registers -FR_n_IXNS = f125 -FR_n_IXN = f126 - -FR_n_XNS = f90 -FR_n_XS = f91 -FR_n_XS2 = f92 -FR_n_XS2L = f93 -FR_n_XS4 = f94 -FR_n_XS7 = f95 -FR_n_XS8 = f96 -FR_n_TT = f97 -FR_n_TH = f98 -FR_n_TL = f99 - -FR_n_A2H = f100 -FR_n_A2L = f101 -FR_n_A1H = f102 -FR_n_A1L = f103 -FR_n_A9 = f104 -FR_n_A8 = f105 -FR_n_A7 = f106 -FR_n_A6 = f107 -FR_n_A5 = f108 -FR_n_A4 = f109 -FR_n_A3 = f110 - -FR_n_PolyH = f111 -FR_n_PolyL = f112 - -FR_n_Poly1H = f113 -FR_n_SinxH = f113 // the same as FR_n_Poly1H -FR_n_Poly1L = f114 -FR_n_SinxL = f114 // the same as FR_n_Poly1L - -FR_n_Tail = f115 -FR_n_NegOne = f116 - -FR_n_Y0 = f117 - -FR_n_Q0 = f118 -FR_n_E0 = f119 - -FR_n_E2 = f120 -FR_n_E1 = f121 - -FR_n_Y1 = f55 -FR_n_E3 = f56 - -FR_n_Y2 = f57 -FR_n_R0 = f58 - -FR_n_E4 = f59 -FR_n_RcpResH = f60 - -FR_n_Y3 = f61 -FR_n_R1 = f62 -FR_n_Temp = f63 - -FR_n_RcpResL = f64 - -FR_n_ResH = f65 -FR_n_ResL = f66 - - - - -//======================================================= -// Exp registers - -// General Purpose Registers -GR_e_ad_Arg = r33 -GR_e_ad_A = r34 -GR_e_signexp_x = r35 -GR_e_exp_x = r35 -GR_e_exp_mask = r36 -GR_e_ad_W1 = r37 -GR_e_ad_W2 = r38 -GR_e_M2 = r39 -GR_e_M1 = r40 -GR_e_K = r41 -GR_e_exp_2_mk = r42 -GR_e_exp_2_k = r43 -GR_e_ad_T1 = r44 -GR_e_ad_T2 = r45 -GR_e_N_fix = r46 -GR_e_one = r47 -GR_e_exp_bias = r48 -GR_e_sig_inv_ln2 = r49 -GR_e_rshf_2to51 = r50 -GR_e_exp_2tom51 = r51 -GR_e_rshf = r52 - -// Floating Point Registers -FR_e_RSHF_2TO51 = f10 -FR_e_INV_LN2_2TO63 = f11 -FR_e_W_2TO51_RSH = f12 -FR_e_2TOM51 = f13 -FR_e_RSHF = f14 -FR_e_Y_hi = f15 -FR_e_Y_lo = f32 -FR_e_scale = f33 -FR_e_float_N = f34 -FR_e_N_signif = f35 -FR_e_L_hi = f36 -FR_e_L_lo = f37 -FR_e_r = f38 -FR_e_W1 = f39 -FR_e_T1 = f40 -FR_e_W2 = f41 -FR_e_T2 = f42 -FR_e_W1_p1 = f43 -FR_e_rsq = f44 -FR_e_A2 = f45 -FR_e_r4 = f46 -FR_e_A3 = f47 -FR_e_poly = f48 -FR_e_T = f49 -FR_e_W = f50 -FR_e_Wp1 = f51 -FR_e_r6 = f52 -FR_e_2_mk = f53 -FR_e_A1 = f54 -FR_e_T_scale = f55 -FR_e_result_lo = f56 -FR_e_W_T_scale = f57 -FR_e_Wp1_T_scale = f58 - -FR_e_expl_Input_X = f123 -FR_e_expl_Input_Y = f124 -FR_e_expl_Output_X = f123 -FR_e_expl_Output_Y = f124 - - -FR_e_expl_Input_AbsX = f122 - - - -//======================================================= -// Common registers - -// General Purpose Registers -GR_c_Table = r53 -GR_c_NegUnderflow = r54 -GR_c_NegSingularity = r55 -GR_c_X = r56 -GR_c_SignBit = r57 -GR_c_13 = r58 - - -// Floating Point Registers -FR_c_PosOverflow = f123 -FR_c_XN = f124 - - -//======================================================= -// Polynomial part registers - -// General Purpose Registers -GR_p_Table = r59 -GR_p_XN = r33 -GR_p_Table2 = r34 -GR_p_Int = r35 -GR_p_Offset = r36 -GR_p_Offset2 = r38 -GR_p_X_Sgnd = GR_l_signif_Z // = r37 -GR_p_Exp = r61 -GR_p_Bias = r62 -GR_p_0p75 = r63 - -// Floating Point Registers -FR_p_AbsX = FR_l_AbsX // = f127 -FR_p_IXN = FR_n_IXN // = f126 -FR_p_XN = f32 -FR_p_0p5 = f33 -FR_p_1p5 = f34 -FR_p_AbsXM1 = f35 -FR_p_2 = f36 - -FR_p_A20 = f37 -FR_p_A19 = f38 -FR_p_A18 = f39 -FR_p_A17 = f40 -FR_p_A16 = f41 -FR_p_A15 = f42 -FR_p_A14 = f43 -FR_p_A13 = f44 -FR_p_A12 = f45 -FR_p_A11 = f46 -FR_p_A10 = f47 -FR_p_A9 = f48 -FR_p_A8 = f49 -FR_p_A7 = f50 -FR_p_A6 = f51 -FR_p_A5H = f52 -FR_p_A5L = f53 -FR_p_A4H = f54 -FR_p_A4L = f55 -FR_p_A3H = f56 -FR_p_A3L = f57 -FR_p_A2H = f58 -FR_p_A2L = f59 -FR_p_A1H = f60 -FR_p_A1L = f61 -FR_p_A0H = f62 -FR_p_A0L = f63 - -FR_p_XR = f64 -FR_p_XR2 = f65 -FR_p_XR2L = f52 - -FR_p_XR3 = f58 -FR_p_XR3L = f38 - -FR_p_XR4 = f42 -FR_p_XR6 = f40 -FR_p_XR8 = f37 - -FR_p_Poly5H = f66 -FR_p_Poly5L = f67 -FR_p_Poly4H = f53 -FR_p_Poly4L = f44 -FR_p_Poly3H = f41 -FR_p_Poly3L = f47 -FR_p_Poly2H = f68 -FR_p_Poly2L = f54 -FR_p_Poly1H = f55 -FR_p_Poly1L = f46 -FR_p_Poly0H = f39 -FR_p_Poly0L = f43 - -FR_p_Temp5H = f69 -FR_p_Temp5L = f70 -FR_p_Temp4H = f71 -FR_p_Temp4L = f60 -FR_p_Temp2H = f72 -FR_p_Temp2L = f73 -FR_p_Temp1H = f59 -FR_p_Temp1L = f61 -FR_p_Temp0H = f49 -FR_p_Temp0L = f48 -FR_p_PolyTail = f45 -FR_p_OddPoly0H = f56 -FR_p_OddPoly0L = f51 - -FR_p_0p25 = f73 - - -//======================================================= -// Negative polynomial part registers -// General Purpose Registers -GR_r_sin_Table = r47 -GR_r_sin_Table2 = r60 - -// Floating Point Registers -FR_r_IXNS = FR_n_IXNS -FR_r_IXN = FR_n_IXN - -FR_r_AbsX = FR_l_AbsX - -FR_r_A9 = f74 -FR_r_A8 = f75 -FR_r_A7 = f76 -FR_r_A6 = f77 -FR_r_A5 = f78 -FR_r_A4 = f79 -FR_r_A3 = f80 -FR_r_A2H = f81 -FR_r_A2L = f82 -FR_r_A1H = f83 -FR_r_A1L = f84 - -FR_r_XNS = f85 -FR_r_XS = f86 -FR_r_XS2 = f87 -FR_r_XS2L = f88 -FR_r_XS4 = f89 -FR_r_XS7 = f90 -FR_r_XS8 = f91 - -FR_r_Tail = f92 - -FR_r_TT = f93 -FR_r_TH = f94 -FR_r_TL = f95 - -FR_r_ResH = f96 -FR_r_ResL = f97 - -FR_r_Res3H = f98 -FR_r_Res3L = f99 - -FR_r_Res1H = f100 -FR_r_Res1L = f101 - - - -FR_r_Y0 = f102 -FR_r_Q0 = f103 -FR_r_E0 = f104 -FR_r_E2 = f105 -FR_r_E1 = f106 -FR_r_Y1 = f107 -FR_r_E3 = f108 -FR_r_Y2 = f109 -FR_r_R0 = f110 -FR_r_E4 = f111 -FR_r_ZH = f112 -FR_r_Y3 = f113 -FR_r_R1 = f114 -FR_r_ZHN = f115 -FR_r_ZL = f115 -FR_r_NegOne = f116 - -FR_z_Y0 = f102 -FR_z_Q0 = f103 -FR_z_E0 = f104 -FR_z_E2 = f105 -FR_z_E1 = f106 -FR_z_Y1 = f107 -FR_z_E3 = f108 -FR_z_Y2 = f109 -FR_z_R0 = f110 -FR_z_E4 = f111 -FR_z_ZH = f112 -FR_z_Y3 = f113 -FR_z_R1 = f114 -FR_z_ZL = f115 - - -// General Purpose Registers -GR_SAVE_PFS = r32 -GR_DenOverflow = r33 -GR_u_XN = r34 - -GR_SAVE_B0 = r35 -GR_SAVE_GP = r36 -GR_SAVE_SP = r37 - -// Floating Point Registers -FR_u_IXN = f34 - - -// ERROR HANDLER REGISTERS -GR_Parameter_X = r64 -GR_Parameter_Y = r65 -GR_Parameter_RESULT = r66 -GR_Parameter_TAG = r67 - -FR_RESULT = f8 -FR_X = f32 -FR_Y = f1 - - -.section .text -GLOBAL_LIBM_ENTRY(tgammal) -{ .mfi - alloc r32 = ar.pfs,0,32,4,0 - fabs FR_l_AbsX = f8 // Get absolute value of X - addl GR_n_sin_Table = @ltoff(Constants_Tgammal_sin), gp -} -{ .mfi - addl GR_l_Log_Table=@ltoff(Constants_Tgammal_log_80_Z_G_H_h1#),gp - nop.f 0 - addl GR_l_Stirling_Table = @ltoff(Constants_Tgammal_stirling), gp -};; - -{ .mfi - getf.sig GR_l_signif_Z = f8 // Significand of X - fcvt.fx.s1 FR_n_IXNS = f8 // Convert to fixed point - addl GR_c_Table = @ltoff(Constants_Tgammal_common), gp -} -{ .mfi - ld8 GR_l_Log_Table = [GR_l_Log_Table] - nop.f 0 - addl GR_p_Table = @ltoff(Constants_Tgammal_poly), gp -};; - -{ .mfi - ld8 GR_n_sin_Table = [GR_n_sin_Table] - fclass.m p6,p0 = f8,0x1EF // Check x for NaN, 0, INF, denorm - // NatVal. - addl GR_c_NegSingularity = 0x1003E, r0 -} -{ .mlx - ld8 GR_l_Stirling_Table = [GR_l_Stirling_Table] - movl GR_c_13 = 0x402A000000000000 // 13.0 -};; - -{ .mfi - getf.d GR_c_X = f8 // Double prec. X to general register - frcpa.s1 FR_z_Y0,p0 = f1,f8 // y = frcpa(x) (for negatives) - extr.u GR_l_Index1 = GR_l_signif_Z, 59, 4 // = High 4 bits of Z -} -{ .mlx - ld8 GR_c_Table = [GR_c_Table] - movl GR_c_SignBit = 0x8000000000000000 // High bit (sign) -};; - -{ .mfi - ld8 GR_p_Table = [GR_p_Table] - fcmp.lt.s1 p15, p14 = f8,f0 // p14 - positive arg, p15 - negative - shl GR_l_Index1 = GR_l_Index1,5 // Adjust Index1 ptr (x32) -} -{ .mfb - adds GR_c_NegUnderflow = 1765, r0 - nop.f 0 -(p6) br.cond.spnt tgammal_spec // Spec. values processing branch //////////// - // (0s, INFs, NANs, NatVals, denormals) ////// -};; - -{ .mfi - ldfpd FR_l_CH,FR_l_CL= [GR_l_Stirling_Table], 16 // Load CH, CL - fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Abs arg to int by trunc - extr.u GR_l_X_0 = GR_l_signif_Z, 49, 15 // High 15 bit of Z -} -{ .mfi - add GR_l_Index1 = GR_l_Index1,GR_l_Log_Table // Add offset - fma.s1 FR_p_2 = f1, f1, f1 // 2.0 - andcm GR_c_X = GR_c_X, GR_c_SignBit // Remove sign -};; - -{ .mfi - addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Z_G_H_h2#), gp - fcmp.lt.s1 p10, p0 = FR_l_AbsX, f1 // If |X|<1 then p10 = 1 - nop.i 0 -} -{ .mlx - ld2 GR_l_Z_1 = [GR_l_Index1],4 // load Z_1 from Index1 - movl GR_l_BIAS = 0x000000000000FFFF // Bias for exponent -};; - -{ .mfi - ld8 GR_l_Log_Table = [GR_l_Log_Table] - frcpa.s1 FR_l_Y0, p0 = f1, FR_l_AbsX // y = frcpa(x) - nop.i 0 -} -{ .mfi - ldfs FR_l_G_1 = [GR_l_Index1],4 // Load G_1 - fsub.s1 FR_l_W = FR_l_AbsX, f1 // W = |X|-1 - nop.i 0 -};; - -{ .mfi - getf.exp GR_l_N_Unbiased= FR_l_AbsX // exponent of |X| - fmerge.se FR_l_S = f1, FR_l_AbsX // S = merging of X and 1.0 - cmp.gtu p11, p0 = GR_c_13, GR_c_X // If 1 <= |X| < 13 - // then p11 = 1 -} -{ .mfb - ldfs FR_l_H_1 = [GR_l_Index1],8 // Load H_1 - fcvt.xf FR_n_XNS = FR_n_IXNS // Convert to FP repr. of int X -(p10) br.cond.spnt tgamma_lt_1 // Branch to |X| < 1 path /////////////////// -};; - -{ .mfi - ldfpd FR_n_A2H, FR_n_A2L = [GR_n_sin_Table], 16 - nop.f 0 - pmpyshr2.u GR_l_X_1 = GR_l_X_0,GR_l_Z_1,15 // Adjust Index2 (x32) -} -{ .mfb - ldfe FR_l_B2 = [GR_l_Stirling_Table], 16 - nop.f 0 -(p11) br.cond.spnt tgamma_lt_13 // Branch to 1 <= |X| < 13 path /////////////// -};; - -{ .mfi - ldfe FR_l_h_1 = [GR_l_Index1],0 - nop.f 0 - sub GR_l_N = GR_l_N_Unbiased, GR_l_BIAS // N - BIAS -} -{ .mib - ldfpd FR_l_B4,FR_l_B6= [GR_l_Stirling_Table], 16 // Load C -(p15) cmp.geu.unc p8,p0 = GR_l_N_Unbiased, GR_c_NegSingularity -(p8) br.cond.spnt tgammal_singularity // Singularity for arg < to -2^63 ////// -};; - -{ .mmi -(p15) ldfpd FR_n_A1H, FR_n_A1L = [GR_n_sin_Table], 16 - ldfpd FR_l_B8, FR_l_B10 = [GR_l_Stirling_Table], 16 - add GR_c_Table = 0x20, GR_c_Table -};; - -{ .mfi -(p15) ldfe FR_n_A9 = [GR_n_sin_Table], 16 - fma.s1 FR_l_Q0 = f1,FR_l_Y0,f0 // Q0 = Y0 - nop.i 0 -} -{ .mfi - ldfpd FR_l_B12, FR_l_B14 = [GR_l_Stirling_Table], 16 - fnma.s1 FR_l_E0 = FR_l_Y0,FR_l_AbsX,f1 // e = 1-b*y - nop.i 0 -};; - -{ .mfi -(p15) ldfe FR_n_A8 = [GR_n_sin_Table], 16 - fcvt.xf FR_c_XN = FR_n_IXN // Convert to FP repr. of int X - extr.u GR_l_Index2 = GR_l_X_1, 6, 4 // Extract Index2 -} -{ .mfi - ldfpd FR_l_B16, FR_l_B18 = [GR_l_Stirling_Table], 16 - nop.f 0 - nop.i 0 -};; - -{ .mfi -(p15) ldfe FR_n_A7 = [GR_n_sin_Table], 16 - fms.s1 FR_l_CXH = FR_l_CH, f1, FR_l_AbsX // CXH = CH+|X| - shl GR_l_Index2 = GR_l_Index2,5 -} -{ .mfi - ldfd FR_l_Half = [GR_l_Stirling_Table] // Load 0.5 - nop.f 0 - nop.i 0 -};; - -{ .mfi - add GR_l_Index2 = GR_l_Index2, GR_l_Log_Table // Add offset - nop.f 0 - nop.i 0 -} -{ .mfi -(p15) ldfe FR_n_A6 = [GR_n_sin_Table], 16 -(p15) fma.s1 FR_n_XS = FR_l_AbsX , f1, FR_n_XNS // xs = x - int(x) - nop.i 0 -};; - -{ .mmi - ld2 GR_l_Z_2 = [GR_l_Index2],4 - addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_h3_G_H#),gp - nop.i 0 -};; - -{ .mfi - ld8 GR_l_Log_Table = [GR_l_Log_Table] - fma.s1 FR_l_E2 = FR_l_E0,FR_l_E0,FR_l_E0 // e2 = e+e^2 - nop.i 0 -} -{ .mfi - ldfs FR_l_G_2 = [GR_l_Index2],4 - fma.s1 FR_l_E1 = FR_l_E0,FR_l_E0,f0 // e1 = e^2 - nop.i 0 -};; - -{ .mmi - ldfs FR_l_H_2 = [GR_l_Index2],8 -(p15) ldfe FR_n_A5 = [GR_n_sin_Table], 16 - nop.i 0 -};; - -{ .mfi - setf.sig FR_l_float_N = GR_l_N // float_N = Make N a fp number - nop.f 0 - pmpyshr2.u GR_l_X_2 = GR_l_X_1,GR_l_Z_2,15 // X_2 = X_1 * Z_2 -} -{ .mfi - ldfe FR_l_h_2 = [GR_l_Index2],0 - fma.s1 FR_l_CXL = FR_l_AbsX, f1, FR_l_CXH // CXL = |X|+CXH - add GR_l_Log_Table1= 0x200, GR_l_Log_Table -};; - -{ .mfi -(p15) ldfe FR_n_A4 = [GR_n_sin_Table], 16 -(p15) fcmp.eq.unc.s1 p9,p0 = FR_l_AbsX, FR_c_XN //if argument is integer - // and negative - nop.i 0 -} -{ .mfi - ldfe FR_c_PosOverflow = [GR_c_Table],16 //Load pos overflow value -(p15) fma.s1 FR_n_XS2 = FR_n_XS, FR_n_XS, f0 // xs^2 = xs*xs - nop.i 0 -};; - -{ .mfi -(p15) ldfe FR_n_A3 = [GR_n_sin_Table], 16 - nop.f 0 - nop.i 0 -};; - -{ .mfi -(p15) getf.sig GR_n_XN = FR_n_IXN // int(x) to general reg - fma.s1 FR_l_Y1 = FR_l_Y0,FR_l_E2,FR_l_Y0 // y1 = y+y*e2 - nop.i 0 -} -{ .mfb - nop.m 0 - fma.s1 FR_l_E3 = FR_l_E1,FR_l_E1,FR_l_E0 // e3 = e+e1^2 -(p9) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// - // and negative arguments ////////////// -};; - -{ .mfi - nop.m 0 - fms.s1 FR_l_AbsX_m_Half = FR_l_AbsX, f1, FR_l_Half // |x|-0.5 - extr.u GR_l_Index2 = GR_l_X_2, 1, 5 // Get Index3 -};; - -{ .mfi - shladd GR_l_Log_Table1= GR_l_Index2, 2, GR_l_Log_Table1 - nop.f 0 - shladd GR_l_Index3 = GR_l_Index2,4, GR_l_Log_Table // Index3 -} -{ .mfb -(p15) cmp.gtu.unc p11, p0 = GR_n_XN, GR_c_NegUnderflow // X < -1765 - fms.s1 FR_l_CXL = FR_l_CH, f1, FR_l_CXL // CXL = CH - CXL -(p11) br.cond.spnt tgammal_underflow // Singularity for negative argument ////// - // at underflow domain (X < -1765) ////// -};; - -{ .mfi - addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Q#), gp -(p15) fma.s1 FR_n_TT = FR_n_A2L, FR_n_XS2, f0 // T=A2L*x^2 - tbit.nz.unc p13, p12 = GR_n_XN, 0x0 // whether [X] odd or even -} -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_XS2L = FR_n_XS, FR_n_XS, FR_n_XS2 // xs^2 Low part - nop.i 0 -};; - -{ .mfi - ld8 GR_l_Log_Table = [GR_l_Log_Table] -(p15) fma.s1 FR_n_A7 = FR_n_A8, FR_n_XS2, FR_n_A7 // poly tail - nop.i 0 -} -{ .mfi - ldfe FR_l_h_3 = [GR_l_Index3],12 -(p15) fma.s1 FR_n_XS4 = FR_n_XS2, FR_n_XS2, f0 // xs^4 = xs^2*xs^2 - nop.i 0 -};; - -{ .mfi - ldfs FR_l_H_3 = [GR_l_Log_Table1], 0 - fma.s1 FR_l_Y2 = FR_l_Y1, FR_l_E3, FR_l_Y0 // y2 = y+y1*e3 - nop.i 0 -} -{ .mfi - ldfs FR_l_G_3 = [GR_l_Index3], 0 - fnma.s1 FR_l_Z = FR_l_AbsX,FR_l_Q0,f1 // r = a-b*q - nop.i 0 -};; - -{ .mfi - nop.m 0 - fmpy.s1 FR_l_G = FR_l_G_1, FR_l_G_2 // G = G1 * G_2 - nop.i 0 -} -{ .mfi - nop.m 0 - fadd.s1 FR_l_H = FR_l_H_1, FR_l_H_2 // H = H_1 + H_2 - nop.i 0 -};; - -{ .mfi - ldfe FR_l_log2_hi = [GR_l_Log_Table],16 // load log2_hi part - fadd.s1 FR_l_h = FR_l_h_1, FR_l_h_2 // h = h_1 + h_2 - nop.i 0 -} -{ .mfi - nop.m 0 - fcvt.xf FR_l_float_N = FR_l_float_N // int(N) - nop.i 0 -};; - -{ .mfi - ldfe FR_l_log2_lo = [GR_l_Log_Table],16 // Load log2_lo part - fma.s1 FR_l_CXL = FR_l_CXL, f1, FR_l_CL - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TT = FR_n_A2H, FR_n_XS2L, FR_n_TT // T=A2H*x2L+T - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_6 = [GR_l_Log_Table],16 -(p15) fma.s1 FR_n_A3 = FR_n_A4, FR_n_XS2, FR_n_A3 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_A5 = FR_n_A6, FR_n_XS2, FR_n_A5 // poly tail - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_5 = [GR_l_Log_Table],16 -(p15) fabs FR_n_XS = FR_n_XS // abs(xs) - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_Z = FR_l_Z,FR_l_Y2,FR_l_Q0 // x_hi = q+r*y2 - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_4 = [GR_l_Log_Table],16 -(p15) fma.s1 FR_n_A7 = FR_n_A9, FR_n_XS4, FR_n_A7 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_XS7 = FR_n_XS4, FR_n_XS2, f0 // = x^4*x^2 - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_3 = [GR_l_Log_Table],16 - fneg FR_n_NegOne = f1 // -1.0 - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_XS8 = FR_n_XS4, FR_n_XS4, f0 // xs^8 = xs^4*xs^4 - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_2 = [GR_l_Log_Table],16 - fadd.s1 FR_l_h = FR_l_h, FR_l_h_3 // h = h_1 + h_2 + h_3 - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TH = FR_n_A2H, FR_n_XS2, FR_n_TT // A2H*xs2+T - nop.i 0 -};; - -{ .mfi - ldfe FR_l_Q_1 = [GR_l_Log_Table],16 - fmpy.s1 FR_l_G = FR_l_G, FR_l_G_3 // G = G_1 * G_2 * G_3 - nop.i 0 -} -{ .mfi - nop.m 0 - fadd.s1 FR_l_H = FR_l_H, FR_l_H_3 // H = H_1 + H_2 + H_3 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_Z2 = FR_l_Z, FR_l_Z, f0 // Z^2 - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_A3 = FR_n_A5, FR_n_XS4, FR_n_A3 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p14) fcmp.gt.unc.s1 p7,p0 = FR_l_AbsX, FR_c_PosOverflow //X > 1755.5483 - // (overflow domain, result cannot be represented by normal value) - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_XS7 = FR_n_XS7, FR_n_XS, f0 // x^7 construction - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_TL = FR_n_A2H, FR_n_XS2, FR_n_TH // A2H*xs2+TH - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_PolyH = FR_n_TH, f1, FR_n_A1H // PolyH=TH+A1H - nop.i 0 -};; - -{ .mfi - nop.m 0 - fmpy.s1 FR_l_GS_hi = FR_l_G, FR_l_S // GS_hi = G*S - nop.i 0 -} -{ .mfb - nop.m 0 - fms.s1 FR_l_r = FR_l_G, FR_l_S, f1 // r = G*S -1 -(p7) br.cond.spnt tgammal_overflow // Overflow path for arg > 1755.5483 ////// -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_B14 = FR_l_B16, FR_l_Z2, FR_l_B14// Bernoulli tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_Z4 = FR_l_Z2, FR_l_Z2, f0 // Z^4 = Z^2*Z^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_B2 = FR_l_B4, FR_l_Z2, FR_l_B2 // Bernoulli tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_B6 = FR_l_B8, FR_l_Z2, FR_l_B6 // Bernoulli tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_B10 = FR_l_B12, FR_l_Z2, FR_l_B10// Bernoulli tail - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_Tail = FR_n_A7, FR_n_XS8, FR_n_A3 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT // TL = TL+T - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_PolyL = FR_n_A1H, f1, FR_n_PolyH // polyH+A1H - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_poly_lo = FR_l_r, FR_l_Q_6, FR_l_Q_5 // Q_5+r*Q_6 - nop.i 0 -} -{ .mfi - nop.m 0 - fsub.s1 FR_l_r_cor = FR_l_GS_hi, f1 // r_cor = GS_hi -1 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_l_GS_lo = FR_l_G, FR_l_S, FR_l_GS_hi // G*S-GS_hi - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_poly = FR_l_r, FR_l_Q_2, FR_l_Q_1 //poly=r*Q2+Q1 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fmpy.s1 FR_l_rsq = FR_l_r, FR_l_r // rsq = r * r - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_G = FR_l_float_N, FR_l_log2_hi, FR_l_H // Tbl = - // float_N*log2_hi + H - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_Y_lo = FR_l_float_N, FR_l_log2_lo, FR_l_h // Y_lo= - // float_N*log2_lo + h - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_B14 = FR_l_B18, FR_l_Z4, FR_l_B14 //bernulli tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_B2 = FR_l_B6, FR_l_Z4, FR_l_B2 //bernulli tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_Z8 = FR_l_Z4, FR_l_Z4, f0 //bernulli tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_4 // poly_lo = - // Q_4 + r * poly_lo - nop.i 0 -} -{ .mfi - nop.m 0 - fsub.s1 FR_l_r_cor = FR_l_r_cor, FR_l_r // r_cor = r_cor - r - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TH // polyL+TH - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TT = FR_n_TL, f1, FR_n_A1L // TL+A1L - nop.i 0 -};; - -{ .mfi - nop.m 0 - fadd.s1 FR_l_logl_YHi = FR_l_G, FR_l_r // Y_hi = Tbl + r - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_B10 = FR_l_B14, FR_l_Z4, FR_l_B10 //bernulli tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_3 // poly_lo = - // Q_3 + r * poly_lo - nop.i 0 -} -{ .mfi - nop.m 0 - fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_GS_lo // r_cor=r_cor+GS_lo - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TT // polyL+TT - nop.i 0 -};; - -{ .mfi - nop.m 0 - fsub.s1 FR_l_Y_lo_res = FR_l_G, FR_l_logl_YHi // Y_lo = Tbl - Y_hi - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_XYH = FR_l_logl_YHi, FR_l_AbsX_m_Half, f0 // XYH= - // YHi*|x-0.5| - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_SS = FR_l_B10, FR_l_Z8, FR_l_B2 // Bernoulli tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_Y_lo // r_cor = r_cor+Y_lo - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly_lo, FR_l_poly //poly= - // r^2*polyLo+poly - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_n_XS2, f0 // T=polyL*xs^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fadd.s1 FR_l_Y_lo = FR_l_Y_lo_res, FR_l_r // Y_lo = Y_lo + r - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_l_XYL = FR_l_logl_YHi, FR_l_AbsX_m_Half, FR_l_XYH - // XYL = YHi*|x-0.5|-XYH - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_SSCXH = FR_l_SS, FR_l_Z, FR_l_CXH // SS*Z+CXH - nop.i 0 -} -{ .mfi - mov GR_e_exp_2tom51= 0xffff-51 // 2^-51 -(p15) fma.s1 FR_l_SignedXYH = FR_l_XYH, FR_n_NegOne, f0 // XYH = -XYH - // for negatives - nop.i 0 -};; - -{ .mlx - nop.m 0 - movl GR_e_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) -} -{ .mlx - nop.m 0 - movl GR_e_sig_inv_ln2 = 0xb8aa3b295c17f0bc //significand of 1/ln2 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly, FR_l_r_cor // poly = - // rsq * poly + r_cor - nop.i 0 -};; - -{ .mfi - addl GR_e_ad_Arg = @ltoff(Constants_Tgammal_exp_64_Arg#),gp -(p15) fma.s1 FR_n_TT = FR_n_PolyH, FR_n_XS2L, FR_n_TT - mov GR_e_exp_mask = 0x1FFFF // Form exponent mask -} -{ .mlx - nop.m 0 - movl GR_e_rshf = 0x43e8000000000000 // 1.10000 2^63 rshift -};; - - -{ .mmi - setf.sig FR_e_INV_LN2_2TO63 = GR_e_sig_inv_ln2 // form 1/ln2 * 2^63 - setf.d FR_e_RSHF_2TO51 = GR_e_rshf_2to51 // 1.1000 * 2^(63+51) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_l_SSCXL = FR_l_CXH, f1, FR_l_SSCXH // CXH+SS*CXH - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_e_expl_Input_AbsX = FR_l_XYH, f1, FR_l_SSCXH // HI EXP - nop.i 0 -};; - -.pred.rel "mutex",p14,p15 -{ .mfi - nop.m 0 -(p14) fma.s1 FR_e_expl_Input_X = FR_l_XYH, f1, FR_l_SSCXH // HI EXP - mov GR_e_exp_bias = 0x0FFFF // Set exponent bias -} -{ .mfi - ld8 GR_e_ad_Arg = [GR_e_ad_Arg] // Point to Arg table -(p15) fms.s1 FR_e_expl_Input_X = FR_l_SignedXYH, f1, FR_l_SSCXH // HI EXP - nop.i 0 -};; - -{ .mfi - nop.m 0 - fadd.s1 FR_l_logl_YLo = FR_l_Y_lo, FR_l_poly // YLo = YLo+poly - nop.i 0 -};; - -{ .mfi - setf.exp FR_e_2TOM51 = GR_e_exp_2tom51 //2^-51 for scaling float_N -(p15) fma.s1 FR_n_TH = FR_n_PolyH, FR_n_XS2, FR_n_TT // TH= - // polyH*xs^2+T - nop.i 0 -} -{ .mib - setf.d FR_e_RSHF = GR_e_rshf // Right shift const 1.1000*2^63 - nop.i 0 - nop.b 0 -};; - -{ .mfi - add GR_e_ad_A = 0x20, GR_e_ad_Arg // Point to A table - nop.f 0 - add GR_e_ad_T1 = 0x50, GR_e_ad_Arg // Point to T1 table -} -{ .mfi - add GR_e_ad_T2 = 0x150, GR_e_ad_Arg // Point to T2 table - nop.f 0 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_SSCXL = FR_l_SS, FR_l_Z, FR_l_SSCXL - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_e_expl_Input_Y = FR_l_XYH, f1, FR_e_expl_Input_AbsX - nop.i 0 -};; - -{ .mfi - ldfe FR_e_L_hi = [GR_e_ad_Arg],16 // Get L_hi - nop.f 0 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_XYL = FR_l_logl_YLo, FR_l_AbsX_m_Half, FR_l_XYL - // XYL = YLo*|x-0.5|+XYL - nop.i 0 -};; - -{ .mfi - ldfe FR_e_L_lo = [GR_e_ad_Arg],16 // Get L_lo -(p15) fms.s1 FR_n_TL = FR_n_PolyH, FR_n_XS2, FR_n_TH // TL = - // = polyH*xs^2-TH - add GR_e_ad_W1 = 0x100, GR_e_ad_T2 // Point to W1 table -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_Poly1H = FR_n_TH, f1, f1 // poly1H = TH+1 - add GR_e_ad_W2 = 0x300, GR_e_ad_T2 // Point to W2 table -};; - -{ .mmi - getf.exp GR_e_signexp_x = FR_e_expl_Input_X // Extract sign and exp - ldfe FR_e_A3 = [GR_e_ad_A],16 // Get A3 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_SSCXL = FR_l_SSCXL, f1, FR_l_CXL - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_SSCXH - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_N_signif=FR_e_expl_Input_X,FR_e_INV_LN2_2TO63,FR_e_RSHF_2TO51 - and GR_e_exp_x = GR_e_signexp_x, GR_e_exp_mask -};; - -{ .mmi - sub GR_e_exp_x = GR_e_exp_x, GR_e_exp_bias // Get exponent - ldfe FR_e_A2 = [GR_e_ad_A],16 // Get A2 for main path - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_PolyH = FR_n_Poly1H, FR_n_XS, f0//sin(Pi*x) poly - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_Poly1L = f1, f1, FR_n_Poly1H//sin(Pi*x) poly - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT//sin(Pi*x) poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_l_Temp = FR_l_XYL, f1, FR_l_SSCXL // XYL+SS*CXL - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, FR_n_NegOne, f0 - // Negate lo part of exp argument for negative input values - nop.i 0 -};; - -{ .mfi - ldfe FR_e_A1 = [GR_e_ad_A],16 // Get A1 - nop.f 0 - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_e_float_N = FR_e_N_signif, FR_e_2TOM51, FR_e_RSHF - // Get float N = signd*2^51-RSHIFTER - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TH //sin(Pi*x) poly - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_PolyL = FR_n_Poly1H, FR_n_XS, FR_n_PolyH//sin(Pi*x) - nop.i 0 -};; - -{ .mfi - getf.sig GR_e_N_fix = FR_e_N_signif // Get N from significand - nop.f 0 - nop.i 0 -};; - -.pred.rel "mutex",p14,p15 -{ .mfi - nop.m 0 -(p14) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fms.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp - // arguments for exp computation - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_e_r = FR_e_L_hi, FR_e_float_N, FR_e_expl_Input_X - // r = -L_hi * float_N + x - extr.u GR_e_M1 = GR_e_N_fix, 6, 6 // Extract index M_1 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TL //sin(Pi*x) poly - nop.i 0 -};; - - -{ .mmf - nop.m 0 - nop.m 0 - fma.s1 FR_e_r = FR_e_r, f1, FR_e_expl_Input_Y - // r = r + FR_e_expl_Input_Y -};; - -{ .mmi - shladd GR_e_ad_W1 = GR_e_M1,3,GR_e_ad_W1 // Point to W1 - shladd GR_e_ad_T1 = GR_e_M1,2,GR_e_ad_T1 // Point to T1 - extr.u GR_e_M2 = GR_e_N_fix, 0, 6 // Extract index M_2 -};; - - -{ .mfi - ldfs FR_e_T1 = [GR_e_ad_T1],0 // Get T1 - nop.f 0 - extr GR_e_K = GR_e_N_fix, 12, 32 //Extract limit range K -} -{ .mfi - shladd GR_e_ad_T2 = GR_e_M2,2,GR_e_ad_T2 // Point to T2 -(p15) fma.s1 FR_n_PolyL = FR_n_Poly1L, FR_n_XS, FR_n_PolyL - //sin(Pi*x) poly - shladd GR_e_ad_W2 = GR_e_M2,3,GR_e_ad_W2 // Point to W2 -};; - -{ .mfi - ldfs FR_e_T2 = [GR_e_ad_T2],0 // Get T2 - nop.f 0 - add GR_e_exp_2_k = GR_e_exp_bias, GR_e_K // exp of 2^k -} -{ .mfi - ldfd FR_e_W1 = [GR_e_ad_W1],0 // Get W1 - nop.f 0 - sub GR_e_exp_2_mk = GR_e_exp_bias, GR_e_K // exp of 2^-k -};; - -{ .mmi - ldfd FR_e_W2 = [GR_e_ad_W2],0 // Get W2 - nop.m 0 - nop.i 0 -};; - -{ .mmf - setf.exp FR_e_scale = GR_e_exp_2_k // Set scale = 2^k - setf.exp FR_e_2_mk = GR_e_exp_2_mk // Form 2^-k - fnma.s1 FR_e_r = FR_e_L_lo, FR_e_float_N, FR_e_r - // r = -L_lo * float_N + r -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_PolyL = FR_n_Tail, FR_n_XS7, FR_n_PolyL - //sin(Pi*x) poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_poly = FR_e_r, FR_e_A3, FR_e_A2 // poly=r*A3+A2 - nop.i 0 -} -{ .mfi - nop.m 0 - fmpy.s1 FR_e_rsq = FR_e_r, FR_e_r // rsq = r * r - nop.i 0 -};; - -{ .mfi - nop.m 0 - fmpy.s1 FR_e_T = FR_e_T1, FR_e_T2 // T = T1 * T2 - nop.i 0 -} -{ .mfi - nop.m 0 - fadd.s1 FR_e_W1_p1 = FR_e_W1, f1 // W1_p1 = W1 + 1.0 - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_l_AbsX, f0 //sin(Pi*x) poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_poly = FR_e_r, FR_e_poly, FR_e_A1 - // poly = r * poly + A1 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_T_scale = FR_e_T, FR_e_scale, f0 // T_scale=T*scale - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_e_W = FR_e_W2, FR_e_W1_p1, FR_e_W1 - // W = W2 * (W1+1.0) + W1 - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_SinxH = FR_n_PolyH, FR_l_AbsX, FR_n_TT - // sin(Pi*x) poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - mov FR_e_Y_hi = FR_e_T // Assume Y_hi = T - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_poly = FR_e_rsq, FR_e_poly, FR_e_r - // poly = rsq * poly + r - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_Wp1_T_scale = FR_e_W, FR_e_T_scale, FR_e_T_scale - // (W+1)*T*scale - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_e_W_T_scale = FR_e_W, FR_e_T_scale, f0 // W*T*scale - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fms.s1 FR_n_SinxL = FR_n_PolyH, FR_l_AbsX, FR_n_SinxH - // Low part of sin - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) frcpa.s1 FR_n_Y0, p0 = f1, FR_n_SinxH // y = frcpa(b) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_result_lo = FR_e_Wp1_T_scale, FR_e_poly, FR_e_W_T_scale - // Low part of exp result - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_SinxL = FR_n_SinxL, f1, FR_n_TT // sin low result - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p15) fma.s1 FR_n_Q0 = f1,FR_n_Y0,f0 // q = y - nop.i 0 -} -{ .mfi - nop.m 0 -(p15) fnma.s1 FR_n_E0 = FR_n_Y0, FR_n_SinxH, f1 // e = 1-b*y - nop.i 0 -};; - - -{ .mfb - nop.m 0 -(p14) fma.s0 f8 = FR_e_Y_hi, FR_e_scale, FR_e_result_lo -(p14) br.ret.spnt b0 // Exit for positive Stirling path ////////////////////// -};; - -{ .mfi - nop.m 0 - fma.s1 FR_e_expl_Output_X = FR_e_Y_hi, FR_e_scale, f0 // exp result - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_e_expl_Output_Y = FR_e_result_lo, f1, f0// exp lo result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_E2 = FR_n_E0,FR_n_E0,FR_n_E0 // e2 = e+e^2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_n_E1 = FR_n_E0,FR_n_E0,f0 // e1 = e^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_Y1 = FR_n_Y0,FR_n_E2,FR_n_Y0 // y1 = y+y*e2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_n_E3 = FR_n_E1,FR_n_E1,FR_n_E0 // e3 = e+e1^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_Y2 = FR_n_Y1,FR_n_E3,FR_n_Y0 // y2 = y+y1*e3 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_n_R0 = FR_n_SinxH,FR_n_Q0,f1 // r = a-b*q - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_n_E4 = FR_n_SinxH,FR_n_Y2,f1 // e4 = 1-b*y2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_n_RcpResH = FR_n_R0,FR_n_Y2,FR_n_Q0 // x = q+r*y2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_Y3 = FR_n_Y2,FR_n_E4,FR_n_Y2 // y3 = y2+y2*e4 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_n_R1 = FR_n_SinxH,FR_n_RcpResH,f1 // r1 = a-b*x - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_n_R1 = FR_n_SinxL,FR_n_RcpResH,FR_n_R1 - // r1 = r1 - b_lo*X - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_RcpResL = FR_n_R1,FR_n_Y3,f0 // x_lo = r1*y3 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_n_Temp = FR_n_RcpResH, FR_e_expl_Output_Y, f0 - // Multiplying exp and sin result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_Temp = FR_n_RcpResL, FR_e_expl_Output_X, FR_n_Temp - // Multiplying exp and sin result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_ResH = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_Temp - // Multiplying exp and sin result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_n_ResL = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_ResH - // Multiplying exp and sin result - nop.i 0 -} -{ .mfi - nop.m 0 -(p12) fma.s1 FR_n_ResH = FR_n_ResH, FR_n_NegOne, f0 // Negate - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_n_ResL = FR_n_ResL, f1, FR_n_Temp - // Multiplying exp and sin result - low result obtained - nop.i 0 -};; - -.pred.rel "mutex",p12,p13 -{ .mfi - nop.m 0 -(p13) fma.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For odd - nop.i 0 -} -{ .mfb - nop.m 0 -(p12) fms.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For even - br.ret.sptk b0 // Exit for negative Stirling path ////////////////////// -};; - - -//////////// 1 <= |X| < 13 path //////////////////////////////////////////////// -//------------------------------------------------------------------------------ -.align 64 -tgamma_lt_13: -{ .mfi - getf.sig GR_p_XN = FR_p_IXN // Get significand - fcvt.xf FR_p_XN = FR_p_IXN // xn = [x] - add GR_r_sin_Table2= 0x40, GR_r_sin_Table // Shifted table addr. -} -{ .mfi - ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 // 0.5 & 1.5 - fms.s1 FR_p_AbsXM1 = FR_p_AbsX, f1, f1 // X-1 - add GR_p_Table2 = 0xB0, GR_p_Table -};; - -{ .mfi - add GR_r_sin_Table = -16, GR_r_sin_Table // For compensation - fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float - shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 59 // Get only 5 bit of signd -};; - -{ .mfi - ldfpd FR_r_A2H,FR_r_A2L = [GR_r_sin_Table], 16 // Load A2 - nop.f 0 - add GR_p_Int = -2, GR_p_XN // int = int - 2 -} -{ .mfi - ldfe FR_r_A6 = [GR_r_sin_Table2], 16 - nop.f 0 - cmp.gtu p11, p12 = 0x2, GR_p_XN // p11: x < 2 (splitted intervals), - // p12: x > 2 (base intervals) -};; - -{ .mfi - ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 - nop.f 0 - shr GR_p_Int = GR_p_Int, 1 // int/2 -} -{ .mfi - ldfe FR_r_A5 = [GR_r_sin_Table2], 16 - nop.f 0 -(p11) cmp.gtu.unc p10, p11 = 0x1C, GR_p_X_Sgnd // sgnd(x) < 0.75 -};; - -{ .mfi - ldfe FR_r_A9 = [GR_r_sin_Table], 16 - nop.f 0 - shl GR_p_Offset = GR_p_Int, 4 // offset = int*16 -} -{ .mfi - ldfe FR_r_A4 = [GR_r_sin_Table2], 16 - nop.f 0 -(p10) cmp.gtu.unc p9, p10 = 0x14, GR_p_X_Sgnd // sgnd(x) < 0.25 -};; - - -{ .mfi - ldfe FR_r_A8 = [GR_r_sin_Table], 16 - nop.f 0 -(p12) tbit.nz.unc p13, p12 = GR_p_XN, 0x0 // p13: reccurent computations - // X is at [3;4], [5;6], [7;8]... interval -} -{ .mfi - ldfe FR_r_A3 = [GR_r_sin_Table2], 16 - nop.f 0 - shladd GR_p_Offset = GR_p_Int, 2, GR_p_Offset // +int*4 -};; - -.pred.rel "mutex",p9,p11 -{ .mfi - add GR_p_Offset = GR_p_Int, GR_p_Offset - // +int, so offset = int*21 -(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f1 // r = x-1 - nop.i 0 -} -{ .mfi - ldfe FR_r_A7 = [GR_r_sin_Table], 16 -(p11) fms.s1 FR_p_XR = FR_p_2, f1, FR_p_AbsX - // r = 2-x for 1.75 < x < 2 - nop.i 0 -};; - -.pred.rel "mutex",p9,p10 -.pred.rel "mutex",p10,p11 -.pred.rel "mutex",p9,p11 -{ .mfi -(p9) add GR_p_Offset = 126, r0 // 1.0 < x < 1.25 table -(p15) fcmp.eq.unc.s1 p7,p0 = FR_p_AbsX, FR_p_XN - // If arg is integer and negative - singularity branch - nop.i 0 -} -{ .mfi -(p10) add GR_p_Offset = 147, r0 // 1.25 < x < 1.75 table - nop.f 0 -(p11) add GR_p_Offset = 168, r0 // 1.75 < x < 2.0 table -};; - -{ .mmf - shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table - shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 - fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = x - [x] -};; - -{ .mmb - ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 - ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 -(p7) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// - // and negative argument /////////////// -};; - -{ .mfi - ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 - fma.s1 FR_p_XN = FR_p_XN, f1, FR_p_0p5 // xn = xn+0.5 - nop.i 0 -} -{ .mfi - ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 -(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_1p5 // r = x - 1.5 - nop.i 0 -};; - -{ .mmi - ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 - ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A20 = [GR_p_Table], 16 - ldfe FR_p_A12 = [GR_p_Table2], 16 - nop.i 0 -};; - -{ .mmf - ldfe FR_p_A19 = [GR_p_Table], 16 - ldfe FR_p_A11 = [GR_p_Table2], 16 - fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs2 = xs*xs -};; - -{ .mmi - ldfe FR_p_A18 = [GR_p_Table], 16 - ldfe FR_p_A10 = [GR_p_Table2], 16 - nop.i 0 -};; - -.pred.rel "mutex",p12,p13 -{ .mfi - ldfe FR_p_A17 = [GR_p_Table], 16 -(p12) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN // r = x - xn - nop.i 0 -} -{ .mfi - ldfe FR_p_A9 = [GR_p_Table2], 16 -(p13) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A16 = [GR_p_Table], 16 - ldfe FR_p_A8 = [GR_p_Table2], 16 -(p9) cmp.eq p12, p0 = r0, r0 // clear p12 -};; - -{ .mmi - ldfe FR_p_A15 = [GR_p_Table], 16 - ldfe FR_p_A7 = [GR_p_Table2], 16 -(p10) cmp.eq p12, p0 = r0, r0 // clear p12 -};; - -{ .mfi - ldfe FR_p_A14 = [GR_p_Table], 16 - fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // sin for neg -(p11) cmp.eq p12, p0 = r0, r0 // clear p12 -} -{ .mfi - ldfe FR_p_A6 = [GR_p_Table2], 16 - fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - ldfe FR_p_A13 = [GR_p_Table], 16 - fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // x2Lo part - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // A5H*r - // 'Low poly' - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // r^2 = r*r - nop.i 0 -};; - -{ .mfi - nop.m 0 - fabs FR_r_XS = FR_r_XS // abs(xs) - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // A2H*r - // 'High poly' - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp5L = FR_p_A5H,FR_p_XR,FR_p_Temp5H //A5H*r delta - // 'Low poly' - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // A5H*r+A4H - // 'Low poly' - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H//A2H*r delta - //'High poly' - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // A2H*r+A1H - //'High poly' - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 = r^2*r - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // Poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // r^4 = r^2*r^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L// Low part - // of A5*r+A4 - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low part - // of A5*r+A4 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // (A5H*r+A4H)*r - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // A2*r low - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp4L = FR_p_Poly5H,FR_p_XR,FR_p_Temp4H //Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // Poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // Poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // Poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // Poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0H = FR_p_Poly3H,f1,FR_p_Poly1H //Low & High add - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // Poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly0L = FR_p_Poly1H,f1,FR_p_Poly0H //Low & High add - nop.i 0 -} -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_OddPoly0H = FR_p_Poly0H, FR_p_AbsXM1, f0 - // Reccurent computations - multiplying by X-1 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L//High - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH//sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Poly3H //Low & High add - nop.i 0 -} -{ .mfi - nop.m 0 -(p13) fms.s1 FR_p_OddPoly0L = FR_p_Poly0H, FR_p_AbsXM1, FR_p_OddPoly0H - // Reccurent computations - multiplying by X-1 (low part) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp0H = FR_p_Poly3L,f1,FR_p_Poly1L //Low & High add - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL//sin for neg - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // sin tail res - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Temp0H //Low & High add - nop.i 0 -};; - - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_Tail,FR_r_XS7,FR_r_ResL //sin for neg - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_OddPoly0L = FR_p_Poly0L, FR_p_AbsXM1, FR_p_OddPoly0L - // Reccurent computations - multiplying by X-1 (low part) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TT = FR_r_ResL, FR_r_AbsX, f0 // X*sin - nop.i 0 -};; - -.pred.rel "mutex",p12,p13 -{ .mfi - nop.m 0 -(p12) fma.s0 f8 = FR_p_Poly0H, f1, FR_p_Poly0L // Even - nop.i 0 -} -{ .mfb - nop.m 0 -(p13) fma.s0 f8 = FR_p_OddPoly0H, f1, FR_p_OddPoly0L // Odd -(p14) br.ret.spnt b0 // Exit for 1 <= |X| < 13 path (positive arguments)///// -};; - -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_Poly0H = FR_p_OddPoly0H, f1, f0 - // Reccurent computations - nop.i 0 -} -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_Poly0L = FR_p_OddPoly0L, f1, f0 - // Reccurent computations - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res1H = FR_r_ResH, FR_r_AbsX, FR_r_TT // X*sin -(p11) cmp.eq p13, p12 = r0, r0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_Res1L = FR_r_ResH,FR_r_AbsX,FR_r_Res1H// X*sin -(p9) cmp.eq p13, p12 = r0, r0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // sin for neg -(p10) cmp.eq p13, p12 = r0, r0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_p_Poly0L, FR_r_Res1H, f0 // mult by sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_p_Poly0H,FR_r_Res1L,FR_r_TL//mult by sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_p_Poly0H,FR_r_Res1H,FR_r_TL//mult by sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH//sin mult - nop.i 0 -};; - -{ .mfi - nop.m 0 - frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fneg FR_r_NegOne = f1 // Form -1.0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL //Low result of mult - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1-b_lo*X - nop.i 0 -} -{ .mfi - nop.m 0 -(p12) fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate for evens - nop.i 0 -};; - -.pred.rel "mutex",p13,p12 -{ .mfi - nop.m 0 -(p13) fma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZH // Final result - nop.i 0 -} -{ .mfb - nop.m 0 -(p12) fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Final result - br.ret.sptk b0 // Exit for 1 <= |X| < 13 path (negative arguments)////// -};; - - -//////////// |X| < 1 path ///////////////////////////////////////////////////// -//------------------------------------------------------------------------------ -.align 64 -tgamma_lt_1: -{ .mfi - getf.exp GR_p_Exp = FR_p_AbsX // exp of abs X - fma.s1 FR_z_Q0 = f1,FR_z_Y0,f0 // q = a*y - add GR_r_sin_Table2= 0x50, GR_r_sin_Table -} -{ .mfi - ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 - fnma.s1 FR_z_E0 = FR_z_Y0,f8,f1 // e = 1-b*y - add GR_p_Table2 = 0xB0, GR_p_Table -};; - -{ .mfi - ldfd FR_p_0p25 = [GR_c_Table] - fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float - shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 60 - // Obtain only 4 bits of significand -} -{ .mfi - nop.m 0 - nop.f 0 - add GR_p_Bias = 0xffff, r0 // Set bias -};; - -{ .mfi - ldfpd FR_r_A2H, FR_r_A2L = [GR_r_sin_Table], 16 - nop.f 0 - shl GR_p_XN = GR_p_Exp, 4 - // Shift exp to 4 bits left to set place for significand -} -{ .mlx - ldfe FR_r_A6 = [GR_r_sin_Table2], 16 - movl GR_p_0p75 = 0xfffec // 0.75 -};; - -{ .mfi - ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 - nop.f 0 - or GR_p_XN = GR_p_XN, GR_p_X_Sgnd - // Combine exp with 4 high bits of significand -} -{ .mfi - ldfe FR_r_A5 = [GR_r_sin_Table2], 16 - nop.f 0 - sub GR_p_Exp = GR_p_Exp, GR_p_Bias // Unbiased exp -};; - -{ .mmi - ldfe FR_r_A9 = [GR_r_sin_Table], 16 - ldfe FR_r_A4 = [GR_r_sin_Table2], 16 - cmp.gtu.unc p10, p11 = GR_p_0p75, GR_p_XN // sgnd(x) < 0.75 -};; - -{ .mfi - ldfe FR_r_A8 = [GR_r_sin_Table], 16 - fma.s1 FR_z_E2 = FR_z_E0,FR_z_E0,FR_z_E0 // e2 = e+e^2 -(p10) cmp.gt.unc p9, p10 = -2, GR_p_Exp // x < 0.25 -} -{ .mfi - ldfe FR_r_A3 = [GR_r_sin_Table2], 16 - fma.s1 FR_z_E1 = FR_z_E0,FR_z_E0,f0 // e1 = e^2 -(p11) add GR_p_Offset = 168, r0 // [0.75;1] interval -};; - -{ .mmi -(p10) add GR_p_Offset = 147, r0 // [0.25;0.75] interval - ldfe FR_r_A7 = [GR_r_sin_Table], 16 -(p9) cmp.gt.unc p8, p9 = -3, GR_p_Exp // x < 0.125 -};; - -.pred.rel "mutex",p9,p8 -{ .mmi -(p9) add GR_p_Offset = 126, r0 // [0.125;0.25] interval -(p8) add GR_p_Offset = 189, r0 // [0.;0.125] interval - nop.i 0 -};; - -{ .mmf - shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table //Make addresses - shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 - fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = |x|-[x] -};; - -.pred.rel "mutex",p8,p11 -{ .mfi - ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 -(p11) fms.s1 FR_p_XR = f1, f1, FR_p_AbsX // r = 1 - |x| - // for [0.75;1] interval - nop.i 0 -} -{ .mfi - ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 -(p8) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| - // for [0.;0.125] interval - nop.i 0 -};; - -{ .mfi - ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 - fma.s1 FR_z_Y1 = FR_z_Y0,FR_z_E2,FR_z_Y0 // y1 = y+y*e2 - nop.i 0 -} -{ .mfi - ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 - fma.s1 FR_z_E3 = FR_z_E1,FR_z_E1,FR_z_E0 // e3 = e+e1^2 - nop.i 0 -};; - -.pred.rel "mutex",p9,p10 -{ .mfi - ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 -(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| - // for [0.125;0.25] interval - nop.i 0 -} -{ .mfi - ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 -(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_0p5 // r = |x| - 0.5 - // for [0.25;0.75] interval - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A20 = [GR_p_Table], 16 - ldfe FR_p_A12 = [GR_p_Table2], 16 - nop.i 0 -};; - -{ .mfi - ldfe FR_p_A19 = [GR_p_Table], 16 - fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs^2 - nop.i 0 -} -{ .mfi - ldfe FR_p_A11 = [GR_p_Table2], 16 - nop.f 0 - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A18 = [GR_p_Table], 16 - ldfe FR_p_A10 = [GR_p_Table2], 16 - nop.i 0 -};; - -.pred.rel "mutex",p12,p13 -{ .mfi - ldfe FR_p_A17 = [GR_p_Table], 16 - fma.s1 FR_z_Y2 = FR_z_Y1,FR_z_E3,FR_z_Y0 // y2 = y+y1*e3 - nop.i 0 -} -{ .mfi - ldfe FR_p_A9 = [GR_p_Table2], 16 - fnma.s1 FR_z_R0 = f8,FR_z_Q0,f1 // r = a-b*q - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A16 = [GR_p_Table], 16 - ldfe FR_p_A8 = [GR_p_Table2], 16 - nop.i 0 -};; - -{ .mmi - ldfe FR_p_A15 = [GR_p_Table], 16 - ldfe FR_p_A7 = [GR_p_Table2], 16 - nop.i 0 -};; - -{ .mfi - ldfe FR_p_A14 = [GR_p_Table], 16 - fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // neg sin - nop.i 0 -} -{ .mfi - ldfe FR_p_A6 = [GR_p_Table2], 16 - fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // neg sin - nop.i 0 -};; - -{ .mfi - ldfe FR_p_A13 = [GR_p_Table], 16 - fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // xs^2 delta - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fabs FR_r_XS = FR_r_XS // Absolute value of xs - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_z_E4 = f8,FR_z_Y2,f1 // e4 = 1-b*y2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_z_ZH = FR_z_R0,FR_z_Y2,FR_z_Q0 // 1/x = q+r*y2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp5L = FR_p_A5H, FR_p_XR, FR_p_Temp5H // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_z_Y3 = FR_z_Y2,FR_z_E4,FR_z_Y2 // y3 = y2+y2*e4 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 //poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H //Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp4L = FR_p_Poly5H, FR_p_XR, FR_p_Temp4H//Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L //Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 //poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H /// Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // r^6 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L //Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // poly tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // r^8 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_z_R1 = f8,FR_z_ZH,f1 // r1 = a-b*x - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0H = FR_p_Poly3H, f1, FR_p_Poly1H // Result - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // xs^4 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // poly tail - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_p_Poly0L = FR_p_Poly1H, f1, FR_p_Poly0H // Result - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_z_ZL = FR_z_R1,FR_z_Y3, f0 // x_lo = r1*y3 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 /// neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L // High - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // neg sin - nop.i 0 -} -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // neg sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Poly3H // result - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p14) fma.s1 f8 = FR_p_Poly0H, FR_z_ZH, f0 // z*poly - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp1L = FR_p_Poly0H, FR_z_ZL, f0 // z*poly low - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin tail - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin low - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // xs^8 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp0H = FR_p_Poly3L, f1, FR_p_Poly1L // result - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p14) fms.s1 FR_p_Temp1H = FR_p_Poly0H, FR_z_ZH, f8 // hi result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL // lo result - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // tail result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Temp0H // lo result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_Tail, FR_r_XS7, FR_r_ResL // lo result - nop.i 0 -};; - -{ .mfi - nop.m 0 -(p14) fma.s1 FR_p_Temp1L = FR_p_Poly0L,FR_z_ZH,FR_p_Temp1L //hi result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TT = FR_r_ResL, f1, f0 // for low result - nop.i 0 -};; - -.pred.rel "mutex",p12,p13 -{ .mfi - nop.m 0 -(p14) fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_Temp1H // for lo res - nop.i 0 -};; - -{ .mfi -(p10) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 - fma.s1 FR_r_Res1H = FR_r_ResH, f1, FR_r_TT // hi res - nop.i 0 -};; - -{ .mfb -(p9) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 -(p14) fma.s0 f8 = f8, f1, FR_p_Temp1L // Final result -(p14) br.ret.spnt b0 // Exit for 0 < |X| < 1 path (positive arguments)/////// -};; - -{ .mfi -(p11) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 - fms.s1 FR_r_Res1L = FR_r_ResH, f1, FR_r_Res1H // Low sin result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // Low sin result - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_p_Poly0L,FR_r_Res1H,f0 //Low sin result - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_TL = FR_p_Poly0H, FR_r_Res1L, FR_r_TL //Low sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_ResH = FR_p_Poly0H, FR_r_Res1H, FR_r_TL //High sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH //Low res - nop.i 0 -};; - -{ .mfi - nop.m 0 - frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) - nop.i 0 -};; - -{ .mfi - nop.m 0 - fneg FR_r_NegOne = f1 // Construct -1.0 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL // low sin - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 - nop.i 0 -};; - -{ .mfi - nop.m 0 - fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 - nop.i 0 -} -{ .mfi - nop.m 0 - fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x - nop.i 0 -};; - -{ .mfi - nop.m 0 - fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1 - b_lo*X - nop.i 0 -} -{ .mfi - nop.m 0 - fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate - nop.i 0 -};; - -.pred.rel "mutex",p13,p12 -{ .mfb - nop.m 0 - fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Result for neg - br.ret.sptk b0 // Exit for 0 < |X| < 1 path (negative arguments)////// -};; - - - - -// SPECIALS (x for natval, nan, +/-inf or +/-0) /////////////////////////////// -//------------------------------------------------------------------------------ -.align 32 -tgammal_spec: -{ .mlx - nop.m 0 - movl GR_DenOverflow = 0x2000000000000001 -} -{ .mfi - nop.m 0 - fclass.m p9,p0 = f8,0xB // +/-denormals - nop.i 0 -};; -{ .mfi - nop.m 0 - fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf - nop.i 0 -};; -{ .mfi - nop.m 0 - fclass.m p7,p8 = f8,0x7 // +/-0 - nop.i 0 -} - -{ .mfi -(p9) cmp.ltu.unc p10,p11 = GR_l_signif_Z, GR_DenOverflow -(p9) fnorm.s0 f8 = f8 - nop.i 0 -};; - -{ .mfb - nop.m 0 -(p9) fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Round by truncate -(p11) br.cond.sptk tgamma_lt_1 // Return to gamma ('good' denormal)//////////// -};; - -{ .mfb - nop.m 0 - nop.f 0 -(p10) br.cond.spnt tgammal_overflow // "Bad" denormal - overflow! ///////////// -};; - -{ .mfi - nop.m 0 - mov FR_X = f8 // for error handler - nop.i 0 -} -{ .mfb - nop.m 0 -(p6) fma.s0 f8 = f8,f1,f8 // res = x + x -(p6) br.ret.spnt b0 // Exit for NAN, INF and NatVals //////////////////////// -};; -.pred.rel "mutex",p7,p8 -{ .mfi -(p7) mov GR_Parameter_TAG = 256 // negative -(p7) frcpa.s0 f8,p0 = f1,f8 // Raise V flag - nop.i 0 -} -{ .mfb - nop.m 0 - nop.f 0 -(p8) br.cond.spnt tgammal_singularity // Branch for +ZERO //////////////////// -};; - -{ .mfb - nop.m 0 - nop.f 0 - br.cond.spnt tgammal_libm_err // Branch for -ZERO /////////////////////// -};; - - - - -// SINGULARITY (x is negative integer or 0) //////////////////////////////////// -//------------------------------------------------------------------------------ -.align 32 -tgammal_singularity: -{ .mfi - nop.m 0 - mov FR_X = f8 // For error handler - mov GR_Parameter_TAG = 256 // negative -} -{ .mfb - nop.m 0 - frcpa.s0 f8,p0 = f0,f0 // Raise V flag - br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// - // with singularity error ///////////////// -};; - - - - -// OVERFLOW (result is too big and cannot be represented by normal value) ////// -// ( X > 1755.54 and for denormals with abs value less than 0x2000000000000001 ) -//------------------------------------------------------------------------------ -.align 32 -tgammal_overflow: -{ .mfi - addl r8 = 0x1FFFE, r0 // Exp of INF - fcmp.lt.s1 p15,p14 = f8,f0 // p14 - pos arg, p15 - neg arg - nop.i 0 -};; - -{ .mfi - setf.exp f9 = r8 - mov FR_X = f8 // For error handler - mov GR_Parameter_TAG = 255 // overflow -};; - -.pred.rel "mutex",p14,p15 -{ .mfi - nop.m 0 -(p14) fma.s0 f8 = f9,f9,f0 // Set I,O and +INF result - nop.i 0 -} -{ .mfb - nop.m 0 -(p15) fnma.s0 f8 = f9,f9,f0 // Set I,O and -INF result - br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// - // with overflow error //////////////////// -};; - - - - - -// UNDERFLOW (x is negative noninteger with big absolute value) //////////////// -//------------------------------------------------------------------------------ -.align 32 -tgammal_underflow: -{ .mfi - nop.m 0 - fcvt.fx.trunc.s1 FR_u_IXN = f8 // Convert arg to int repres. in FR - nop.i 0 -};; - -{ .mmi - getf.sig GR_u_XN = FR_u_IXN - mov r11 = 0x00001 - nop.i 0 -};; - -{ .mfi - setf.exp f9 = r11 - nop.f 0 - nop.i 0 -};; - -{ .mfi - nop.m 0 - nop.f 0 - tbit.z p6,p7 = GR_u_XN,0 // even or odd -};; - -.pred.rel "mutex",p6,p7 -{ .mfi - nop.m 0 -(p6) fms.s0 f8 = f9,f9,f9 // for negatives - nop.i 0 -} -{ .mfb - nop.m 0 -(p7) fma.s0 f8 = f9,f9,f9 // for positives - br.ret.sptk b0 // Exit for underflow path ////////////////////////////// -};; - - -GLOBAL_LIBM_END(tgammal) - - - - -////////////////// Tgammal error handler /////////////////////////////////////// -//------------------------------------------------------------------------------ -LOCAL_LIBM_ENTRY(__libm_error_region) -tgammal_libm_err: -.prologue -{ .mfi - add GR_Parameter_Y=-32,sp // Parameter 2 value - nop.f 0 -.save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs -} -{ .mfi -.fframe 64 - add sp=-64,sp // Create new stack - nop.f 0 - mov GR_SAVE_GP=gp // Save gp -};; -{ .mmi - stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack - add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 -};; -.body -{ .mib - stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y - nop.b 0 // Parameter 3 address -} -{ .mib - stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y - br.call.sptk b0=__libm_error_support# // Call error handling function -};; -{ .mmi - nop.m 999 - nop.m 999 - add GR_Parameter_RESULT = 48,sp -};; -{ .mmi - ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack -.restore sp - add sp = 64,sp // Restore stack pointer - mov b0 = GR_SAVE_B0 // Restore return address -};; -{ .mib - mov gp = GR_SAVE_GP // Restore gp - mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs - br.ret.sptk b0 // Return -};; - -LOCAL_LIBM_END(__libm_error_region#) - -.type __libm_error_support#,@function -.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/w_tgammal_compat.S b/sysdeps/ia64/fpu/w_tgammal_compat.S new file mode 100644 index 0000000000..b10c5dc276 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammal_compat.S @@ -0,0 +1,4487 @@ +.file "tgammal.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// 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. +// +// * The name of Intel Corporation may not 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 INTEL OR ITS +// 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. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 01/16/02 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 03/17/03 Moved tgammal_libm_err label into .proc region +// 04/10/03 Changed error codes for overflow and negative integers +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// long double tgammal(long double) +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f32-f127 +// +// General Purpose Registers: r32-r67 +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgammal(+inf) = +inf +// tgammal(-inf) = QNaN +// tgammal(+/-0) = +/-inf +// tgammal(x<0, x - integer) = QNaN +// tgammal(SNaN) = QNaN +// tgammal(QNaN) = QNaN +// +//********************************************************************* +// Overview of operation +//============================================================== +// +// Algorithm description +// --------------------- +// +// There are 3 main paths in the implementation +// (and additional special values branches) +// +// 1) |X| >= 13 - Stirling formula computation +// a) Positive arguments: +// TGAMMAL(X) = exp((X-0.5)*ln(X) - X + C + S(Z)), +// where C = 0.5*ln(2*Pi) , Z = 1/Z, S(Z) - Bernulli polynomial +// (up to 'B18' term). +// Some of these calculation done in multiprecision. +// Ln returns multiprecision result too +// and exp also accepts and returns pair of values. +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). +// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. +// Here we use polynomial of 9th degree with 2 multiprecision steps. +// Argument range reduction is: +// N = [x] with round to nearest, r = x - N, -0.5 <= r < 0.5 +// After ((X-0.5)*ln(X) - X + C + S(Z)) completed we just invert +// its result and compute exp with negative argument (1/exp(x)=exp(-x)) +// Then we multiply exp result to PI/(X*sin(PI*X)). +// +// 2) 1 <= |X| < 13 - Polynomial part +// a) Positive arguments: +// All values are splitted to such intervals as: +// #0->[2;3], #1->[3,4], #2->[5,6]... +// For even intervals we just use polynomial computation with degree 20 +// and first 6 multiprecision computations. +// Range reduction looks like +// N = [x] with truncate, r = x - N - 0.5, -0.5 <= r < 0.5 +// For odd intervals we use reccurent formula: +// TGAMMAL(X) = TGAMMA(X-1)*(X-1) +// [1;2] interval is splitted to 3 subranges: +// [1;1.25], [1.25;1.75], [1.75;2] with the same polynomial forms +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). +// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. +// After multiplication by TGAMMAL(X) result we calculate reciprocal +// and get final result. +// +// 3) 0 < |X| < 1 - Near 0 part +// a) Here we use reccurent formula TGAMMAL(X) = TGAMMAL(X+1)/X +// TGAMMAL(X+1) calculated as shown above, +// 1/X result obtained in parallel. Then we just multiply these values. +// There is only additional separated subrange: [0;0.125] with specific +// polynomial constants set. +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(TGAMMAL(X+1)*sin(PI*X)). +// There is no need to compute 1/X. + + + +RODATA + +.align 16 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Q) +// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0xA51BE0AF,0x92492453,0x00003FFC,0x00000000 +data4 0xA0CFD29F,0xAAAAAB73,0x0000BFFC,0x00000000 +data4 0xCCCE3872,0xCCCCCCCC,0x00003FFC,0x00000000 +data4 0xFFFFB4FB,0xFFFFFFFF,0x0000BFFC,0x00000000 +data4 0xAAAAAAAB,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0x00000000,0x80000000,0x0000BFFE,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Q) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h1) +// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007879,0x3F70F0F0,0x3D785196,0x00000000 +data4 0xEBA0E0D1,0x8B1D330B,0x00003FDA,0x00000000 +data4 0x000071C8,0x3F638E38,0x3DF13843,0x00000000 +data4 0x9EADD553,0xE2AF365E,0x00003FE2,0x00000000 +data4 0x00006BCB,0x3F579430,0x3E2FF9A0,0x00000000 +data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 +data4 0x00006667,0x3F4CCCC8,0x3E647FD6,0x00000000 +data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 +data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 +data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 +data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 +data4 0x457978A1,0x8718789F,0x00003FE2,0x00000000 +data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 +data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 +data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 +data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 +data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 +data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 +data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 +data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 +data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 +data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 +data4 0x00004925,0x3F124920,0x3F0F4303,0x00000000 +data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 +data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 +data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 +data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 +data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 +data4 0x00004211,0x3F042108,0x3F29516A,0x00000000 +data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h1) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h2) +// Z2 - 16 bit fixed, G2 and H2 IEEE single, h2 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 +data4 0x211398BF,0xAD08B116,0x00003FDB,0x00000000 +data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 +data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 +data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 +data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 +data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 +data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 +data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 +data4 0x049EB22F,0xD1B87D3C,0x00003FDE,0x00000000 +data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 +data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 +data4 0x00007C98,0x3F792FB0,0x3CDCFE47,0x00000000 +data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 +data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 +data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 +data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 +data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 +data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 +data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 +data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 +data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 +data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 +data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 +data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 +data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 +data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 +data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 +data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 +data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h2) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_h3_G_H) +// h3 IEEE double extended, H3 and G3 IEEE single +data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 +data4 0x9B7FAD21,0x90051030,0x00003FD8,0x3F7FF400 +data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 +data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 +data4 0xCA964D95,0xCE65C1D8,0x0000BFD8,0x3F7FDC00 +data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 +data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 +data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 +data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 +data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 +data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 +data4 0x2F053150,0xB25CA912,0x0000BFDA,0x3F7FA420 +data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 +data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 +data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 +data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 +data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 +data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 +data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 +data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 +data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 +data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 +data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 +data4 0x1F34A7EB,0x9A995A97,0x0000BFDC,0x3F7F4488 +data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 +data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 +data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 +data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 +data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 +data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 +data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 +data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 +data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here +data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D +data4 0x3A87F20B,0x3A97F68B,0x3AA7EB86,0x3AB7E101 +data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED +data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 +data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 +data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 +data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D +LOCAL_OBJECT_END(Constants_Tgammal_log_80_h3_G_H) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_stirling) +//0.5*ln(2*Pi)=9.1893853320467266954096885e-01 + 7.2239360881843238220057778e-17 +data8 0x3FED67F1C864BEB4, 0x3C94D252F2400510 +// Bernulli numbers +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFB //B2 = 8.3333333333333333333333333333e-02 +data8 0xBF66C16C16C16C17 //B4 = -2.7777777777777777777777777778e-03 +data8 0x3F4A01A01A01A01A //B6 = 7.9365079365079365079365079365e-04 +data8 0xBF43813813813814 //B8 = -5.9523809523809523809523809524e-04 +data8 0x3F4B951E2B18FF23 //B10 = 8.4175084175084175084175084175e-04 +data8 0xBF5F6AB0D9993C7D //B12 = -1.9175269175269175269175269175e-03 +data8 0x3F7A41A41A41A41A //B14 = 6.4102564102564102564102564103e-03 +data8 0xBF9E4286CB0F5398 //B16 = -2.9550653594771241830065359477e-02 +data8 0x3FC6FE96381E0680 //B18 = 1.7964437236883057316493849002e-01 +data8 0x3FE0000000000000 // 0.5 +LOCAL_OBJECT_END(Constants_Tgammal_stirling) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_sin) +// Polynomial coefficients for the sin(Pi*x)/Pi, 0 <= |x| < 0.5 +//A2 = 8.1174242528335360802316245099e-01 + 5.1302254650266899774269946201e-18 +data8 0x3FE9F9CB402BC46C, 0x3C57A8B3819B7CEC +//A1 = -1.6449340668482264060656916627e+00 + -3.0210280454695477893051351574e-17 +data8 0xBFFA51A6625307D3, 0xBC816A402079D0EF +data8 0xF3AEF1FFCCE6C813, 0x0000BFE3 //A9 = -7.0921197799923779127089910470e-09 +data8 0x87D54408E6D4BB9D, 0x00003FE9 //A8 = 2.5300880778252693946712766029e-07 +data8 0xEA12033DCE7B8ED9, 0x0000BFED //A7 = -6.9758403885461690048189307819e-06 +data8 0x9BA38C952A59D1A8, 0x00003FF2 //A6 = 1.4842878710882320255092707181e-04 +data8 0x99C0B55178FF0E38, 0x0000BFF6 //A5 = -2.3460810348048124421268761990e-03 +data8 0xD63402E798FEC896, 0x00003FF9 //A4 = 2.6147847817611456327417812320e-02 +data8 0xC354723906D95E92, 0x0000BFFC //A3 = -1.9075182412208257558294507774e-01 +LOCAL_OBJECT_END(Constants_Tgammal_sin) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_Arg) +data4 0x00000000,0xB17217F4,0x00003FF2,0x00000000 // L_hi = hi part log(2)/2^12 +data4 0xF278ECE6,0xF473DE6A,0x00003FD4,0x00000000 // L_lo = lo part log(2)/2^12 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_Arg) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_A) +data4 0xB1B736A0,0xAAAAAAAB,0x00003FFA,0x00000000 // A3 +data4 0x90CD6327,0xAAAAAAAB,0x00003FFC,0x00000000 // A2 +data4 0xFFFFFFFF,0xFFFFFFFF,0x00003FFD,0x00000000 // A1 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_A) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T1) +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC +data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D +data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA +data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 +data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A +data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 +data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B +data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD +data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 +data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B +data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 +data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A +data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 +data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T1) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T2) +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T2) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W1) +data8 0x0000000000000000, 0xBE384454171EC4B4 +data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 +data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 +data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE +data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F +data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 +data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 +data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F +data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF +data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F +data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 +data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E +data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D +data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 +data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A +data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA +data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 +data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF +data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC +data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 +data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 +data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 +data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 +data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 +data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 +data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 +data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA +data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B +data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A +data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 +data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D +data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W1) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W2) +data8 0x0000000000000000, 0xBE641F2537A3D7A2 +data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 +data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE +data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 +data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 +data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B +data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 +data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA +data8 0xBE56856B49BFF529, 0x3E66DD3300508651 +data8 0x3E51165FC114BC13, 0x3E53333DC453290F +data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 +data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 +data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE +data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 +data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 +data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 +data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC +data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 +data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 +data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D +data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C +data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 +data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 +data8 0xBE559725ADE45917, 0xBE68C29C042FC476 +data8 0xBE67593B01E511FA, 0xBE4A4313398801ED +data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E +data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D +data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F +data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 +data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 +data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E +data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W2) + + + +LOCAL_OBJECT_START(Constants_Tgammal_poly) + +// Polynomial coefficients for the tgammal(x), 2 <= |x| < 3 +//A5 = 2.8360780594841213109180699803e-02 + 2.2504152891014320704380000000e-19 +data8 0x3F9D0A9BC49353D2, 0x3C109AEA0F23CE2D +//A4 = 1.0967323400216015538699565468e-01 + 9.9225166000430644587276000000e-18 +data8 0x3FBC138B89492C5B, 0x3C66E138506D5652 +//A3 = 2.5387124684114281691904579930e-01 + 2.2667777637607113205546600000e-17 +data8 0x3FD03F6D2FA4F4F8, 0x3C7A2258DA8CD8B1 +data8 0xC5866457328BC39B, 0x00003FE3 //A20 = 5.7487331964156762795056629138e-09 +data8 0xE93D9F1ACD59C929, 0x0000BFE4 //A19= -1.3576396100397317396956445658e-08 +data8 0xE33389C8F6CBA813, 0x00003FE5 //A18 = 2.6449714924964597501721434271e-08 +data8 0x8FE7B25B9CD26D2A, 0x0000BFE7 //A17= -6.7011017946055513660266853311e-08 +data8 0xB89F4721BFBC15B0, 0x00003FE8 //A16 = 1.7194280320370423615174419192e-07 +data8 0xE49CBDC1874EBABA, 0x0000BFE9 //A15= -4.2582353660153782928729466776e-07 +data8 0x913AF50A336129CA, 0x00003FEB //A14 = 1.0820500665257088283172211622e-06 +data8 0xABCF0F7313B3B332, 0x0000BFEC //A13= -2.5601510627710417669568115706e-06 +//A2 = 6.5455857798133676439533701341e-01 + 1.3292075193155190798867000000e-18 +data8 0x3FE4F224D4B7E01C, 0x3C3885014A2B8319 +//A1 = 9.3473452162608550164435428087e-01 + 3.2785154201417136611642400000e-17 +data8 0x3FEDE9585F1A7093, 0x3C82E63C1B5028BF +//A0 = 1.3293403881791368004172682049e+00 + 2.2005689328949279282607500000e-16 +data8 0x3FF544FA6D47B38F, 0x3CAFB6AA9829E81F +data8 0xF3668F799997C76D, 0x00003FED //A12 = 7.2539039479124273660331538367e-06 +data8 0xD6C6BBD54CDEAEB1, 0x0000BFEE //A11= -1.2801665282681088568639378920e-05 +data8 0x809E4763B06F6883, 0x00003FF1 //A10 = 6.1329973609906572700697893187e-05 +data8 0x8443B000F8F9A71A, 0x00003FED //A9 = 3.9417864189995544394564413428e-06 +data8 0xC5C7E6D62A6991D8, 0x00003FF4 //A8 = 7.5447412886334708803357581519e-04 +data8 0xD2AF690725C62D88, 0x00003FF5 //A7 = 1.6074004848394703022110823298e-03 +data8 0xAA44E635D4B7B682, 0x00003FF8 //A6 = 1.0392403425906843901680697839e-02 +// +// Polynomial coefficients for the tgammal(x), 4 <= |x| < 5 +//A5 = 1.1600674810589555185913468449e+00 + 3.0229979112715124660731000000e-17 +data8 0x3FF28FA2EB44D22E, 0x3C816D285234C815 +//A4 = 3.1374268565470946334983182169e+00 + 1.3694868953995008497659600000e-16 +data8 0x400919734073B1E1, 0x3CA3BC83CD7E9565 +//A3 = 7.0834593993741057360580271052e+00 + 3.3899702569039156457249800000e-16 +data8 0x401C5576617B6C1F, 0x3CB86D6431213296 +data8 0xA4A5FB49C094966B, 0x00003FDA //A20 = 9.3591760106637809309720130828e-12 +data8 0xA9260DA0F51D7ED8, 0x00003FDD //A19 = 7.6919898428091669411809372180e-11 +data8 0xA16441DFB14BD6E1, 0x00003FE0 //A18 = 5.8713933014370867331213494535e-10 +data8 0x95F098D9C2234849, 0x00003FE3 //A17 = 4.3638234584169302324461091035e-09 +data8 0x8581817400E5AD2B, 0x00003FE6 //A16 = 3.1084260332429955234755367839e-08 +data8 0xE272940E373EBE15, 0x00003FE8 //A15 = 2.1089573544273993580820317236e-07 +data8 0xB6B3391145D226FB, 0x00003FEB //A14 = 1.3612217421122787182942706259e-06 +data8 0x8B9428C4DF95FCD5, 0x00003FEE //A13 = 8.3195416382628990683949003789e-06 +//A2 = 1.2665135075272345943631080445e+01 + 9.8721896915973874255877000000e-16 +data8 0x4029548C95A76F38, 0x3CD1C8BE715B8E13 +//A1 = 1.6154969393303069580269948347e+01 + 9.6850518810678379641029000000e-16 +data8 0x403027AC12FC1E1E, 0x3CD172711C15501B +//A0 = 1.1631728396567448058362970187e+01 + 8.7078125362814179268673000000e-16 +data8 0x40274371E7866C65, 0x3CCF5F8A1A5FACA0 +data8 0xC94A903114272C03, 0x00003FF0 //A12 = 4.7991576836334427243159066630e-05 +data8 0x8844262960E04BE6, 0x00003FF3 //A11 = 2.5990716419283017929486175141e-04 +data8 0xAC5418A76767678D, 0x00003FF5 //A10 = 1.3147621245497801180184809726e-03 +data8 0xCA231B6EFE959132, 0x00003FF7 //A9 = 6.1687358811367989146517222415e-03 +data8 0xDA38E39C13819D2A, 0x00003FF9 //A8 = 2.6638454961912040754759086920e-02 +data8 0xD696DF8D8389FE53, 0x00003FFB //A7 = 1.0477995539298934056097943975e-01 +data8 0xBDD5C153048BC435, 0x00003FFD //A6 = 3.7077144754791605130056406006e-01 +// +// Polynomial coefficients for the tgammal(x), 6 <= |x| < 7 +//A5 = 6.7169398121054200601065531373e+01 + 2.9481001527213915901489600000e-15 +data8 0x4050CAD76B377BA0, 0x3CEA8DDB2B2DE93E +//A4 = 1.6115104376855398982115730178e+02 + 1.3422421925418824418257300000e-14 +data8 0x406424D559BDC687, 0x3D0E397FDB5B33DC +//A3 = 3.1812194028053562533386866562e+02 + 3.9881709875858650942409600000e-14 +data8 0x4073E1F377A6CF73, 0x3D26738F63FE9C4C +data8 0xD6E1B5FF90CAABD3, 0x00003FE1 //A20 = 1.5634700199277480081025480635e-09 +data8 0xD451987B925DD37E, 0x00003FE4 //A19 = 1.2358576813211397717382327174e-08 +data8 0xBFC151B67FA58E6B, 0x00003FE7 //A18 = 8.9292951435632759686382657901e-08 +data8 0xA9034C5E1D67572E, 0x00003FEA //A17 = 6.2962205718327848327368724720e-07 +data8 0x8E40F6EAA30A71EC, 0x00003FED //A16 = 4.2394926442967995119170095258e-06 +data8 0xE3C3541B03A1C350, 0x00003FEF //A15 = 2.7151465666109594512258841637e-05 +data8 0xACE2E58436B2DDCE, 0x00003FF2 //A14 = 1.6487723793339152877117376243e-04 +data8 0xF7EAF8D8D1CAA3D1, 0x00003FF4 //A13 = 9.4573158112768812533636022369e-04 +//A2 = 4.8664351544258869353143381886e+02 + 4.7424047995944376868895400000e-14 +data8 0x407E6A4BD6D9463B, 0x3D2AB2868D79E192 +//A1 = 5.1615277644992545447166776285e+02 + 3.0901956935588717379242200000e-14 +data8 0x40802138E2DC003B, 0x3D216570FB601AEA +//A0 = 2.8788527781504433278314536437e+02 + 2.8213174117085164944959600000e-14 +data8 0x4071FE2A1911F7D6, 0x3D1FC3E4CF4DB5AF +data8 0xA72B88E48D3D1BAB, 0x00003FF7 //A12 = 5.1016252919939028020562237471e-03 +data8 0xD2EFB1067DB4FFB2, 0x00003FF9 //A11 = 2.5749059441230515023024615917e-02 +data8 0xF788AF9522205C24, 0x00003FFB //A10 = 1.2086617635601742290221382521e-01 +data8 0x861A6CE06CB29EAF, 0x00003FFE //A9 = 5.2384071807018493367136112163e-01 +data8 0x84FBDE0947718B58, 0x00004000 //A8 = 2.0778727617851237754568261869e+00 +data8 0xEEC1371E265A2C3A, 0x00004001 //A7 = 7.4610858525146049022238037342e+00 +data8 0xBF514B9BE68ED59D, 0x00004003 //A6 = 2.3914694993947572859629197920e+01 +// +// Polynomial coefficients for the tgammal(x), 8 <= |x| < 9 +//A5 = 5.8487447114416836484451778233e+03 + 4.7365465221455983144182900000e-13 +data8 0x40B6D8BEA568B6FD, 0x3D60AA4D44C2589B +//A4 = 1.2796464063087094473303295672e+04 + 1.2373341702514898266244200000e-12 +data8 0x40C8FE3B666B532D, 0x3D75C4752C5B4783 +//A3 = 2.2837606581322281272150576115e+04 + 2.6598064610627891398831000000e-13 +data8 0x40D64D66D23A7764, 0x3D52B77B3A10EA5C +data8 0xB23418F75B0BE22A, 0x00003FE9 //A20 = 3.3192989594206801808678663868e-07 +data8 0xA984A7BC8B856ED2, 0x00003FEC //A19 = 2.5260177918662350066375115788e-06 +data8 0x921A49729416372C, 0x00003FEF //A18 = 1.7416797068239475136398213598e-05 +data8 0xF5BB9415CC399CA4, 0x00003FF1 //A17 = 1.1717449586392814601938207599e-04 +data8 0xC50B91A40B81F9DF, 0x00003FF4 //A16 = 7.5166775151159345732094429036e-04 +data8 0x96002572326DB203, 0x00003FF7 //A15 = 4.5776541559407384162139204300e-03 +data8 0xD81A1A595E4157BA, 0x00003FF9 //A14 = 2.6379634345126284099420760736e-02 +data8 0x92B700D0CFECADD8, 0x00003FFC //A13 = 1.4327622675407940907282658100e-01 +//A2 = 3.1237895525940199149772524834e+04 + 3.1280450505163186432331700000e-12 +data8 0x40DE8179504C0878, 0x3D8B83BB33FBB766 +//A1 = 2.9192841741344487672904506326e+04 + 7.9300780509779689630767000000e-13 +data8 0x40DC8235DF171691, 0x3D6BE6C780EE54DF +//A0 = 1.4034407293483411194756627083e+04 + 1.4038139346291543309253700000e-12 +data8 0x40CB693422315F90, 0x3D78B23746113FCE +data8 0xBAE50807548BC711, 0x00003FFE //A12 = 7.3005724123917935346868107005e-01 +data8 0xDE28B1F57E68CFB6, 0x00004000 //A11 = 3.4712338349724065462763671443e+00 +data8 0xF4DCA5A5FF901118, 0x00004002 //A10 = 1.5303868912154033908205911714e+01 +data8 0xF85AAA1AD5E84E5E, 0x00004004 //A9 = 6.2088539523416399361048051373e+01 +data8 0xE5AA8BB1BF02934D, 0x00004006 //A8 = 2.2966619406617480799195651466e+02 +data8 0xBF6CFEFD67F59845, 0x00004008 //A7 = 7.6570306334640770654588802417e+02 +data8 0x8DB5D2F001635C29, 0x0000400A //A6 = 2.2673639984182571062068713002e+03 +// +// Polynomial coefficients for the tgammal(x), 10 <= |x| < 11 +//A5 = 7.2546009516580589115619659424e+05 + 1.0343348865365065212891728822e-10 +data8 0x412623A830B99290, 0x3DDC6E7C157611C4 +//A4 = 1.4756292870840241666883230209e+06 + 8.1516565365333844166705674775e-11 +data8 0x4136842D497E56AF, 0x3DD66837E4C3F9EE +//A3 = 2.4356116926500420086085796356e+06 + 3.5508860076560925641351069404e-10 +data8 0x4142950DD8A8C1AF, 0x3DF866C8E3DD0980 +data8 0xB7FD0D1EEAC38EB4, 0x00003FF1 //A20 = 8.7732544640091602721643775932e-05 +data8 0xA9345C64AC750AE9, 0x00003FF4 //A19 = 6.4546407626804942279126469603e-04 +data8 0x8BEABC81BE1E93C9, 0x00003FF7 //A18 = 4.2699261134524096128048819443e-03 +data8 0xE1CD281EDD7315F8, 0x00003FF9 //A17 = 2.7563646660310313164706189622e-02 +data8 0xAD8A5BA6D0FD9758, 0x00003FFC //A16 = 1.6947310643831556048460963841e-01 +data8 0xFCDDA464AD3F182E, 0x00003FFE //A15 = 9.8775699098518676937088606052e-01 +data8 0xAE0DCE2F7B60D1AE, 0x00004001 //A14 = 5.4391852309591064073782104822e+00 +data8 0xE1745D9ABEB8D1A7, 0x00004003 //A13 = 2.8181819161363002758615770457e+01 +//A2 = 3.0619656223573554307222366333e+06 + 1.0819940302945474471259520006e-10 +data8 0x41475C66CFA967E4, 0x3DDDBDDB2A27334B +//A1 = 2.6099413018962685018777847290e+06 + 3.6851882860056025385268615240e-10 +data8 0x4143E98AA6A48974, 0x3DF9530D42589AB6 +//A0 = 1.1332783889487853739410638809e+06 + 1.9339350553312096248591829758e-10 +data8 0x41314ADE639225C9, 0x3DEA946DD6C2C8D3 +data8 0x88BCFAAE71812A1C, 0x00004006 //A12 = 1.3673820009490115307300592012e+02 +data8 0x9A770F5AB540A326, 0x00004008 //A11 = 6.1786031215382040427126476507e+02 +data8 0xA170C1D2C6B413FC, 0x0000400A //A10 = 2.5830473201524594051391525170e+03 +data8 0x9AE56061CB02EB55, 0x0000400C //A9 = 9.9133441230507404119297200255e+03 +data8 0x872390769650FBE2, 0x0000400E //A8 = 3.4595564309496661629764193479e+04 +data8 0xD3E5E8D6923910C1, 0x0000400F //A7 = 1.0849181904819284819615140521e+05 +data8 0x930D70602F50B754, 0x00004011 //A6 = 3.0116351174131169193070583741e+05 +// +// Polynomial coefficients for the tgammal(x), 12 <= |x| < 13 +//A5 = 1.2249876249976964294910430908e+08 + 6.0051348061679753770848000000e-09 +data8 0x419D34BB29FFC39D, 0x3E39CAB72E01818D +//A4 = 2.3482765927605420351028442383e+08 + 1.1874729051592862323641700000e-08 +data8 0x41ABFE5F168D56FA, 0x3E4980338AA7B04B +//A3 = 3.6407329688125067949295043945e+08 + 2.6657200942150363994658700000e-08 +data8 0x41B5B35150E199A5, 0x3E5C9F79C0EB5300 +data8 0xE89AE0F8D726329D, 0x00003FF9 //A20 = 2.8394164465429105626588451540e-02 +data8 0xCF90981F86E38013, 0x00003FFC //A19 = 2.0270002071785908652476845915e-01 +data8 0xA56C658079CA8C4A, 0x00003FFF //A18 = 1.2923704984019263122675412350e+00 +data8 0x80AEF96A67C5615A, 0x00004002 //A17 = 8.0427183300456238315262463506e+00 +data8 0xBE886D7529678931, 0x00004004 //A16 = 4.7633230047847868242503413461e+01 +data8 0x858EDBA4CE2F7508, 0x00004007 //A15 = 2.6711607799594541057655957154e+02 +data8 0xB0B0A3AF388274F0, 0x00004009 //A14 = 1.4135199810126975119809102782e+03 +data8 0xDBA87137988751EF, 0x0000400B //A13 = 7.0290552818218513870879313985e+03 +//A2 = 4.2828433593031734228134155273e+08 + 3.9760422293645854535247300000e-08 +data8 0x41B98719AFEE2947, 0x3E6558A17E0D3007 +//A1 = 3.4008253676084774732589721680e+08 + 1.2558352335001093116071000000e-09 +data8 0x41B4453F68C2C6EB, 0x3E159338C5BC7EC3 +//A0 = 1.3684336546556583046913146973e+08 + 2.6786516700381562934240300000e-08 +data8 0x41A05020CAEE5EA5, 0x3E5CC3058A858579 +data8 0xFF5E3940FB4BA576, 0x0000400D //A12 = 3.2687111823895439312116108631e+04 +data8 0x8A08C124C7F74B6C, 0x00004010 //A11 = 1.4134701786994123329786229006e+05 +data8 0x89D701953540BFFB, 0x00004012 //A10 = 5.6459209892773907605385652281e+05 +data8 0xFC46344B3116C3AD, 0x00004013 //A9 = 2.0666305367147234406757715163e+06 +data8 0xD183EBD7A400151F, 0x00004015 //A8 = 6.8653979211730981618367536737e+06 +data8 0x9C083A40742112F4, 0x00004017 //A7 = 2.0451444503543981795037456447e+07 +data8 0xCD3C475B1A8B6662, 0x00004018 //A6 = 5.3801245423495149598177886823e+07 +LOCAL_OBJECT_END(Constants_Tgammal_poly) + + +LOCAL_OBJECT_START(Constants_Tgammal_poly_splitted) + +// Polynomial coefficients for the tgammal(x), 1 <= |x| < 1.25 +//A5 = -9.8199506890310417350775651357e-01+ -3.2546247786122976510752200000e-17 +data8 0xBFEF6C80EC38B509, 0xBC82C2FA7A3DE3BD +//A4 = 9.8172808683439960475425323239e-01 + 4.4847611775298520359811400000e-17 +data8 0x3FEF6A51055096B0, 0x3C89DA56DE95EFE4 +//A3 = -9.0747907608088618225394839101e-01 +-1.0244057366544064435443970000e-16 +data8 0xBFED0A118F324B62, 0xBC9D86C7B9EBCFFF +data8 0xB8E3FDAA66CC738E, 0x00003FFB //A20 = 9.0278608095877488976217714815e-02 +data8 0xA76067AE1738699C, 0x0000BFFD //A19 =-3.2690738678103132837070881737e-01 +data8 0x9D66B13718408C44, 0x00003FFE //A18 = 6.1484820933424283818320582920e-01 +data8 0xD4AC67BBB4AE5599, 0x0000BFFE //A17 =-8.3075569470082063491389474937e-01 +data8 0xF1426ED1C1488DB3, 0x00003FFE //A16 = 9.4241993542644505594957058785e-01 +data8 0xFC12EB07AA6F4B6B, 0x0000BFFE //A15 =-9.8466366707947121954333549690e-01 +data8 0xFF2B32CFE5B0DDC8, 0x00003FFE //A14 = 9.9675290656677214804168895915e-01 +data8 0xFFD8E7E6FF3662EA, 0x0000BFFE //A13 =-9.9940347089360552383472582319e-01 +//A2 = 9.8905599532797250361682017683e-01 + 5.1760162410376024240867300000e-17 +data8 0x3FEFA658C23B1578, 0x3C8DD673A61F6FE7 +//A1 = -5.7721566490153275452712478000e-01+ -1.0607935612223465065923310000e-16 +data8 0xBFE2788CFC6FB618, 0xBC9E9346622D53B7 +//A0 = 9.9999999999999988897769753748e-01 + 1.1102230245372554544790880000e-16 +data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFF51E4E +data8 0xFFF360DF628F0BC9, 0x00003FFE //A12 = 9.9980740979895815468216470840e-01 +data8 0xFFEF8F9A72B40480, 0x0000BFFE //A11 = -9.9974916001038145045939523470e-01 +data8 0xFFE037B8C7E39952, 0x00003FFE //A10 = 9.9951504002809911822597567307e-01 +data8 0xFFC01E08F348BED2, 0x0000BFFE //A9 = -9.9902522772325406705059517941e-01 +data8 0xFF83DAC83119B52C, 0x00003FFE //A8 = 9.9810569179053383842734164901e-01 +data8 0xFEF9F8AB891ABB24, 0x0000BFFE //A7 = -9.9600176036720260345608796766e-01 +data8 0xFE3F0537573C8235, 0x00003FFE //A6 = 9.9314911461918778676646301341e-01 +// +// Polynomial coefficients for the tgammal(x), 1.25 <= |x| < 1.75 +//A5 = -7.7523052299853054125655660300e-02+ -1.2693512521686721504433600000e-17 +data8 0xBFB3D88CFE50601B, 0xBC6D44ED60EE2170 +//A4 = 1.4464535904462152982041800442e-01 + 2.5426820829345729856648800000e-17 +data8 0x3FC283BD374EB2A9, 0x3C7D50AC436187C3 +//A3 = -1.0729480456477220873257039102e-01+ -6.2429894945456418196551000000e-18 +data8 0xBFBB77AC1CA2EBA5, 0xBC5CCA6BCC422D41 +data8 0xF732D2689F323283, 0x00003FF2 //A20 = 2.3574688251652899567587145422e-04 +data8 0xB6B00E23DE89D13A, 0x0000BFF3 //A19 =-3.4844916488842618776630058875e-04 +data8 0xE98396FE4A1B2799, 0x00003FF3 //A18 =4.4539265198744452020440735977e-04 +data8 0xAF8D235A640DB1A2, 0x0000BFF4 //A17 =-6.6967514303333563295261178346e-04 +data8 0x8513B736C918B261, 0x00003FF5 //A16 = 1.0152970456990865810615917715e-03 +data8 0xC790A1A2C78D8E17, 0x0000BFF5 //A15 =-1.5225598630329403515321688394e-03 +data8 0x959706CFA638CDE2, 0x00003FF6 //A14 = 2.2825614575133879623648932383e-03 +data8 0xE050A6021E129860, 0x0000BFF6 //A13 =-3.4227757733947066666295285936e-03 +//A2 = 4.1481345368830113695679528973e-01 + 3.1252439808354284892632100000e-17 +data8 0x3FDA8C4DBA620D56, 0x3C82040BCB483C76 +//A1 = 3.2338397448885010387886751460e-02 + 3.4437825798552300531443100000e-18 +data8 0x3FA08EA88EE561B1, 0x3C4FC366D6C64806 +//A0 = 8.8622692545275794095971377828e-01 + 7.2689375867553992399219000000e-17 +data8 0x3FEC5BF891B4EF6A, 0x3C94F3877D311C0C +data8 0xA8275AADC09D16FC, 0x00003FF7 //A12 = 5.1316445128621071486146117136e-03 +data8 0xFBFE2CE9215267A2, 0x0000BFF7 //A11= -7.6902121820788373000579382408e-03 +data8 0xBCC8EEAB67ECD91D, 0x00003FF8 //A10 = 1.1522515369164312742737727262e-02 +data8 0x8D1614BB97E5E8C2, 0x0000BFF9 //A9 = -1.7222443097804730395560633583e-02 +data8 0xD3A963578BE291E3, 0x00003FF9 //A8 = 2.5837606456090186343624210891e-02 +data8 0x9BA7EAE64C42FDF7, 0x0000BFFA //A7 = -3.8001935555045161419575037512e-02 +data8 0xF0115BA1A77607E7, 0x00003FFA //A6 = 5.8610303817173477119764956736e-02 +// +// Polynomial coefficients for the tgammal(x), 1.75 <= |x| < 2.0 +//A5 = 2.6698206874501426502654943818e-04 + 3.4033756836921062797887300000e-20 +data8 0x3F317F3740FE2A68, 0x3BE417093234B06E +//A4 = 7.4249010753513894345090307070e-02 + 3.9810018444482764697014200000e-18 +data8 0x3FB301FBB0F25A92, 0x3C525BEFFABB622F +//A3 = -8.1576919247086265851720554565e-02+ -5.2716624487804746360745000000e-19 +data8 0xBFB4E239984650AC, 0xBC2372F1C4F276FF +data8 0xFEF3AEE71038E9A3, 0x00003FEB //A20 = 1.8995395865421509009969188571e-06 +data8 0xA11CFA2672BF876A, 0x0000BFEB //A19 =-1.2003868221414015771269244270e-06 +data8 0xF8E107215DAE2164, 0x00003FEC //A18 = 3.7085863210303833432006027217e-06 +data8 0xBCDDD3FC011EF7D6, 0x00003FEC //A17 = 2.8143303971756051015245433043e-06 +data8 0x8683C4687FA22E68, 0x00003FEE //A16 = 8.0177018464360416764308252462e-06 +data8 0xFDA09E5D33E32968, 0x00003FEE //A15 = 1.5117372062443781157389064848e-05 +data8 0xFFB00D0CFF4089B4, 0x00003FEF //A14 = 3.0480348961227424242198174995e-05 +data8 0xFEF6C39566785085, 0x00003FF0 //A13 = 6.0788135974125244644334004947e-05 +//A2 = 4.1184033042643969357854416558e-01 + 1.2103396182129232634761000000e-18 +data8 0x3FDA5B978B96BEBF, 0x3C3653AAD0A139E4 +//A1 = -4.2278433509846713445057275749e-01+ -4.9429151528135657430413000000e-18 +data8 0xBFDB0EE6072093CE, 0xBC56CB907027554F +//A0 = 1.0000000000000000000000000000e+00 + 1.0969171200000000000000000000e-31 +data8 0x3FF0000000000000, 0x3981CC6A5B20B4D5 +data8 0xFF2B7BA9A8D68C37, 0x00003FF1 //A12 = 1.2167446884801403650547161615e-04 +data8 0xFCA53468E3692EF1, 0x00003FF2 //A11 = 2.4094136329542400976250900707e-04 +data8 0x808D698A9C993615, 0x00003FF4 //A10 = 4.9038845704938303659791698883e-04 +data8 0xF10F8E3FB8BB4AFB, 0x00003FF4 //A9 = 9.1957383840999861214472423976e-04 +data8 0x89E224E42F93F005, 0x00003FF6 //A8 = 2.1039333407187324139473634747e-03 +data8 0xBAF374824937A323, 0x00003FF6 //A7 = 2.8526458211545152218493600470e-03 +data8 0xB6BF7564F52140C6, 0x00003FF8 //A6 = 1.1154045718131014476684982178e-02 +// +// Polynomial coefficients for the tgammal(x), 0.0 <= |x| < 0.125 +//A5 = -9.8199506890314514073736518185e-01+ -5.9363811993837985890950900000e-17 +data8 0xBFEF6C80EC38B67A, 0xBC911C46B447C81F +//A4 = 9.8172808683440015986576554496e-01 + 2.7457414262802803699834200000e-17 +data8 0x3FEF6A51055096B5, 0x3C7FA7FF90ACAD1F +//A3 = -9.0747907608088618225394839101e-01 + -1.0676255850934306734701780000e-16 +data8 0xBFED0A118F324B62, 0xBC9EC5AFB633438D +data8 0x9217E83FA207CB80, 0x00003FFD //A20 = 2.8533864762086088781083621561e-01 +data8 0xA8DABFA52FDF03EC, 0x0000BFFE //A19= -6.5958783896337186303285832783e-01 +data8 0xE331ED293AF39F9B, 0x00003FFE //A18 = 8.8748056656454687449654731184e-01 +data8 0xF9163C5DDB52419D, 0x0000BFFE //A17= -9.7299554149078295602977718525e-01 +data8 0xFEC0A1C672CB9265, 0x00003FFE //A16 = 9.9512683005268190987854104489e-01 +data8 0xFFD2D65B8EA7B5F4, 0x0000BFFE //A15= -9.9931087241443958201592847861e-01 +data8 0xFFF93AA39EE53445, 0x00003FFE //A14 = 9.9989668364186884793382816496e-01 +data8 0xFFFB99A9A3F5F480, 0x0000BFFE //A13= -9.9993286506283835663204999212e-01 +//A2 = 9.8905599532797250361682017683e-01 + 5.1778575360788420716540100000e-17 +data8 0x3FEFA658C23B1578, 0x3C8DD92B45408D07 +//A1 = -5.7721566490153275452712478000e-01+ -1.0607938730998824663273110000e-16 +data8 0xBFE2788CFC6FB618, 0xBC9E9346F8FDE55B +//A0 = 9.9999999999999988897769753748e-01 + 1.1102230246251564036631420000e-16 +data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFFFFFFF +data8 0xFFF7FEBB545812C1, 0x00003FFE //A12 = 9.9987785409425126648628395084e-01 +data8 0xFFF00C02E943A3F2, 0x0000BFFE //A11= -9.9975657530855116454438747397e-01 +data8 0xFFE0420AADC53820, 0x00003FFE //A10 = 9.9951565514290485919027183699e-01 +data8 0xFFC01EB42EF27EEB, 0x0000BFFE //A9 = -9.9902526759155739377365522320e-01 +data8 0xFF83DAD0BF23FF12, 0x00003FFE //A8 = 9.9810569378236378800364235948e-01 +data8 0xFEF9F8ABDBCDB2F3, 0x0000BFFE //A7 = -9.9600176044241699109053158187e-01 +data8 0xFE3F05375988491D, 0x00003FFE //A6 = 9.9314911462127599008937257662e-01 +LOCAL_OBJECT_END(Constants_Tgammal_poly_splitted) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_common) +// Positive overflow value +data8 0x3FE0000000000000 // 0.5 +data8 0x3FF8000000000000 // 1.5 +data8 0x3FD0000000000000 // 0.25 +data8 0x0000000000000000 // 0 +data8 0xDB718C066B352E21, 0x00004009 // Positive overflow value +LOCAL_OBJECT_END(Constants_Tgammal_common) + + + +//======================================================= +// Lgamma registers + +// General Purpose Registers +GR_l_Log_Table = r33 +GR_l_Log_Table1 = r34 +GR_l_BIAS = r34 +GR_l_Index1 = r35 +GR_l_Index2 = r36 +GR_l_signif_Z = r37 +GR_l_X_0 = r38 +GR_l_X_1 = r39 +GR_l_X_2 = r40 +GR_l_Z_1 = r41 +GR_l_Z_2 = r42 +GR_l_N = r43 +GR_l_Index3 = r44 +GR_l_Stirling_Table = r45 +GR_l_N_Unbiased = r46 + +// Floating Point Registers +FR_l_logl_X = f8 + +FR_l_h_3 = f10 +FR_l_poly_hi = f10 +FR_l_W = f11 +FR_l_S = f12 +FR_l_GS_hi = f13 +FR_l_Y_lo = f13 +FR_l_r_cor = f14 +FR_l_G_1 = f15 +FR_l_G = f15 +FR_l_H_1 = f32 +FR_l_H = f32 +FR_l_h = f33 +FR_l_h_1 = f33 +FR_l_N = f33 +FR_l_G_2 = f34 +FR_l_H_2 = f35 +FR_l_h_2 = f36 +FR_l_G_3 = f37 +FR_l_log2_hi = f38 +FR_l_GS_lo = f39 +FR_l_H_3 = f40 +FR_l_float_N = f41 +FR_l_Q_4 = f42 +FR_l_Q_3 = f43 +FR_l_Q_2 = f44 +FR_l_Q_1 = f45 +FR_l_Q_5 = f46 +FR_l_Q_6 = f47 +FR_l_log2_lo = f48 +FR_l_r = f49 +FR_l_poly_lo = f50 +FR_l_poly = f51 +FR_l_rsq = f52 +FR_l_Y_lo_res = f53 + +FR_l_Y0 = f55 +FR_l_Q0 = f56 +FR_l_E0 = f57 +FR_l_E2 = f58 +FR_l_E1 = f59 +FR_l_Y1 = f60 +FR_l_E3 = f61 +FR_l_Y2 = f62 + +FR_l_Z = f63 +FR_l_Z2 = f64 +FR_l_Z4 = f65 +FR_l_Z8 = f66 + +FR_l_CH = f67 +FR_l_CL = f68 + +FR_l_B2 = f69 +FR_l_B4 = f70 +FR_l_B6 = f71 +FR_l_B8 = f72 +FR_l_B10 = f73 +FR_l_B12 = f74 +FR_l_B14 = f75 +FR_l_B16 = f76 +FR_l_B18 = f77 +FR_l_Half = f78 +FR_l_SS = f79 +FR_l_AbsX_m_Half = f80 +FR_l_CXH = f81 +FR_l_CXL = f82 +FR_l_SSCXH = f83 +FR_l_SSCXL = f84 +FR_l_XYH = f85 +FR_l_XYL = f86 +FR_l_Temp = f87 + +FR_l_logl_YHi = f88 +FR_l_logl_YLo = f89 + +FR_l_SignedXYH = f123 + +FR_l_AbsX = f127 + + + +//======================================================= +// Negative part registers + +// General Purpose Registers +GR_n_sin_Table = r47 +GR_n_XN = r48 + +// Float point registers +FR_n_IXNS = f125 +FR_n_IXN = f126 + +FR_n_XNS = f90 +FR_n_XS = f91 +FR_n_XS2 = f92 +FR_n_XS2L = f93 +FR_n_XS4 = f94 +FR_n_XS7 = f95 +FR_n_XS8 = f96 +FR_n_TT = f97 +FR_n_TH = f98 +FR_n_TL = f99 + +FR_n_A2H = f100 +FR_n_A2L = f101 +FR_n_A1H = f102 +FR_n_A1L = f103 +FR_n_A9 = f104 +FR_n_A8 = f105 +FR_n_A7 = f106 +FR_n_A6 = f107 +FR_n_A5 = f108 +FR_n_A4 = f109 +FR_n_A3 = f110 + +FR_n_PolyH = f111 +FR_n_PolyL = f112 + +FR_n_Poly1H = f113 +FR_n_SinxH = f113 // the same as FR_n_Poly1H +FR_n_Poly1L = f114 +FR_n_SinxL = f114 // the same as FR_n_Poly1L + +FR_n_Tail = f115 +FR_n_NegOne = f116 + +FR_n_Y0 = f117 + +FR_n_Q0 = f118 +FR_n_E0 = f119 + +FR_n_E2 = f120 +FR_n_E1 = f121 + +FR_n_Y1 = f55 +FR_n_E3 = f56 + +FR_n_Y2 = f57 +FR_n_R0 = f58 + +FR_n_E4 = f59 +FR_n_RcpResH = f60 + +FR_n_Y3 = f61 +FR_n_R1 = f62 +FR_n_Temp = f63 + +FR_n_RcpResL = f64 + +FR_n_ResH = f65 +FR_n_ResL = f66 + + + + +//======================================================= +// Exp registers + +// General Purpose Registers +GR_e_ad_Arg = r33 +GR_e_ad_A = r34 +GR_e_signexp_x = r35 +GR_e_exp_x = r35 +GR_e_exp_mask = r36 +GR_e_ad_W1 = r37 +GR_e_ad_W2 = r38 +GR_e_M2 = r39 +GR_e_M1 = r40 +GR_e_K = r41 +GR_e_exp_2_mk = r42 +GR_e_exp_2_k = r43 +GR_e_ad_T1 = r44 +GR_e_ad_T2 = r45 +GR_e_N_fix = r46 +GR_e_one = r47 +GR_e_exp_bias = r48 +GR_e_sig_inv_ln2 = r49 +GR_e_rshf_2to51 = r50 +GR_e_exp_2tom51 = r51 +GR_e_rshf = r52 + +// Floating Point Registers +FR_e_RSHF_2TO51 = f10 +FR_e_INV_LN2_2TO63 = f11 +FR_e_W_2TO51_RSH = f12 +FR_e_2TOM51 = f13 +FR_e_RSHF = f14 +FR_e_Y_hi = f15 +FR_e_Y_lo = f32 +FR_e_scale = f33 +FR_e_float_N = f34 +FR_e_N_signif = f35 +FR_e_L_hi = f36 +FR_e_L_lo = f37 +FR_e_r = f38 +FR_e_W1 = f39 +FR_e_T1 = f40 +FR_e_W2 = f41 +FR_e_T2 = f42 +FR_e_W1_p1 = f43 +FR_e_rsq = f44 +FR_e_A2 = f45 +FR_e_r4 = f46 +FR_e_A3 = f47 +FR_e_poly = f48 +FR_e_T = f49 +FR_e_W = f50 +FR_e_Wp1 = f51 +FR_e_r6 = f52 +FR_e_2_mk = f53 +FR_e_A1 = f54 +FR_e_T_scale = f55 +FR_e_result_lo = f56 +FR_e_W_T_scale = f57 +FR_e_Wp1_T_scale = f58 + +FR_e_expl_Input_X = f123 +FR_e_expl_Input_Y = f124 +FR_e_expl_Output_X = f123 +FR_e_expl_Output_Y = f124 + + +FR_e_expl_Input_AbsX = f122 + + + +//======================================================= +// Common registers + +// General Purpose Registers +GR_c_Table = r53 +GR_c_NegUnderflow = r54 +GR_c_NegSingularity = r55 +GR_c_X = r56 +GR_c_SignBit = r57 +GR_c_13 = r58 + + +// Floating Point Registers +FR_c_PosOverflow = f123 +FR_c_XN = f124 + + +//======================================================= +// Polynomial part registers + +// General Purpose Registers +GR_p_Table = r59 +GR_p_XN = r33 +GR_p_Table2 = r34 +GR_p_Int = r35 +GR_p_Offset = r36 +GR_p_Offset2 = r38 +GR_p_X_Sgnd = GR_l_signif_Z // = r37 +GR_p_Exp = r61 +GR_p_Bias = r62 +GR_p_0p75 = r63 + +// Floating Point Registers +FR_p_AbsX = FR_l_AbsX // = f127 +FR_p_IXN = FR_n_IXN // = f126 +FR_p_XN = f32 +FR_p_0p5 = f33 +FR_p_1p5 = f34 +FR_p_AbsXM1 = f35 +FR_p_2 = f36 + +FR_p_A20 = f37 +FR_p_A19 = f38 +FR_p_A18 = f39 +FR_p_A17 = f40 +FR_p_A16 = f41 +FR_p_A15 = f42 +FR_p_A14 = f43 +FR_p_A13 = f44 +FR_p_A12 = f45 +FR_p_A11 = f46 +FR_p_A10 = f47 +FR_p_A9 = f48 +FR_p_A8 = f49 +FR_p_A7 = f50 +FR_p_A6 = f51 +FR_p_A5H = f52 +FR_p_A5L = f53 +FR_p_A4H = f54 +FR_p_A4L = f55 +FR_p_A3H = f56 +FR_p_A3L = f57 +FR_p_A2H = f58 +FR_p_A2L = f59 +FR_p_A1H = f60 +FR_p_A1L = f61 +FR_p_A0H = f62 +FR_p_A0L = f63 + +FR_p_XR = f64 +FR_p_XR2 = f65 +FR_p_XR2L = f52 + +FR_p_XR3 = f58 +FR_p_XR3L = f38 + +FR_p_XR4 = f42 +FR_p_XR6 = f40 +FR_p_XR8 = f37 + +FR_p_Poly5H = f66 +FR_p_Poly5L = f67 +FR_p_Poly4H = f53 +FR_p_Poly4L = f44 +FR_p_Poly3H = f41 +FR_p_Poly3L = f47 +FR_p_Poly2H = f68 +FR_p_Poly2L = f54 +FR_p_Poly1H = f55 +FR_p_Poly1L = f46 +FR_p_Poly0H = f39 +FR_p_Poly0L = f43 + +FR_p_Temp5H = f69 +FR_p_Temp5L = f70 +FR_p_Temp4H = f71 +FR_p_Temp4L = f60 +FR_p_Temp2H = f72 +FR_p_Temp2L = f73 +FR_p_Temp1H = f59 +FR_p_Temp1L = f61 +FR_p_Temp0H = f49 +FR_p_Temp0L = f48 +FR_p_PolyTail = f45 +FR_p_OddPoly0H = f56 +FR_p_OddPoly0L = f51 + +FR_p_0p25 = f73 + + +//======================================================= +// Negative polynomial part registers +// General Purpose Registers +GR_r_sin_Table = r47 +GR_r_sin_Table2 = r60 + +// Floating Point Registers +FR_r_IXNS = FR_n_IXNS +FR_r_IXN = FR_n_IXN + +FR_r_AbsX = FR_l_AbsX + +FR_r_A9 = f74 +FR_r_A8 = f75 +FR_r_A7 = f76 +FR_r_A6 = f77 +FR_r_A5 = f78 +FR_r_A4 = f79 +FR_r_A3 = f80 +FR_r_A2H = f81 +FR_r_A2L = f82 +FR_r_A1H = f83 +FR_r_A1L = f84 + +FR_r_XNS = f85 +FR_r_XS = f86 +FR_r_XS2 = f87 +FR_r_XS2L = f88 +FR_r_XS4 = f89 +FR_r_XS7 = f90 +FR_r_XS8 = f91 + +FR_r_Tail = f92 + +FR_r_TT = f93 +FR_r_TH = f94 +FR_r_TL = f95 + +FR_r_ResH = f96 +FR_r_ResL = f97 + +FR_r_Res3H = f98 +FR_r_Res3L = f99 + +FR_r_Res1H = f100 +FR_r_Res1L = f101 + + + +FR_r_Y0 = f102 +FR_r_Q0 = f103 +FR_r_E0 = f104 +FR_r_E2 = f105 +FR_r_E1 = f106 +FR_r_Y1 = f107 +FR_r_E3 = f108 +FR_r_Y2 = f109 +FR_r_R0 = f110 +FR_r_E4 = f111 +FR_r_ZH = f112 +FR_r_Y3 = f113 +FR_r_R1 = f114 +FR_r_ZHN = f115 +FR_r_ZL = f115 +FR_r_NegOne = f116 + +FR_z_Y0 = f102 +FR_z_Q0 = f103 +FR_z_E0 = f104 +FR_z_E2 = f105 +FR_z_E1 = f106 +FR_z_Y1 = f107 +FR_z_E3 = f108 +FR_z_Y2 = f109 +FR_z_R0 = f110 +FR_z_E4 = f111 +FR_z_ZH = f112 +FR_z_Y3 = f113 +FR_z_R1 = f114 +FR_z_ZL = f115 + + +// General Purpose Registers +GR_SAVE_PFS = r32 +GR_DenOverflow = r33 +GR_u_XN = r34 + +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 +GR_SAVE_SP = r37 + +// Floating Point Registers +FR_u_IXN = f34 + + +// ERROR HANDLER REGISTERS +GR_Parameter_X = r64 +GR_Parameter_Y = r65 +GR_Parameter_RESULT = r66 +GR_Parameter_TAG = r67 + +FR_RESULT = f8 +FR_X = f32 +FR_Y = f1 + + +.section .text +GLOBAL_LIBM_ENTRY(tgammal) +{ .mfi + alloc r32 = ar.pfs,0,32,4,0 + fabs FR_l_AbsX = f8 // Get absolute value of X + addl GR_n_sin_Table = @ltoff(Constants_Tgammal_sin), gp +} +{ .mfi + addl GR_l_Log_Table=@ltoff(Constants_Tgammal_log_80_Z_G_H_h1#),gp + nop.f 0 + addl GR_l_Stirling_Table = @ltoff(Constants_Tgammal_stirling), gp +};; + +{ .mfi + getf.sig GR_l_signif_Z = f8 // Significand of X + fcvt.fx.s1 FR_n_IXNS = f8 // Convert to fixed point + addl GR_c_Table = @ltoff(Constants_Tgammal_common), gp +} +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + nop.f 0 + addl GR_p_Table = @ltoff(Constants_Tgammal_poly), gp +};; + +{ .mfi + ld8 GR_n_sin_Table = [GR_n_sin_Table] + fclass.m p6,p0 = f8,0x1EF // Check x for NaN, 0, INF, denorm + // NatVal. + addl GR_c_NegSingularity = 0x1003E, r0 +} +{ .mlx + ld8 GR_l_Stirling_Table = [GR_l_Stirling_Table] + movl GR_c_13 = 0x402A000000000000 // 13.0 +};; + +{ .mfi + getf.d GR_c_X = f8 // Double prec. X to general register + frcpa.s1 FR_z_Y0,p0 = f1,f8 // y = frcpa(x) (for negatives) + extr.u GR_l_Index1 = GR_l_signif_Z, 59, 4 // = High 4 bits of Z +} +{ .mlx + ld8 GR_c_Table = [GR_c_Table] + movl GR_c_SignBit = 0x8000000000000000 // High bit (sign) +};; + +{ .mfi + ld8 GR_p_Table = [GR_p_Table] + fcmp.lt.s1 p15, p14 = f8,f0 // p14 - positive arg, p15 - negative + shl GR_l_Index1 = GR_l_Index1,5 // Adjust Index1 ptr (x32) +} +{ .mfb + adds GR_c_NegUnderflow = 1765, r0 + nop.f 0 +(p6) br.cond.spnt tgammal_spec // Spec. values processing branch //////////// + // (0s, INFs, NANs, NatVals, denormals) ////// +};; + +{ .mfi + ldfpd FR_l_CH,FR_l_CL= [GR_l_Stirling_Table], 16 // Load CH, CL + fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Abs arg to int by trunc + extr.u GR_l_X_0 = GR_l_signif_Z, 49, 15 // High 15 bit of Z +} +{ .mfi + add GR_l_Index1 = GR_l_Index1,GR_l_Log_Table // Add offset + fma.s1 FR_p_2 = f1, f1, f1 // 2.0 + andcm GR_c_X = GR_c_X, GR_c_SignBit // Remove sign +};; + +{ .mfi + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Z_G_H_h2#), gp + fcmp.lt.s1 p10, p0 = FR_l_AbsX, f1 // If |X|<1 then p10 = 1 + nop.i 0 +} +{ .mlx + ld2 GR_l_Z_1 = [GR_l_Index1],4 // load Z_1 from Index1 + movl GR_l_BIAS = 0x000000000000FFFF // Bias for exponent +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + frcpa.s1 FR_l_Y0, p0 = f1, FR_l_AbsX // y = frcpa(x) + nop.i 0 +} +{ .mfi + ldfs FR_l_G_1 = [GR_l_Index1],4 // Load G_1 + fsub.s1 FR_l_W = FR_l_AbsX, f1 // W = |X|-1 + nop.i 0 +};; + +{ .mfi + getf.exp GR_l_N_Unbiased= FR_l_AbsX // exponent of |X| + fmerge.se FR_l_S = f1, FR_l_AbsX // S = merging of X and 1.0 + cmp.gtu p11, p0 = GR_c_13, GR_c_X // If 1 <= |X| < 13 + // then p11 = 1 +} +{ .mfb + ldfs FR_l_H_1 = [GR_l_Index1],8 // Load H_1 + fcvt.xf FR_n_XNS = FR_n_IXNS // Convert to FP repr. of int X +(p10) br.cond.spnt tgamma_lt_1 // Branch to |X| < 1 path /////////////////// +};; + +{ .mfi + ldfpd FR_n_A2H, FR_n_A2L = [GR_n_sin_Table], 16 + nop.f 0 + pmpyshr2.u GR_l_X_1 = GR_l_X_0,GR_l_Z_1,15 // Adjust Index2 (x32) +} +{ .mfb + ldfe FR_l_B2 = [GR_l_Stirling_Table], 16 + nop.f 0 +(p11) br.cond.spnt tgamma_lt_13 // Branch to 1 <= |X| < 13 path /////////////// +};; + +{ .mfi + ldfe FR_l_h_1 = [GR_l_Index1],0 + nop.f 0 + sub GR_l_N = GR_l_N_Unbiased, GR_l_BIAS // N - BIAS +} +{ .mib + ldfpd FR_l_B4,FR_l_B6= [GR_l_Stirling_Table], 16 // Load C +(p15) cmp.geu.unc p8,p0 = GR_l_N_Unbiased, GR_c_NegSingularity +(p8) br.cond.spnt tgammal_singularity // Singularity for arg < to -2^63 ////// +};; + +{ .mmi +(p15) ldfpd FR_n_A1H, FR_n_A1L = [GR_n_sin_Table], 16 + ldfpd FR_l_B8, FR_l_B10 = [GR_l_Stirling_Table], 16 + add GR_c_Table = 0x20, GR_c_Table +};; + +{ .mfi +(p15) ldfe FR_n_A9 = [GR_n_sin_Table], 16 + fma.s1 FR_l_Q0 = f1,FR_l_Y0,f0 // Q0 = Y0 + nop.i 0 +} +{ .mfi + ldfpd FR_l_B12, FR_l_B14 = [GR_l_Stirling_Table], 16 + fnma.s1 FR_l_E0 = FR_l_Y0,FR_l_AbsX,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A8 = [GR_n_sin_Table], 16 + fcvt.xf FR_c_XN = FR_n_IXN // Convert to FP repr. of int X + extr.u GR_l_Index2 = GR_l_X_1, 6, 4 // Extract Index2 +} +{ .mfi + ldfpd FR_l_B16, FR_l_B18 = [GR_l_Stirling_Table], 16 + nop.f 0 + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A7 = [GR_n_sin_Table], 16 + fms.s1 FR_l_CXH = FR_l_CH, f1, FR_l_AbsX // CXH = CH+|X| + shl GR_l_Index2 = GR_l_Index2,5 +} +{ .mfi + ldfd FR_l_Half = [GR_l_Stirling_Table] // Load 0.5 + nop.f 0 + nop.i 0 +};; + +{ .mfi + add GR_l_Index2 = GR_l_Index2, GR_l_Log_Table // Add offset + nop.f 0 + nop.i 0 +} +{ .mfi +(p15) ldfe FR_n_A6 = [GR_n_sin_Table], 16 +(p15) fma.s1 FR_n_XS = FR_l_AbsX , f1, FR_n_XNS // xs = x - int(x) + nop.i 0 +};; + +{ .mmi + ld2 GR_l_Z_2 = [GR_l_Index2],4 + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_h3_G_H#),gp + nop.i 0 +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + fma.s1 FR_l_E2 = FR_l_E0,FR_l_E0,FR_l_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + ldfs FR_l_G_2 = [GR_l_Index2],4 + fma.s1 FR_l_E1 = FR_l_E0,FR_l_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mmi + ldfs FR_l_H_2 = [GR_l_Index2],8 +(p15) ldfe FR_n_A5 = [GR_n_sin_Table], 16 + nop.i 0 +};; + +{ .mfi + setf.sig FR_l_float_N = GR_l_N // float_N = Make N a fp number + nop.f 0 + pmpyshr2.u GR_l_X_2 = GR_l_X_1,GR_l_Z_2,15 // X_2 = X_1 * Z_2 +} +{ .mfi + ldfe FR_l_h_2 = [GR_l_Index2],0 + fma.s1 FR_l_CXL = FR_l_AbsX, f1, FR_l_CXH // CXL = |X|+CXH + add GR_l_Log_Table1= 0x200, GR_l_Log_Table +};; + +{ .mfi +(p15) ldfe FR_n_A4 = [GR_n_sin_Table], 16 +(p15) fcmp.eq.unc.s1 p9,p0 = FR_l_AbsX, FR_c_XN //if argument is integer + // and negative + nop.i 0 +} +{ .mfi + ldfe FR_c_PosOverflow = [GR_c_Table],16 //Load pos overflow value +(p15) fma.s1 FR_n_XS2 = FR_n_XS, FR_n_XS, f0 // xs^2 = xs*xs + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A3 = [GR_n_sin_Table], 16 + nop.f 0 + nop.i 0 +};; + +{ .mfi +(p15) getf.sig GR_n_XN = FR_n_IXN // int(x) to general reg + fma.s1 FR_l_Y1 = FR_l_Y0,FR_l_E2,FR_l_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 FR_l_E3 = FR_l_E1,FR_l_E1,FR_l_E0 // e3 = e+e1^2 +(p9) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// + // and negative arguments ////////////// +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_AbsX_m_Half = FR_l_AbsX, f1, FR_l_Half // |x|-0.5 + extr.u GR_l_Index2 = GR_l_X_2, 1, 5 // Get Index3 +};; + +{ .mfi + shladd GR_l_Log_Table1= GR_l_Index2, 2, GR_l_Log_Table1 + nop.f 0 + shladd GR_l_Index3 = GR_l_Index2,4, GR_l_Log_Table // Index3 +} +{ .mfb +(p15) cmp.gtu.unc p11, p0 = GR_n_XN, GR_c_NegUnderflow // X < -1765 + fms.s1 FR_l_CXL = FR_l_CH, f1, FR_l_CXL // CXL = CH - CXL +(p11) br.cond.spnt tgammal_underflow // Singularity for negative argument ////// + // at underflow domain (X < -1765) ////// +};; + +{ .mfi + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Q#), gp +(p15) fma.s1 FR_n_TT = FR_n_A2L, FR_n_XS2, f0 // T=A2L*x^2 + tbit.nz.unc p13, p12 = GR_n_XN, 0x0 // whether [X] odd or even +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_XS2L = FR_n_XS, FR_n_XS, FR_n_XS2 // xs^2 Low part + nop.i 0 +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] +(p15) fma.s1 FR_n_A7 = FR_n_A8, FR_n_XS2, FR_n_A7 // poly tail + nop.i 0 +} +{ .mfi + ldfe FR_l_h_3 = [GR_l_Index3],12 +(p15) fma.s1 FR_n_XS4 = FR_n_XS2, FR_n_XS2, f0 // xs^4 = xs^2*xs^2 + nop.i 0 +};; + +{ .mfi + ldfs FR_l_H_3 = [GR_l_Log_Table1], 0 + fma.s1 FR_l_Y2 = FR_l_Y1, FR_l_E3, FR_l_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + ldfs FR_l_G_3 = [GR_l_Index3], 0 + fnma.s1 FR_l_Z = FR_l_AbsX,FR_l_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_G = FR_l_G_1, FR_l_G_2 // G = G1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_H = FR_l_H_1, FR_l_H_2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_log2_hi = [GR_l_Log_Table],16 // load log2_hi part + fadd.s1 FR_l_h = FR_l_h_1, FR_l_h_2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fcvt.xf FR_l_float_N = FR_l_float_N // int(N) + nop.i 0 +};; + +{ .mfi + ldfe FR_l_log2_lo = [GR_l_Log_Table],16 // Load log2_lo part + fma.s1 FR_l_CXL = FR_l_CXL, f1, FR_l_CL + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_A2H, FR_n_XS2L, FR_n_TT // T=A2H*x2L+T + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_6 = [GR_l_Log_Table],16 +(p15) fma.s1 FR_n_A3 = FR_n_A4, FR_n_XS2, FR_n_A3 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_A5 = FR_n_A6, FR_n_XS2, FR_n_A5 // poly tail + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_5 = [GR_l_Log_Table],16 +(p15) fabs FR_n_XS = FR_n_XS // abs(xs) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z = FR_l_Z,FR_l_Y2,FR_l_Q0 // x_hi = q+r*y2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_4 = [GR_l_Log_Table],16 +(p15) fma.s1 FR_n_A7 = FR_n_A9, FR_n_XS4, FR_n_A7 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS7 = FR_n_XS4, FR_n_XS2, f0 // = x^4*x^2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_3 = [GR_l_Log_Table],16 + fneg FR_n_NegOne = f1 // -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS8 = FR_n_XS4, FR_n_XS4, f0 // xs^8 = xs^4*xs^4 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_2 = [GR_l_Log_Table],16 + fadd.s1 FR_l_h = FR_l_h, FR_l_h_3 // h = h_1 + h_2 + h_3 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TH = FR_n_A2H, FR_n_XS2, FR_n_TT // A2H*xs2+T + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_1 = [GR_l_Log_Table],16 + fmpy.s1 FR_l_G = FR_l_G, FR_l_G_3 // G = G_1 * G_2 * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_H = FR_l_H, FR_l_H_3 // H = H_1 + H_2 + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Z2 = FR_l_Z, FR_l_Z, f0 // Z^2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_A3 = FR_n_A5, FR_n_XS4, FR_n_A3 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fcmp.gt.unc.s1 p7,p0 = FR_l_AbsX, FR_c_PosOverflow //X > 1755.5483 + // (overflow domain, result cannot be represented by normal value) + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS7 = FR_n_XS7, FR_n_XS, f0 // x^7 construction + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_TL = FR_n_A2H, FR_n_XS2, FR_n_TH // A2H*xs2+TH + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyH = FR_n_TH, f1, FR_n_A1H // PolyH=TH+A1H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_GS_hi = FR_l_G, FR_l_S // GS_hi = G*S + nop.i 0 +} +{ .mfb + nop.m 0 + fms.s1 FR_l_r = FR_l_G, FR_l_S, f1 // r = G*S -1 +(p7) br.cond.spnt tgammal_overflow // Overflow path for arg > 1755.5483 ////// +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B14 = FR_l_B16, FR_l_Z2, FR_l_B14// Bernoulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z4 = FR_l_Z2, FR_l_Z2, f0 // Z^4 = Z^2*Z^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B2 = FR_l_B4, FR_l_Z2, FR_l_B2 // Bernoulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_B6 = FR_l_B8, FR_l_Z2, FR_l_B6 // Bernoulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B10 = FR_l_B12, FR_l_Z2, FR_l_B10// Bernoulli tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Tail = FR_n_A7, FR_n_XS8, FR_n_A3 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT // TL = TL+T + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_PolyL = FR_n_A1H, f1, FR_n_PolyH // polyH+A1H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_Q_6, FR_l_Q_5 // Q_5+r*Q_6 + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 FR_l_r_cor = FR_l_GS_hi, f1 // r_cor = GS_hi -1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_GS_lo = FR_l_G, FR_l_S, FR_l_GS_hi // G*S-GS_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_r, FR_l_Q_2, FR_l_Q_1 //poly=r*Q2+Q1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_rsq = FR_l_r, FR_l_r // rsq = r * r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_G = FR_l_float_N, FR_l_log2_hi, FR_l_H // Tbl = + // float_N*log2_hi + H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Y_lo = FR_l_float_N, FR_l_log2_lo, FR_l_h // Y_lo= + // float_N*log2_lo + h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_B14 = FR_l_B18, FR_l_Z4, FR_l_B14 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B2 = FR_l_B6, FR_l_Z4, FR_l_B2 //bernulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z8 = FR_l_Z4, FR_l_Z4, f0 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_4 // poly_lo = + // Q_4 + r * poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 FR_l_r_cor = FR_l_r_cor, FR_l_r // r_cor = r_cor - r + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TH // polyL+TH + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_TL, f1, FR_n_A1L // TL+A1L + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_logl_YHi = FR_l_G, FR_l_r // Y_hi = Tbl + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B10 = FR_l_B14, FR_l_Z4, FR_l_B10 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_3 // poly_lo = + // Q_3 + r * poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_GS_lo // r_cor=r_cor+GS_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TT // polyL+TT + nop.i 0 +};; + +{ .mfi + nop.m 0 + fsub.s1 FR_l_Y_lo_res = FR_l_G, FR_l_logl_YHi // Y_lo = Tbl - Y_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_XYH = FR_l_logl_YHi, FR_l_AbsX_m_Half, f0 // XYH= + // YHi*|x-0.5| + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SS = FR_l_B10, FR_l_Z8, FR_l_B2 // Bernoulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_Y_lo // r_cor = r_cor+Y_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly_lo, FR_l_poly //poly= + // r^2*polyLo+poly + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_n_XS2, f0 // T=polyL*xs^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_Y_lo = FR_l_Y_lo_res, FR_l_r // Y_lo = Y_lo + r + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_l_XYL = FR_l_logl_YHi, FR_l_AbsX_m_Half, FR_l_XYH + // XYL = YHi*|x-0.5|-XYH + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXH = FR_l_SS, FR_l_Z, FR_l_CXH // SS*Z+CXH + nop.i 0 +} +{ .mfi + mov GR_e_exp_2tom51= 0xffff-51 // 2^-51 +(p15) fma.s1 FR_l_SignedXYH = FR_l_XYH, FR_n_NegOne, f0 // XYH = -XYH + // for negatives + nop.i 0 +};; + +{ .mlx + nop.m 0 + movl GR_e_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) +} +{ .mlx + nop.m 0 + movl GR_e_sig_inv_ln2 = 0xb8aa3b295c17f0bc //significand of 1/ln2 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly, FR_l_r_cor // poly = + // rsq * poly + r_cor + nop.i 0 +};; + +{ .mfi + addl GR_e_ad_Arg = @ltoff(Constants_Tgammal_exp_64_Arg#),gp +(p15) fma.s1 FR_n_TT = FR_n_PolyH, FR_n_XS2L, FR_n_TT + mov GR_e_exp_mask = 0x1FFFF // Form exponent mask +} +{ .mlx + nop.m 0 + movl GR_e_rshf = 0x43e8000000000000 // 1.10000 2^63 rshift +};; + + +{ .mmi + setf.sig FR_e_INV_LN2_2TO63 = GR_e_sig_inv_ln2 // form 1/ln2 * 2^63 + setf.d FR_e_RSHF_2TO51 = GR_e_rshf_2to51 // 1.1000 * 2^(63+51) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_SSCXL = FR_l_CXH, f1, FR_l_SSCXH // CXH+SS*CXH + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Input_AbsX = FR_l_XYH, f1, FR_l_SSCXH // HI EXP + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_e_expl_Input_X = FR_l_XYH, f1, FR_l_SSCXH // HI EXP + mov GR_e_exp_bias = 0x0FFFF // Set exponent bias +} +{ .mfi + ld8 GR_e_ad_Arg = [GR_e_ad_Arg] // Point to Arg table +(p15) fms.s1 FR_e_expl_Input_X = FR_l_SignedXYH, f1, FR_l_SSCXH // HI EXP + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_logl_YLo = FR_l_Y_lo, FR_l_poly // YLo = YLo+poly + nop.i 0 +};; + +{ .mfi + setf.exp FR_e_2TOM51 = GR_e_exp_2tom51 //2^-51 for scaling float_N +(p15) fma.s1 FR_n_TH = FR_n_PolyH, FR_n_XS2, FR_n_TT // TH= + // polyH*xs^2+T + nop.i 0 +} +{ .mib + setf.d FR_e_RSHF = GR_e_rshf // Right shift const 1.1000*2^63 + nop.i 0 + nop.b 0 +};; + +{ .mfi + add GR_e_ad_A = 0x20, GR_e_ad_Arg // Point to A table + nop.f 0 + add GR_e_ad_T1 = 0x50, GR_e_ad_Arg // Point to T1 table +} +{ .mfi + add GR_e_ad_T2 = 0x150, GR_e_ad_Arg // Point to T2 table + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXL = FR_l_SS, FR_l_Z, FR_l_SSCXL + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_e_expl_Input_Y = FR_l_XYH, f1, FR_e_expl_Input_AbsX + nop.i 0 +};; + +{ .mfi + ldfe FR_e_L_hi = [GR_e_ad_Arg],16 // Get L_hi + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_XYL = FR_l_logl_YLo, FR_l_AbsX_m_Half, FR_l_XYL + // XYL = YLo*|x-0.5|+XYL + nop.i 0 +};; + +{ .mfi + ldfe FR_e_L_lo = [GR_e_ad_Arg],16 // Get L_lo +(p15) fms.s1 FR_n_TL = FR_n_PolyH, FR_n_XS2, FR_n_TH // TL = + // = polyH*xs^2-TH + add GR_e_ad_W1 = 0x100, GR_e_ad_T2 // Point to W1 table +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1H = FR_n_TH, f1, f1 // poly1H = TH+1 + add GR_e_ad_W2 = 0x300, GR_e_ad_T2 // Point to W2 table +};; + +{ .mmi + getf.exp GR_e_signexp_x = FR_e_expl_Input_X // Extract sign and exp + ldfe FR_e_A3 = [GR_e_ad_A],16 // Get A3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXL = FR_l_SSCXL, f1, FR_l_CXL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_SSCXH + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_N_signif=FR_e_expl_Input_X,FR_e_INV_LN2_2TO63,FR_e_RSHF_2TO51 + and GR_e_exp_x = GR_e_signexp_x, GR_e_exp_mask +};; + +{ .mmi + sub GR_e_exp_x = GR_e_exp_x, GR_e_exp_bias // Get exponent + ldfe FR_e_A2 = [GR_e_ad_A],16 // Get A2 for main path + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyH = FR_n_Poly1H, FR_n_XS, f0//sin(Pi*x) poly + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_Poly1L = f1, f1, FR_n_Poly1H//sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT//sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Temp = FR_l_XYL, f1, FR_l_SSCXL // XYL+SS*CXL + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, FR_n_NegOne, f0 + // Negate lo part of exp argument for negative input values + nop.i 0 +};; + +{ .mfi + ldfe FR_e_A1 = [GR_e_ad_A],16 // Get A1 + nop.f 0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_e_float_N = FR_e_N_signif, FR_e_2TOM51, FR_e_RSHF + // Get float N = signd*2^51-RSHIFTER + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TH //sin(Pi*x) poly + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_PolyL = FR_n_Poly1H, FR_n_XS, FR_n_PolyH//sin(Pi*x) + nop.i 0 +};; + +{ .mfi + getf.sig GR_e_N_fix = FR_e_N_signif // Get N from significand + nop.f 0 + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp + // arguments for exp computation + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_e_r = FR_e_L_hi, FR_e_float_N, FR_e_expl_Input_X + // r = -L_hi * float_N + x + extr.u GR_e_M1 = GR_e_N_fix, 6, 6 // Extract index M_1 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TL //sin(Pi*x) poly + nop.i 0 +};; + + +{ .mmf + nop.m 0 + nop.m 0 + fma.s1 FR_e_r = FR_e_r, f1, FR_e_expl_Input_Y + // r = r + FR_e_expl_Input_Y +};; + +{ .mmi + shladd GR_e_ad_W1 = GR_e_M1,3,GR_e_ad_W1 // Point to W1 + shladd GR_e_ad_T1 = GR_e_M1,2,GR_e_ad_T1 // Point to T1 + extr.u GR_e_M2 = GR_e_N_fix, 0, 6 // Extract index M_2 +};; + + +{ .mfi + ldfs FR_e_T1 = [GR_e_ad_T1],0 // Get T1 + nop.f 0 + extr GR_e_K = GR_e_N_fix, 12, 32 //Extract limit range K +} +{ .mfi + shladd GR_e_ad_T2 = GR_e_M2,2,GR_e_ad_T2 // Point to T2 +(p15) fma.s1 FR_n_PolyL = FR_n_Poly1L, FR_n_XS, FR_n_PolyL + //sin(Pi*x) poly + shladd GR_e_ad_W2 = GR_e_M2,3,GR_e_ad_W2 // Point to W2 +};; + +{ .mfi + ldfs FR_e_T2 = [GR_e_ad_T2],0 // Get T2 + nop.f 0 + add GR_e_exp_2_k = GR_e_exp_bias, GR_e_K // exp of 2^k +} +{ .mfi + ldfd FR_e_W1 = [GR_e_ad_W1],0 // Get W1 + nop.f 0 + sub GR_e_exp_2_mk = GR_e_exp_bias, GR_e_K // exp of 2^-k +};; + +{ .mmi + ldfd FR_e_W2 = [GR_e_ad_W2],0 // Get W2 + nop.m 0 + nop.i 0 +};; + +{ .mmf + setf.exp FR_e_scale = GR_e_exp_2_k // Set scale = 2^k + setf.exp FR_e_2_mk = GR_e_exp_2_mk // Form 2^-k + fnma.s1 FR_e_r = FR_e_L_lo, FR_e_float_N, FR_e_r + // r = -L_lo * float_N + r +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_Tail, FR_n_XS7, FR_n_PolyL + //sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_r, FR_e_A3, FR_e_A2 // poly=r*A3+A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_e_rsq = FR_e_r, FR_e_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_e_T = FR_e_T1, FR_e_T2 // T = T1 * T2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_e_W1_p1 = FR_e_W1, f1 // W1_p1 = W1 + 1.0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_l_AbsX, f0 //sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_r, FR_e_poly, FR_e_A1 + // poly = r * poly + A1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_T_scale = FR_e_T, FR_e_scale, f0 // T_scale=T*scale + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_W = FR_e_W2, FR_e_W1_p1, FR_e_W1 + // W = W2 * (W1+1.0) + W1 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_SinxH = FR_n_PolyH, FR_l_AbsX, FR_n_TT + // sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + mov FR_e_Y_hi = FR_e_T // Assume Y_hi = T + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_rsq, FR_e_poly, FR_e_r + // poly = rsq * poly + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_Wp1_T_scale = FR_e_W, FR_e_T_scale, FR_e_T_scale + // (W+1)*T*scale + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_W_T_scale = FR_e_W, FR_e_T_scale, f0 // W*T*scale + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_SinxL = FR_n_PolyH, FR_l_AbsX, FR_n_SinxH + // Low part of sin + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) frcpa.s1 FR_n_Y0, p0 = f1, FR_n_SinxH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_result_lo = FR_e_Wp1_T_scale, FR_e_poly, FR_e_W_T_scale + // Low part of exp result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_SinxL = FR_n_SinxL, f1, FR_n_TT // sin low result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Q0 = f1,FR_n_Y0,f0 // q = y + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fnma.s1 FR_n_E0 = FR_n_Y0, FR_n_SinxH, f1 // e = 1-b*y + nop.i 0 +};; + + +{ .mfb + nop.m 0 +(p14) fma.s0 f8 = FR_e_Y_hi, FR_e_scale, FR_e_result_lo +(p14) br.ret.spnt b0 // Exit for positive Stirling path ////////////////////// +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Output_X = FR_e_Y_hi, FR_e_scale, f0 // exp result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Output_Y = FR_e_result_lo, f1, f0// exp lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_E2 = FR_n_E0,FR_n_E0,FR_n_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_E1 = FR_n_E0,FR_n_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y1 = FR_n_Y0,FR_n_E2,FR_n_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_E3 = FR_n_E1,FR_n_E1,FR_n_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y2 = FR_n_Y1,FR_n_E3,FR_n_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_n_R0 = FR_n_SinxH,FR_n_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_n_E4 = FR_n_SinxH,FR_n_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_RcpResH = FR_n_R0,FR_n_Y2,FR_n_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y3 = FR_n_Y2,FR_n_E4,FR_n_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_n_R1 = FR_n_SinxH,FR_n_RcpResH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_n_R1 = FR_n_SinxL,FR_n_RcpResH,FR_n_R1 + // r1 = r1 - b_lo*X + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_RcpResL = FR_n_R1,FR_n_Y3,f0 // x_lo = r1*y3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_Temp = FR_n_RcpResH, FR_e_expl_Output_Y, f0 + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Temp = FR_n_RcpResL, FR_e_expl_Output_X, FR_n_Temp + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_ResH = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_Temp + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_n_ResL = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_ResH + // Multiplying exp and sin result + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_n_ResH = FR_n_ResH, FR_n_NegOne, f0 // Negate + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_ResL = FR_n_ResL, f1, FR_n_Temp + // Multiplying exp and sin result - low result obtained + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p13) fma.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For odd + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fms.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For even + br.ret.sptk b0 // Exit for negative Stirling path ////////////////////// +};; + + +//////////// 1 <= |X| < 13 path //////////////////////////////////////////////// +//------------------------------------------------------------------------------ +.align 64 +tgamma_lt_13: +{ .mfi + getf.sig GR_p_XN = FR_p_IXN // Get significand + fcvt.xf FR_p_XN = FR_p_IXN // xn = [x] + add GR_r_sin_Table2= 0x40, GR_r_sin_Table // Shifted table addr. +} +{ .mfi + ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 // 0.5 & 1.5 + fms.s1 FR_p_AbsXM1 = FR_p_AbsX, f1, f1 // X-1 + add GR_p_Table2 = 0xB0, GR_p_Table +};; + +{ .mfi + add GR_r_sin_Table = -16, GR_r_sin_Table // For compensation + fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float + shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 59 // Get only 5 bit of signd +};; + +{ .mfi + ldfpd FR_r_A2H,FR_r_A2L = [GR_r_sin_Table], 16 // Load A2 + nop.f 0 + add GR_p_Int = -2, GR_p_XN // int = int - 2 +} +{ .mfi + ldfe FR_r_A6 = [GR_r_sin_Table2], 16 + nop.f 0 + cmp.gtu p11, p12 = 0x2, GR_p_XN // p11: x < 2 (splitted intervals), + // p12: x > 2 (base intervals) +};; + +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 + nop.f 0 + shr GR_p_Int = GR_p_Int, 1 // int/2 +} +{ .mfi + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + nop.f 0 +(p11) cmp.gtu.unc p10, p11 = 0x1C, GR_p_X_Sgnd // sgnd(x) < 0.75 +};; + +{ .mfi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 + nop.f 0 + shl GR_p_Offset = GR_p_Int, 4 // offset = int*16 +} +{ .mfi + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 + nop.f 0 +(p10) cmp.gtu.unc p9, p10 = 0x14, GR_p_X_Sgnd // sgnd(x) < 0.25 +};; + + +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 + nop.f 0 +(p12) tbit.nz.unc p13, p12 = GR_p_XN, 0x0 // p13: reccurent computations + // X is at [3;4], [5;6], [7;8]... interval +} +{ .mfi + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + nop.f 0 + shladd GR_p_Offset = GR_p_Int, 2, GR_p_Offset // +int*4 +};; + +.pred.rel "mutex",p9,p11 +{ .mfi + add GR_p_Offset = GR_p_Int, GR_p_Offset + // +int, so offset = int*21 +(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f1 // r = x-1 + nop.i 0 +} +{ .mfi + ldfe FR_r_A7 = [GR_r_sin_Table], 16 +(p11) fms.s1 FR_p_XR = FR_p_2, f1, FR_p_AbsX + // r = 2-x for 1.75 < x < 2 + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +.pred.rel "mutex",p10,p11 +.pred.rel "mutex",p9,p11 +{ .mfi +(p9) add GR_p_Offset = 126, r0 // 1.0 < x < 1.25 table +(p15) fcmp.eq.unc.s1 p7,p0 = FR_p_AbsX, FR_p_XN + // If arg is integer and negative - singularity branch + nop.i 0 +} +{ .mfi +(p10) add GR_p_Offset = 147, r0 // 1.25 < x < 1.75 table + nop.f 0 +(p11) add GR_p_Offset = 168, r0 // 1.75 < x < 2.0 table +};; + +{ .mmf + shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table + shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 + fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = x - [x] +};; + +{ .mmb + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +(p7) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// + // and negative argument /////////////// +};; + +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 + fma.s1 FR_p_XN = FR_p_XN, f1, FR_p_0p5 // xn = xn+0.5 + nop.i 0 +} +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 +(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_1p5 // r = x - 1.5 + nop.i 0 +};; + +{ .mmi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmf + ldfe FR_p_A19 = [GR_p_Table], 16 + ldfe FR_p_A11 = [GR_p_Table2], 16 + fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs2 = xs*xs +};; + +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 +(p12) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN // r = x - xn + nop.i 0 +} +{ .mfi + ldfe FR_p_A9 = [GR_p_Table2], 16 +(p13) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 +(p9) cmp.eq p12, p0 = r0, r0 // clear p12 +};; + +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 +(p10) cmp.eq p12, p0 = r0, r0 // clear p12 +};; + +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 + fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // sin for neg +(p11) cmp.eq p12, p0 = r0, r0 // clear p12 +} +{ .mfi + ldfe FR_p_A6 = [GR_p_Table2], 16 + fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A13 = [GR_p_Table], 16 + fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // x2Lo part + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // A5H*r + // 'Low poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // r^2 = r*r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fabs FR_r_XS = FR_r_XS // abs(xs) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // A2H*r + // 'High poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp5L = FR_p_A5H,FR_p_XR,FR_p_Temp5H //A5H*r delta + // 'Low poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // A5H*r+A4H + // 'Low poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H//A2H*r delta + //'High poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // A2H*r+A1H + //'High poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 = r^2*r + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // r^4 = r^2*r^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L// Low part + // of A5*r+A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low part + // of A5*r+A4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // (A5H*r+A4H)*r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // A2*r low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp4L = FR_p_Poly5H,FR_p_XR,FR_p_Temp4H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0H = FR_p_Poly3H,f1,FR_p_Poly1H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly0L = FR_p_Poly1H,f1,FR_p_Poly0H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_OddPoly0H = FR_p_Poly0H, FR_p_AbsXM1, f0 + // Reccurent computations - multiplying by X-1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L//High + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH//sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Poly3H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s1 FR_p_OddPoly0L = FR_p_Poly0H, FR_p_AbsXM1, FR_p_OddPoly0H + // Reccurent computations - multiplying by X-1 (low part) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp0H = FR_p_Poly3L,f1,FR_p_Poly1L //Low & High add + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL//sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // sin tail res + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Temp0H //Low & High add + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Tail,FR_r_XS7,FR_r_ResL //sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_OddPoly0L = FR_p_Poly0L, FR_p_AbsXM1, FR_p_OddPoly0L + // Reccurent computations - multiplying by X-1 (low part) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_ResL, FR_r_AbsX, f0 // X*sin + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p12) fma.s0 f8 = FR_p_Poly0H, f1, FR_p_Poly0L // Even + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.s0 f8 = FR_p_OddPoly0H, f1, FR_p_OddPoly0L // Odd +(p14) br.ret.spnt b0 // Exit for 1 <= |X| < 13 path (positive arguments)///// +};; + +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0H = FR_p_OddPoly0H, f1, f0 + // Reccurent computations + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0L = FR_p_OddPoly0L, f1, f0 + // Reccurent computations + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1H = FR_r_ResH, FR_r_AbsX, FR_r_TT // X*sin +(p11) cmp.eq p13, p12 = r0, r0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res1L = FR_r_ResH,FR_r_AbsX,FR_r_Res1H// X*sin +(p9) cmp.eq p13, p12 = r0, r0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // sin for neg +(p10) cmp.eq p13, p12 = r0, r0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0L, FR_r_Res1H, f0 // mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0H,FR_r_Res1L,FR_r_TL//mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_p_Poly0H,FR_r_Res1H,FR_r_TL//mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH//sin mult + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fneg FR_r_NegOne = f1 // Form -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL //Low result of mult + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1-b_lo*X + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate for evens + nop.i 0 +};; + +.pred.rel "mutex",p13,p12 +{ .mfi + nop.m 0 +(p13) fma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZH // Final result + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Final result + br.ret.sptk b0 // Exit for 1 <= |X| < 13 path (negative arguments)////// +};; + + +//////////// |X| < 1 path ///////////////////////////////////////////////////// +//------------------------------------------------------------------------------ +.align 64 +tgamma_lt_1: +{ .mfi + getf.exp GR_p_Exp = FR_p_AbsX // exp of abs X + fma.s1 FR_z_Q0 = f1,FR_z_Y0,f0 // q = a*y + add GR_r_sin_Table2= 0x50, GR_r_sin_Table +} +{ .mfi + ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 + fnma.s1 FR_z_E0 = FR_z_Y0,f8,f1 // e = 1-b*y + add GR_p_Table2 = 0xB0, GR_p_Table +};; + +{ .mfi + ldfd FR_p_0p25 = [GR_c_Table] + fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float + shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 60 + // Obtain only 4 bits of significand +} +{ .mfi + nop.m 0 + nop.f 0 + add GR_p_Bias = 0xffff, r0 // Set bias +};; + +{ .mfi + ldfpd FR_r_A2H, FR_r_A2L = [GR_r_sin_Table], 16 + nop.f 0 + shl GR_p_XN = GR_p_Exp, 4 + // Shift exp to 4 bits left to set place for significand +} +{ .mlx + ldfe FR_r_A6 = [GR_r_sin_Table2], 16 + movl GR_p_0p75 = 0xfffec // 0.75 +};; + +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 + nop.f 0 + or GR_p_XN = GR_p_XN, GR_p_X_Sgnd + // Combine exp with 4 high bits of significand +} +{ .mfi + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + nop.f 0 + sub GR_p_Exp = GR_p_Exp, GR_p_Bias // Unbiased exp +};; + +{ .mmi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 + cmp.gtu.unc p10, p11 = GR_p_0p75, GR_p_XN // sgnd(x) < 0.75 +};; + +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 + fma.s1 FR_z_E2 = FR_z_E0,FR_z_E0,FR_z_E0 // e2 = e+e^2 +(p10) cmp.gt.unc p9, p10 = -2, GR_p_Exp // x < 0.25 +} +{ .mfi + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + fma.s1 FR_z_E1 = FR_z_E0,FR_z_E0,f0 // e1 = e^2 +(p11) add GR_p_Offset = 168, r0 // [0.75;1] interval +};; + +{ .mmi +(p10) add GR_p_Offset = 147, r0 // [0.25;0.75] interval + ldfe FR_r_A7 = [GR_r_sin_Table], 16 +(p9) cmp.gt.unc p8, p9 = -3, GR_p_Exp // x < 0.125 +};; + +.pred.rel "mutex",p9,p8 +{ .mmi +(p9) add GR_p_Offset = 126, r0 // [0.125;0.25] interval +(p8) add GR_p_Offset = 189, r0 // [0.;0.125] interval + nop.i 0 +};; + +{ .mmf + shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table //Make addresses + shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 + fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = |x|-[x] +};; + +.pred.rel "mutex",p8,p11 +{ .mfi + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 +(p11) fms.s1 FR_p_XR = f1, f1, FR_p_AbsX // r = 1 - |x| + // for [0.75;1] interval + nop.i 0 +} +{ .mfi + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +(p8) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| + // for [0.;0.125] interval + nop.i 0 +};; + +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 + fma.s1 FR_z_Y1 = FR_z_Y0,FR_z_E2,FR_z_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 + fma.s1 FR_z_E3 = FR_z_E1,FR_z_E1,FR_z_E0 // e3 = e+e1^2 + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +{ .mfi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 +(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| + // for [0.125;0.25] interval + nop.i 0 +} +{ .mfi + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 +(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_0p5 // r = |x| - 0.5 + // for [0.25;0.75] interval + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A19 = [GR_p_Table], 16 + fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs^2 + nop.i 0 +} +{ .mfi + ldfe FR_p_A11 = [GR_p_Table2], 16 + nop.f 0 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 + fma.s1 FR_z_Y2 = FR_z_Y1,FR_z_E3,FR_z_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + ldfe FR_p_A9 = [GR_p_Table2], 16 + fnma.s1 FR_z_R0 = f8,FR_z_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 + fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // neg sin + nop.i 0 +} +{ .mfi + ldfe FR_p_A6 = [GR_p_Table2], 16 + fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // neg sin + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A13 = [GR_p_Table], 16 + fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // xs^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fabs FR_r_XS = FR_r_XS // Absolute value of xs + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_z_E4 = f8,FR_z_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_ZH = FR_z_R0,FR_z_Y2,FR_z_Q0 // 1/x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp5L = FR_p_A5H, FR_p_XR, FR_p_Temp5H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_Y3 = FR_z_Y2,FR_z_E4,FR_z_Y2 // y3 = y2+y2*e4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 //poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp4L = FR_p_Poly5H, FR_p_XR, FR_p_Temp4H//Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 //poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H /// Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // r^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // r^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_z_R1 = f8,FR_z_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0H = FR_p_Poly3H, f1, FR_p_Poly1H // Result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // xs^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly0L = FR_p_Poly1H, f1, FR_p_Poly0H // Result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_ZL = FR_z_R1,FR_z_Y3, f0 // x_lo = r1*y3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 /// neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L // High + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Poly3H // result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 f8 = FR_p_Poly0H, FR_z_ZH, f0 // z*poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly0H, FR_z_ZL, f0 // z*poly low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin low + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // xs^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp0H = FR_p_Poly3L, f1, FR_p_Poly1L // result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fms.s1 FR_p_Temp1H = FR_p_Poly0H, FR_z_ZH, f8 // hi result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL // lo result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // tail result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Temp0H // lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Tail, FR_r_XS7, FR_r_ResL // lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 FR_p_Temp1L = FR_p_Poly0L,FR_z_ZH,FR_p_Temp1L //hi result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_ResL, f1, f0 // for low result + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_Temp1H // for lo res + nop.i 0 +};; + +{ .mfi +(p10) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 + fma.s1 FR_r_Res1H = FR_r_ResH, f1, FR_r_TT // hi res + nop.i 0 +};; + +{ .mfb +(p9) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 +(p14) fma.s0 f8 = f8, f1, FR_p_Temp1L // Final result +(p14) br.ret.spnt b0 // Exit for 0 < |X| < 1 path (positive arguments)/////// +};; + +{ .mfi +(p11) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 + fms.s1 FR_r_Res1L = FR_r_ResH, f1, FR_r_Res1H // Low sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // Low sin result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0L,FR_r_Res1H,f0 //Low sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0H, FR_r_Res1L, FR_r_TL //Low sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_p_Poly0H, FR_r_Res1H, FR_r_TL //High sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH //Low res + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fneg FR_r_NegOne = f1 // Construct -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL // low sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1 - b_lo*X + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate + nop.i 0 +};; + +.pred.rel "mutex",p13,p12 +{ .mfb + nop.m 0 + fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Result for neg + br.ret.sptk b0 // Exit for 0 < |X| < 1 path (negative arguments)////// +};; + + + + +// SPECIALS (x for natval, nan, +/-inf or +/-0) /////////////////////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_spec: +{ .mlx + nop.m 0 + movl GR_DenOverflow = 0x2000000000000001 +} +{ .mfi + nop.m 0 + fclass.m p9,p0 = f8,0xB // +/-denormals + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +} + +{ .mfi +(p9) cmp.ltu.unc p10,p11 = GR_l_signif_Z, GR_DenOverflow +(p9) fnorm.s0 f8 = f8 + nop.i 0 +};; + +{ .mfb + nop.m 0 +(p9) fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Round by truncate +(p11) br.cond.sptk tgamma_lt_1 // Return to gamma ('good' denormal)//////////// +};; + +{ .mfb + nop.m 0 + nop.f 0 +(p10) br.cond.spnt tgammal_overflow // "Bad" denormal - overflow! ///////////// +};; + +{ .mfi + nop.m 0 + mov FR_X = f8 // for error handler + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f8,f1,f8 // res = x + x +(p6) br.ret.spnt b0 // Exit for NAN, INF and NatVals //////////////////////// +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_Parameter_TAG = 256 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 // Raise V flag + nop.i 0 +} +{ .mfb + nop.m 0 + nop.f 0 +(p8) br.cond.spnt tgammal_singularity // Branch for +ZERO //////////////////// +};; + +{ .mfb + nop.m 0 + nop.f 0 + br.cond.spnt tgammal_libm_err // Branch for -ZERO /////////////////////// +};; + + + + +// SINGULARITY (x is negative integer or 0) //////////////////////////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_singularity: +{ .mfi + nop.m 0 + mov FR_X = f8 // For error handler + mov GR_Parameter_TAG = 256 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 // Raise V flag + br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// + // with singularity error ///////////////// +};; + + + + +// OVERFLOW (result is too big and cannot be represented by normal value) ////// +// ( X > 1755.54 and for denormals with abs value less than 0x2000000000000001 ) +//------------------------------------------------------------------------------ +.align 32 +tgammal_overflow: +{ .mfi + addl r8 = 0x1FFFE, r0 // Exp of INF + fcmp.lt.s1 p15,p14 = f8,f0 // p14 - pos arg, p15 - neg arg + nop.i 0 +};; + +{ .mfi + setf.exp f9 = r8 + mov FR_X = f8 // For error handler + mov GR_Parameter_TAG = 255 // overflow +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fnma.s0 f8 = f9,f9,f0 // Set I,O and -INF result + br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// + // with overflow error //////////////////// +};; + + + + + +// UNDERFLOW (x is negative noninteger with big absolute value) //////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_underflow: +{ .mfi + nop.m 0 + fcvt.fx.trunc.s1 FR_u_IXN = f8 // Convert arg to int repres. in FR + nop.i 0 +};; + +{ .mmi + getf.sig GR_u_XN = FR_u_IXN + mov r11 = 0x00001 + nop.i 0 +};; + +{ .mfi + setf.exp f9 = r11 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + tbit.z p6,p7 = GR_u_XN,0 // even or odd +};; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s0 f8 = f9,f9,f9 // for negatives + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s0 f8 = f9,f9,f9 // for positives + br.ret.sptk b0 // Exit for underflow path ////////////////////////////// +};; + + +GLOBAL_LIBM_END(tgammal) + + + + +////////////////// Tgammal error handler /////////////////////////////////////// +//------------------------------------------------------------------------------ +LOCAL_LIBM_ENTRY(__libm_error_region) +tgammal_libm_err: +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 999 + nop.m 999 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ieee754/ldbl-opt/w_acos.c b/sysdeps/ieee754/ldbl-opt/w_acos.c deleted file mode 100644 index 2934041d4d..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acos.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __acos, acosl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acos_compat.c b/sysdeps/ieee754/ldbl-opt/w_acos_compat.c new file mode 100644 index 0000000000..1e6d1b37ec --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_acos_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __acos, acosl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acosh.c b/sysdeps/ieee754/ldbl-opt/w_acosh.c deleted file mode 100644 index 7f7fa14e27..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acosh.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __acosh, acoshl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c b/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c new file mode 100644 index 0000000000..40da339a7a --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __acosh, acoshl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acoshl.c b/sysdeps/ieee754/ldbl-opt/w_acoshl.c deleted file mode 100644 index 6243c2ac80..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acoshl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __acoshl, acoshl); diff --git a/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c b/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c new file mode 100644 index 0000000000..df4338d9fa --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __acoshl, acoshl); diff --git a/sysdeps/ieee754/ldbl-opt/w_acosl.c b/sysdeps/ieee754/ldbl-opt/w_acosl.c deleted file mode 100644 index 8b6e890a53..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acosl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __acosl, acosl); diff --git a/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c b/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c new file mode 100644 index 0000000000..5efc99024c --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __acosl, acosl); diff --git a/sysdeps/ieee754/ldbl-opt/w_asin.c b/sysdeps/ieee754/ldbl-opt/w_asin.c deleted file mode 100644 index 5e1d70ff65..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_asin.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __asin, asinl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_asin_compat.c b/sysdeps/ieee754/ldbl-opt/w_asin_compat.c new file mode 100644 index 0000000000..1c52cc22ad --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_asin_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __asin, asinl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_asinl.c b/sysdeps/ieee754/ldbl-opt/w_asinl.c deleted file mode 100644 index a58a224a38..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_asinl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __asinl, asinl); diff --git a/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c b/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c new file mode 100644 index 0000000000..087fab25bb --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __asinl, asinl); diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2.c b/sysdeps/ieee754/ldbl-opt/w_atan2.c deleted file mode 100644 index f1d1501bd2..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atan2.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __atan2, atan2l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c b/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c new file mode 100644 index 0000000000..d3f7964d7c --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __atan2, atan2l, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2l.c b/sysdeps/ieee754/ldbl-opt/w_atan2l.c deleted file mode 100644 index 01431eff44..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atan2l.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __atan2l, atan2l); diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c b/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c new file mode 100644 index 0000000000..6b12209625 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __atan2l, atan2l); diff --git a/sysdeps/ieee754/ldbl-opt/w_atanh.c b/sysdeps/ieee754/ldbl-opt/w_atanh.c deleted file mode 100644 index b4cab87c32..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atanh.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __atanh, atanhl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c b/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c new file mode 100644 index 0000000000..e15ef1f93d --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __atanh, atanhl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atanhl.c b/sysdeps/ieee754/ldbl-opt/w_atanhl.c deleted file mode 100644 index 0dbc114481..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atanhl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __atanhl, atanhl); diff --git a/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c b/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c new file mode 100644 index 0000000000..49bae1ee8f --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __atanhl, atanhl); diff --git a/sysdeps/ieee754/ldbl-opt/w_cosh.c b/sysdeps/ieee754/ldbl-opt/w_cosh.c deleted file mode 100644 index a6f56cf4c5..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_cosh.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __cosh, coshl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c b/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c new file mode 100644 index 0000000000..af29735e10 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __cosh, coshl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_coshl.c b/sysdeps/ieee754/ldbl-opt/w_coshl.c deleted file mode 100644 index 8c7dccb7f3..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_coshl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __coshl, coshl); diff --git a/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c b/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c new file mode 100644 index 0000000000..a8808778ba --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __coshl, coshl); diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10.c b/sysdeps/ieee754/ldbl-opt/w_exp10.c deleted file mode 100644 index 990c48e61a..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_exp10.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __exp10, exp10l, GLIBC_2_1); -compat_symbol (libm, __pow10, pow10l, GLIBC_2_1); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c new file mode 100644 index 0000000000..142a70bcd6 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c @@ -0,0 +1,6 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __exp10, exp10l, GLIBC_2_1); +compat_symbol (libm, __pow10, pow10l, GLIBC_2_1); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10l.c b/sysdeps/ieee754/ldbl-opt/w_exp10l.c deleted file mode 100644 index e06dfb5014..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_exp10l.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __exp10l, exp10l); -long_double_symbol (libm, __pow10l, pow10l); diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c new file mode 100644 index 0000000000..8f2ccd3441 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c @@ -0,0 +1,6 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __exp10l, exp10l); +long_double_symbol (libm, __pow10l, pow10l); diff --git a/sysdeps/ieee754/ldbl-opt/w_fmod.c b/sysdeps/ieee754/ldbl-opt/w_fmod.c deleted file mode 100644 index 81ad5057f7..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_fmod.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fmod, fmodl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c b/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c new file mode 100644 index 0000000000..9280d39d70 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __fmod, fmodl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_fmodl.c b/sysdeps/ieee754/ldbl-opt/w_fmodl.c deleted file mode 100644 index 2a534a304c..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_fmodl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __fmodl, fmodl); diff --git a/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c b/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c new file mode 100644 index 0000000000..88fe0ac4d2 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __fmodl, fmodl); diff --git a/sysdeps/ieee754/ldbl-opt/w_hypot.c b/sysdeps/ieee754/ldbl-opt/w_hypot.c deleted file mode 100644 index e1cf1ffcfe..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_hypot.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __hypot, hypotl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c b/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c new file mode 100644 index 0000000000..b3979ff0f4 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __hypot, hypotl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_hypotl.c b/sysdeps/ieee754/ldbl-opt/w_hypotl.c deleted file mode 100644 index 6c46bd4bde..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_hypotl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __hypotl, hypotl); diff --git a/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c b/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c new file mode 100644 index 0000000000..68e3997489 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __hypotl, hypotl); diff --git a/sysdeps/ieee754/ldbl-opt/w_j0.c b/sysdeps/ieee754/ldbl-opt/w_j0.c deleted file mode 100644 index 5c78aff085..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j0.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, j0, j0l, GLIBC_2_0); -compat_symbol (libm, y0, y0l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j0_compat.c b/sysdeps/ieee754/ldbl-opt/w_j0_compat.c new file mode 100644 index 0000000000..45b4d14764 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_j0_compat.c @@ -0,0 +1,6 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, j0, j0l, GLIBC_2_0); +compat_symbol (libm, y0, y0l, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j0l.c b/sysdeps/ieee754/ldbl-opt/w_j0l.c deleted file mode 100644 index 767a1bcada..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j0l.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __j0l, j0l); -long_double_symbol (libm, __y0l, y0l); diff --git a/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c b/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c new file mode 100644 index 0000000000..9050657e03 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c @@ -0,0 +1,6 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __j0l, j0l); +long_double_symbol (libm, __y0l, y0l); diff --git a/sysdeps/ieee754/ldbl-opt/w_j1.c b/sysdeps/ieee754/ldbl-opt/w_j1.c deleted file mode 100644 index ed3dbc0361..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j1.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, j1, j1l, GLIBC_2_0); -compat_symbol (libm, y1, y1l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j1_compat.c b/sysdeps/ieee754/ldbl-opt/w_j1_compat.c new file mode 100644 index 0000000000..1071c8fd6a --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_j1_compat.c @@ -0,0 +1,6 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, j1, j1l, GLIBC_2_0); +compat_symbol (libm, y1, y1l, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j1l.c b/sysdeps/ieee754/ldbl-opt/w_j1l.c deleted file mode 100644 index 946c36467c..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j1l.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __j1l, j1l); -long_double_symbol (libm, __y1l, y1l); diff --git a/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c b/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c new file mode 100644 index 0000000000..4ed9e2dd12 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c @@ -0,0 +1,6 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __j1l, j1l); +long_double_symbol (libm, __y1l, y1l); diff --git a/sysdeps/ieee754/ldbl-opt/w_jn.c b/sysdeps/ieee754/ldbl-opt/w_jn.c deleted file mode 100644 index 7a7e0d434b..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_jn.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, jn, jnl, GLIBC_2_0); -compat_symbol (libm, yn, ynl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_jn_compat.c b/sysdeps/ieee754/ldbl-opt/w_jn_compat.c new file mode 100644 index 0000000000..be29a36041 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_jn_compat.c @@ -0,0 +1,6 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, jn, jnl, GLIBC_2_0); +compat_symbol (libm, yn, ynl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_jnl.c b/sysdeps/ieee754/ldbl-opt/w_jnl.c deleted file mode 100644 index 5219543a97..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_jnl.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __jnl, jnl); -long_double_symbol (libm, __ynl, ynl); diff --git a/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c b/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c new file mode 100644 index 0000000000..d22ee54997 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c @@ -0,0 +1,6 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __jnl, jnl); +long_double_symbol (libm, __ynl, ynl); diff --git a/sysdeps/ieee754/ldbl-opt/w_log.c b/sysdeps/ieee754/ldbl-opt/w_log.c deleted file mode 100644 index bde1e31db4..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __log, logl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log10.c b/sysdeps/ieee754/ldbl-opt/w_log10.c deleted file mode 100644 index 74e716821e..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log10.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __log10, log10l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log10_compat.c b/sysdeps/ieee754/ldbl-opt/w_log10_compat.c new file mode 100644 index 0000000000..5ec6a2b2b6 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_log10_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __log10, log10l, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log10l.c b/sysdeps/ieee754/ldbl-opt/w_log10l.c deleted file mode 100644 index 9c936e376a..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log10l.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __log10l, log10l); diff --git a/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c b/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c new file mode 100644 index 0000000000..17de3e7856 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __log10l, log10l); diff --git a/sysdeps/ieee754/ldbl-opt/w_log2.c b/sysdeps/ieee754/ldbl-opt/w_log2.c deleted file mode 100644 index 9b9b45b21b..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log2.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __log2, log2l, GLIBC_2_1); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log2_compat.c b/sysdeps/ieee754/ldbl-opt/w_log2_compat.c new file mode 100644 index 0000000000..dffd2c183e --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_log2_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __log2, log2l, GLIBC_2_1); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log2l.c b/sysdeps/ieee754/ldbl-opt/w_log2l.c deleted file mode 100644 index c859682133..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log2l.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __log2l, log2l); diff --git a/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c b/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c new file mode 100644 index 0000000000..3c5e734573 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __log2l, log2l); diff --git a/sysdeps/ieee754/ldbl-opt/w_log_compat.c b/sysdeps/ieee754/ldbl-opt/w_log_compat.c new file mode 100644 index 0000000000..d2a2bcadde --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_log_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __log, logl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_logl.c b/sysdeps/ieee754/ldbl-opt/w_logl.c deleted file mode 100644 index c2354a02b9..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_logl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __logl, logl); diff --git a/sysdeps/ieee754/ldbl-opt/w_logl_compat.c b/sysdeps/ieee754/ldbl-opt/w_logl_compat.c new file mode 100644 index 0000000000..2b55842139 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_logl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __logl, logl); diff --git a/sysdeps/ieee754/ldbl-opt/w_pow.c b/sysdeps/ieee754/ldbl-opt/w_pow.c deleted file mode 100644 index 2d98fb9be4..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_pow.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __pow, powl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_pow_compat.c b/sysdeps/ieee754/ldbl-opt/w_pow_compat.c new file mode 100644 index 0000000000..c2a7942019 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_pow_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __pow, powl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_powl.c b/sysdeps/ieee754/ldbl-opt/w_powl.c deleted file mode 100644 index 85b8927648..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_powl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __powl, powl); diff --git a/sysdeps/ieee754/ldbl-opt/w_powl_compat.c b/sysdeps/ieee754/ldbl-opt/w_powl_compat.c new file mode 100644 index 0000000000..1897cf1c63 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_powl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __powl, powl); diff --git a/sysdeps/ieee754/ldbl-opt/w_remainder.c b/sysdeps/ieee754/ldbl-opt/w_remainder.c deleted file mode 100644 index dfa7b7f569..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_remainder.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __remainder, remainderl, GLIBC_2_0); -strong_alias (__remainder, __drem) -compat_symbol (libm, __drem, dreml, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c new file mode 100644 index 0000000000..c823dcb8e7 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c @@ -0,0 +1,7 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __remainder, remainderl, GLIBC_2_0); +strong_alias (__remainder, __drem) +compat_symbol (libm, __drem, dreml, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_remainderl.c b/sysdeps/ieee754/ldbl-opt/w_remainderl.c deleted file mode 100644 index 7a344b7709..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_remainderl.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __remainderl, remainderl); -strong_alias (__remainderl, __dreml) -long_double_symbol (libm, __dreml, dreml); diff --git a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c new file mode 100644 index 0000000000..b2ce5c9563 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c @@ -0,0 +1,7 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __remainderl, remainderl); +strong_alias (__remainderl, __dreml) +long_double_symbol (libm, __dreml, dreml); diff --git a/sysdeps/ieee754/ldbl-opt/w_scalb.c b/sysdeps/ieee754/ldbl-opt/w_scalb.c deleted file mode 100644 index e2ac601596..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_scalb.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __scalb, scalbl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c b/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c new file mode 100644 index 0000000000..f6d53a5ba5 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __scalb, scalbl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_scalbl.c b/sysdeps/ieee754/ldbl-opt/w_scalbl.c deleted file mode 100644 index f3d3901f86..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_scalbl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __scalbl, scalbl); diff --git a/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c b/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c new file mode 100644 index 0000000000..c8feb654a2 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __scalbl, scalbl); diff --git a/sysdeps/ieee754/ldbl-opt/w_sinh.c b/sysdeps/ieee754/ldbl-opt/w_sinh.c deleted file mode 100644 index a5400b5eb1..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sinh.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sinh, sinhl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c b/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c new file mode 100644 index 0000000000..b47182c017 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sinh, sinhl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sinhl.c b/sysdeps/ieee754/ldbl-opt/w_sinhl.c deleted file mode 100644 index b94f4ec845..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sinhl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __sinhl, sinhl); diff --git a/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c b/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c new file mode 100644 index 0000000000..305ed82357 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __sinhl, sinhl); diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrt.c b/sysdeps/ieee754/ldbl-opt/w_sqrt.c deleted file mode 100644 index ca2ba061e8..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sqrt.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c b/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c new file mode 100644 index 0000000000..355d1c20db --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrtl.c b/sysdeps/ieee754/ldbl-opt/w_sqrtl.c deleted file mode 100644 index 609f5bf3d6..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sqrtl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __sqrtl, sqrtl); diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c b/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c new file mode 100644 index 0000000000..1e4526f2c6 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __sqrtl, sqrtl); diff --git a/sysdeps/ieee754/ldbl-opt/w_tgamma.c b/sysdeps/ieee754/ldbl-opt/w_tgamma.c deleted file mode 100644 index cce9f348ed..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_tgamma.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c b/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c new file mode 100644 index 0000000000..082ce8aaff --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c @@ -0,0 +1,5 @@ +#include +#include +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_tgammal.c b/sysdeps/ieee754/ldbl-opt/w_tgammal.c deleted file mode 100644 index c3c511db8c..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_tgammal.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#undef weak_alias -#define weak_alias(n,a) -#include -long_double_symbol (libm, __tgammal, tgammal); diff --git a/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c b/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c new file mode 100644 index 0000000000..aaf5403522 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c @@ -0,0 +1,5 @@ +#include +#undef weak_alias +#define weak_alias(n,a) +#include +long_double_symbol (libm, __tgammal, tgammal); diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile index 99761ef7f0..35517b63a1 100644 --- a/sysdeps/powerpc/nofpu/Makefile +++ b/sysdeps/powerpc/nofpu/Makefile @@ -24,9 +24,9 @@ CFLAGS-s_clogl.c += -fno-builtin-fabsl CFLAGS-s_clog10l.c += -fno-builtin-fabsl CFLAGS-s_csinl.c += -fno-builtin-fabsl CFLAGS-s_csqrtl.c += -fno-builtin-fabsl -CFLAGS-w_acosl.c += -fno-builtin-fabsl -CFLAGS-w_asinl.c += -fno-builtin-fabsl -CFLAGS-w_atanhl.c += -fno-builtin-fabsl -CFLAGS-w_j0l.c += -fno-builtin-fabsl -CFLAGS-w_j1l.c += -fno-builtin-fabsl +CFLAGS-w_acosl_compat.c += -fno-builtin-fabsl +CFLAGS-w_asinl_compat.c += -fno-builtin-fabsl +CFLAGS-w_atanhl_compat.c += -fno-builtin-fabsl +CFLAGS-w_j0l_compat.c += -fno-builtin-fabsl +CFLAGS-w_j1l_compat.c += -fno-builtin-fabsl endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile index 804e7dc095..5afbade15f 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile @@ -8,8 +8,9 @@ sysdep_routines += s_isnan-power7 s_isnan-power6 s_isnan-power5 s_isnan-ppc32 \ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \ s_llrint-ppc32 s_llround-power6 s_llround-power5+ \ - s_llround-ppc32 w_sqrt-power5 w_sqrt-ppc32 \ - w_sqrtf-power5 w_sqrtf-ppc32 s_isnan-power7 \ + s_llround-ppc32 s_isnan-power7 \ + w_sqrt_compat-power5 w_sqrt_compat-ppc32 \ + w_sqrtf_compat-power5 w_sqrtf_compat-ppc32 \ s_isnan-power6 s_isnan-power5 s_isnan-ppc32 \ s_isnanf-power6 s_isnanf-power5 s_isinf-power7 \ s_isinf-ppc32 s_isinff-ppc32 s_finite-power7 \ diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S deleted file mode 100644 index 9d1f9c2d47..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S +++ /dev/null @@ -1,31 +0,0 @@ -/* sqrt function. PowerPC32/POWER5 version. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) - -#define __sqrt __sqrt_power5 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S deleted file mode 100644 index 5eed5c05cc..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S +++ /dev/null @@ -1,31 +0,0 @@ -/* sqrt function. PowerPC32 default version. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) - -#define __sqrt __sqrt_ppc32 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c deleted file mode 100644 index 1e1892034e..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Multiple versions of sqrt. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include "init-arch.h" - -extern __typeof (__sqrt) __sqrt_ppc32 attribute_hidden; -extern __typeof (__sqrt) __sqrt_power5 attribute_hidden; - -libc_ifunc (__sqrt, - (hwcap & PPC_FEATURE_POWER5) - ? __sqrt_power5 - : __sqrt_ppc32); - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -strong_alias (__sqrt, __sqrtl) -weak_alias (__sqrt, sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S new file mode 100644 index 0000000000..7c5a504177 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S @@ -0,0 +1,31 @@ +/* sqrt function. PowerPC32/POWER5 version. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#undef weak_alias +#define weak_alias(a,b) +#undef strong_alias +#define strong_alias(a,b) +#undef compat_symbol +#define compat_symbol(a,b,c,d) + +#define __sqrt __sqrt_power5 + +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S new file mode 100644 index 0000000000..534e934ac9 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S @@ -0,0 +1,31 @@ +/* sqrt function. PowerPC32 default version. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#undef weak_alias +#define weak_alias(a,b) +#undef strong_alias +#define strong_alias(a,b) +#undef compat_symbol +#define compat_symbol(a,b,c,d) + +#define __sqrt __sqrt_ppc32 + +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c new file mode 100644 index 0000000000..1e1892034e --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c @@ -0,0 +1,40 @@ +/* Multiple versions of sqrt. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include "init-arch.h" + +extern __typeof (__sqrt) __sqrt_ppc32 attribute_hidden; +extern __typeof (__sqrt) __sqrt_power5 attribute_hidden; + +libc_ifunc (__sqrt, + (hwcap & PPC_FEATURE_POWER5) + ? __sqrt_power5 + : __sqrt_ppc32); + +weak_alias (__sqrt, sqrt) + +#ifdef NO_LONG_DOUBLE +strong_alias (__sqrt, __sqrtl) +weak_alias (__sqrt, sqrtl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); +#endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S deleted file mode 100644 index d4b28d6941..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S +++ /dev/null @@ -1,26 +0,0 @@ -/* sqrtf function. PowerPC32/POWER5 version. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#undef weak_alias -#define weak_alias(a,b) - -#define __sqrtf __sqrtf_power5 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S deleted file mode 100644 index 256ed0ba2a..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S +++ /dev/null @@ -1,26 +0,0 @@ -/* sqrtf function. PowerPC32 default version. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#undef weak_alias -#define weak_alias(a,b) - -#define __sqrtf __sqrtf_ppc32 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c deleted file mode 100644 index bbab4d4f93..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Multiple versions of sqrtf. - Copyright (C) 2013-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include "init-arch.h" - -extern __typeof (__sqrtf) __sqrtf_ppc32 attribute_hidden; -extern __typeof (__sqrtf) __sqrtf_power5 attribute_hidden; - -libc_ifunc (__sqrtf, - (hwcap & PPC_FEATURE_POWER5) - ? __sqrtf_power5 - : __sqrtf_ppc32); - -weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S new file mode 100644 index 0000000000..eacc042850 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S @@ -0,0 +1,26 @@ +/* sqrtf function. PowerPC32/POWER5 version. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#undef weak_alias +#define weak_alias(a,b) + +#define __sqrtf __sqrtf_power5 + +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S new file mode 100644 index 0000000000..72191fc9a5 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S @@ -0,0 +1,26 @@ +/* sqrtf function. PowerPC32 default version. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#undef weak_alias +#define weak_alias(a,b) + +#define __sqrtf __sqrtf_ppc32 + +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c new file mode 100644 index 0000000000..bbab4d4f93 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c @@ -0,0 +1,32 @@ +/* Multiple versions of sqrtf. + Copyright (C) 2013-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include "init-arch.h" + +extern __typeof (__sqrtf) __sqrtf_ppc32 attribute_hidden; +extern __typeof (__sqrtf) __sqrtf_power5 attribute_hidden; + +libc_ifunc (__sqrtf, + (hwcap & PPC_FEATURE_POWER5) + ? __sqrtf_power5 + : __sqrtf_ppc32); + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S deleted file mode 100644 index 61e6d1feff..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S +++ /dev/null @@ -1,109 +0,0 @@ -/* sqrt function. PowerPC32 version. - Copyright (C) 2007-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* double [fp1] sqrt (double x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrt instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - The fsqrt will set FPCC and FU (Floating Point Unordered or NaN - to indicated that the input value was negative or NaN. Use Move to - Condition Register from FPSCR to copy the FPCC field to cr1. The - branch on summary overflow transfers control to w_sqrt to process - any error conditions. Otherwise we can return the result directly. - - This part of the function is a leaf routine, so no need to stack a - frame or execute prologue/epilogue code. This means it is safe to - transfer directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (double parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrt, 5, 0) - fsqrt fp2,fp1 - mcrfs cr1,4 - bso- cr1,.Lw_sqrt - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrt: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x) return z; !isnan*/ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 26) */ - fmr fp2,fp1 - fabs fp0,fp1 - li r3,26 - fcmpu cr7,fp1,fp0 - bne- cr7,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrt) - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -weak_alias (__sqrt, sqrtl) -strong_alias (__sqrt, __sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) -#endif - diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S new file mode 100644 index 0000000000..bb896a33cd --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S @@ -0,0 +1,108 @@ +/* sqrt function. PowerPC32 version. + Copyright (C) 2007-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* double [fp1] sqrt (double x [fp1]) + Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). + The fsqrt instruction generates the correct value for all inputs and + sets the appropriate floating point exceptions. Extended checking is + only needed to set errno (via __kernel_standard) if the input value + is negative. + + The fsqrt will set FPCC and FU (Floating Point Unordered or NaN + to indicated that the input value was negative or NaN. Use Move to + Condition Register from FPSCR to copy the FPCC field to cr1. The + branch on summary overflow transfers control to w_sqrt to process + any error conditions. Otherwise we can return the result directly. + + This part of the function is a leaf routine, so no need to stack a + frame or execute prologue/epilogue code. This means it is safe to + transfer directly to w_sqrt as long as the input value (f1) is + preserved. Putting the sqrt result into f2 (double parameter 2) + allows passing both the input value and sqrt result into the extended + wrapper so there is no need to recompute. + + This tactic avoids the overhead of stacking a frame for the normal + (non-error) case. Until gcc supports prologue shrink-wrapping + this is the best we can do. */ + + .section ".text" + .machine power4 +EALIGN (__sqrt, 5, 0) + fsqrt fp2,fp1 + mcrfs cr1,4 + bso- cr1,.Lw_sqrt + fmr fp1,fp2 + blr + .align 4 +.Lw_sqrt: + mflr r0 + stwu r1,-16(r1) + cfi_adjust_cfa_offset(16) + fmr fp12,fp2 + stw r0,20(r1) + stw r30,8(r1) + cfi_offset(lr,20-16) + cfi_offset(r30,8-16) +#ifdef SHARED + SETUP_GOT_ACCESS(r30,got_label) + addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha + addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l + lwz r9,_LIB_VERSION@got(30) + lwz r0,0(r9) +#else + lis r9,_LIB_VERSION@ha + lwz r0,_LIB_VERSION@l(r9) +#endif +/* if (_LIB_VERSION == _IEEE_) return z; */ + cmpwi cr7,r0,-1 + beq- cr7,.L4 +/* if (x != x) return z; !isnan*/ + fcmpu cr7,fp1,fp1 + bne- cr7,.L4 +/* if (x < 0.0) + return __kernel_standard (x, x, 26) */ + fmr fp2,fp1 + fabs fp0,fp1 + li r3,26 + fcmpu cr7,fp1,fp0 + bne- cr7,.L11 +.L4: + lwz r0,20(r1) + fmr fp1,fp12 + lwz r30,8(r1) + addi r1,r1,16 + mtlr r0 + blr +.L11: + bl __kernel_standard@plt + fmr fp12,fp1 + b .L4 + END (__sqrt) + +weak_alias (__sqrt, sqrt) + +#ifdef NO_LONG_DOUBLE +weak_alias (__sqrt, sqrtl) +strong_alias (__sqrt, __sqrtl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) +#endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S deleted file mode 100644 index 8e74232ba3..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S +++ /dev/null @@ -1,101 +0,0 @@ -/* sqrtf function. PowerPC32 version. - Copyright (C) 2007-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* float [fp1] sqrts (float x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrts instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - The fsqrts will set FPCC and FU (Floating Point Unordered or NaN - to indicated that the input value was negative or NaN. Use Move to - Condition Register from FPSCR to copy the FPCC field to cr1. The - branch on summary overflow transfers control to w_sqrt to process - any error conditions. Otherwise we can return the result directly. - - This part of the function is a leaf routine, so no need to stack a - frame or execute prologue/epilogue code. This means it is safe to - transfer directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrtf, 5, 0) - fsqrts fp2,fp1 - mcrfs cr1,4 - bso- cr1,.Lw_sqrtf - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrtf: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x, 0) return z; !isnan */ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 126) */ - fmr fp2,fp1 - fabs fp0,fp1 - li r3,126 - fcmpu cr7,1,0 - bne- cr7,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) - diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S new file mode 100644 index 0000000000..c304ab5ca2 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S @@ -0,0 +1,100 @@ +/* sqrtf function. PowerPC32 version. + Copyright (C) 2007-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* float [fp1] sqrts (float x [fp1]) + Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). + The fsqrts instruction generates the correct value for all inputs and + sets the appropriate floating point exceptions. Extended checking is + only needed to set errno (via __kernel_standard) if the input value + is negative. + + The fsqrts will set FPCC and FU (Floating Point Unordered or NaN + to indicated that the input value was negative or NaN. Use Move to + Condition Register from FPSCR to copy the FPCC field to cr1. The + branch on summary overflow transfers control to w_sqrt to process + any error conditions. Otherwise we can return the result directly. + + This part of the function is a leaf routine, so no need to stack a + frame or execute prologue/epilogue code. This means it is safe to + transfer directly to w_sqrt as long as the input value (f1) is + preserved. Putting the sqrt result into f2 (float parameter 2) + allows passing both the input value and sqrt result into the extended + wrapper so there is no need to recompute. + + This tactic avoids the overhead of stacking a frame for the normal + (non-error) case. Until gcc supports prologue shrink-wrapping + this is the best we can do. */ + + .section ".text" + .machine power4 +EALIGN (__sqrtf, 5, 0) + fsqrts fp2,fp1 + mcrfs cr1,4 + bso- cr1,.Lw_sqrtf + fmr fp1,fp2 + blr + .align 4 +.Lw_sqrtf: + mflr r0 + stwu r1,-16(r1) + cfi_adjust_cfa_offset(16) + fmr fp12,fp2 + stw r0,20(r1) + stw r30,8(r1) + cfi_offset(lr,20-16) + cfi_offset(r30,8-16) +#ifdef SHARED + SETUP_GOT_ACCESS(r30,got_label) + addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha + addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l + lwz r9,_LIB_VERSION@got(30) + lwz r0,0(r9) +#else + lis r9,_LIB_VERSION@ha + lwz r0,_LIB_VERSION@l(r9) +#endif +/* if (_LIB_VERSION == _IEEE_) return z; */ + cmpwi cr7,r0,-1 + beq- cr7,.L4 +/* if (x != x, 0) return z; !isnan */ + fcmpu cr7,fp1,fp1 + bne- cr7,.L4 +/* if (x < 0.0) + return __kernel_standard (x, x, 126) */ + fmr fp2,fp1 + fabs fp0,fp1 + li r3,126 + fcmpu cr7,1,0 + bne- cr7,.L11 +.L4: + lwz r0,20(r1) + fmr fp1,fp12 + lwz r30,8(r1) + addi r1,r1,16 + mtlr r0 + blr +.L11: + bl __kernel_standard@plt + fmr fp12,fp1 + b .L4 + END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S deleted file mode 100644 index 617fc69f05..0000000000 --- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S +++ /dev/null @@ -1,107 +0,0 @@ -/* sqrt function. PowerPC32 version. - Copyright (C) 2007-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* double [fp1] sqrt (double x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrt instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - So compare the input value against the absolute value of itself. - This will compare equal unless the value is negative (EDOM) or a NAN, - in which case we branch to the extend wrapper. If equal we can return - the result directly. - - This part of the function looks like a leaf routine, so no need to - stack a frame or execute prologue/epilogue code. It is safe to - branch directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrt, 5, 0) - fabs fp0,fp1 - fsqrt fp2,fp1 - fcmpu cr1,fp0,fp1 - bne- cr1,.Lw_sqrt - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrt: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x) return z; !isnan*/ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 26) */ - fmr fp2,fp1 - li r3,26 - bne- cr1,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrt) - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -weak_alias (__sqrt, sqrtl) -strong_alias (__sqrt, __sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) -#endif - diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S new file mode 100644 index 0000000000..93625c5aa9 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S @@ -0,0 +1,106 @@ +/* sqrt function. PowerPC32 version. + Copyright (C) 2007-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* double [fp1] sqrt (double x [fp1]) + Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). + The fsqrt instruction generates the correct value for all inputs and + sets the appropriate floating point exceptions. Extended checking is + only needed to set errno (via __kernel_standard) if the input value + is negative. + + So compare the input value against the absolute value of itself. + This will compare equal unless the value is negative (EDOM) or a NAN, + in which case we branch to the extend wrapper. If equal we can return + the result directly. + + This part of the function looks like a leaf routine, so no need to + stack a frame or execute prologue/epilogue code. It is safe to + branch directly to w_sqrt as long as the input value (f1) is + preserved. Putting the sqrt result into f2 (float parameter 2) + allows passing both the input value and sqrt result into the extended + wrapper so there is no need to recompute. + + This tactic avoids the overhead of stacking a frame for the normal + (non-error) case. Until gcc supports prologue shrink-wrapping + this is the best we can do. */ + + .section ".text" + .machine power4 +EALIGN (__sqrt, 5, 0) + fabs fp0,fp1 + fsqrt fp2,fp1 + fcmpu cr1,fp0,fp1 + bne- cr1,.Lw_sqrt + fmr fp1,fp2 + blr + .align 4 +.Lw_sqrt: + mflr r0 + stwu r1,-16(r1) + cfi_adjust_cfa_offset(16) + fmr fp12,fp2 + stw r0,20(r1) + stw r30,8(r1) + cfi_offset(lr,20-16) + cfi_offset(r30,8-16) +#ifdef SHARED + SETUP_GOT_ACCESS(r30,got_label) + addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha + addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l + lwz r9,_LIB_VERSION@got(30) + lwz r0,0(r9) +#else + lis r9,_LIB_VERSION@ha + lwz r0,_LIB_VERSION@l(r9) +#endif +/* if (_LIB_VERSION == _IEEE_) return z; */ + cmpwi cr7,r0,-1 + beq- cr7,.L4 +/* if (x != x) return z; !isnan*/ + fcmpu cr7,fp1,fp1 + bne- cr7,.L4 +/* if (x < 0.0) + return __kernel_standard (x, x, 26) */ + fmr fp2,fp1 + li r3,26 + bne- cr1,.L11 +.L4: + lwz r0,20(r1) + fmr fp1,fp12 + lwz r30,8(r1) + addi r1,r1,16 + mtlr r0 + blr +.L11: + bl __kernel_standard@plt + fmr fp12,fp1 + b .L4 + END (__sqrt) + +weak_alias (__sqrt, sqrt) + +#ifdef NO_LONG_DOUBLE +weak_alias (__sqrt, sqrtl) +strong_alias (__sqrt, __sqrtl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) +#endif diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S deleted file mode 100644 index 1ccd1f99a4..0000000000 --- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S +++ /dev/null @@ -1,99 +0,0 @@ -/* sqrtf function. PowerPC32 version. - Copyright (C) 2007-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* float [fp1] sqrts (float x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrts instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - So compare the input value against the absolute value of itself. - This will compare equal unless the value is negative (EDOM) or a NAN, - in which case we branch to the extend wrapper. If equal we can return - the result directly. - - This part of the function looks like a leaf routine, so no need to - stack a frame or execute prologue/epilogue code. It is safe to - branch directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrtf, 5, 0) - fabs fp0,fp1 - fsqrts fp2,fp1 - fcmpu cr1,fp0,fp1 - bne- cr1,.Lw_sqrtf - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrtf: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x, 0) return z; !isnan */ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 126) */ - fmr fp2,fp1 - li r3,126 - bne- cr1,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) - diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S new file mode 100644 index 0000000000..2ca86b6155 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S @@ -0,0 +1,98 @@ +/* sqrtf function. PowerPC32 version. + Copyright (C) 2007-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* float [fp1] sqrts (float x [fp1]) + Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). + The fsqrts instruction generates the correct value for all inputs and + sets the appropriate floating point exceptions. Extended checking is + only needed to set errno (via __kernel_standard) if the input value + is negative. + + So compare the input value against the absolute value of itself. + This will compare equal unless the value is negative (EDOM) or a NAN, + in which case we branch to the extend wrapper. If equal we can return + the result directly. + + This part of the function looks like a leaf routine, so no need to + stack a frame or execute prologue/epilogue code. It is safe to + branch directly to w_sqrt as long as the input value (f1) is + preserved. Putting the sqrt result into f2 (float parameter 2) + allows passing both the input value and sqrt result into the extended + wrapper so there is no need to recompute. + + This tactic avoids the overhead of stacking a frame for the normal + (non-error) case. Until gcc supports prologue shrink-wrapping + this is the best we can do. */ + + .section ".text" + .machine power4 +EALIGN (__sqrtf, 5, 0) + fabs fp0,fp1 + fsqrts fp2,fp1 + fcmpu cr1,fp0,fp1 + bne- cr1,.Lw_sqrtf + fmr fp1,fp2 + blr + .align 4 +.Lw_sqrtf: + mflr r0 + stwu r1,-16(r1) + cfi_adjust_cfa_offset(16) + fmr fp12,fp2 + stw r0,20(r1) + stw r30,8(r1) + cfi_offset(lr,20-16) + cfi_offset(r30,8-16) +#ifdef SHARED + SETUP_GOT_ACCESS(r30,got_label) + addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha + addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l + lwz r9,_LIB_VERSION@got(30) + lwz r0,0(r9) +#else + lis r9,_LIB_VERSION@ha + lwz r0,_LIB_VERSION@l(r9) +#endif +/* if (_LIB_VERSION == _IEEE_) return z; */ + cmpwi cr7,r0,-1 + beq- cr7,.L4 +/* if (x != x, 0) return z; !isnan */ + fcmpu cr7,fp1,fp1 + bne- cr7,.L4 +/* if (x < 0.0) + return __kernel_standard (x, x, 126) */ + fmr fp2,fp1 + li r3,126 + bne- cr1,.L11 +.L4: + lwz r0,20(r1) + fmr fp1,fp12 + lwz r30,8(r1) + addi r1,r1,16 + mtlr r0 + blr +.L11: + bl __kernel_standard@plt + fmr fp12,fp1 + b .L4 + END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/fpu/w_sqrt.S deleted file mode 100644 index 703f228766..0000000000 --- a/sysdeps/sparc/sparc32/fpu/w_sqrt.S +++ /dev/null @@ -1,53 +0,0 @@ -/* sqrt function. sparc32 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrt) - clr %g1 - std %g0, [%sp + 72] - std %o0, [%sp + 80] - ldd [%sp + 72], %f8 - ldd [%sp + 80], %f0 - fcmpd %f0, %f8 - fbl 1f - nop -8: retl - fsqrtd %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o2 - mov %o1, %o3 - mov 26, %o4 - mov %o7, %g1 - call __kernel_standard - mov %g1, %o7 -END (__sqrt) - -weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S b/sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S new file mode 100644 index 0000000000..703f228766 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S @@ -0,0 +1,53 @@ +/* sqrt function. sparc32 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrt) + clr %g1 + std %g0, [%sp + 72] + std %o0, [%sp + 80] + ldd [%sp + 72], %f8 + ldd [%sp + 80], %f0 + fcmpd %f0, %f8 + fbl 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o2 + mov %o1, %o3 + mov 26, %o4 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S deleted file mode 100644 index 05d1160378..0000000000 --- a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S +++ /dev/null @@ -1,51 +0,0 @@ -/* sqrtf function. sparc32 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrtf) - st %g0, [%sp + 68] - st %o0, [%sp + 72] - ld [%sp + 68], %f8 - ld [%sp + 72], %f0 - fcmps %f0, %f8 - fbl 1f - nop -8: retl - fsqrts %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o1 - mov 126, %o2 - mov %o7, %g1 - call __kernel_standard_f - mov %g1, %o7 -END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S b/sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S new file mode 100644 index 0000000000..05d1160378 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S @@ -0,0 +1,51 @@ +/* sqrtf function. sparc32 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrtf) + st %g0, [%sp + 68] + st %o0, [%sp + 72] + ld [%sp + 68], %f8 + ld [%sp + 72], %f0 + fcmps %f0, %f8 + fbl 1f + nop +8: retl + fsqrts %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o1 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile index 4489b70cff..c929f98764 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile @@ -2,7 +2,8 @@ ifeq ($(subdir),math) ifeq ($(have-as-vis3),yes) libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_fabs-vis3 \ s_fabsf-vis3 s_llrintf-vis3 s_llrint-vis3 \ - s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \ + s_rintf-vis3 s_rint-vis3 \ + w_sqrt_compat-vis3 w_sqrtf_compat-vis3 \ s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \ s_fmaf-vis3 s_fma-vis3 s_nearbyint-vis3 \ s_nearbyintf-vis3 s_fdimf-vis3 s_fdim-vis3 diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S deleted file mode 100644 index 06ff449150..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S +++ /dev/null @@ -1,49 +0,0 @@ -/* sqrt function. sparc32 v9 vis3 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrt_vis3) - movwtos %o0, %f0 - fzero %f8 - movwtos %o1, %f1 - fcmpd %f0, %f8 - fbl 1f - nop -8: retl - fsqrtd %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o2 - mov %o1, %o3 - mov 26, %o4 - mov %o7, %g1 - call __kernel_standard - mov %g1, %o7 -END (__sqrt_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S deleted file mode 100644 index 3b070721d2..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S +++ /dev/null @@ -1,12 +0,0 @@ -#include - -SPARC_ASM_VIS3_IFUNC(sqrt) - -weak_alias (__sqrt, sqrt) - -# undef weak_alias -# define weak_alias(a, b) - -#define __sqrt __sqrt_generic - -#include "../w_sqrt.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S new file mode 100644 index 0000000000..06ff449150 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S @@ -0,0 +1,49 @@ +/* sqrt function. sparc32 v9 vis3 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrt_vis3) + movwtos %o0, %f0 + fzero %f8 + movwtos %o1, %f1 + fcmpd %f0, %f8 + fbl 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o2 + mov %o1, %o3 + mov 26, %o4 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S new file mode 100644 index 0000000000..1ccac19e29 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S @@ -0,0 +1,12 @@ +#include + +SPARC_ASM_VIS3_IFUNC(sqrt) + +weak_alias (__sqrt, sqrt) + +# undef weak_alias +# define weak_alias(a, b) + +#define __sqrt __sqrt_generic + +#include "../w_sqrt_compat.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S deleted file mode 100644 index 5b21523fc0..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S +++ /dev/null @@ -1,47 +0,0 @@ -/* sqrtf function. sparc32 v9 vis3 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrtf_vis3) - movwtos %o0, %f0 - fzeros %f8 - fcmps %f0, %f8 - fbl 1f - nop -8: retl - fsqrts %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o1 - mov 126, %o2 - mov %o7, %g1 - call __kernel_standard_f - mov %g1, %o7 -END (__sqrtf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S deleted file mode 100644 index 777a04058c..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include - -SPARC_ASM_VIS3_IFUNC(sqrtf) - -weak_alias (__sqrtf, sqrtf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __sqrtf __sqrtf_generic - -#include "../w_sqrtf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S new file mode 100644 index 0000000000..5b21523fc0 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S @@ -0,0 +1,47 @@ +/* sqrtf function. sparc32 v9 vis3 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrtf_vis3) + movwtos %o0, %f0 + fzeros %f8 + fcmps %f0, %f8 + fbl 1f + nop +8: retl + fsqrts %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o1 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S new file mode 100644 index 0000000000..f0e759a2c8 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S @@ -0,0 +1,12 @@ +#include + +SPARC_ASM_VIS3_IFUNC(sqrtf) + +weak_alias (__sqrtf, sqrtf) + +# undef weak_alias +# define weak_alias(a, b) + +#define __sqrtf __sqrtf_generic + +#include "../w_sqrtf_compat.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S deleted file mode 100644 index 4415a82024..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S +++ /dev/null @@ -1,51 +0,0 @@ -/* sqrt function. sparc32 v9 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrt) - std %o0, [%sp + 80] - fzero %f8 - ldd [%sp + 80], %f0 - fcmpd %f0, %f8 - fbl 1f - nop -8: retl - fsqrtd %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o2 - mov %o1, %o3 - mov 26, %o4 - mov %o7, %g1 - call __kernel_standard - mov %g1, %o7 -END (__sqrt) - -weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S new file mode 100644 index 0000000000..4415a82024 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S @@ -0,0 +1,51 @@ +/* sqrt function. sparc32 v9 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrt) + std %o0, [%sp + 80] + fzero %f8 + ldd [%sp + 80], %f0 + fcmpd %f0, %f8 + fbl 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o2 + mov %o1, %o3 + mov 26, %o4 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S deleted file mode 100644 index 1c3c97f8e9..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S +++ /dev/null @@ -1,50 +0,0 @@ -/* sqrtf function. sparc32 v9 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrtf) - st %o0, [%sp + 72] - fzeros %f8 - ld [%sp + 72], %f0 - fcmps %f0, %f8 - fbl 1f - nop -8: retl - fsqrts %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o1 - mov 126, %o2 - mov %o7, %g1 - call __kernel_standard_f - mov %g1, %o7 -END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S new file mode 100644 index 0000000000..1c3c97f8e9 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S @@ -0,0 +1,50 @@ +/* sqrtf function. sparc32 v9 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrtf) + st %o0, [%sp + 72] + fzeros %f8 + ld [%sp + 72], %f0 + fcmps %f0, %f8 + fbl 1f + nop +8: retl + fsqrts %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o1 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrt.S b/sysdeps/sparc/sparc64/fpu/w_sqrt.S deleted file mode 100644 index de95e52e8e..0000000000 --- a/sysdeps/sparc/sparc64/fpu/w_sqrt.S +++ /dev/null @@ -1,48 +0,0 @@ -/* sqrt function. sparc64 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrt) - fzero %f8 - fcmpd %fcc2, %f0, %f8 - fbl,pn %fcc2, 1f - nop -8: retl - fsqrtd %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be,pt %icc, 8b - fmovd %f0, %f2 - mov 26, %o2 - mov %o7, %g1 - call __kernel_standard - mov %g1, %o7 -END (__sqrt) - -weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S b/sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S new file mode 100644 index 0000000000..de95e52e8e --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S @@ -0,0 +1,48 @@ +/* sqrt function. sparc64 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrt) + fzero %f8 + fcmpd %fcc2, %f0, %f8 + fbl,pn %fcc2, 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be,pt %icc, 8b + fmovd %f0, %f2 + mov 26, %o2 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrtf.S b/sysdeps/sparc/sparc64/fpu/w_sqrtf.S deleted file mode 100644 index 0c253fe43a..0000000000 --- a/sysdeps/sparc/sparc64/fpu/w_sqrtf.S +++ /dev/null @@ -1,48 +0,0 @@ -/* sqrtf function. sparc64 version. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -ENTRY (__sqrtf) - fzeros %f8 - fcmps %fcc2, %f1, %f8 - fbl,pn %fcc2, 1f - nop -8: retl - fsqrts %f1, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be,pt %icc, 8b - fmovs %f1, %f3 - mov 126, %o2 - mov %o7, %g1 - call __kernel_standard_f - mov %g1, %o7 -END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S b/sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S new file mode 100644 index 0000000000..0c253fe43a --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S @@ -0,0 +1,48 @@ +/* sqrtf function. sparc64 version. + Copyright (C) 2012-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +ENTRY (__sqrtf) + fzeros %f8 + fcmps %fcc2, %f1, %f8 + fbl,pn %fcc2, 1f + nop +8: retl + fsqrts %f1, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be,pt %icc, 8b + fmovs %f1, %f3 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) -- cgit v1.2.3