On Mon, 28 Sep 2020 19:09:17 GMT, Bernhard Urban-Forster <bur...@openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/register_aarch64.cpp line 44: >> >>> 42: "rscratch1", "rscratch2", >>> 43: "r10", "r11", "r12", "r13", "r14", "r15", "r16", >>> 44: "r17", NOT_R18_RESERVED("r18") WIN64_ONLY("rtls"), "r19", >> >> For me this line doesn't look good in case of expanding this functionality >> to macos-aarch64 >> as it's just the name of register and it's r18 on every platform except >> WIN64 and has nothing to do with reserving r18. > > The idea is that the naming should suggest that `r18` shouldn't be used on > that particular platform. Same is true for > macOS, but the ABI docs suggest a different usage, hence we have something > like that in our internal branch for macOS: > Suggestion: > "r17", NOT_R18_RESERVED("r18") WIN64_ONLY("rtls") > MACOS_ONLY("rplatform"), "r19", > Are you suggesting it should rather be something like this eventually? > Suggestion: > > "r17", LINUX_ONLY("r18") WIN64_ONLY("rtls") MACOS_ONLY("rplatform"), > "r19", this looks better I think, if it's done right from beginning, we won't have to modify it later. The Question is, can we do it ahead of JEP-391 ? If we can't then maybe better to leave it this way for now: WIN64_ONLY("rtls") NOT_WIN64("r18") as r18 is supposed to be reserved register on aarch64, linux is just an exception where it's allowed. ------------- PR: https://git.openjdk.java.net/jdk/pull/212