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

Bernhard Urban-Forster burban at openjdk.java.net
Fri Jan 21 21:42:15 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 ).

This pull request has now been integrated.

Changeset: b5cae573
Author:    Bernhard Urban-Forster <burban at openjdk.org>
Committer: Vladimir Kempik <vkempik at openjdk.org>
URL:       https://git.openjdk.java.net/jdk11u-dev/commit/b5cae5738155561dfa4b41fc9382d8a7376b093e
Stats:     21 lines in 2 files changed: 15 ins; 0 del; 6 mod

8274795: AArch64: avoid spilling and restoring r18 in macro assembler

Reviewed-by: aph
Backport-of: ede3f4e94c752a8457b7c24e001bd122845d2f6a

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

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


More information about the jdk-updates-dev mailing list