[jdk11u-dev] RFR: 8274795: AArch64: avoid spilling and restoring r18 in macro assembler
Bernhard Urban-Forster
burban at openjdk.java.net
Fri Jan 7 16:23:53 UTC 2022
`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.
-------------
Commit messages:
- Backport ede3f4e94c752a8457b7c24e001bd122845d2f6a
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/744/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=744&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274795
Stats: 21 lines in 2 files changed: 15 ins; 0 del; 6 mod
Patch: https://git.openjdk.java.net/jdk11u-dev/pull/744.diff
Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/744/head:pull/744
PR: https://git.openjdk.java.net/jdk11u-dev/pull/744
More information about the jdk-updates-dev
mailing list