diff options
author | Jeff Garzik <jeff@garzik.org> | 2010-12-06 20:14:58 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-12-06 20:14:58 -0500 |
commit | f1fcd76ba7514003135f3d76ef2308b86b754507 (patch) | |
tree | 4c5a16ec64dc04d65031639d33821c787da44aed /cpu-miner.c | |
parent | 1a1a018627d11ac7475f0c27e2cbdb7f248314f2 (diff) |
sha256_cryptopp: Add crypto++ 32-bit assembly implementation
Diffstat (limited to 'cpu-miner.c')
-rw-r--r-- | cpu-miner.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpu-miner.c b/cpu-miner.c index 70974c3..db1fd57 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -39,7 +39,8 @@ enum sha256_algos { ALGO_C, /* plain C */ ALGO_4WAY, /* parallel SSE2 */ ALGO_VIA, /* VIA padlock */ - ALGO_CRYPTOPP, /* Crypto++ */ + ALGO_CRYPTOPP, /* Crypto++ (C) */ + ALGO_CRYPTOPP_ASM32, /* Crypto++ 32-bit assembly */ }; static const char *algo_names[] = { @@ -51,6 +52,9 @@ static const char *algo_names[] = { [ALGO_VIA] = "via", #endif [ALGO_CRYPTOPP] = "cryptopp", +#ifdef WANT_CRYPTOPP_ASM32 + [ALGO_CRYPTOPP_ASM32] = "cryptopp_asm32", +#endif }; bool opt_debug = false; @@ -82,6 +86,9 @@ static struct option_help options_help[] = { "\n\tvia\t\tVIA padlock implementation" #endif "\n\tcryptopp\tCrypto++ library implementation (EXPERIMENTAL)" +#ifdef WANT_CRYPTOPP_ASM32 + "\n\tcryptopp_asm32\tCrypto++ library implementation (EXPERIMENTAL)" +#endif }, { "debug", @@ -294,6 +301,16 @@ static void *miner_thread(void *thr_id_int) work.hash1, work.hash, &hashes_done); break; +#ifdef WANT_CRYPTOPP_ASM32 + case ALGO_CRYPTOPP_ASM32: + rc = scanhash_asm32(work.midstate, work.data + 64, + work.hash1, work.hash, &hashes_done); + break; +#endif + + default: + /* should never happen */ + return NULL; } hashmeter(thr_id, &tv_start, hashes_done); |