[PPC64] Unify and optimize code which converts != 0 to 1

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 23
    • Component/s: hotspot
    • b05
    • ppc

      The template interpreter contains branch-free conversion code for T_BOOLEAN (TemplateInterpreterGenerator::generate_result_handler_for).

      SharedRuntime::generate_native_wrapper uses unoptimized code to "Unpack the native result" for T_BOOLEAN.

      Power10 has the "setbc" / "setbcr" instruction.

      We could create a new function for the conversion and use "setbc" on Power10 (determined by VM_Version::has_brw()) and otherwise the branch-free implementation. We should have a function for 32 and one for 64 bit operations (or one with supports both).
      The new code for MacroAssembler::verify_secondary_supers_table should also use the new function.

            Assignee:
            Suchismith Roy
            Reporter:
            Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: