RFR(T): 8214206: Fix for JDK-8213419 is broken on 32-bit

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Nov 22 14:34:08 UTC 2018


isn't this wrong, too:

 inline int log2_long(jlong x) {
   return log2_long((unsigned long)x);

It casts the 64-bit x to 32 bit on 32 bit architectures.

Further, we also see a build issue on s390x:  

...jdk/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp: In member function 'void LIR_Assembler::arithmetic_idiv(LIR_Code, LIR_Opr, LIR_Opr, LIR_Opr, LIR_Opr, CodeEmitInfo*)':
...jdk/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp:1884:51: error: call of overloaded 'log2_long(jint)' is ambiguous
     jlong log_divisor = log2_long(right->as_jint());
In file included from  ...jdk/src/hotspot/share/utilities/align.hpp:28:0,
                 from ...jdk /src/hotspot/share/runtime/globals.hpp:29,
                 from ...jdk /hotspot/share/memory/allocation.hpp:28,
                 from ...jdk /src/hotspot/share/classfile/classLoaderData.hpp:28,
                 from ...jdk /src/hotspot/share/precompiled/precompiled.hpp:34:
.../jdk/src/hotspot/share/utilities/globalDefinitions.hpp:1051:12: note: candidate: int log2_long(long unsigned int)
 inline int log2_long(unsigned long x) {
.../jdk/src/hotspot/share/utilities/globalDefinitions.hpp:1075:12: note: candidate: int log2_long(jlong)
 inline int log2_long(jlong x) {
Best regards,

> -----Original Message-----
> From: hotspot-dev <hotspot-dev-bounces at openjdk.java.net> On Behalf Of
> Roland Westrelin
> Sent: Donnerstag, 22. November 2018 15:14
> To: hotspot-dev Source Developers <hotspot-dev at openjdk.java.net>
> Subject: RFR(T): 8214206: Fix for JDK-8213419 is broken on 32-bit
> http://cr.openjdk.java.net/~roland/8214206/webrev.00/
> The log2_intptr(int x) and log2_intptr(intptr_t x) conflict on 32 bit.
> Roland.

More information about the hotspot-dev mailing list