diff options
Diffstat (limited to 'cpu-miner.c')
-rw-r--r-- | cpu-miner.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpu-miner.c b/cpu-miner.c index dffc7ed..fd64a0c 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -38,6 +38,7 @@ enum sha256_algos { ALGO_VIA, /* VIA padlock */ ALGO_CRYPTOPP, /* Crypto++ (C) */ ALGO_CRYPTOPP_ASM32, /* Crypto++ 32-bit assembly */ + ALGO_SSE2_64, /* SSE2 for x86_64 */ }; static const char *algo_names[] = { @@ -52,6 +53,9 @@ static const char *algo_names[] = { #ifdef WANT_CRYPTOPP_ASM32 [ALGO_CRYPTOPP_ASM32] = "cryptopp_asm32", #endif +#ifdef WANT_X8664_SSE2 + [ALGO_SSE2_64] = "sse2_64", +#endif }; bool opt_debug = false; @@ -94,6 +98,9 @@ static struct option_help options_help[] = { #ifdef WANT_CRYPTOPP_ASM32 "\n\tcryptopp_asm32\tCrypto++ 32-bit assembler implementation" #endif +#ifdef WANT_X8664_SSE2 + "\n\tsse2_64\t\tSSE2 implementation for x86_64 machines" +#endif }, { "quiet", @@ -331,6 +338,18 @@ static void *miner_thread(void *thr_id_int) max_nonce, &hashes_done); break; +#ifdef WANT_X8664_SSE2 + case ALGO_SSE2_64: { + unsigned int rc5 = + scanhash_sse2_64(work.midstate, work.data + 64, + work.hash1, work.hash, + work.target, + max_nonce, &hashes_done); + rc = (rc5 == -1) ? false : true; + } + break; +#endif + #ifdef WANT_SSE2_4WAY case ALGO_4WAY: { unsigned int rc4 = |