RFR (XS) 8238909: x86_32 fails gtest:power_of_2
Aleksey Shipilev
shade at redhat.com
Wed Feb 12 19:15:03 UTC 2020
On 2/12/20 7:54 PM, Stefan Karlsson wrote:
> On 2020-02-12 19:45, Aleksey Shipilev wrote:
>> Fix:
>> https://cr.openjdk.java.net/~shade/8238909/webrev.01/
>>
> FWIW, we have a template version in align.hpp:
>
> // Temporary declaration until this file has been restructured.
> template <typename T>
> bool is_power_of_2_t(T x) {
> return (x != T(0)) && ((x & (x - 1)) == T(0));
> }
>
> Would that version work in this situation?
Oh! Ohhh! It does seem to work. Testing...
Why isn't it in globalDefinitions.hpp?
--
Thanks,
-Aleksey
More information about the hotspot-dev
mailing list