JBigI: GMP 6.2.0 for linux 64 bit (ticket #1869)

Add support for zen and zen2
Enable more fallbacks for zen and zen2
Adds Zen and Zen2 binaries, stripped
Built with gcc 9.3.0
Other binaries will be added if testing shows improvement
Fix hangs in mbuild-all.sh build script
Add silvermont and goldmont to build script, untested, support TBD
GMP is GPLv2
More info: http://zzz.i2p/topics/2955
This commit is contained in:
zzz
2020-09-26 12:58:55 +00:00
parent ea4409897d
commit 2989d955d9
11 changed files with 78 additions and 20 deletions

View File

@ -193,7 +193,7 @@ Jbigi Libraries (jbigi.jar):
GMP 4.3.2 / 5.0.2: GMP 4.3.2 / 5.0.2:
Copyright 1991, 1996, 1999, 2000, 2007 Free Software Foundation, Inc. Copyright 1991, 1996, 1999, 2000, 2007 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv3.txt See licenses/LICENSE-LGPLv3.txt
GMP 6.0.0 / 6.1.2: GMP 6.0.0 / 6.1.2 / 6.2.0:
See licenses/LICENSE-GPLv2.txt See licenses/LICENSE-GPLv2.txt

View File

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
# #
# This script downloads gmp-6.1.2.tar.bz2 to this directory # This script downloads gmp-6.x.x.tar.bz2 to this directory
# (if a different version, change the GMP_VER= line below) # (if a different version, change the GMP_VER= line below)
# #
export GMP_VER=6.1.2 export GMP_VER=6.2.0
export GMP_TARVER=${GMP_VER} export GMP_TARVER=${GMP_VER}
export GMP_DIR="gmp-$GMP_VER" export GMP_DIR="gmp-$GMP_VER"
export GMP_TAR="gmp-$GMP_TARVER.tar.bz2" export GMP_TAR="gmp-$GMP_TARVER.tar.bz2"

View File

@ -50,7 +50,7 @@ TRANSLATE_NAME_armv7a="armv7"
# Note! these build on 32bit as 32bit when operating as 32bit... # Note! these build on 32bit as 32bit when operating as 32bit...
# starting with k10 added for 6.0.0 # starting with k10 added for 6.0.0
# As of GMP 6.0.0, libgmp 3, # As of GMP 6.0.0, libgmp 3,
X86_64_PLATFORMS="skylake coreisbr coreihwl coreibwl bobcat jaguar bulldozer piledriver steamroller excavator atom athlon64 core2 corei nano pentium4 k10 x86_64" X86_64_PLATFORMS="zen2 zen silvermont goldmont skylake coreisbr coreihwl coreibwl bobcat jaguar bulldozer piledriver steamroller excavator atom athlon64 core2 corei nano pentium4 k10 x86_64"
TRANSLATE_NAME_x86_64="none" # Rename x86_64 to none_64, since that is what NativeBigInteger refers to it as TRANSLATE_NAME_x86_64="none" # Rename x86_64 to none_64, since that is what NativeBigInteger refers to it as
# Note! these are 32bit _ONLY_ (after the 64 bit ones) # Note! these are 32bit _ONLY_ (after the 64 bit ones)
@ -84,7 +84,7 @@ if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
exit 1 exit 1
fi fi
if ! command m4 > /dev/null; then if [ ! $(which m4) ]; then
printf "\aWARNING: \`m4\` not found. Install m4 " >&2 printf "\aWARNING: \`m4\` not found. Install m4 " >&2
printf "and re-run this script.\n\n\n\a" >&2 printf "and re-run this script.\n\n\n\a" >&2
exit 1 exit 1
@ -140,7 +140,7 @@ else
exit 1 exit 1
fi fi
if ! command ${CC} > /dev/null; then if [ ! $(which ${CC}) ]; then
echo "The compiler you've selected \"$CC\" does not appear to exist" echo "The compiler you've selected \"$CC\" does not appear to exist"
exit 1 exit 1
fi fi

View File

@ -73,4 +73,16 @@ public interface AMDCPUInfo extends CPUInfo {
*/ */
public boolean IsExcavatorCompatible(); public boolean IsExcavatorCompatible();
/**
* @return true if the CPU present in the machine is at least a Zen family CPU
* @since 0.9.48
*/
public boolean IsZenCompatible();
/**
* @return true if the CPU present in the machine is at least a Zen2 family CPU
* @since 0.9.48
*/
public boolean IsZen2Compatible();
} }

View File

@ -22,6 +22,8 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
private static boolean isPiledriverCompatible; private static boolean isPiledriverCompatible;
private static boolean isSteamrollerCompatible; private static boolean isSteamrollerCompatible;
private static boolean isExcavatorCompatible; private static boolean isExcavatorCompatible;
private static boolean isZenCompatible;
private static boolean isZen2Compatible;
public boolean IsK6Compatible(){ return isK6Compatible; } public boolean IsK6Compatible(){ return isK6Compatible; }
@ -50,6 +52,18 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
public boolean IsExcavatorCompatible(){ return isExcavatorCompatible; } public boolean IsExcavatorCompatible(){ return isExcavatorCompatible; }
/**
* @return true if the CPU present in the machine is at least a Zen family CPU
* @since 0.9.48
*/
public boolean IsZenCompatible() { return isZenCompatible; }
/**
* @return true if the CPU present in the machine is at least a Zen2 family CPU
* @since 0.9.48
*/
public boolean IsZen2Compatible() { return isZen2Compatible; }
public String getCPUModelString() throws UnknownCPUException public String getCPUModelString() throws UnknownCPUException
{ {
@ -454,9 +468,10 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
} }
break; break;
//Ryzen 7 (model 1), Ryzen 5 TBD // Zen / Zen+ / Zen2 / Zen3 / Ryzen 3/5/7/9/Threadripper / EPYC
// untested // untested
case 23: { case 23:
case 25: {
// Quote wikipedia: // Quote wikipedia:
// Zen is a clean sheet design that differs from the long-standing Bulldozer architecture. // Zen is a clean sheet design that differs from the long-standing Bulldozer architecture.
// All models support: x87, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AES, CLMUL, // All models support: x87, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AES, CLMUL,
@ -466,18 +481,22 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
isK6_3_Compatible = true; isK6_3_Compatible = true;
isAthlonCompatible = true; isAthlonCompatible = true;
isAthlon64Compatible = true; isAthlon64Compatible = true;
// Pending testing of the bulldozer jbigi isPiledriverCompatible = true;
//isPiledriverCompatible = true; isSteamrollerCompatible = true;
//isSteamrollerCompatible = true; isExcavatorCompatible = true;
//isExcavatorCompatible = true; isBulldozerCompatible = true;
//isBulldozerCompatible = true; isZenCompatible = true;
if (model == 1) isZen2Compatible = family == 25;
if (isZen2Compatible)
modelString = "EPYC model " + model;
else if (model == 1)
modelString = "Ryzen 7"; modelString = "Ryzen 7";
else else
modelString = "Ryzen model " + model; modelString = "Ryzen model " + model;
} }
break; break;
// Hygon Dhyana
// http://lkml.iu.edu/hypermail/linux/kernel/1806.1/00730.html // http://lkml.iu.edu/hypermail/linux/kernel/1806.1/00730.html
// untested // untested
case 24: { case 24: {

View File

@ -420,6 +420,8 @@ public class CPUID {
System.out.println("Is Piledriver-compatible: " + cc.IsPiledriverCompatible()); System.out.println("Is Piledriver-compatible: " + cc.IsPiledriverCompatible());
System.out.println("Is Steamroller-compatible: " + cc.IsSteamrollerCompatible()); System.out.println("Is Steamroller-compatible: " + cc.IsSteamrollerCompatible());
System.out.println("Is Excavator-compatible: " + cc.IsExcavatorCompatible()); System.out.println("Is Excavator-compatible: " + cc.IsExcavatorCompatible());
System.out.println("Is Zen-compatible: " + cc.IsZenCompatible());
System.out.println("Is Zen2-compatible: " + cc.IsZen2Compatible());
} }
} }

