diff src/share/vm/utilities/globalDefinitions.hpp @ 9044:bb44c0e88235

8214206: Fix for JDK-8213419 is broken on 32-bit Reviewed-by: mdoerr, shade
author roland
date Wed, 06 Feb 2019 11:41:51 +0100
parents 67aa2bb0d84e
children 71bd8f8ad1fb
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp	Wed Feb 06 17:32:25 2019 +0100
+++ b/src/share/vm/utilities/globalDefinitions.hpp	Wed Feb 06 11:41:51 2019 +0100
@@ -1149,8 +1149,7 @@
 }
 
 //* largest i such that 2^i <= x
-//  A negative value of 'x' will return '63'
-inline int log2_long(unsigned long x) {
+inline int log2_long(julong x) {
   int i = -1;
   julong p =  1;
   while (p != 0 && p <= x) {
@@ -1166,16 +1165,21 @@
   return log2_intptr((uintptr_t)x);
 }
 
-inline int log2_intptr(int x) {
+inline int log2_int(int x) {
   return log2_intptr((uintptr_t)x);
 }
 
-inline int log2_intptr(uint x) {
+inline int log2_jint(jint x) {
   return log2_intptr((uintptr_t)x);
 }
 
-inline int log2_long(jlong x) {
-  return log2_long((unsigned long)x);
+inline int log2_uint(uint x) {
+  return log2_intptr((uintptr_t)x);
+}
+
+//  A negative value of 'x' will return '63'
+inline int log2_jlong(jlong x) {
+  return log2_long((julong)x);
 }
 
 //* the argument must be exactly a power of 2