< prev index next >
src/hotspot/share/opto/divnode.cpp
Print this page
*** 131,141 ****
}
}
}
// Add rounding to the shift to handle the sign bit
! int l = log2_intptr(d-1)+1;
if (needs_rounding) {
// Divide-by-power-of-2 can be made into a shift, but you have to do
// more math for the rounding. You need to add 0 for positive
// numbers, and "i-1" for negative numbers. Example: i=4, so the
// shift is by 2. You need to add 3 to negative dividends and 0 to
--- 131,141 ----
}
}
}
// Add rounding to the shift to handle the sign bit
! int l = log2_jint(d-1)+1;
if (needs_rounding) {
// Divide-by-power-of-2 can be made into a shift, but you have to do
// more math for the rounding. You need to add 0 for positive
// numbers, and "i-1" for negative numbers. Example: i=4, so the
// shift is by 2. You need to add 3 to negative dividends and 0 to
< prev index next >