RFR: 8354803: ALL_64_BITS is the same across platforms [v2]
Stefan Karlsson
stefank at openjdk.org
Tue Apr 22 10:57:56 UTC 2025
On Tue, 22 Apr 2025 09:11:25 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> We have quite a lot of duplication of ALL_64_BITS
>> #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
>> across posix platforms but it is the same for these platforms so it could be moved to a central place.
>>
>> On Windows it is currently
>> #define ALL_64_BITS CONST64(-1)
>> but this should be the same too.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> handle windows too
src/hotspot/share/utilities/globalDefinitions.hpp line 166:
> 164: // for timer info max values which include all bits
> 165: #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
> 166:
Maybe place this down at:
// Build a 64bit integer constant
#define CONST64(x) (x ## LL)
#define UCONST64(x) (x ## ULL)
const jlong min_jlong = CONST64(0x8000000000000000);
const jlong max_jlong = CONST64(0x7fffffffffffffff);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24715#discussion_r2053868140
More information about the hotspot-runtime-dev
mailing list