⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e_asinl.s

📁 Glibc 2.3.2源代码(解压后有100多M)
💻 S
📖 第 1 页 / 共 2 页
字号:
.file "asinl.s"// Copyright (C) 2000, 2001, Intel Corporation// All rights reserved.// // Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story,// and Ping Tak Peter Tang of the Computational Software Lab, 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://developer.intel.com/opensource.//// History//==============================================================// 2/02/00  Initial version // 4/04/00  Unwind support added// 8/15/00  Bundle added after call to __libm_error_support to properly//          set [the previously overwritten] GR_Parameter_RESULT.//// API//==============================================================// long double = asinl(long double)// input  floating point f8// output floating point f8//// Registers used//==============================================================//// predicate registers used:// p6 -> p12//// floating-point registers used:// f8 has input, then output// f32 -> f87, f8 -> f13, f32 -> f87//// general registers used:// r32 -> r47//// Overview of operation//==============================================================// There are three paths// 1. |x| < 2^-40                 ASIN_TINY// 2. 2^-40 <= |x| < 1/4          ASIN_POLY// 3. 1/4 <= |x| < 1              ASIN_ATAN#include "libm_support.h"// Assembly macros//==============================================================FR_RESULT = f10FR_X = f8FR_Y = f1asin_P79                   = f32asin_P59                   = f33asin_P39                   = f34asin_P19                   = f35asin_P810                  = f36asin_P610                  = f37asin_P410                  = f38asin_P210                  = f39asin_A1                    = f41asin_A2                    = f42asin_A3                    = f43asin_A4                    = f44asin_A5                    = f45asin_A6                    = f46asin_A7                    = f47asin_A8                    = f48asin_A9                    = f49asin_A10                   = f50asin_X2                    = f51asin_X4                    = f52asin_B                     = f53asin_Bb                    = f54asin_C                     = f55asin_Cc                    = f56asin_D                     = f57asin_W                     = f58asin_Ww                    = f59asin_y0                    = f60asin_y1                    = f61asin_y2                    = f62asin_H                     = f63asin_Hh                    = f64asin_t1                    = f65asin_t2                    = f66asin_t3                    = f67asin_t4                    = f68asin_t5                    = f69asin_Pseries               = f70asin_NORM_f8               = f71asin_ABS_NORM_f8           = f72asin_2m100                 = f73asin_P1P2                  = f74asin_HALF                  = f75asin_1mD                   = f76asin_1mB                   = f77asin_1mBmC                 = f78 asin_S                     = f79asin_BmWW                  = f80 asin_BmWWpb                = f81 asin_2W                    = f82 asin_1d2W                  = f83 asin_Dd                    = f84asin_XWw                   = f85 asin_low                   = f86asin_pi_by_2               = f87asin_pi_by_2_lo            = f88asin_GR_17_ones            = r33asin_GR_16_ones            = r34asin_GR_signexp_f8         = r35asin_GR_exp                = r36asin_GR_true_exp           = r37asin_GR_ff9b               = r38 GR_SAVE_B0              = r39GR_SAVE_SP              = r40GR_SAVE_PFS             = r33 // r33 can be used safely.// r40 is address of table of coefficients// Later it is used to save sp across calls GR_SAVE_GP              = r41asin_GR_fffe               = r42 asin_GR_retval             = r43 GR_Parameter_X                 = r44 GR_Parameter_Y                 = r45 GR_Parameter_RESULT            = r46 GR_Parameter_TAG               = r47 // 2^-40:// A true exponent of -40 is//                    : -40 + register_bias//                    : -28 + ffff = ffd7// A true exponent of -100 is //                    : -100 + register_bias//                    : -64 + ffff = ff9b// Data tables//==============================================================#ifdef _LIBC.rodata#else.data#endif.align 16asin_coefficients:ASM_TYPE_DIRECTIVE(asin_coefficients,@object)data8  0xBB08911F2013961E, 0x00003FF8            // A10data8  0x981F1095A23A87D3, 0x00003FF8            // A9 data8  0xBDF09C6C4177BCC6, 0x00003FF8            // A8 data8  0xE4C3A60B049ACCEA, 0x00003FF8            // A7 data8  0x8E2789F4E8A8F1AD, 0x00003FF9            // A6 data8  0xB745D09B2B0E850B, 0x00003FF9            // A5 data8  0xF8E38E3BC4C50920, 0x00003FF9            // A4 data8  0xB6DB6DB6D89FCD81, 0x00003FFA            // A3 data8  0x99999999999AF376, 0x00003FFB            // A2 data8  0xAAAAAAAAAAAAAA71, 0x00003FFC            // A1data8  0xc90fdaa22168c234, 0x00003FFF            // pi_by_2_hidata8  0xc4c6628b80dc1cd1, 0x00003FBF            // pi_by_2_loASM_SIZE_DIRECTIVE(asin_coefficients).align 32.global asinl#.section .text.proc  asinl#.align 32asinl: { .mfi      alloc r32 = ar.pfs,1,11,4,0                        (p0)  fnorm      asin_NORM_f8 = f8                       (p0)  mov        asin_GR_17_ones = 0x1ffff               }{ .mii(p0)  mov        asin_GR_16_ones = 0xffff                (p0)  mov        asin_GR_ff9b = 0xff9b ;;                         nop.i 999}{ .mmi(p0)  setf.exp  asin_2m100 = asin_GR_ff9b                                      (p0)  addl           r40   = @ltoff(asin_coefficients), gp      nop.i 999};;{ .mmi      ld8 r40 = [r40]      nop.m 999      nop.i 999};;// Load the constants{ .mmi(p0) ldfe       asin_A10 = [r40],16 ;;      (p0) ldfe       asin_A9  = [r40],16            nop.i 999 ;;}{ .mmi(p0) ldfe       asin_A8  = [r40],16 ;;      (p0) ldfe       asin_A7  = [r40],16            nop.i 999 ;;}{ .mmi(p0) ldfe       asin_A6  = [r40],16 ;;      (p0)  getf.exp   asin_GR_signexp_f8  = asin_NORM_f8                                  nop.i 999}{ .mmi(p0) ldfe       asin_A5  = [r40],16 ;;      (p0) ldfe       asin_A4  = [r40],16            nop.i 999 ;;}{ .mfi      nop.m 999(p0) fmerge.s   asin_ABS_NORM_f8 = f0, asin_NORM_f8            (p0)  and        asin_GR_exp         = asin_GR_signexp_f8, asin_GR_17_ones ;;     }// case 1: |x| < 2^-40         ==> p6 (includes x = +-0)// case 2: 2^-40 <= |x| < 2^-2 ==> p8// case 3: 2^-2  <= |x| < 1    ==> p9// case 4: 1  <= |x|           ==> p11//   In case 4, we pick up the special case x = +-1 and return +-pi/2{ .mii(p0) ldfe       asin_A3  = [r40],16      (p0)  sub        asin_GR_true_exp    = asin_GR_exp, asin_GR_16_ones ;;            (p0)  cmp.ge.unc p6, p7    = -41, asin_GR_true_exp ;;             }{ .mii(p0) ldfe       asin_A2  = [r40],16      (p7)  cmp.ge.unc p8, p9    = -3,  asin_GR_true_exp ;;             (p9)  cmp.ge.unc p10, p11  = -1,  asin_GR_true_exp              }{ .mmi(p0) ldfe       asin_A1  = [r40],16 ;;      (p0) ldfe       asin_pi_by_2  = [r40],16       nop.i 999}// case 4: |x| >= 1{ .mib      nop.m 999      nop.i 999(p11) br.spnt         L(ASIN_ERROR_RETURN) ;;                         }// case 1: |x| < 2^-40{ .mfb      nop.m 999(p6)  fma.s0         f8 = asin_2m100,f8,f8                       (p6)  br.ret.spnt   b0 ;;                                          }// case 2: 2^-40 <= |x| < 2^-2 ==> p8{ .mfi      nop.m 999(p8)  fma.s1        asin_X2   = f8,f8, f0                             nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_X4   = asin_X2,asin_X2, f0                   nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P810 = asin_X4, asin_A10, asin_A8            nop.i 999}{ .mfi      nop.m 999(p8)  fma.s1        asin_P79  = asin_X4, asin_A9, asin_A7             nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P610 = asin_X4, asin_P810, asin_A6           nop.i 999}{ .mfi      nop.m 999(p8)  fma.s1        asin_P59  = asin_X4, asin_P79, asin_A5            nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P410 = asin_X4, asin_P610, asin_A4           nop.i 999}{ .mfi      nop.m 999(p8)  fma.s1        asin_P39  = asin_X4, asin_P59, asin_A3            nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P210 = asin_X4, asin_P410, asin_A2           nop.i 999}{ .mfi      nop.m 999(p8)  fma.s1        asin_P19  = asin_X4, asin_P39, asin_A1            nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P1P2    = asin_X2, asin_P210, asin_P19       nop.i 999 ;;}{ .mfi      nop.m 999(p8)  fma.s1        asin_P1P2    = asin_X2, asin_P1P2, f0             nop.i 999 ;;}{ .mfb      nop.m 999(p8)  fma.s0        f8 = asin_NORM_f8, asin_P1P2, asin_NORM_f8  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -