Changeset 92ad4d1 for core/java


Ignore:
Timestamp:
Jan 1, 2019 3:41:11 PM (19 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
d95d81a
Parents:
3c0ba5c
Message:

NBI: Add lookup tables for ARMv8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/NativeBigInteger.java

    r3c0ba5c r92ad4d1  
    187187    private final static String JBIGI_OPTIMIZATION_ARM_ARMV6           = "armv6";
    188188    private final static String JBIGI_OPTIMIZATION_ARM_ARMV7           = "armv7";
     189    private final static String JBIGI_OPTIMIZATION_ARM_ARMV8           = "armv8";
    189190    private final static String JBIGI_OPTIMIZATION_ARM_CORTEX_A5       = "armcortexa5";
    190191    private final static String JBIGI_OPTIMIZATION_ARM_CORTEX_A7       = "armcortexa7";
     
    217218                                                                     JBIGI_OPTIMIZATION_ARM_CORTEX_A7, JBIGI_OPTIMIZATION_ARM_CORTEX_A5, JBIGI_OPTIMIZATION_ARM_ARMV7,
    218219                                                                     JBIGI_OPTIMIZATION_ARM_ARMV6, JBIGI_OPTIMIZATION_ARM_ARMV5};
     220    private final static String[] JBIGI_COMPAT_LIST_ARM_ARMV8     = {JBIGI_OPTIMIZATION_ARM_ARMV8};
    219221    private final static String[] JBIGI_COMPAT_LIST_VIA           = {JBIGI_OPTIMIZATION_NANO, JBIGI_OPTIMIZATION_VIAC32, JBIGI_OPTIMIZATION_VIAC3,
    220222                                                                     JBIGI_OPTIMIZATION_PENTIUM, JBIGI_OPTIMIZATION_X86};
     
    248250        put(JBIGI_OPTIMIZATION_ARM_ARMV6,      JBIGI_COMPAT_LIST_ARM);
    249251        put(JBIGI_OPTIMIZATION_ARM_ARMV7,      JBIGI_COMPAT_LIST_ARM);
     252        put(JBIGI_OPTIMIZATION_ARM_ARMV8,      JBIGI_COMPAT_LIST_ARM_ARMV8);
    250253        put(JBIGI_OPTIMIZATION_ARM_CORTEX_A5,  JBIGI_COMPAT_LIST_ARM);
    251254        put(JBIGI_OPTIMIZATION_ARM_CORTEX_A7,  JBIGI_COMPAT_LIST_ARM);
     
    455458                //CPU architecture: 5TEJ
    456459                //CPU architecture: 7
     460                if (arch.startsWith("8"))
     461                    return JBIGI_OPTIMIZATION_ARM_ARMV8;
    457462                if (arch.startsWith("7")) {
    458463                    // Raspberry Pi workaround
     
    472477            // Let's try by looking at model name
    473478            if (model != null) {
     479                if (model.contains("ARMv8"))
     480                    return JBIGI_OPTIMIZATION_ARM_ARMV8;
    474481                if (model.contains("ARMv7"))
    475482                    return JBIGI_OPTIMIZATION_ARM_ARMV7;
     
    479486                    return JBIGI_OPTIMIZATION_ARM_ARMV5;
    480487            }
     488               
     489            if (_is64)
     490                return JBIGI_OPTIMIZATION_ARM_ARMV8;
    481491               
    482492            // If we didn't find a match, return null
Note: See TracChangeset for help on using the changeset viewer.