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

Add count_leading_zeros utility

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06

      Description

      While RegMask::find_highest_bit isn't a very hot method, its implementation is quite inefficient compared to what's possible using compiler intrinsics like gcc's __builtin_clz. For platforms without intrinsics a more efficient implementation can be used.

      Introduce a count_trailing_zeros utility method, initially for 32-bit unsigned integer values.

        Attachments

          Activity

            People

            • Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: