This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][ppc] Remove redundant return lines from mpa.c
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 14 Feb 2013 15:20:20 +0530
- Subject: [PATCH][ppc] Remove redundant return lines from mpa.c
Hi,
There are a few 'return' lines in functions in the power-specific
mpa.c that are redundant. Built and verified that generated code is
identical. OK to commit?
Siddhesh
* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__cpy): remove
redundant return line.
(norm): Likewise.
(denorm): Likewise.
(dbl_mp): Likewise.
(sub_magnitudes): Likewise.
(__add): Likewise.
(__sub): Likewise.
(__mul): Likewise.
(__inv): Likewise.
(__dvd): Likewise.
* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__cpy): remove
redundant return line.
(norm): Likewise.
(denorm): Likewise.
(dbl_mp): Likewise.
(sub_magnitudes): Likewise.
(__add): Likewise.
(__sub): Likewise.
(__mul): Likewise.
(__inv): Likewise.
(__dvd): Likewise.
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
index f948293..517a9cd 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
@@ -105,8 +105,6 @@ __cpy (const mp_no *x, mp_no *y, int p)
EY = EX;
for (i = 0; i <= p; i++)
Y[i] = X[i];
-
- return;
}
/* Convert a multiple precision number *X into a double precision
@@ -181,7 +179,6 @@ norm (const mp_no *x, double *y, int p)
c *= RADIXI;
*y = c;
- return;
#undef R
}
@@ -293,8 +290,6 @@ denorm (const mp_no *x, double *y, int p)
c = X[0] * ((z[1] + R * (z[2] + R * z[3])) - TWO10);
*y = c * TWOM1032;
- return;
-
#undef R
}
@@ -359,7 +354,6 @@ __dbl_mp (double x, mp_no *y, int p)
}
for (; i <= p2; i++)
Y[i] = ZERO;
- return;
}
/* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The
@@ -501,8 +495,6 @@ sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p)
Z[k++] = Z[i++];
for (; k <= p2;)
Z[k++] = ZERO;
-
- return;
}
/* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X
@@ -552,7 +544,6 @@ __add (const mp_no *x, const mp_no *y, mp_no *z, int p)
else
Z[0] = ZERO;
}
- return;
}
/* Subtract *Y from *X and return the result in *Z. X and Y may overlap but
@@ -603,7 +594,6 @@ __sub (const mp_no *x, const mp_no *y, mp_no *z, int p)
else
Z[0] = ZERO;
}
- return;
}
/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X
@@ -692,7 +682,6 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
EZ = EX + EY;
Z[0] = X[0] * Y[0];
- return;
}
/* Square *X and store result in *Y. X and Y may not overlap. For P in
@@ -826,7 +815,6 @@ __inv (const mp_no *x, mp_no *y, int p)
__sub (&mptwo, y, &z, p);
__mul (&w, &z, y, p);
}
- return;
}
/* Divide *X by *Y and store result in *Z. X and Y may overlap but not X and Z
@@ -848,5 +836,4 @@ __dvd (const mp_no *x, const mp_no *y, mp_no *z, int p)
__inv (y, &w, p);
__mul (x, &w, z, p);
}
- return;
}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
index f948293..517a9cd 100644
--- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
@@ -105,8 +105,6 @@ __cpy (const mp_no *x, mp_no *y, int p)
EY = EX;
for (i = 0; i <= p; i++)
Y[i] = X[i];
-
- return;
}
/* Convert a multiple precision number *X into a double precision
@@ -181,7 +179,6 @@ norm (const mp_no *x, double *y, int p)
c *= RADIXI;
*y = c;
- return;
#undef R
}
@@ -293,8 +290,6 @@ denorm (const mp_no *x, double *y, int p)
c = X[0] * ((z[1] + R * (z[2] + R * z[3])) - TWO10);
*y = c * TWOM1032;
- return;
-
#undef R
}
@@ -359,7 +354,6 @@ __dbl_mp (double x, mp_no *y, int p)
}
for (; i <= p2; i++)
Y[i] = ZERO;
- return;
}
/* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The
@@ -501,8 +495,6 @@ sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p)
Z[k++] = Z[i++];
for (; k <= p2;)
Z[k++] = ZERO;
-
- return;
}
/* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X
@@ -552,7 +544,6 @@ __add (const mp_no *x, const mp_no *y, mp_no *z, int p)
else
Z[0] = ZERO;
}
- return;
}
/* Subtract *Y from *X and return the result in *Z. X and Y may overlap but
@@ -603,7 +594,6 @@ __sub (const mp_no *x, const mp_no *y, mp_no *z, int p)
else
Z[0] = ZERO;
}
- return;
}
/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X
@@ -692,7 +682,6 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
EZ = EX + EY;
Z[0] = X[0] * Y[0];
- return;
}
/* Square *X and store result in *Y. X and Y may not overlap. For P in
@@ -826,7 +815,6 @@ __inv (const mp_no *x, mp_no *y, int p)
__sub (&mptwo, y, &z, p);
__mul (&w, &z, y, p);
}
- return;
}
/* Divide *X by *Y and store result in *Z. X and Y may overlap but not X and Z
@@ -848,5 +836,4 @@ __dvd (const mp_no *x, const mp_no *y, mp_no *z, int p)
__inv (y, &w, p);
__mul (x, &w, z, p);
}
- return;
}