RFR: 8308452: Extend internal Architecture enum with byte order and address size [v5]

Roger Riggs rriggs at openjdk.org
Fri Jun 16 19:48:31 UTC 2023


> 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 10 commits:

 - 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
 - Correct address size for ARM (32-bit)
 - 8308452: Extend internal Architecture enum with byte order and address size

-------------

Changes: https://git.openjdk.org/jdk/pull/14063/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14063&range=04
  Stats: 147 lines in 5 files changed: 114 ins; 19 del; 14 mod
  Patch: https://git.openjdk.org/jdk/pull/14063.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14063/head:pull/14063

PR: https://git.openjdk.org/jdk/pull/14063


More information about the core-libs-dev mailing list