diff options
-rw-r--r-- | compiler-rt/lib/adddf3.c | 2 | ||||
-rw-r--r-- | compiler-rt/lib/addsf3.c | 2 | ||||
-rw-r--r-- | compiler-rt/lib/fp_lib.h | 2 | ||||
-rw-r--r-- | compiler-rt/lib/muldf3.c | 2 | ||||
-rw-r--r-- | compiler-rt/lib/mulsf3.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/adddf3.c b/compiler-rt/lib/adddf3.c index 7eb40a15d2a..241726f2dba 100644 --- a/compiler-rt/lib/adddf3.c +++ b/compiler-rt/lib/adddf3.c @@ -85,7 +85,7 @@ __adddf3(fp_t a, fp_t b) { // Shift the significand of b by the difference in exponents, with a sticky // bottom bit to get rounding correct. - const int align = aExponent - bExponent; + const unsigned int align = aExponent - bExponent; if (align) { if (align < typeWidth) { const bool sticky = bSignificand << (typeWidth - align); diff --git a/compiler-rt/lib/addsf3.c b/compiler-rt/lib/addsf3.c index e57270a1e28..a5d24e19c37 100644 --- a/compiler-rt/lib/addsf3.c +++ b/compiler-rt/lib/addsf3.c @@ -84,7 +84,7 @@ fp_t __addsf3(fp_t a, fp_t b) { // Shift the significand of b by the difference in exponents, with a sticky // bottom bit to get rounding correct. - const int align = aExponent - bExponent; + const unsigned int align = aExponent - bExponent; if (align) { if (align < typeWidth) { const bool sticky = bSignificand << (typeWidth - align); diff --git a/compiler-rt/lib/fp_lib.h b/compiler-rt/lib/fp_lib.h index de5f17fde19..661119ae412 100644 --- a/compiler-rt/lib/fp_lib.h +++ b/compiler-rt/lib/fp_lib.h @@ -124,7 +124,7 @@ static inline void wideLeftShift(rep_t *hi, rep_t *lo, int count) { *lo = *lo << count; } -static inline void wideRightShiftWithSticky(rep_t *hi, rep_t *lo, int count) { +static inline void wideRightShiftWithSticky(rep_t *hi, rep_t *lo, unsigned int count) { if (count < typeWidth) { const bool sticky = *lo << (typeWidth - count); *lo = *hi << (typeWidth - count) | *lo >> count | sticky; diff --git a/compiler-rt/lib/muldf3.c b/compiler-rt/lib/muldf3.c index 86d72d883e2..eb2ff267f33 100644 --- a/compiler-rt/lib/muldf3.c +++ b/compiler-rt/lib/muldf3.c @@ -96,7 +96,7 @@ __muldf3(fp_t a, fp_t b) { // a zero of the appropriate sign. Mathematically there is no need to // handle this case separately, but we make it a special case to // simplify the shift logic. - const int shift = 1 - productExponent; + const unsigned int shift = 1U - (unsigned int)productExponent; if (shift >= typeWidth) return fromRep(productSign); // Otherwise, shift the significand of the result so that the round diff --git a/compiler-rt/lib/mulsf3.c b/compiler-rt/lib/mulsf3.c index fce2fd4fb2a..fc17f4efdc8 100644 --- a/compiler-rt/lib/mulsf3.c +++ b/compiler-rt/lib/mulsf3.c @@ -92,7 +92,7 @@ __mulsf3(fp_t a, fp_t b) { if (productExponent <= 0) { // Result is denormal before rounding, the exponent is zero and we // need to shift the significand. - wideRightShiftWithSticky(&productHi, &productLo, 1 - productExponent); + wideRightShiftWithSticky(&productHi, &productLo, 1U - (unsigned)productExponent); } else { |