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

📄 s_cosl.s

📁 Glibc 2.3.2源代码(解压后有100多M)
💻 S
📖 第 1 页 / 共 4 页
字号:
// //     Point to  2*-14 //     N_0 = Arg * Inv_P_0//{ .mmi(p0)   add GR_Table_Base = 688, GR_Table_Base ;;(p0)   ldfs FR_Two_to_M14 = [GR_Table_Base], 4	nop.i 999 ;;}{ .mfi(p0)   ldfs FR_Neg_Two_to_M14 = [GR_Table_Base], 0	nop.f 999	nop.i 999 ;;}{ .mfi	nop.m 999////     Load values 2**(-14) and -2**(-14)//(p0)   fcvt.fx.s1 FR_N_0_fix = FR_N_0	nop.i 999 ;;}{ .mfi	nop.m 999////     N_0_fix  = integer part of N_0//(p0)   fcvt.xf FR_N_0 = FR_N_0_fix 	nop.i 999 ;;}{ .mfi	nop.m 999////     Make N_0 the integer part//(p0)   fnma.s1 FR_ArgPrime = FR_N_0, FR_P_0, FR_Input_X	nop.i 999}{ .mfi	nop.m 999(p0)   fma.s1 FR_w = FR_N_0, FR_d_1, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     Arg' = -N_0 * P_0 + Arg//     w  = N_0 * d_1//(p0)   fma.s1 FR_N_float = FR_ArgPrime, FR_Inv_pi_by_2, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     N = A' * 2/pi	//(p0)   fcvt.fx.s1 FR_N_fix = FR_N_float	nop.i 999 ;;}{ .mfi	nop.m 999////     N_fix is the integer part	//(p0)   fcvt.xf FR_N_float = FR_N_fix 	nop.i 999 ;;}{ .mfi(p0)   getf.sig GR_N_Inc = FR_N_fix	nop.f 999	nop.i 999 ;;}{ .mii	nop.m 999	nop.i 999 ;;(p0)   add GR_N_Inc = GR_N_Inc, GR_Sin_or_Cos ;;}{ .mfi	nop.m 999////     N is the integer part of the reduced-reduced argument.//     Put the integer in a GP register//(p0)   fnma.s1 FR_s = FR_N_float, FR_P_1, FR_ArgPrime	nop.i 999}{ .mfi	nop.m 999(p0)   fnma.s1 FR_w = FR_N_float, FR_P_2, FR_w	nop.i 999 ;;}{ .mfi	nop.m 999////     s = -N*P_1 + Arg'//     w = -N*P_2 + w//     N_fix_gr = N_fix_gr + N_inc//(p0)   fcmp.lt.unc.s1 p9, p8 = FR_s, FR_Two_to_M14	nop.i 999 ;;}{ .mfi	nop.m 999(p9)   fcmp.gt.s1 p9, p8 = FR_s, FR_Neg_Two_to_M14	nop.i 999 ;;}{ .mfi	nop.m 999////     For |s|  > 2**(-14) r = S + w (r complete)//     Else       U_hi = N_0 * d_1//(p9)   fma.s1 FR_V_hi = FR_N_float, FR_P_2, f0	nop.i 999}{ .mfi	nop.m 999(p9)   fma.s1 FR_U_hi = FR_N_0, FR_d_1, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     Either S <= -2**(-14) or S >= 2**(-14)//     or -2**(-14) < s < 2**(-14)//(p8)   fma.s1 FR_r = FR_s, f1, FR_w	nop.i 999}{ .mfi	nop.m 999(p9)   fma.s1 FR_w = FR_N_float, FR_P_3, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     We need abs of both U_hi and V_hi - don't//     worry about switched sign of V_hi.//(p9)   fms.s1 FR_A = FR_U_hi, f1, FR_V_hi	nop.i 999}{ .mfi	nop.m 999////     Big s: finish up c = (S - r) + w (c complete)	//     Case 4: A =  U_hi + V_hi//     Note: Worry about switched sign of V_hi, so subtract instead of add.//(p9)   fnma.s1 FR_V_lo = FR_N_float, FR_P_2, FR_V_hi	nop.i 999 ;;}{ .mmf	nop.m 999	nop.m 999(p9)   fms.s1 FR_U_lo = FR_N_0, FR_d_1, FR_U_hi}{ .mfi	nop.m 999(p9)   fmerge.s FR_V_hiabs = f0, FR_V_hi	nop.i 999 ;;}{ .mfi	nop.m 999//     For big s: c = S - r//     For small s do more work: U_lo = N_0 * d_1 - U_hi//(p9)   fmerge.s FR_U_hiabs = f0, FR_U_hi	nop.i 999}{ .mfi	nop.m 999////     For big s: Is |r| < 2**(-3)	//     For big s: if p12 set, prepare to branch to Small_R.//     For big s: If p13 set, prepare to branch to Normal_R.//(p8)   fms.s1 FR_c = FR_s, f1, FR_r 	nop.i 999 ;;}{ .mfi	nop.m 999////     For small S: V_hi = N * P_2//                  w = N * P_3//     Note the product does not include the (-) as in the writeup//     so (-) missing for V_hi and w.//(p8)   fcmp.lt.unc.s1 p12, p13 = FR_r, FR_Two_to_M3	nop.i 999 ;;}{ .mfi	nop.m 999(p12)  fcmp.gt.s1 p12, p13 = FR_r, FR_Neg_Two_to_M3	nop.i 999 ;;}{ .mfi	nop.m 999(p8)   fma.s1 FR_c = FR_c, f1, FR_w	nop.i 999}{ .mfb	nop.m 999(p9)   fms.s1 FR_w = FR_N_0, FR_d_2, FR_w(p12)  br.cond.spnt L(SINCOSL_SMALL_R) ;;}{ .mib	nop.m 999	nop.i 999(p13)  br.cond.sptk L(SINCOSL_NORMAL_R) ;;}{ .mfi	nop.m 999// //     Big s: Vector off when |r| < 2**(-3).  Recall that p8 will be true. //     The remaining stuff is for Case 4.//     Small s: V_lo = N * P_2 + U_hi (U_hi is in place of V_hi in writeup)//     Note: the (-) is still missing for V_lo.//     Small s: w = w + N_0 * d_2//     Note: the (-) is now incorporated in w.//(p9)   fcmp.ge.unc.s1 p10, p11 = FR_U_hiabs, FR_V_hiabs(p0)   extr.u	GR_i_1 = GR_N_Inc, 0, 1}{ .mfi	nop.m 999////     C_hi = S + A//(p9)   fma.s1 FR_t = FR_U_lo, f1, FR_V_lo(p0)   extr.u	GR_i_0 = GR_N_Inc, 1, 1 ;;}{ .mfi	nop.m 999////     t = U_lo + V_lo ////(p10)  fms.s1 FR_a = FR_U_hi, f1, FR_A	nop.i 999 ;;}{ .mfi	nop.m 999(p11)  fma.s1 FR_a = FR_V_hi, f1, FR_A	nop.i 999};;{ .mmi      nop.m 999(p0)  addl           GR_Table_Base   = @ltoff(FSINCOSL_CONSTANTS#), gp      nop.i 999};;{ .mmi      ld8 GR_Table_Base = [GR_Table_Base]      nop.m 999      nop.i 999};;{ .mfi(p0)   add GR_Table_Base = 528, GR_Table_Base////     Is U_hiabs >= V_hiabs?//(p9)   fma.s1 FR_C_hi = FR_s, f1, FR_A	nop.i 999 ;;}{ .mmi(p0)   ldfe FR_C_1 = [GR_Table_Base], 16 ;;(p0)   ldfe FR_C_2 = [GR_Table_Base], 64	nop.i 999 ;;}////     c = c + C_lo  finished.//     Load  C_2//{ .mfi(p0)   ldfe	FR_S_1 = [GR_Table_Base], 16////     C_lo = S - C_hi //(p0)   fma.s1 FR_t = FR_t, f1, FR_w	nop.i 999 ;;}////     r and c have been computed.//     Make sure ftz mode is set - should be automatic when using wre//     |r| < 2**(-3)//     Get [i_0,i_1] - two lsb of N_fix.//     Load S_1//{ .mfi(p0)   ldfe FR_S_2 = [GR_Table_Base], 64////     t = t + w	//(p10)  fms.s1 FR_a = FR_a, f1, FR_V_hi(p0)   cmp.eq.unc p9, p10 = 0x0, GR_i_0 ;;}{ .mfi	nop.m 999////     For larger u than v: a = U_hi - A//     Else a = V_hi - A (do an add to account for missing (-) on V_hi//(p0)   fms.s1 FR_C_lo = FR_s, f1, FR_C_hi	nop.i 999 ;;}{ .mfi	nop.m 999(p11)  fms.s1 FR_a = FR_U_hi, f1, FR_a(p0)   cmp.eq.unc p11, p12 = 0x0, GR_i_1 ;;}{ .mfi	nop.m 999////     If u > v: a = (U_hi - A)  + V_hi//     Else      a = (V_hi - A)  + U_hi//     In each case account for negative missing from V_hi.//(p0)   fma.s1 FR_C_lo = FR_C_lo, f1, FR_A	nop.i 999 ;;}{ .mfi	nop.m 999////     C_lo = (S - C_hi) + A	//(p0)   fma.s1 FR_t = FR_t, f1, FR_a	nop.i 999 ;;}{ .mfi	nop.m 999////     t = t + a //(p0)   fma.s1 FR_C_lo = FR_C_lo, f1, FR_t	nop.i 999 ;;}{ .mfi	nop.m 999////     C_lo = C_lo + t//     Adjust Table_Base to beginning of table//(p0)   fma.s1 FR_r = FR_C_hi, f1, FR_C_lo	nop.i 999 ;;}{ .mfi	nop.m 999////     Load S_2//(p0)   fma.s1 FR_rsq = FR_r, FR_r, f0	nop.i 999}{ .mfi	nop.m 999////     Table_Base points to C_1//     r = C_hi + C_lo//(p0)   fms.s1 FR_c = FR_C_hi, f1, FR_r	nop.i 999 ;;}{ .mfi	nop.m 999////     if i_1 ==0: poly = S_2 * FR_rsq + S_1//     else        poly = C_2 * FR_rsq + C_1//(p11)  fma.s1 FR_Input_X = f0, f1, FR_r	nop.i 999 ;;}{ .mfi	nop.m 999(p12)  fma.s1 FR_Input_X = f0, f1, f1	nop.i 999 ;;}{ .mfi	nop.m 999////     Compute r_cube = FR_rsq * r	//(p11)  fma.s1 FR_poly = FR_rsq, FR_S_2, FR_S_1	nop.i 999 ;;}{ .mfi	nop.m 999(p12)  fma.s1 FR_poly = FR_rsq, FR_C_2, FR_C_1	nop.i 999}{ .mfi	nop.m 999////     Compute FR_rsq = r * r//     Is i_1 == 0 ?//(p0)   fma.s1 FR_r_cubed = FR_rsq, FR_r, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     c = C_hi - r//     Load  C_1//(p0)   fma.s1 FR_c = FR_c, f1, FR_C_lo	nop.i 999}{ .mfi	nop.m 999////     if i_1 ==0: poly = r_cube * poly + c//     else        poly = FR_rsq * poly//(p10)  fms.s1 FR_Input_X = f0, f1, FR_Input_X	nop.i 999 ;;}{ .mfi	nop.m 999////     if i_1 ==0: Result = r//     else        Result = 1.0//(p11)  fma.s1 FR_poly = FR_r_cubed, FR_poly, FR_c	nop.i 999 ;;}{ .mfi	nop.m 999(p12)  fma.s1 FR_poly = FR_rsq, FR_poly, f0	nop.i 999 ;;}{ .mfi	nop.m 999////     if i_0 !=0: Result = -Result //(p9)   fma.s0 FR_Input_X = FR_Input_X, f1, FR_poly	nop.i 999 ;;}{ .mfb	nop.m 999(p10)  fms.s0 FR_Input_X = FR_Input_X, f1, FR_poly////     if i_0 == 0: Result = Result + poly//     else         Result = Result - poly//(p0)    br.ret.sptk   b0 ;;}L(SINCOSL_SMALL_R): { .mii	nop.m 999(p0)  	extr.u	GR_i_1 = GR_N_Inc, 0, 1 ;;//////      Compare both i_1 and i_0 with 0.//      if i_1 == 0, set p9.//      if i_0 == 0, set p11.//(p0)  	cmp.eq.unc p9, p10 = 0x0, GR_i_1 ;;}{ .mfi	nop.m 999(p0)  	fma.s1 FR_rsq = FR_r, FR_r, f0(p0)  	extr.u	GR_i_0 = GR_N_Inc, 1, 1 ;;}{ .mfi	nop.m 999//// 	Z = Z * FR_rsq //(p10)	fnma.s1	FR_c = FR_c, FR_r, f0(p0)  	cmp.eq.unc p11, p12 = 0x0, GR_i_0};;// ******************************************************************// ******************************************************************// ******************************************************************//      r and c have been computed.//      We know whether this is the sine or cosine routine.//      Make sure ftz mode is set - should be automatic when using wre//      |r| < 2**(-3)////      Set table_ptr1 to beginning of constant table.//      Get [i_0,i_1] - two lsb of N_fix_gr.//{ .mmi      nop.m 999(p0)  addl           GR_Table_Base   = @ltoff(FSINCOSL_CONSTANTS#), gp      nop.i 999};;{ .mmi      ld8 GR_Table_Base = [GR_Table_Base]      nop.m 999      nop.i 999};;// //      Set table_ptr1 to point to S_5.//      Set table_ptr1 to point to C_5.//      Compute FR_rsq = r * r//{ .mfi(p9)  	add GR_Table_Base = 672, GR_Table_Base(p10)	fmerge.s FR_r = f1, f1(p10) 	add GR_Table_Base = 592, GR_Table_Base ;;}// //      Set table_ptr1 to point to S_5.//      Set table_ptr1 to point to C_5.//{ .mmi(p9)  	ldfe FR_S_5 = [GR_Table_Base], -16 ;;////      if (i_1 == 0) load S_5//      if (i_1 != 0) load C_5//(p9)  	ldfe FR_S_4 = [GR_Table_Base], -16	nop.i 999 ;;}{ .mmf(p10) 	ldfe FR_C_5 = [GR_Table_Base], -16// //      Z = FR_rsq * FR_rsq//(p9)  	ldfe FR_S_3 = [GR_Table_Base], -16////      Compute FR_rsq = r * r//      if (i_1 == 0) load S_4//      if (i_1 != 0) load C_4//(p0)   	fma.s1 FR_Z = FR_rsq, FR_rsq, f0 ;;}////      if (i_1 == 0) load S_3//      if (i_1 != 0) load C_3//{ .mmi(p9)  	ldfe FR_S_2 = [GR_Table_Base], -16 ;;////      if (i_1 == 0) load S_2//      if (i_1 != 0) load C_2//(p9)  	ldfe FR_S_1 = [GR_Table_Base], -16	nop.i 999}{ .mmi(p10) 	ldfe FR_C_4 = [GR_Table_Base], -16 ;;(p10)  	ldfe FR_C_3 = [GR_Table_Base], -16	nop.i 999 ;;}{ .mmi(p10) 	ldfe FR_C_2 = [GR_Table_Base], -16 ;;(p10) 	ldfe FR_C_1 = [GR_Table_Base], -16	nop.i 999}{ .mfi	nop.m 999////      if (i_1 != 0)://      poly_lo = FR_rsq * C_5 + C_4//      poly_hi = FR_rsq * C_2 + C_1//(p9)  	fma.s1 FR_Z = FR_Z, FR_r, f0	nop.i 999 ;;}{ .mfi	nop.m 999////      if (i_1 == 0) load S_1//      if (i_1 != 0) load C_1//(p9)  	fma.s1 FR_poly_lo = FR_rsq, FR_S_5, FR_S_4	nop.i 999}{ .mfi	nop.m 999////      c = -c * r//      dummy fmpy's to flag inexact.//(p9)	fma.s0 FR_S_4 = FR_S_4, FR_S_4, f0	nop.i 999 ;;}{ .mfi	nop.m 999////      poly_lo = FR_rsq * poly_lo + C_3//      poly_hi = FR_rsq * poly_hi//(p0)    fma.s1	FR_Z = FR_Z, FR_rsq, f0	nop.i 999 ;;}{ .mfi	nop.m 999(p9)  	fma.s1 FR_poly_hi = FR_rsq, FR_S_2, FR_S_1	nop.i 999}{ .mfi	nop.m 999////      if (i_1 == 0)://      poly_lo = FR_rsq * S_5 + S_4//      poly_hi = FR_rsq * S_2 + S_1//(p10) 	fma.s1 FR_poly_lo = FR_rsq, FR_C_5, FR_C_4	nop.i 999 ;;}{ .mfi	nop.m 999////      if (i_1 == 0)://      Z = Z * r  for only one of the small r cases - not there//      in original implementation notes.// 

⌨️ 快捷键说明

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