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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 23
    • 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.

            sroy Suchismith Roy
            mdoerr Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: