RFR (XS) 8238909: x86_32 fails gtest:power_of_2
Stefan Karlsson
stefan.karlsson at oracle.com
Wed Feb 12 19:23:02 UTC 2020
On 2020-02-12 20:15, Aleksey Shipilev wrote:
> 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?
IIRC, there used to be a circular dependency between
globalDefinitions.hpp and align.hpp.
I created an RFE some time ago, that I never got to:
https://bugs.openjdk.java.net/browse/JDK-8183574
I also wonder why the is_power_of_2* functions are not in the new
utilities/powerOfTwo.hpp file.
StefanK
>
More information about the hotspot-dev
mailing list