Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303813

[Lilliput] (AArch64) Use tbz instead of tst and br in load_klass()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-lilliput
    • repo-lilliput
    • hotspot
    • aarch64
    • generic

      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.

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: