hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 2032 1e27661bff28
parent 2023 10d955a8d972
child 2034 ca0ff0c51e3b
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Fri Feb 13 09:09:35 2009 -0800
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Mon Feb 16 07:19:26 2009 -0800
@@ -907,6 +907,14 @@
   return log2_intptr(x);
 }
 
+//* the argument must be exactly a power of 2
+inline int exact_log2_long(jlong x) {
+  #ifdef ASSERT
+    if (!is_power_of_2_long(x)) basic_fatal("x must be a power of 2");
+  #endif
+  return log2_long(x);
+}
+
 
 // returns integer round-up to the nearest multiple of s (s must be a power of two)
 inline intptr_t round_to(intptr_t x, uintx s) {