[jdk11u-dev] RFR: 8274795: AArch64: avoid spilling and restoring r18 in macro assembler
Bernhard Urban-Forster
burban at openjdk.java.net
Fri Jan 21 21:56:07 UTC 2022
On Fri, 7 Jan 2022 16:11:48 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:
> `r18` should not be used as it is reserved as platform register. Linux is fine with userspace using it, but Windows and also recently macOS (https://github.com/openjdk/jdk11u-dev/pull/301#issuecomment-911998917 ) are actually using it on the kernel side.
>
> The macro assembler uses the bit pattern `0x7fff_ffff` (== `r0-r30`) to specify which registers to spill. While spilling `r18` is fine (e.g. for a register dump), we should never restore it.
>
> Tested tier1 on Linux/AArch64 and macOS/AArch64 (the latter on top of the current patches from https://github.com/openjdk/aarch64-port/pull/14 ).
Thank you Andrew, Goetz and Vladimir!
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/744
More information about the jdk-updates-dev
mailing list