[master] RFR: 8303813: [Lilliput] (AArch64) Use tbz instead of tst and br in load_klass() [v2]

Roman Kennke rkennke at openjdk.org
Thu Mar 9 17:07:29 UTC 2023


> In the implementation of load_klass(), we have a test-and-branch idiom:
> 
> 
> tst(dst, markWord::monitor_value);
> br(Assembler::EQ, fast);
> 
> 
> We can make this better:
> 
> `tbz(dst, exact_log2(markWord::monitor_value), fast);
> `
> This is not only smaller and perhaps a little faster, it also has the advantage that it doesn't touch the condition flags. This is relevant in at least one place: in verify_oop() the condition flag is alive across the load_klass() call and one jtreg test (runtime/CheckUnhandledOops/TestVerifyOops.java) is failing because of that.
> 
> Testing:
>  - [x] tier1

Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:

  Fix comment for MacroAssembler::load_nklass()

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

Changes:
  - all: https://git.openjdk.org/lilliput/pull/78/files
  - new: https://git.openjdk.org/lilliput/pull/78/files/0e6a576e..59bdb1b9

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

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/lilliput/pull/78.diff
  Fetch: git fetch https://git.openjdk.org/lilliput pull/78/head:pull/78

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


More information about the lilliput-dev mailing list