RFR: 8287567: AArch64: Implement post-call NOPs

Andrew Haley aph at openjdk.java.net
Tue May 31 13:43:09 UTC 2022


Post-call NOPs (introduced with Loom virtual threads) are not implemented in the AArch64 port. Given that these are a significant optimization on x86, we should have them on AArch64 too. 

I looked at a variety of possible instruction sequences, and ended up with `nop; movk zr, lo; movk zr, hi`. `movk` is typically one of the fastest AArch64 instructions, so it should be suitable. It's not possible to patch the `movk` instructions concurrently with this code executing, but as far as I can tell the offsets in post-call NOPs are only ever patched while the code is being installed.

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

Commit messages:
 - 8287567: AArch64: Implement post-call NOPs
 - Merge branch 'master' of https://github.com/openjdk/jdk into new-master
 - Merge https://github.com/openjdk/jdk into new-master
 - Revert "8287091: aarch64 : guarantee(val < (1ULL << nbits)) failed: Field too big for insn"
 - 8287091: aarch64 : guarantee(val < (1ULL << nbits)) failed: Field too big for insn

Changes: https://git.openjdk.java.net/jdk/pull/8955/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8955&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8287567
  Stats: 46 lines in 5 files changed: 42 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8955.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8955/head:pull/8955

PR: https://git.openjdk.java.net/jdk/pull/8955


More information about the hotspot-dev mailing list