RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]
ExE Boss
duke at openjdk.org
Tue Apr 11 10:29:43 UTC 2023
On Tue, 11 Apr 2023 10:15:27 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unused static and import of Stabile
>
> test/jdk/jdk/internal/util/ArchTest.java line 128:
>
>> 126: case RISCV64 -> true;
>> 127: case S390 -> false;
>> 128: case PPC64 -> true;
>
> This is not always true. The PPC64 architecture supports both endianness versions. AIX and legacy linux is Big Endian while recent linux is little Endian (determined by platform name "os.arch = ppc64le" instead of "os.arch = ppc64"). Querying the endianness is also possible, of course.
This should (probably) be correct:
Suggestion:
case PPC64 -> !OperatingSystem.isAix() && Architecture.isLittleEndian();
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1162614588
More information about the serviceability-dev
mailing list