8287169: compiler/arguments/TestCompileThresholdScaling.java fails on x86_32 after JDK-8287052

Reviewed-by: kvn, dlong
This commit is contained in:
Aleksey Shipilev 2022-05-24 16:31:10 +00:00
parent 25080e0c3a
commit fdece9ac71

View File

@ -136,10 +136,13 @@ intx CompilerConfig::scaled_compile_threshold(intx threshold, double scale) {
}
int exp;
(void) frexp(v, &exp);
if (exp > 63) {
int max_exp = sizeof(intx) * BitsPerByte - 1;
if (exp > max_exp) {
return max_intx;
}
return (intx)(v);
intx r = (intx)(v);
assert(r >= 0, "must be");
return r;
}
}