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>
-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
*/
- 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 */
ieee754_setcx(IEEE754_INEXACT);
{
/* Not tiny after rounding */
ieee754_setcx(IEEE754_INEXACT);
- xm = get_rounding(sn, xm);
+ xm = ieee754dp_get_rounding(sn, xm);
xm >>= 1;
/* Clear grs bits */
xm &= ~(DP_MBIT(3) - 1);
xm >>= 1;
/* Clear grs bits */
xm &= ~(DP_MBIT(3) - 1);
/* 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
*/
if (xm >> (DP_FBITS + 3 + 1)) {
/* adjust exponent for rounding add overflowing
*/
if (xm >> (DP_FBITS + 3 + 1)) {
-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
*/
- 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 */
ieee754_setcx(IEEE754_INEXACT);
{
/* Not tiny after rounding */
ieee754_setcx(IEEE754_INEXACT);
- xm = get_rounding(sn, xm);
+ xm = ieee754sp_get_rounding(sn, xm);
xm >>= 1;
/* Clear grs bits */
xm &= ~(SP_MBIT(3) - 1);
xm >>= 1;
/* Clear grs bits */
xm &= ~(SP_MBIT(3) - 1);
/* 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
*/
if (xm >> (SP_FBITS + 1 + 3)) {
/* adjust exponent for rounding add overflowing
*/
if (xm >> (SP_FBITS + 1 + 3)) {