31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
# from https://bugs.openjdk.java.net/browse/JDK-8238909
|
|
|
|
--- a/src/hotspot/share/utilities/powerOfTwo.hpp Thu Feb 13 15:43:59 2020 +0000
|
|
+++ b/src/hotspot/share/utilities/powerOfTwo.hpp Thu Feb 13 17:05:30 2020 +0100
|
|
@@ -28,6 +28,7 @@
|
|
#include "metaprogramming/enableIf.hpp"
|
|
#include "metaprogramming/isIntegral.hpp"
|
|
#include "metaprogramming/isSigned.hpp"
|
|
+#include "utilities/align.hpp"
|
|
#include "utilities/count_leading_zeros.hpp"
|
|
#include "utilities/debug.hpp"
|
|
#include "utilities/globalDefinitions.hpp"
|
|
@@ -68,7 +69,7 @@
|
|
STATIC_ASSERT(IsIntegral<T>::value);
|
|
STATIC_ASSERT(IsSigned<T>::value);
|
|
assert(value > 0, "Invalid value");
|
|
- if (is_power_of_2(value)) {
|
|
+ if (is_power_of_2_t(value)) {
|
|
return value;
|
|
}
|
|
uint32_t lz = count_leading_zeros(value);
|
|
@@ -84,7 +85,7 @@
|
|
STATIC_ASSERT(IsIntegral<T>::value);
|
|
STATIC_ASSERT(!IsSigned<T>::value);
|
|
assert(value != 0, "Invalid value");
|
|
- if (is_power_of_2(value)) {
|
|
+ if (is_power_of_2_t(value)) {
|
|
return value;
|
|
}
|
|
uint32_t lz = count_leading_zeros(value);
|