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

📄 e_powf.s

📁 glibc 2.9,最新版的C语言库函数
💻 S
📖 第 1 页 / 共 5 页
字号:
// When X is +-0 and Y is +-0, IEEE returns 1.0// We call error support with this value{ .mfb        mov pow_GR_tag                  = 32        fma.s.s0 f8                     = f1,f1,f0        br.cond.sptk __libm_error_region};;POW_X_0_Y_NEG:// When X is +-0 and Y is negative, IEEE returns// X     Y           answer// +0    -odd int    +inf// -0    -odd int    -inf// +0    !-odd int   +inf// -0    !-odd int   +inf// p6 == Y is a floating point number outside the integer.//       Hence it is an integer and is even.//       return +inf// p7 == Y is a floating point number within the integer range.//      p9  == (int_Y = NORM_Y), Y is an integer, which may be odd or even.//           p11 odd//              return (sign_of_x)inf//           p12 even//              return +inf//      p10 == Y is not an integer//         return +inf//{ .mfi          nop.m 999          nop.f 999          cmp.gt  p6,p7                 = pow_GR_exp_Y, pow_GR_10033};;{ .mfi          mov pow_GR_tag                = 33(p7)      fcmp.eq.unc.s1 p9,p10         = POW_float_int_Y,  POW_NORM_Y          nop.i 999};;{ .mfb          nop.m 999(p6)      frcpa.s0 f8,p13               = f1, f0(p6)      br.cond.sptk __libm_error_region   // x=0, y<0, y large neg int};;{ .mfb          nop.m 999(p10)     frcpa.s0 f8,p13               = f1, f0(p10)     br.cond.sptk __libm_error_region   // x=0, y<0, y not int};;// x=0, y<0, y an int{ .mib          nop.m 999(p9)      tbit.nz.unc p11,p12           = pow_GR_sig_int_Y,0          nop.b 999};;{ .mfi          nop.m 999(p12)     frcpa.s0 f8,p13               = f1,f0          nop.i 999};;{ .mfb          nop.m 999(p11)     frcpa.s0 f8,p13               = f1,f8          br.cond.sptk __libm_error_region};;POW_Y_0:// Here for y zero, x anything but zero and nan// Set flag if x denormal// Result is +1.0{ .mfi        nop.m 999        fcmp.eq.s0 p6,p0 = f8,f0    // Sets flag if x denormal        nop.i 999}{ .mfb        nop.m 999        fma.s.s0 f8 = f1,f1,f0        br.ret.sptk b0};;POW_X_INF:// Here when X is +-inf// X +inf  Y +inf             +inf// X -inf  Y +inf             +inf// X +inf  Y >0               +inf// X -inf  Y >0, !odd integer +inf     <== (-inf)^0.5 = +inf !!// X -inf  Y >0,  odd integer -inf// X +inf  Y -inf             +0// X -inf  Y -inf             +0// X +inf  Y <0               +0// X -inf  Y <0, !odd integer +0// X -inf  Y <0, odd integer  -0// X + inf Y=+0                +1// X + inf Y=-0                +1// X - inf Y=+0                +1// X - inf Y=-0                +1// p13 == Y negative// p14 == Y positive// p6 == Y is a floating point number outside the integer.//       Hence it is an integer and is even.//       p13 == (Y negative)//          return +inf//       p14 == (Y positive)//          return +0// p7 == Y is a floating point number within the integer range.//      p9  == (int_Y = NORM_Y), Y is an integer, which may be odd or even.//           p11 odd//              p13 == (Y negative)//                 return (sign_of_x)inf//              p14 == (Y positive)//                 return (sign_of_x)0//           pxx even//              p13 == (Y negative)//                 return +inf//              p14 == (Y positive)//                 return +0//      pxx == Y is not an integer//           p13 == (Y negative)//                 return +inf//           p14 == (Y positive)//                 return +0//// If x=inf, test y and flag denormal{ .mfi          nop.m 999          fcmp.eq.s0 p10,p11 = f9,f0          nop.i 999};;{ .mfi          nop.m 999          fcmp.lt.s0 p13,p14            = POW_NORM_Y,f0          cmp.gt  p6,p7                 = pow_GR_exp_Y, pow_GR_10033}{ .mfi          nop.m 999          fclass.m p12,p0               = f9, 0x23 //@inf          nop.i 999};;{ .mfi          nop.m 999          fclass.m p15,p0               = f9, 0x07 //@zero          nop.i 999};;{ .mfb          nop.m 999(p15)     fmerge.s f8 = f1,f1      // Return +1.0 if x=inf, y=0(p15)     br.ret.spnt b0           // Exit if x=inf, y=0};;{ .mfi          nop.m 999(p14)     frcpa.s1 f8,p10 = f1,f0  // If x=inf, y>0, assume result +inf          nop.i 999}{ .mfb          nop.m 999(p13)     fma.s.s0 f8 = f0,f0,f0   // If x=inf, y<0, assume result +0.0(p12)     br.ret.spnt b0           // Exit if x=inf, y=inf};;// Here if x=inf, and 0 < |y| < inf.  Need to correct results if y odd integer.{ .mfi          nop.m 999(p7)      fcmp.eq.unc.s1 p9,p0 = POW_float_int_Y,  POW_NORM_Y // Is y integer?          nop.i 999};;{ .mfi          nop.m 999          nop.f 999(p9)      tbit.nz.unc p11,p0 = pow_GR_sig_int_Y,0  // Test for y odd integer};;{ .mfb          nop.m 999(p11)     fmerge.s f8 = POW_NORM_X,f8    // If y odd integer use sign of x          br.ret.sptk b0                 // Exit for x=inf, 0 < |y| < inf};;POW_X_NEG_Y_NONINT:// When X is negative and Y is a non-integer, IEEE// returns a qnan indefinite.// We call error support with this value{ .mfb         mov pow_GR_tag                 = 34         frcpa.s0 f8,p6                 = f0,f0         br.cond.sptk __libm_error_region};;POW_X_NAN:// Here if x=nan, y not nan{ .mfi         nop.m 999         fclass.m  p9,p13 = f9, 0x07 // Test y=zero         nop.i 999};;{ .mfb         nop.m 999(p13)    fma.s.s0 f8 = f8,f1,f0(p13)    br.ret.sptk  b0            // Exit if x nan, y anything but zero or nan};;POW_X_NAN_Y_0:// When X is a NAN and Y is zero, IEEE returns 1.// We call error support with this value.{ .mfi         nop.m 999         fcmp.eq.s0 p6,p0 = f8,f0       // Dummy op to set invalid on snan         nop.i 999}{ .mfb         mov pow_GR_tag                 = 35         fma.s.s0 f8 = f0,f0,f1         br.cond.sptk __libm_error_region};;POW_OVER_UNDER_X_NOT_INF:// p8 is TRUE for overflow// p9 is TRUE for underflow// if y is infinity, we should not over/underflow{ .mfi          nop.m 999          fcmp.eq.s1     p14, p13       = POW_xsq,f1  // Test |x|=1          cmp.eq p8,p9                  = pow_GR_sign_Y_Gpr, r0};;{ .mfi          nop.m 999(p14)     fclass.m.unc       p15, p0    = f9, 0x23 // If |x|=1, test y=inf          nop.i 999}{ .mfi          nop.m 999(p13)     fclass.m.unc       p11,p0     = f9, 0x23 // If |x| not 1, test y=inf          nop.i 999};;// p15 = TRUE if |x|=1, y=inf, return +1{ .mfb          nop.m 999(p15)     fma.s.s0          f8          = f1,f1,f0 // If |x|=1, y=inf, result +1(p15)     br.ret.spnt b0                // Exit if |x|=1, y=inf};;.pred.rel "mutex",p8,p9{  .mfb(p8)      setf.exp           f8 = pow_GR_17ones // If exp(+big), result inf(p9)      fmerge.s           f8 = f0,f0         // If exp(-big), result 0(p11)     br.ret.sptk b0                // Exit if |x| not 1, y=inf};;{ .mfb          nop.m 999          nop.f 999          br.cond.sptk POW_OVER_UNDER_ERROR // Branch if y not inf};;POW_Y_NAN:// Here if y=nan, x anything// If x = +1 then result is +1, else result is quiet Y{ .mfi       nop.m 999       fcmp.eq.s1         p10,p9        = POW_NORM_X, f1       nop.i 999};;{ .mfi       nop.m 999(p10)  fcmp.eq.s0 p6,p0 = f9,f1   // Set invalid, even if x=+1       nop.i 999};;{ .mfi       nop.m 999(p10)  fma.s.s0 f8 = f1,f1,f0       nop.i 999}{ .mfb       nop.m 999(p9)   fma.s.s0 f8 = f9,f8,f0       br.ret.sptk b0             // Exit y=nan};;POW_OVER_UNDER_ERROR:// Here if we have overflow or underflow.// Enter with p12 true if x negative and y odd int to force -0 or -inf{ .mfi         sub   pow_GR_17ones_m1         = pow_GR_17ones, r0, 1         nop.f 999         mov pow_GR_one                 = 0x1};;// overflow, force inf with O flag{ .mmb(p8)     mov pow_GR_tag                 = 30(p8)     setf.exp POW_tmp               = pow_GR_17ones_m1         nop.b 999};;// underflow, force zero with I, U flags{ .mmi(p9)    mov pow_GR_tag                  = 31(p9)    setf.exp POW_tmp                = pow_GR_one        nop.i 999};;{ .mfi        nop.m 999        fma.s.s0 f8                     = POW_tmp, POW_tmp, f0        nop.i 999};;// p12 x is negative and y is an odd integer, change sign of result{ .mfi        nop.m 999(p12)   fnma.s.s0 f8                    = POW_tmp, POW_tmp, f0        nop.i 999};;GLOBAL_LIBM_END(powf)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  

⌨️ 快捷键说明

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