[jdk11u-dev] RFR: 8254827: JVMCI: Enable it for Windows+AArch64 [v3]

Bernhard Urban-Forster burban at openjdk.java.net
Wed Dec 15 15:55:01 UTC 2021


On Wed, 6 Oct 2021 08:14:03 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Reka Kovacs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>> 
>>   Backport 88ee973334e6a155719bd2486da73567d59a7f1e
>
> src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java line 141:
> 
>> 139:     private static RegisterArray initAllocatable(Architecture arch, boolean reserveForHeapBase, boolean canUsePlatformRegister) {
>> 140:         RegisterArray allRegisters = arch.getAvailableValueRegisters();
>> 141:         Register[] registers = new Register[allRegisters.size() - reservedRegisters.size() - (reserveForHeapBase ? 1 : 0) - (!canUsePlatformRegister ? 1 : 0)];
> 
> This is confusing and complicated. If you set `platformRegister` to be either `r18` or `Register.None` depending on the OS, you don't need a separate boolean `canUsePlatformRegister`.

I agree, it doesn't read nice. However the code around the definition of `platformRegister` doesn't know which platform we are dealing with. We could potentially pass down the `config` object via the constructor... or use the boolean flag as proposed here. Do you think it's worth changing it? I'm mostly worried about diverging from tip.

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

PR: https://git.openjdk.java.net/jdk11u-dev/pull/307


More information about the jdk-updates-dev mailing list