Index: uspace/lib/softfloat/div.c
===================================================================
--- uspace/lib/softfloat/div.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ uspace/lib/softfloat/div.c	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
@@ -53,7 +53,7 @@
 	int32_t aexp, bexp, cexp;
 	uint64_t afrac, bfrac, cfrac;
-	
+
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
-	
+
 	if (is_float32_nan(a)) {
 		if (is_float32_signan(a)) {
@@ -63,5 +63,5 @@
 		return a;
 	}
-	
+
 	if (is_float32_nan(b)) {
 		if (is_float32_signan(b)) {
@@ -71,5 +71,5 @@
 		return b;
 	}
-	
+
 	if (is_float32_infinity(a)) {
 		if (is_float32_infinity(b)) {
@@ -83,5 +83,5 @@
 		return result;
 	}
-	
+
 	if (is_float32_infinity(b)) {
 		if (is_float32_zero(a)) {
@@ -96,5 +96,5 @@
 		return result;
 	}
-	
+
 	if (is_float32_zero(b)) {
 		if (is_float32_zero(a)) {
@@ -108,10 +108,10 @@
 		return result;
 	}
-	
+
 	afrac = a.parts.fraction;
 	aexp = a.parts.exp;
 	bfrac = b.parts.fraction;
 	bexp = b.parts.exp;
-	
+
 	/* denormalized numbers */
 	if (aexp == 0) {
@@ -121,5 +121,5 @@
 			return result;
 		}
-		
+
 		/* normalize it*/
 		afrac <<= 1;
@@ -130,5 +130,5 @@
 		}
 	}
-	
+
 	if (bexp == 0) {
 		bfrac <<= 1;
@@ -139,22 +139,22 @@
 		}
 	}
-	
+
 	afrac = (afrac | FLOAT32_HIDDEN_BIT_MASK) << (32 - FLOAT32_FRACTION_SIZE - 1);
 	bfrac = (bfrac | FLOAT32_HIDDEN_BIT_MASK) << (32 - FLOAT32_FRACTION_SIZE);
-	
+
 	if (bfrac <= (afrac << 1)) {
 		afrac >>= 1;
 		aexp++;
 	}
-	
+
 	cexp = aexp - bexp + FLOAT32_BIAS - 2;
-	
+
 	cfrac = (afrac << 32) / bfrac;
 	if ((cfrac & 0x3F) == 0) {
 		cfrac |= (bfrac * cfrac != afrac << 32);
 	}
-	
+
 	/* pack and round */
-	
+
 	/* find first nonzero digit and shift result and detect possibly underflow */
 	while ((cexp > 0) && (cfrac) && (!(cfrac & (FLOAT32_HIDDEN_BIT_MASK << 7)))) {
@@ -163,12 +163,12 @@
 		/* TODO: fix underflow */
 	}
-	
+
 	cfrac += (0x1 << 6); /* FIXME: 7 is not sure*/
-	
+
 	if (cfrac & (FLOAT32_HIDDEN_BIT_MASK << 7)) {
 		++cexp;
 		cfrac >>= 1;
 	}
-	
+
 	/* check overflow */
 	if (cexp >= FLOAT32_MAX_EXPONENT) {
@@ -178,5 +178,5 @@
 		return result;
 	}
-	
+
 	if (cexp < 0) {
 		/* FIXME: underflow */
@@ -194,7 +194,7 @@
 		result.parts.exp = (uint32_t) cexp;
 	}
-	
+
 	result.parts.fraction = ((cfrac >> 6) & (~FLOAT32_HIDDEN_BIT_MASK));
-	
+
 	return result;
 }
@@ -215,7 +215,7 @@
 	uint64_t remlo, remhi;
 	uint64_t tmplo, tmphi;
-	
+
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
-	
+
 	if (is_float64_nan(a)) {
 		if (is_float64_signan(b)) {
@@ -223,5 +223,5 @@
 			return b;
 		}
-		
+
 		if (is_float64_signan(a)) {
 			// FIXME: SigNaN
@@ -230,5 +230,5 @@
 		return a;
 	}
-	
+
 	if (is_float64_nan(b)) {
 		if (is_float64_signan(b)) {
@@ -238,5 +238,5 @@
 		return b;
 	}
-	
+
 	if (is_float64_infinity(a)) {
 		if (is_float64_infinity(b) || is_float64_zero(b)) {
@@ -250,5 +250,5 @@
 		return result;
 	}
-	
+
 	if (is_float64_infinity(b)) {
 		if (is_float64_zero(a)) {
@@ -263,5 +263,5 @@
 		return result;
 	}
-	
+
 	if (is_float64_zero(b)) {
 		if (is_float64_zero(a)) {
@@ -275,10 +275,10 @@
 		return result;
 	}
-	
+
 	afrac = a.parts.fraction;
 	aexp = a.parts.exp;
 	bfrac = b.parts.fraction;
 	bexp = b.parts.exp;
-	
+
 	/* denormalized numbers */
 	if (aexp == 0) {
@@ -288,5 +288,5 @@
 			return result;
 		}
-		
+
 		/* normalize it*/
 		aexp++;
@@ -297,5 +297,5 @@
 		}
 	}
-	
+
 	if (bexp == 0) {
 		bexp++;
@@ -306,21 +306,21 @@
 		}
 	}
-	
+
 	afrac = (afrac | FLOAT64_HIDDEN_BIT_MASK) << (64 - FLOAT64_FRACTION_SIZE - 2);
 	bfrac = (bfrac | FLOAT64_HIDDEN_BIT_MASK) << (64 - FLOAT64_FRACTION_SIZE - 1);
-	
+
 	if (bfrac <= (afrac << 1)) {
 		afrac >>= 1;
 		aexp++;
 	}
-	
+
 	cexp = aexp - bexp + FLOAT64_BIAS - 2;
-	
+
 	cfrac = div128est(afrac, 0x0ll, bfrac);
-	
+
 	if ((cfrac & 0x1FF) <= 2) {
 		mul64(bfrac, cfrac, &tmphi, &tmplo);
 		sub128(afrac, 0x0ll, tmphi, tmplo, &remhi, &remlo);
-		
+
 		while ((int64_t) remhi < 0) {
 			cfrac--;
@@ -329,5 +329,5 @@
 		cfrac |= (remlo != 0);
 	}
-	
+
 	/* round and shift */
 	result = finish_float64(cexp, cfrac, result.parts.sign);
@@ -351,7 +351,7 @@
 	uint64_t rem_hihi, rem_hilo, rem_lohi, rem_lolo;
 	uint64_t tmp_hihi, tmp_hilo, tmp_lohi, tmp_lolo;
-	
+
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
-	
+
 	if (is_float128_nan(a)) {
 		if (is_float128_signan(b)) {
@@ -359,5 +359,5 @@
 			return b;
 		}
-		
+
 		if (is_float128_signan(a)) {
 			// FIXME: SigNaN
@@ -366,5 +366,5 @@
 		return a;
 	}
-	
+
 	if (is_float128_nan(b)) {
 		if (is_float128_signan(b)) {
@@ -374,5 +374,5 @@
 		return b;
 	}
-	
+
 	if (is_float128_infinity(a)) {
 		if (is_float128_infinity(b) || is_float128_zero(b)) {
@@ -388,5 +388,5 @@
 		return result;
 	}
-	
+
 	if (is_float128_infinity(b)) {
 		if (is_float128_zero(a)) {
@@ -403,5 +403,5 @@
 		return result;
 	}
-	
+
 	if (is_float128_zero(b)) {
 		if (is_float128_zero(a)) {
@@ -417,5 +417,5 @@
 		return result;
 	}
-	
+
 	afrac_hi = a.parts.frac_hi;
 	afrac_lo = a.parts.frac_lo;
@@ -424,5 +424,5 @@
 	bfrac_lo = b.parts.frac_lo;
 	bexp = b.parts.exp;
-	
+
 	/* denormalized numbers */
 	if (aexp == 0) {
@@ -433,5 +433,5 @@
 			return result;
 		}
-		
+
 		/* normalize it*/
 		aexp++;
@@ -445,5 +445,5 @@
 		}
 	}
-	
+
 	if (bexp == 0) {
 		bexp++;
@@ -457,5 +457,5 @@
 		}
 	}
-	
+
 	or128(afrac_hi, afrac_lo,
 	    FLOAT128_HIDDEN_BIT_MASK_HI, FLOAT128_HIDDEN_BIT_MASK_LO,
@@ -468,17 +468,17 @@
 	lshift128(bfrac_hi, bfrac_lo,
 	    (128 - FLOAT128_FRACTION_SIZE - 1), &bfrac_hi, &bfrac_lo);
-	
+
 	if (le128(bfrac_hi, bfrac_lo, afrac_hi, afrac_lo)) {
 		rshift128(afrac_hi, afrac_lo, 1, &afrac_hi, &afrac_lo);
 		aexp++;
 	}
-	
+
 	cexp = aexp - bexp + FLOAT128_BIAS - 2;
-	
+
 	cfrac_hi = div128est(afrac_hi, afrac_lo, bfrac_hi);
-	
+
 	mul128(bfrac_hi, bfrac_lo, 0x0ll, cfrac_hi,
 	    &tmp_lolo /* dummy */, &tmp_hihi, &tmp_hilo, &tmp_lohi);
-	
+
 	/* sub192(afrac_hi, afrac_lo, 0,
 	 *     tmp_hihi, tmp_hilo, tmp_lohi
@@ -489,5 +489,5 @@
 	}
 	rem_lohi = -tmp_lohi;
-	
+
 	while ((int64_t) rem_hihi < 0) {
 		--cfrac_hi;
@@ -500,11 +500,11 @@
 		}
 	}
-	
+
 	cfrac_lo = div128est(rem_hilo, rem_lohi, bfrac_lo);
-	
+
 	if ((cfrac_lo & 0x3FFF) <= 4) {
 		mul128(bfrac_hi, bfrac_lo, 0x0ll, cfrac_lo,
 		    &tmp_hihi /* dummy */, &tmp_hilo, &tmp_lohi, &tmp_lolo);
-		
+
 		/* sub192(rem_hilo, rem_lohi, 0,
 		 *     tmp_hilo, tmp_lohi, tmp_lolo,
@@ -515,5 +515,5 @@
 		}
 		rem_lolo = -tmp_lolo;
-		
+
 		while ((int64_t) rem_hilo < 0) {
 			--cfrac_lo;
@@ -526,12 +526,12 @@
 			}
 		}
-		
+
 		cfrac_lo |= ((rem_hilo | rem_lohi | rem_lolo) != 0 );
 	}
-	
+
 	shift_out = cfrac_lo << (64 - (128 - FLOAT128_FRACTION_SIZE - 1));
 	rshift128(cfrac_hi, cfrac_lo, (128 - FLOAT128_FRACTION_SIZE - 1),
 	    &cfrac_hi, &cfrac_lo);
-	
+
 	result = finish_float128(cexp, cfrac_hi, cfrac_lo, result.parts.sign, shift_out);
 	return result;
@@ -544,11 +544,11 @@
 	float32_u ua;
 	ua.val = a;
-	
+
 	float32_u ub;
 	ub.val = b;
-	
+
 	float32_u res;
 	res.data = div_float32(ua.data, ub.data);
-	
+
 	return res.val;
 }
@@ -558,11 +558,11 @@
 	float32_u ua;
 	ua.val = a;
-	
+
 	float32_u ub;
 	ub.val = b;
-	
+
 	float32_u res;
 	res.data = div_float32(ua.data, ub.data);
-	
+
 	return res.val;
 }
@@ -576,11 +576,11 @@
 	float64_u ua;
 	ua.val = a;
-	
+
 	float64_u ub;
 	ub.val = b;
-	
+
 	float64_u res;
 	res.data = div_float64(ua.data, ub.data);
-	
+
 	return res.val;
 }
@@ -590,11 +590,11 @@
 	float64_u ua;
 	ua.val = a;
-	
+
 	float64_u ub;
 	ub.val = b;
-	
+
 	float64_u res;
 	res.data = div_float64(ua.data, ub.data);
-	
+
 	return res.val;
 }
@@ -608,11 +608,11 @@
 	float128_u ua;
 	ua.val = a;
-	
+
 	float128_u ub;
 	ub.val = b;
-	
+
 	float128_u res;
 	res.data = div_float128(ua.data, ub.data);
-	
+
 	return res.val;
 }
