Changeset 98aafee for core


Ignore:
Timestamp:
Apr 14, 2018 12:55:50 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
941db3a
Parents:
abec6ad
Message:

CPUID: Fix TBM detection (ticket #2211)

Location:
core/java/src/freenet/support/CPUInformation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/freenet/support/CPUInformation/CPUIDCPUInfo.java

    rabec6ad r98aafee  
    100100   
    101101    /**
     102     * Trailing Bit Manipulation (AMD feature)
    102103     * @return true iff the CPU supports TBM.
    103      * @since 0.9.26
     104     * @since 0.9.26, broken before 0.9.35, fixed in 0.9.35
    104105     */
    105106    public boolean hasTBM()
    106107    {
    107         return (CPUID.getECXCPUFlags() & (1 << 21)) != 0; //ECX Bit 21
     108        return (CPUID.getExtendedECXCPUFlags() & (1 << 21)) != 0; //Extended ECX Bit 21
    108109    }
    109110   
  • core/java/src/freenet/support/CPUInformation/CPUInfo.java

    rabec6ad r98aafee  
    110110   
    111111    /**
     112     * Trailing Bit Manipulation (AMD feature)
    112113     * @return true iff the CPU supports TBM.
    113      * @since 0.9.26
     114     * @since 0.9.26, broken before 0.9.35, fixed in 0.9.35
    114115     */
    115116    public boolean hasTBM();
Note: See TracChangeset for help on using the changeset viewer.