RFR: 8254827: JVMCI: Enable it for Windows+AArch64

Doug Simon dnsimon at openjdk.java.net
Tue Oct 20 10:05:13 UTC 2020


On Thu, 15 Oct 2020 15:00:47 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:

> Use r18 as allocatable register on Linux only.
> 
> A bootstrap works now (it has been crashing before due to r18 being allocated):
> $
> ./windows-aarch64-server-fastdebug/bin/java.exe -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI -version
> Bootstrapping JVMCI................................. in 17990 ms (compiled 3330 methods)
> openjdk version "16-internal" 2021-03-16
> OpenJDK Runtime Environment (fastdebug build 16-internal+0-adhoc.NORTHAMERICAbeurba.openjdk-jdk)
> OpenJDK 64-Bit Server VM (fastdebug build 16-internal+0-adhoc.NORTHAMERICAbeurba.openjdk-jdk, mixed mode)
> 
> Jtreg tests `test/hotspot/jtreg/compiler/jvmci` are passing as well.

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java
line 126:

> 124:     public static final Register metaspaceMethodRegister = r12;
> 125:
> 126:     public static final Register platformRegister = r18;

There should be a comment here as "platform register" is rather ambiguous.

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java
line 133:

> 131:     private static final RegisterArray reservedRegisters = new RegisterArray(rscratch1, rscratch2, threadRegister,
> fp, lr, r31, zr, sp); 132:
> 133:     private static RegisterArray initAllocatable(Architecture arch, boolean reserveForHeapBase, boolean linuxOs) {

Instead of `linuxOs`, `canUsePlatformRegister` is a better name. The logic of which OS does what belongs more in
AArch64HotSpotJVMCIBackendFactory.

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

PR: https://git.openjdk.java.net/jdk/pull/685



More information about the build-dev mailing list