diff --git a/compiler-rt/lib/builtins/floatdidf.c b/compiler-rt/lib/builtins/floatdidf.c --- a/compiler-rt/lib/builtins/floatdidf.c +++ b/compiler-rt/lib/builtins/floatdidf.c @@ -50,7 +50,7 @@ return 0.0; const unsigned N = sizeof(di_int) * CHAR_BIT; const di_int s = a >> (N - 1); - a = (a ^ s) - s; + a = (du_int)(a ^ s) - s; int sd = N - __builtin_clzll(a); // number of significant digits int e = sd - 1; // exponent if (sd > DBL_MANT_DIG) { diff --git a/compiler-rt/lib/builtins/floatdisf.c b/compiler-rt/lib/builtins/floatdisf.c --- a/compiler-rt/lib/builtins/floatdisf.c +++ b/compiler-rt/lib/builtins/floatdisf.c @@ -24,7 +24,7 @@ return 0.0F; const unsigned N = sizeof(di_int) * CHAR_BIT; const di_int s = a >> (N - 1); - a = (a ^ s) - s; + a = (du_int)(a ^ s) - s; int sd = N - __builtin_clzll(a); // number of significant digits si_int e = sd - 1; // exponent if (sd > FLT_MANT_DIG) {