浏览代码

MIPS: math-emu: Rename get_rounding() functions.

There are two version of get_rounding(), one for single precision, one
for double precision.  Add a ieee754sp_ rsp. ieee754dp_ prefix for
clarity.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 11 年之前
父节点
当前提交
de2fc342b8
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. 5 5
      arch/mips/math-emu/ieee754dp.c
  2. 5 5
      arch/mips/math-emu/ieee754sp.c

+ 5 - 5
arch/mips/math-emu/ieee754dp.c

@@ -65,7 +65,7 @@ union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r)
 	return r;
 	return r;
 }
 }
 
 
-static u64 get_rounding(int sn, u64 xm)
+static u64 ieee754dp_get_rounding(int sn, u64 xm)
 {
 {
 	/* inexact must round of 3 bits
 	/* inexact must round of 3 bits
 	 */
 	 */
@@ -128,12 +128,12 @@ union ieee754dp ieee754dp_format(int sn, int xe, u64 xm)
 			}
 			}
 		}
 		}
 
 
-		if (xe == DP_EMIN - 1
-				&& get_rounding(sn, xm) >> (DP_FBITS + 1 + 3))
+		if (xe == DP_EMIN - 1 &&
+		    ieee754dp_get_rounding(sn, xm) >> (DP_FBITS + 1 + 3))
 		{
 		{
 			/* Not tiny after rounding */
 			/* Not tiny after rounding */
 			ieee754_setcx(IEEE754_INEXACT);
 			ieee754_setcx(IEEE754_INEXACT);
-			xm = get_rounding(sn, xm);
+			xm = ieee754dp_get_rounding(sn, xm);
 			xm >>= 1;
 			xm >>= 1;
 			/* Clear grs bits */
 			/* Clear grs bits */
 			xm &= ~(DP_MBIT(3) - 1);
 			xm &= ~(DP_MBIT(3) - 1);
@@ -156,7 +156,7 @@ union ieee754dp ieee754dp_format(int sn, int xe, u64 xm)
 
 
 		/* inexact must round of 3 bits
 		/* inexact must round of 3 bits
 		 */
 		 */
-		xm = get_rounding(sn, xm);
+		xm = ieee754dp_get_rounding(sn, xm);
 		/* adjust exponent for rounding add overflowing
 		/* adjust exponent for rounding add overflowing
 		 */
 		 */
 		if (xm >> (DP_FBITS + 3 + 1)) {
 		if (xm >> (DP_FBITS + 3 + 1)) {

+ 5 - 5
arch/mips/math-emu/ieee754sp.c

@@ -65,7 +65,7 @@ union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r)
 	return r;
 	return r;
 }
 }
 
 
-static unsigned get_rounding(int sn, unsigned xm)
+static unsigned ieee754sp_get_rounding(int sn, unsigned xm)
 {
 {
 	/* inexact must round of 3 bits
 	/* inexact must round of 3 bits
 	 */
 	 */
@@ -128,12 +128,12 @@ union ieee754sp ieee754sp_format(int sn, int xe, unsigned xm)
 			}
 			}
 		}
 		}
 
 
-		if (xe == SP_EMIN - 1
-				&& get_rounding(sn, xm) >> (SP_FBITS + 1 + 3))
+		if (xe == SP_EMIN - 1 &&
+		    ieee754sp_get_rounding(sn, xm) >> (SP_FBITS + 1 + 3))
 		{
 		{
 			/* Not tiny after rounding */
 			/* Not tiny after rounding */
 			ieee754_setcx(IEEE754_INEXACT);
 			ieee754_setcx(IEEE754_INEXACT);
-			xm = get_rounding(sn, xm);
+			xm = ieee754sp_get_rounding(sn, xm);
 			xm >>= 1;
 			xm >>= 1;
 			/* Clear grs bits */
 			/* Clear grs bits */
 			xm &= ~(SP_MBIT(3) - 1);
 			xm &= ~(SP_MBIT(3) - 1);
@@ -154,7 +154,7 @@ union ieee754sp ieee754sp_format(int sn, int xe, unsigned xm)
 
 
 		/* inexact must round of 3 bits
 		/* inexact must round of 3 bits
 		 */
 		 */
-		xm = get_rounding(sn, xm);
+		xm = ieee754sp_get_rounding(sn, xm);
 		/* adjust exponent for rounding add overflowing
 		/* adjust exponent for rounding add overflowing
 		 */
 		 */
 		if (xm >> (SP_FBITS + 1 + 3)) {
 		if (xm >> (SP_FBITS + 1 + 3)) {