On Thu, 22 Jun 2023 19:24:37 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> The internal enum jdk.internal.util.Architecture does not provide >> information about the big or little endianness or the address size (64 or 32 >> bits). The endian-ness and address size are intrinsic to the architecture. >> >> The values of the enum are extended to separately identify the big endian >> and little-endian uses of the ISA. >> For example, `PPC64` and `PPC64LE` for the big and little-endian versions. >> The enum values directly reflect the build-time artifacts and resulting >> executables. >> >> This information about an architecture will make the enum more useful >> especially to identify a target platform in a cross-platform use case. A >> method is added to map well known aliases for the platforms to the >> Architecture enum. > > Roger Riggs has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 12 commits: > > - Refactored test to make it easier to add new Architectures > - Merge branch 'master' into 8308452-cross-platform-arch > - Merge branch 'master' into 8308452-cross-platform-arch > - Remove duplicate import > - Don't map ppc64le to ppc64 when processing the PlatformProps.java.template > - Merge branch 'master' into 8308452-cross-platform-arch > - Correct handling of ppc64le/ppc64 using non-canonical architecture. > Keep canonical architecture names for s390, amd/x86_64. > - Merge branch 'master' into 8308452-cross-platform-arch > - Merge branch 'master' into 8308452-cross-platform-arch > - Review suggestions > - ... and 2 more: https://git.openjdk.org/jdk/compare/72501cf7...2e04a1ca The changes in this PR look OK to me. The introduction of instance method `byteOrder()` in the `Architecture` enum, as proposed in this PR, will help with the changes being proposed in https://github.com/openjdk/jdk/pull/11943. That way jlink won't have to have its own mapping of osname-architecture to endianness. Once this PR is integrated, I'll update that other PR to use this new API and remove the endianness mappings being proposed in that PR. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14063#pullrequestreview-1498241091