[jdk11u-dev] RFR: 8274795: AArch64: avoid spilling and restoring r18 in macro assembler

Andrew Haley aph at openjdk.java.net
Fri Jan 7 16:56:31 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.

Marked as reviewed by aph (Reviewer).

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

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


More information about the jdk-updates-dev mailing list