[jdk11u-dev] RFR: 8254827: JVMCI: Enable it for Windows+AArch64 [v3]
Andrew Haley
aph at openjdk.java.net
Wed Dec 15 16:02:03 UTC 2021
On Wed, 15 Dec 2021 15:51:58 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:
>> 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.
OK, I see. Let it stand.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/307
More information about the jdk-updates-dev
mailing list