v3.13.1.1

This commit is contained in:
Jay D Dee
2020-05-17 19:21:37 -04:00
parent 1c0719e8a4
commit 9653bca1e2
27 changed files with 143 additions and 183 deletions

View File

@@ -46,6 +46,15 @@ Icelake is only available on some laptops. Mining with a laptop is not
recommended. The icelake build is included in anticipation of Intel eventually
releasing a desktop CPU with a microarchitecture newer than Skylake.
Notes about included DLL files:
Downloading DLL files from alternative sources presents an inherent
security risk if their source is unknown. All DLL files included have
been copied from the Ubuntu-20.04 instalation or compiled by me from
source code obtained from the author's official repository. The exact
procedure is documented in the build instructions for Windows:
https://github.com/JayDDee/cpuminer-opt/wiki/Compiling-from-source
If you like this software feel free to donate:
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

View File

@@ -65,6 +65,13 @@ If not what makes it happen or not happen?
Change Log
----------
v3.13.1.1
Fixed Windows crash mining minotaur algo.
Fixed GCC 10 compile again.
Added -fno-common to testing to be consistent with GCC 10 default.
v3.13.1
Added minotaur algo for Ringcoin.

View File

@@ -105,17 +105,16 @@ int scanhash_generic( struct work *work, uint32_t max_nonce,
uint32_t hash[8] __attribute__((aligned(64)));
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t n = pdata[19];
const uint32_t first_nonce = pdata[19];
const uint32_t last_nonce = max_nonce - 1;
uint32_t n = first_nonce;
const int thr_id = mythr->id;
const bool bench = opt_benchmark;
mm128_bswap32_80( edata, pdata );
do
{
edata[19] = n;
if ( likely( algo_gate.hash( hash, edata, thr_id ) ) )
if ( unlikely( valid_hash( hash, ptarget ) && !bench ) )
{
@@ -123,7 +122,7 @@ int scanhash_generic( struct work *work, uint32_t max_nonce,
submit_solution( work, hash, mythr );
}
n++;
} while ( n < max_nonce && !work_restart[thr_id].restart );
} while ( n < last_nonce && !work_restart[thr_id].restart );
*hashes_done = n - first_nonce;
pdata[19] = n;
return 0;

View File

@@ -110,7 +110,9 @@ inline bool set_excl ( set_t a, set_t b ) { return (a & b) == 0; }
typedef struct
{
// mandatory function, must be overwritten
// Mandatory functions, one of these is mandatory. If the default scanhash
// is used a custom hash function must be registered, with a custom scanhash
// the hash function is not necessary.
int ( *scanhash ) ( struct work*, uint32_t, uint64_t*, struct thr_info* );
//int ( *hash ) ( void*, const void*, uint32_t ) ;

View File

@@ -731,7 +731,7 @@ void skein512_8way_full( skein512_8way_context *sc, void *out, const void *data,
void
skein512_8way_prehash64( skein512_8way_context *sc, const void *data )
{
__m512i *vdata = (__m512*)data;
__m512i *vdata = (__m512i*)data;
__m512i *buf = sc->buf;
buf[0] = vdata[0];
buf[1] = vdata[1];

View File

@@ -7,7 +7,6 @@
#include <stdio.h>
#include "algo/blake/sph_blake.h"
#include "algo/bmw/sph_bmw.h"
#include "algo/groestl/sph_groestl.h"
#include "algo/jh/sph_jh.h"
#include "algo/keccak/sph_keccak.h"
#include "algo/skein/sph_skein.h"
@@ -15,7 +14,6 @@
#include "algo/luffa/luffa_for_sse2.h"
#include "algo/cubehash/cubehash_sse2.h"
#include "algo/simd/nist.h"
#include "algo/echo/sph_echo.h"
#include "algo/hamsi/sph_hamsi.h"
#include "algo/fugue/sph_fugue.h"
#include "algo/shabal/sph_shabal.h"
@@ -24,9 +22,11 @@
#if defined(__AES__)
#include "algo/echo/aes_ni/hash_api.h"
#include "algo/groestl/aes_ni/hash-groestl.h"
#else
#include "algo/echo/sph_echo.h"
#include "algo/groestl/sph_groestl.h"
#endif
// Config
#define MINOTAUR_ALGO_COUNT 16
@@ -39,8 +39,8 @@ struct TortureGarden {
hashState_echo echo;
hashState_groestl groestl;
#else
sph_groestl512_context groestl;
sph_echo512_context echo;
sph_groestl512_context groestl;
#endif
sph_blake512_context blake;
sph_bmw512_context bmw;
@@ -62,13 +62,13 @@ struct TortureGarden {
TortureNode *childLeft;
TortureNode *childRight;
} nodes[22];
};
} __attribute__ ((aligned (64)));
// Get a 64-byte hash for given 64-byte input, using given TortureGarden contexts and given algo index
static void get_hash( void *output, const void *input, TortureGarden *garden,
unsigned int algo )
{
unsigned char _ALIGN(64) hash[64];
unsigned char hash[64] __attribute__ ((aligned (64)));
switch (algo) {
case 0:
@@ -170,7 +170,7 @@ static void get_hash( void *output, const void *input, TortureGarden *garden,
static void traverse_garden( TortureGarden *garden, void *hash,
TortureNode *node )
{
unsigned char _ALIGN(64) partialHash[64];
unsigned char partialHash[64] __attribute__ ((aligned (64)));
get_hash(partialHash, hash, garden, node->algo);
if ( partialHash[63] % 2 == 0 )
@@ -195,9 +195,9 @@ static inline void link_nodes( TortureNode *parent, TortureNode *childLeft,
parent->childRight = childRight;
}
static TortureGarden garden;
static __thread TortureGarden garden;
void initialize_torture_garden()
bool initialize_torture_garden()
{
// Create torture garden nodes. Note that both sides of 19 and 20 lead to 21, and 21 has no children (to make traversal complete).
link_nodes(&garden.nodes[0], &garden.nodes[1], &garden.nodes[2]);
@@ -223,12 +223,13 @@ void initialize_torture_garden()
link_nodes(&garden.nodes[20], &garden.nodes[21], &garden.nodes[21]);
garden.nodes[21].childLeft = NULL;
garden.nodes[21].childRight = NULL;
return true;
}
// Produce a 32-byte hash from 80-byte input data
int minotaur_hash( void *output, const void *input )
{
unsigned char _ALIGN(64) hash[64];
unsigned char hash[64] __attribute__ ((aligned (64)));
// Find initial sha512 hash
SHA512_Init( &garden.sha512 );
@@ -251,7 +252,7 @@ bool register_minotaur_algo( algo_gate_t* gate )
{
gate->hash = (void*)&minotaur_hash;
gate->optimizations = SSE2_OPT | AES_OPT | AVX2_OPT | AVX512_OPT;
initialize_torture_garden();
gate->miner_thread_init = (void*)&initialize_torture_garden;
return true;
};

View File

@@ -4,14 +4,14 @@ bool register_sonoa_algo( algo_gate_t* gate )
{
#if defined (SONOA_8WAY)
gate->scanhash = (void*)&scanhash_sonoa_8way;
// gate->hash = (void*)&sonoa_8way_hash;
gate->hash = (void*)&sonoa_8way_hash;
#elif defined (SONOA_4WAY)
gate->scanhash = (void*)&scanhash_sonoa_4way;
// gate->hash = (void*)&sonoa_4way_hash;
gate->hash = (void*)&sonoa_4way_hash;
#else
init_sonoa_ctx();
gate->scanhash = (void*)&scanhash_sonoa;
// gate->hash = (void*)&sonoa_hash;
// gate->scanhash = (void*)&scanhash_sonoa;
gate->hash = (void*)&sonoa_hash;
#endif
gate->optimizations = SSE2_OPT | AES_OPT | AVX2_OPT | AVX512_OPT | VAES_OPT;
return true;

View File

@@ -569,34 +569,4 @@ int sonoa_hash( void *state, const void *input, int thrid )
return 1;
}
int scanhash_sonoa( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr)
{
uint32_t edata[20] __attribute__((aligned(64)));
uint32_t hash64[8] __attribute__((aligned(64)));
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t n = pdata[19];
const uint32_t first_nonce = pdata[19];
const int thr_id = mythr->id;
const bool bench = opt_benchmark;
mm128_bswap32_80( edata, pdata );
do
{
edata[19] = n;
if ( sonoa_hash( hash64, edata, thr_id ) )
if ( unlikely( valid_hash( hash64, ptarget ) && !bench ) )
{
pdata[19] = bswap_32( n );
submit_solution( work, hash64, mythr );
}
n++;
} while ( n < max_nonce && !work_restart[thr_id].restart );
*hashes_done = n - first_nonce;
pdata[19] = n;
return 0;
}
#endif

View File

@@ -57,7 +57,7 @@ union _x17_8way_context_overlay
} __attribute__ ((aligned (64)));
typedef union _x17_8way_context_overlay x17_8way_context_overlay;
void x17_8way_hash( void *state, const void *input )
int x17_8way_hash( void *state, const void *input )
{
uint64_t vhash[8*8] __attribute__ ((aligned (128)));
uint64_t vhashA[8*8] __attribute__ ((aligned (64)));
@@ -230,6 +230,8 @@ void x17_8way_hash( void *state, const void *input )
haval256_5_8way_init( &ctx.haval );
haval256_5_8way_update( &ctx.haval, vhashA, 64 );
haval256_5_8way_close( &ctx.haval, state );
return 1;
}
int scanhash_x17_8way( struct work *work, uint32_t max_nonce,
@@ -300,7 +302,7 @@ union _x17_4way_context_overlay
};
typedef union _x17_4way_context_overlay x17_4way_context_overlay;
void x17_4way_hash( void *state, const void *input )
int x17_4way_hash( void *state, const void *input )
{
uint64_t vhash[8*4] __attribute__ ((aligned (64)));
uint64_t vhashA[8*4] __attribute__ ((aligned (64)));
@@ -399,6 +401,8 @@ void x17_4way_hash( void *state, const void *input )
haval256_5_4way_init( &ctx.haval );
haval256_5_4way_update( &ctx.haval, vhashB, 64 );
haval256_5_4way_close( &ctx.haval, state );
return 1;
}
int scanhash_x17_4way( struct work *work, uint32_t max_nonce,

View File

@@ -9,7 +9,6 @@ bool register_x17_algo( algo_gate_t* gate )
gate->scanhash = (void*)&scanhash_x17_4way;
gate->hash = (void*)&x17_4way_hash;
#else
gate->scanhash = (void*)&scanhash_x17;
gate->hash = (void*)&x17_hash;
#endif
gate->optimizations = SSE2_OPT | AES_OPT | AVX2_OPT | AVX512_OPT | VAES_OPT;

View File

@@ -14,20 +14,18 @@ bool register_x17_algo( algo_gate_t* gate );
#if defined(X17_8WAY)
void x17_8way_hash( void *state, const void *input );
int x17_8way_hash( void *state, const void *input );
int scanhash_x17_8way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
#elif defined(X17_4WAY)
void x17_4way_hash( void *state, const void *input );
int x17_4way_hash( void *state, const void *input );
int scanhash_x17_4way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
#endif
void x17_hash( void *state, const void *input );
int scanhash_x17( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
int x17_hash( void *state, const void *input, int thr_id );
#endif

View File

@@ -56,7 +56,7 @@ union _x17_context_overlay
};
typedef union _x17_context_overlay x17_context_overlay;
void x17_hash(void *output, const void *input)
int x17_hash(void *output, const void *input, int thr_id )
{
// unsigned char hash[64 * 4] __attribute__((aligned(64))) = {0};
unsigned char hash[64] __attribute__((aligned(64)));
@@ -143,36 +143,8 @@ void x17_hash(void *output, const void *input)
sph_haval256_5_init(&ctx.haval);
sph_haval256_5( &ctx.haval, (const void*)hash, 64 );
sph_haval256_5_close( &ctx.haval, output );
}
int scanhash_x17( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr)
{
uint32_t edata[20] __attribute__((aligned(64)));
uint32_t hash64[8] __attribute__((aligned(64)));
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t n = pdata[19] - 1;
const uint32_t first_nonce = pdata[19];
const int thr_id = mythr->id;
const bool bench = opt_benchmark;
mm128_bswap32_80( edata, pdata );
do
{
edata[19] = n;
x17_hash( hash64, edata );
if ( unlikely( valid_hash( hash64, ptarget ) && !bench ) )
{
pdata[19] = bswap_32( n );
submit_solution( work, hash64, mythr );
}
n++;
} while ( n < max_nonce && !work_restart[thr_id].restart );
*hashes_done = n - first_nonce;
pdata[19] = n;
return 0;
return 1;
}
#endif

View File

@@ -57,7 +57,7 @@ union _xevan_8way_context_overlay
} __attribute__ ((aligned (64)));
typedef union _xevan_8way_context_overlay xevan_8way_context_overlay;
void xevan_8way_hash( void *output, const void *input )
int xevan_8way_hash( void *output, const void *input )
{
uint64_t vhash[16<<3] __attribute__ ((aligned (128)));
uint64_t vhashA[16<<3] __attribute__ ((aligned (64)));
@@ -395,6 +395,8 @@ void xevan_8way_hash( void *output, const void *input )
haval256_5_8way_init( &ctx.haval );
haval256_5_8way_update( &ctx.haval, vhashA, dataLen );
haval256_5_8way_close( &ctx.haval, output );
return 1;
}
int scanhash_xevan_8way( struct work *work, uint32_t max_nonce,
@@ -465,7 +467,7 @@ union _xevan_4way_context_overlay
};
typedef union _xevan_4way_context_overlay xevan_4way_context_overlay;
void xevan_4way_hash( void *output, const void *input )
int xevan_4way_hash( void *output, const void *input )
{
uint64_t hash0[16] __attribute__ ((aligned (64)));
uint64_t hash1[16] __attribute__ ((aligned (64)));
@@ -666,6 +668,8 @@ void xevan_4way_hash( void *output, const void *input )
haval256_5_4way_init( &ctx.haval );
haval256_5_4way_update( &ctx.haval, vhashA, dataLen );
haval256_5_4way_close( &ctx.haval, output );
return 1;
}
int scanhash_xevan_4way( struct work *work, uint32_t max_nonce,

View File

@@ -10,7 +10,6 @@ bool register_xevan_algo( algo_gate_t* gate )
gate->hash = (void*)&xevan_4way_hash;
#else
init_xevan_ctx();
gate->scanhash = (void*)&scanhash_xevan;
gate->hash = (void*)&xevan_hash;
#endif
gate->optimizations = SSE2_OPT | AES_OPT | AVX2_OPT | AVX512_OPT | VAES_OPT;

View File

@@ -14,14 +14,12 @@ bool register_xevan_algo( algo_gate_t* gate );
#if defined(XEVAN_8WAY)
void xevan_8way_hash( void *state, const void *input );
int xevan_8way_hash( void *state, const void *input );
int scanhash_xevan_8way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
#elif defined(XEVAN_4WAY)
void xevan_4way_hash( void *state, const void *input );
int xevan_4way_hash( void *state, const void *input );
int scanhash_xevan_4way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
@@ -29,11 +27,7 @@ int scanhash_xevan_4way( struct work *work, uint32_t max_nonce,
#else
void xevan_hash( void *state, const void *input );
int scanhash_xevan( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
int xevan_hash( void *state, const void *input, int trh_id );
void init_xevan_ctx();
#endif

View File

@@ -83,7 +83,7 @@ void init_xevan_ctx()
#endif
};
void xevan_hash(void *output, const void *input)
int xevan_hash(void *output, const void *input, int thr_id )
{
uint32_t _ALIGN(64) hash[32]; // 128 bytes required
const int dataLen = 128;
@@ -218,36 +218,8 @@ void xevan_hash(void *output, const void *input)
sph_haval256_5_close(&ctx.haval, hash);
memcpy(output, hash, 32);
}
int scanhash_xevan( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr)
{
uint32_t edata[20] __attribute__((aligned(64)));
uint32_t hash64[8] __attribute__((aligned(64)));
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t n = pdata[19];
const uint32_t first_nonce = pdata[19];
const int thr_id = mythr->id;
const bool bench = opt_benchmark;
mm128_bswap32_80( edata, pdata );
do
{
edata[19] = n;
xevan_hash( hash64, edata );
if ( unlikely( valid_hash( hash64, ptarget ) && !bench ) )
{
pdata[19] = bswap_32( n );
submit_solution( work, hash64, mythr );
}
n++;
} while ( n < max_nonce && !work_restart[thr_id].restart );
pdata[19] = n;
*hashes_done = n - first_nonce;
return 0;
return 1;
}
#endif

View File

@@ -445,7 +445,7 @@ bool register_yescrypt_algo( algo_gate_t* gate )
YESCRYPT_P = 1;
applog( LOG_NOTICE,"Yescrypt parameters: N= %d, R= %d.", YESCRYPT_N,
applog( LOG_NOTICE,"Yescrypt parameters: N= %d, R= %d", YESCRYPT_N,
YESCRYPT_R );
if ( yescrypt_client_key )
applog( LOG_NOTICE,"Key= \"%s\"\n", yescrypt_client_key );

View File

@@ -139,7 +139,7 @@ bool register_yespower_algo( algo_gate_t* gate )
yespower_params.perslen = 0;
}
applog( LOG_NOTICE,"Yespower parameters: N= %d, R= %d.", yespower_params.N,
applog( LOG_NOTICE,"Yespower parameters: N= %d, R= %d", yespower_params.N,
yespower_params.r );
if ( yespower_params.pers )
applog( LOG_NOTICE,"Key= \"%s\"\n", yespower_params.pers );
@@ -264,7 +264,7 @@ bool register_power2b_algo( algo_gate_t* gate )
yespower_params.pers = "Now I am become Death, the destroyer of worlds";
yespower_params.perslen = 46;
applog( LOG_NOTICE,"yespower-b2b parameters: N= %d, R= %d.", yespower_params.N,
applog( LOG_NOTICE,"yespower-b2b parameters: N= %d, R= %d", yespower_params.N,
yespower_params.r );
applog( LOG_NOTICE,"Key= \"%s\"", yespower_params.pers );
applog( LOG_NOTICE,"Key length= %d\n", yespower_params.perslen );

View File

@@ -76,7 +76,7 @@ typedef struct {
unsigned char uc[32];
} yespower_binary_t __attribute__ ((aligned (64)));
yespower_params_t yespower_params;
extern yespower_params_t yespower_params;
//SHA256_CTX sha256_prehash_ctx;
extern __thread SHA256_CTX sha256_prehash_ctx;

View File

@@ -9,15 +9,15 @@ rm cpuminer-avx512-sha-vaes cpuminer-avx512 cpuminer-avx2 cpuminer-aes-avx cpumi
make distclean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=icelake-client -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=icelake-client -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-avx512-sha-vaes.exe
strip -s cpuminer
mv cpuminer cpuminer-avx512-sha-vaes
CFLAGS="-O3 -march=skylake-avx512 -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=skylake-avx512 -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-avx512.exe
strip -s cpuminer
@@ -26,8 +26,8 @@ mv cpuminer cpuminer-avx512
make clean || echo clean
rm -f config.status
# GCC 9 doesn't include AES with core-avx2
CFLAGS="-O3 -march=core-avx2 -maes -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=core-avx2 -maes -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-avx2.exe
strip -s cpuminer
@@ -35,17 +35,17 @@ mv cpuminer cpuminer-avx2
make clean || echo clean
rm -f config.status
CFLAGS="-O3 -march=corei7-avx -maes -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=corei7-avx -maes -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-avx.exe
strip -s cpuminer
mv cpuminer cpuminer-aes-avx
mv cpuminer cpuminer-avx
make clean || echo clean
rm -f config.status
CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -maes -msse4.2 -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-aes-sse42.exe
strip -s cpuminer
@@ -53,8 +53,8 @@ mv cpuminer cpuminer-aes-sse42
#make clean || echo clean
#rm -f config.status
#CFLAGS="-O3 -march=corei7 -Wall" ./configure --with-curl
#make -j 16
#CFLAGS="-O3 -march=corei7 -Wall -fno-common" ./configure --with-curl
#make -j 8
#strip -s cpuminer.exe
#mv cpuminer.exe cpuminer-sse42.exe
#strip -s cpuminer
@@ -62,8 +62,8 @@ mv cpuminer cpuminer-aes-sse42
#make clean || echo clean
#rm -f config.status
#CFLAGS="-O3 -march=core2 -Wall" ./configure --with-curl
#make -j 16
#CFLAGS="-O3 -march=core2 -Wall -fno-common" ./configure --with-curl
#make -j 8
#strip -s cpuminer.exe
#mv cpuminer.exe cpuminer-ssse3.exe
#strip -s cpuminer
@@ -71,8 +71,8 @@ mv cpuminer cpuminer-aes-sse42
make clean || echo clean
rm -f config.status
CFLAGS="-O3 -msse2 -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -msse2 -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-sse2.exe
strip -s cpuminer
@@ -80,8 +80,8 @@ mv cpuminer cpuminer-sse2
make clean || echo done
rm -f config.status
CFLAGS="-O3 -march=znver1 -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=znver1 -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe cpuminer-zen.exe
strip -s cpuminer
@@ -89,8 +89,8 @@ mv cpuminer cpuminer-zen
make clean || echo done
rm -f config.status
CFLAGS="-O3 -march=native -Wall" ./configure --with-curl
make -j 16
CFLAGS="-O3 -march=native -Wall -fno-common" ./configure --with-curl
make -j 8
strip -s cpuminer.exe
strip -s cpuminer

27
build-no-common.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
#if [ "$OS" = "Windows_NT" ]; then
# ./mingw64.sh
# exit 0
#fi
# Linux build
make distclean || echo clean
rm -f config.status
./autogen.sh || echo done
# Ubuntu 10.04 (gcc 4.4)
# extracflags="-O3 -march=native -Wall -D_REENTRANT -funroll-loops -fvariable-expansion-in-unroller -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16"
# Debian 7.7 / Ubuntu 14.04 (gcc 4.7+)
#extracflags="$extracflags -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores"
#CFLAGS="-O3 -march=native -Wall" ./configure --with-curl --with-crypto=$HOME/usr
CFLAGS="-O3 -march=native -Wall -fno-common" ./configure --with-curl
#CFLAGS="-O3 -march=native -Wall" CXXFLAGS="$CFLAGS -std=gnu++11" ./configure --with-curl
make -j 4
strip -s cpuminer

View File

@@ -3,8 +3,8 @@
# imake clean and rm all the targetted executables.
# tips to users.
rm cpuminer-avx512-sha-vaes cpuminer-avx512 cpuminer-avx2 cpuminer-aes-avx cpuminer-aes-sse42 cpuminer-sse2 cpuminer-zen > /dev/null
rm cpuminer-avx512-sha-vaes cpuminer-avx512 cpuminer-avx2 cpuminer-avx cpuminer-aes-sse42 cpuminer-sse2 cpuminer-zen > /dev/null
rm cpuminer-avx512-sha-vaes.exe cpuminer-avx512.exe cpuminer-avx2.exe cpuminer-aes-avx.exe cpuminer-aes-sse42.exe cpuminer-sse2.exe cpuminer-zen.exe > /dev/null
rm cpuminer-avx512-sha-vaes.exe cpuminer-avx512.exe cpuminer-avx2.exe cpuminer-avx.exe cpuminer-aes-sse42.exe cpuminer-sse2.exe cpuminer-zen.exe > /dev/null
make distclean > /dev/null

20
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.13.1.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.13.1.1.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cpuminer-opt'
PACKAGE_TARNAME='cpuminer-opt'
PACKAGE_VERSION='3.13.1'
PACKAGE_STRING='cpuminer-opt 3.13.1'
PACKAGE_VERSION='3.13.1.1'
PACKAGE_STRING='cpuminer-opt 3.13.1.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1332,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures cpuminer-opt 3.13.1 to adapt to many kinds of systems.
\`configure' configures cpuminer-opt 3.13.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1404,7 +1404,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cpuminer-opt 3.13.1:";;
short | recursive ) echo "Configuration of cpuminer-opt 3.13.1.1:";;
esac
cat <<\_ACEOF
@@ -1509,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cpuminer-opt configure 3.13.1
cpuminer-opt configure 3.13.1.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cpuminer-opt $as_me 3.13.1, which was
It was created by cpuminer-opt $as_me 3.13.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2993,7 +2993,7 @@ fi
# Define the identity of the package.
PACKAGE='cpuminer-opt'
VERSION='3.13.1'
VERSION='3.13.1.1'
cat >>confdefs.h <<_ACEOF
@@ -6690,7 +6690,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cpuminer-opt $as_me 3.13.1, which was
This file was extended by cpuminer-opt $as_me 3.13.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6756,7 +6756,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
cpuminer-opt config.status 3.13.1
cpuminer-opt config.status 3.13.1.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@@ -1,4 +1,4 @@
AC_INIT([cpuminer-opt], [3.13.1])
AC_INIT([cpuminer-opt], [3.13.1.1])
AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM

View File

@@ -55,9 +55,12 @@
#endif
// GCC 9 warning sysctl.h is deprecated
#if ( __GNUC__ < 9 )
#include <sys/sysctl.h>
#endif
#endif
#endif // HAVE_SYS_SYSCTL_H
#endif // _MSC_VER ELSE
#ifndef WIN32
#include <sys/resource.h>

12
miner.h
View File

@@ -324,12 +324,12 @@ int timeval_subtract( struct timeval *result, struct timeval *x,
#define EXP16 65536.
#define EXP32 4294967296.
const long double exp32; // 2**32
const long double exp48; // 2**48
const long double exp64; // 2**64
const long double exp96; // 2**96
const long double exp128; // 2**128
const long double exp160; // 2**160
extern const long double exp32; // 2**32
extern const long double exp48; // 2**48
extern const long double exp64; // 2**64
extern const long double exp96; // 2**96
extern const long double exp128; // 2**128
extern const long double exp160; // 2**160
bool fulltest( const uint32_t *hash, const uint32_t *target );
bool valid_hash( const void*, const void* );

View File

@@ -44,14 +44,14 @@ cp $LOCAL_LIB/curl/lib/.libs/libcurl-4.dll release/
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=icelake-client -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-avx512-sha-vaes.exe
make clean || echo clean
rm -f config.status
CFLAGS="-O3 -march=znver1 -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-zen.exe
@@ -60,7 +60,7 @@ make clean || echo clean
rm -f config.status
CFLAGS="-O3 -march=skylake-avx512 -Wall" ./configure $CONFIGURE_ARGS
#CFLAGS="-O3 -march=skylake-avx512 -Wall -fno-asynchronous-unwind-tables" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-avx512.exe
@@ -68,7 +68,7 @@ make clean || echo clean
rm -f config.status
# GCC 9 doesn't include AES in -march=core-avx2
CFLAGS="-O3 -march=core-avx2 -maes -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-avx2.exe
@@ -76,7 +76,7 @@ make clean || echo clean
rm -f config.status
# -march=corei7-avx still includes aes, but just in case
CFLAGS="-O3 -march=corei7-avx -maes -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-avx.exe
@@ -85,7 +85,7 @@ make clean || echo clean
rm -f config.status
CFLAGS="-O3 -march=westmere -Wall" ./configure $CONFIGURE_ARGS
#CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-aes-sse42.exe
@@ -107,7 +107,7 @@ mv cpuminer.exe release/cpuminer-aes-sse42.exe
make clean || echo clean
rm -f config.status
CFLAGS="-O3 -msse2 -Wall" ./configure $CONFIGURE_ARGS
make -j 16
make -j 8
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-sse2.exe
make clean || echo clean