View File

@ -174,6 +174,10 @@ public class NativeBigInteger extends BigInteger {
private final static String JBIGI_OPTIMIZATION_JAGUAR = "jaguar"; private final static String JBIGI_OPTIMIZATION_JAGUAR = "jaguar";
/** @since 0.9.41 */ /** @since 0.9.41 */
private final static String JBIGI_OPTIMIZATION_SKYLAKE = "skylake"; private final static String JBIGI_OPTIMIZATION_SKYLAKE = "skylake";
/** @since 0.9.48 */
private final static String JBIGI_OPTIMIZATION_ZEN = "zen";
/** @since 0.9.48 */
private final static String JBIGI_OPTIMIZATION_ZEN2 = "zen2";
/** /**
* Non-x86, no fallbacks to older libs or to "none" * Non-x86, no fallbacks to older libs or to "none"
@ -227,7 +231,9 @@ public class NativeBigInteger extends BigInteger {
private final static String[] JBIGI_COMPAT_LIST_AMD_GEODE = {JBIGI_OPTIMIZATION_GEODE, JBIGI_OPTIMIZATION_K6_3, JBIGI_OPTIMIZATION_K6_2, JBIGI_OPTIMIZATION_K6, private final static String[] JBIGI_COMPAT_LIST_AMD_GEODE = {JBIGI_OPTIMIZATION_GEODE, JBIGI_OPTIMIZATION_K6_3, JBIGI_OPTIMIZATION_K6_2, JBIGI_OPTIMIZATION_K6,
JBIGI_OPTIMIZATION_X86}; JBIGI_OPTIMIZATION_X86};
private final static String[] JBIGI_COMPAT_LIST_AMD_APU = {JBIGI_OPTIMIZATION_JAGUAR, JBIGI_OPTIMIZATION_BOBCAT, JBIGI_OPTIMIZATION_ATHLON64}; private final static String[] JBIGI_COMPAT_LIST_AMD_APU = {JBIGI_OPTIMIZATION_JAGUAR, JBIGI_OPTIMIZATION_BOBCAT, JBIGI_OPTIMIZATION_ATHLON64};
private final static String[] JBIGI_COMPAT_LIST_AMD_BULLDOZER = {JBIGI_OPTIMIZATION_EXCAVATOR, JBIGI_OPTIMIZATION_STEAMROLLER, JBIGI_OPTIMIZATION_PILEDRIVER, /** the main AMD product line */
private final static String[] JBIGI_COMPAT_LIST_AMD_MAIN = {JBIGI_OPTIMIZATION_ZEN2, JBIGI_OPTIMIZATION_ZEN,
JBIGI_OPTIMIZATION_EXCAVATOR, JBIGI_OPTIMIZATION_STEAMROLLER, JBIGI_OPTIMIZATION_PILEDRIVER,
JBIGI_OPTIMIZATION_BULLDOZER, JBIGI_OPTIMIZATION_ATHLON64, JBIGI_OPTIMIZATION_X86}; JBIGI_OPTIMIZATION_BULLDOZER, JBIGI_OPTIMIZATION_ATHLON64, JBIGI_OPTIMIZATION_X86};
private final static String[] JBIGI_COMPAT_LIST_INTEL_ATOM = {JBIGI_OPTIMIZATION_ATOM, JBIGI_OPTIMIZATION_PENTIUM3, JBIGI_OPTIMIZATION_PENTIUM2, private final static String[] JBIGI_COMPAT_LIST_INTEL_ATOM = {JBIGI_OPTIMIZATION_ATOM, JBIGI_OPTIMIZATION_PENTIUM3, JBIGI_OPTIMIZATION_PENTIUM2,
JBIGI_OPTIMIZATION_PENTIUMMMX, JBIGI_OPTIMIZATION_PENTIUM, JBIGI_OPTIMIZATION_X86, JBIGI_OPTIMIZATION_PENTIUMMMX, JBIGI_OPTIMIZATION_PENTIUM, JBIGI_OPTIMIZATION_X86,
@ -275,10 +281,12 @@ public class NativeBigInteger extends BigInteger {
put(JBIGI_OPTIMIZATION_BOBCAT, JBIGI_COMPAT_LIST_AMD_APU); put(JBIGI_OPTIMIZATION_BOBCAT, JBIGI_COMPAT_LIST_AMD_APU);
put(JBIGI_OPTIMIZATION_JAGUAR, JBIGI_COMPAT_LIST_AMD_APU); put(JBIGI_OPTIMIZATION_JAGUAR, JBIGI_COMPAT_LIST_AMD_APU);
put(JBIGI_OPTIMIZATION_BULLDOZER, JBIGI_COMPAT_LIST_AMD_BULLDOZER); put(JBIGI_OPTIMIZATION_BULLDOZER, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_PILEDRIVER, JBIGI_COMPAT_LIST_AMD_BULLDOZER); put(JBIGI_OPTIMIZATION_PILEDRIVER, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_STEAMROLLER, JBIGI_COMPAT_LIST_AMD_BULLDOZER); put(JBIGI_OPTIMIZATION_STEAMROLLER, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_EXCAVATOR, JBIGI_COMPAT_LIST_AMD_BULLDOZER); put(JBIGI_OPTIMIZATION_EXCAVATOR, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_ZEN, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_ZEN2, JBIGI_COMPAT_LIST_AMD_MAIN);
put(JBIGI_OPTIMIZATION_ATOM, JBIGI_COMPAT_LIST_INTEL_ATOM); put(JBIGI_OPTIMIZATION_ATOM, JBIGI_COMPAT_LIST_INTEL_ATOM);
@ -363,6 +371,10 @@ public class NativeBigInteger extends BigInteger {
return JBIGI_OPTIMIZATION_VIAC3; return JBIGI_OPTIMIZATION_VIAC3;
} else if (c instanceof AMDCPUInfo) { } else if (c instanceof AMDCPUInfo) {
AMDCPUInfo amdcpu = (AMDCPUInfo) c; AMDCPUInfo amdcpu = (AMDCPUInfo) c;
if (amdcpu.IsZen2Compatible())
return JBIGI_OPTIMIZATION_ZEN2;
if (amdcpu.IsZenCompatible())
return JBIGI_OPTIMIZATION_ZEN;
if (amdcpu.IsExcavatorCompatible()) if (amdcpu.IsExcavatorCompatible())
return JBIGI_OPTIMIZATION_EXCAVATOR; return JBIGI_OPTIMIZATION_EXCAVATOR;
if (amdcpu.IsSteamrollerCompatible()) if (amdcpu.IsSteamrollerCompatible())

View File

@ -1,4 +1,17 @@
2020-09-26 zzz
* JBigI: GMP 6.2.0 for linux 64 bit Zen and Zen2 (ticket #1869)
2020-09-22 zzz
* i2ptunnel: Change enctype default to both for:
HTTP, IRC, and Streamr servers
IRC, SOCKS IRC, and Streamr clients
* Susimail, SAM: More defensive ByteBuffer casting (ticket #2775)
2020-09-18 zzz
* Build: More git support for release and Debian targets
2020-09-16 zzz 2020-09-16 zzz
* i2psnark: Defensive checks for v2 format files and magnet links
* Router: Block same-country when in hidden mode (ticket #2759) * Router: Block same-country when in hidden mode (ticket #2759)
2020-09-11 zzz 2020-09-11 zzz

Binary file not shown.

Binary file not shown.

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 3; public final static long BUILD = 4;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";