Skip to content
2 changes: 1 addition & 1 deletion src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ C2V_VMENTRY_0(jlong, getMaxCallTargetOffset, (JNIEnv* env, jobject, jlong addr))
if (target_addr != 0x0) {
jlong off_low = (jlong)target_addr - ((jlong)CodeCache::low_bound() + sizeof(int));
jlong off_high = (jlong)target_addr - ((jlong)CodeCache::high_bound() + sizeof(int));
return MAX2(uabs(off_low), uabs(off_high));
return checked_cast<jlong>(MAX2(uabs(off_low), uabs(off_high)));
}
return -1;
C2V_END
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/ifnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ Node* RangeCheckNode::Ideal(PhaseGVN *phase, bool can_reshape) {
// the argument above still holds.
//
// Note that the same optimization with the same maximal accepted interval size can also be found in C1.
const jlong maximum_number_of_min_max_interval_indices = (jlong)max_jint;
const julong maximum_number_of_min_max_interval_indices = (julong)max_jint;

// The top 3 range checks seen
const int NRC = 3;
Expand Down