mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v23.5
This commit is contained in:
@@ -33,7 +33,7 @@ int scanhash_sha256d_sha( struct work *work, uint32_t max_nonce,
|
||||
const int thr_id = mythr->id;
|
||||
const bool bench = opt_benchmark;
|
||||
const v128_t shuf_bswap32 =
|
||||
v128_set_64( 0x0c0d0e0f08090a0bULL, 0x0405060700010203ULL );
|
||||
v128_set64( 0x0c0d0e0f08090a0bULL, 0x0405060700010203ULL );
|
||||
|
||||
// hash first 64 byte block of data
|
||||
sha256_transform_le( mstatea, pdata, sha256_iv );
|
||||
@@ -112,8 +112,7 @@ int scanhash_sha256d_neon_sha2( struct work *work, uint32_t max_nonce,
|
||||
uint32_t block2b[16] __attribute__ ((aligned (64)));
|
||||
uint32_t hasha[8] __attribute__ ((aligned (32)));
|
||||
uint32_t hashb[8] __attribute__ ((aligned (32)));
|
||||
uint32_t mstatea[8] __attribute__ ((aligned (32)));
|
||||
uint32_t sstate[8] __attribute__ ((aligned (32)));
|
||||
uint32_t mstate[8] __attribute__ ((aligned (32)));
|
||||
uint32_t *pdata = work->data;
|
||||
uint32_t *ptarget = work->target;
|
||||
const uint32_t first_nonce = pdata[19];
|
||||
@@ -121,11 +120,9 @@ int scanhash_sha256d_neon_sha2( struct work *work, uint32_t max_nonce,
|
||||
uint32_t n = first_nonce;
|
||||
const int thr_id = mythr->id;
|
||||
const bool bench = opt_benchmark;
|
||||
const v128_t shuf_bswap32 =
|
||||
v128_set_64( 0x0c0d0e0f08090a0bULL, 0x0405060700010203ULL );
|
||||
|
||||
// hash first 64 byte block of data
|
||||
sha256_transform_le( mstatea, pdata, sha256_iv );
|
||||
sha256_transform_le( mstate, pdata, sha256_iv );
|
||||
|
||||
// fill & pad second bock without nonce
|
||||
memcpy( block1a, pdata + 16, 12 );
|
||||
@@ -149,10 +146,10 @@ int scanhash_sha256d_neon_sha2( struct work *work, uint32_t max_nonce,
|
||||
// Insert nonce for second block
|
||||
block1a[3] = n;
|
||||
block1b[3] = n+1;
|
||||
sha256_neon2x_transform_le( block2a, block2b, block1a, block1b,
|
||||
mstatea, mstatea );
|
||||
sha256_neon_x2sha_transform_le( block2a, block2b, block1a, block1b,
|
||||
mstate, mstate );
|
||||
|
||||
sha256_neon2x_transform_le( hasha, hashb, block2a, block2b,
|
||||
sha256_neon_x2sha_transform_le( hasha, hashb, block2a, block2b,
|
||||
sha256_iv, sha256_iv );
|
||||
|
||||
if ( unlikely( bswap_32( hasha[7] ) <= ptarget[7] ) )
|
||||
@@ -388,7 +385,7 @@ int scanhash_sha256d_4way( struct work *work, const uint32_t max_nonce,
|
||||
for ( int i = 0; i < 19; i++ )
|
||||
vdata[i] = v128_32( pdata[i] );
|
||||
|
||||
*noncev = v128_set_32( n+ 3, n+ 2, n+1, n );
|
||||
*noncev = v128_set32( n+ 3, n+ 2, n+1, n );
|
||||
|
||||
vdata[16+4] = last_byte;
|
||||
v128_memset_zero( vdata+16 + 5, 10 );
|
||||
|
Reference in New Issue
Block a user