hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 392 0b3167e2f2de
parent 360 21d113ecbf6a
child 971 f0b20be4165d
child 670 ddf3e9583f2f
equal deleted inserted replaced
379:10767ca40189 392:0b3167e2f2de
   888   while (p != 0 && p <= (julong)x) {
   888   while (p != 0 && p <= (julong)x) {
   889     // p = 2^(i+1) && p <= x (i.e., 2^(i+1) <= x)
   889     // p = 2^(i+1) && p <= x (i.e., 2^(i+1) <= x)
   890     i++; p *= 2;
   890     i++; p *= 2;
   891   }
   891   }
   892   // p = 2^(i+1) && x < p (i.e., 2^i <= x < 2^(i+1))
   892   // p = 2^(i+1) && x < p (i.e., 2^i <= x < 2^(i+1))
   893   // (if p = 0 then overflow occured and i = 31)
   893   // (if p = 0 then overflow occured and i = 63)
   894   return i;
   894   return i;
   895 }
   895 }
   896 
   896 
   897 //* the argument must be exactly a power of 2
   897 //* the argument must be exactly a power of 2
   898 inline int exact_log2(intptr_t x) {
   898 inline int exact_log2(intptr_t x) {