[master] RFR: 8300573: [Lilliput] Properly set ZF on anon-check path; avoid some conditional branches [v2]

Roman Kennke rkennke at openjdk.org
Fri Jan 20 19:41:04 UTC 2023


> In AArch64's fast_unlock(), we need to check if the monitor owner is ANONYMOUS (only with Lilliput/fast-locking), and if so, call the runtime to fix this before exiting the monitor. I tried to be smart and used tbnz there, but it turns out that tbnz does *not* set the zero flag, but we do need the ZF set correctly on exit of fast_unlock, so that C2 generated code would actually call the slow path. Therefore we need to use the longer tst/br instructions instead.
> 
> The change also removes some conditional branches.
> 
> All of the changes have already been integrated into the upstream proposed PR: https://github.com/openjdk/jdk/pull/10907/
> 
> Testing:
>  - [x] tier1
>  - [x] tier2

Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'master' into JDK-8300573
 - 8300573: [Lilliput] Properly set ZF on anon-check path; avoid some conditional branches

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

Changes:
  - all: https://git.openjdk.org/lilliput/pull/63/files
  - new: https://git.openjdk.org/lilliput/pull/63/files/c6726ed0..399b85f3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=lilliput&pr=63&range=01
 - incr: https://webrevs.openjdk.org/?repo=lilliput&pr=63&range=00-01

  Stats: 1786 lines in 3 files changed: 3 ins; 1782 del; 1 mod
  Patch: https://git.openjdk.org/lilliput/pull/63.diff
  Fetch: git fetch https://git.openjdk.org/lilliput pull/63/head:pull/63

PR: https://git.openjdk.org/lilliput/pull/63


More information about the lilliput-dev mailing list