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

bitCount() should use POPC on SPARC processors and AMD+10h

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • hs15
    • 6, 7
    • hotspot
    • b04
    • x86, sparc
    • solaris, windows_xp
    • Verified

        bitCount() should use POPC on SPARC processors where POPC is implemented directly in hardware. (The existing bitCount() implementation comes from "Hacker's Delight" and is fairly fast). Beware, however, that POPC is implemented by kernel-level trap-based emulation on some processors. In those environments we want to use the existing bitCount() implemenation. isainfo (try "isainfo -x") should allow the JVM to identify those processors that support POPC in hardware.

        x86 processors include a popcnt instruction in SSE4a for AMD and SSE4.2 for Intel.

              twisti Christian Thalinger (Inactive)
              dice Dave Dice
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: