diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2010-07-28 23:45:28 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2010-07-28 23:45:28 +0000 |
commit | dd6b53792ce52a8e10d85d4420f3946d87419d44 (patch) | |
tree | bde360b98068b9d3a00a87fe84dd56f2e58edf53 /bench.cpp | |
parent | ee715577df497906aa90034572677835e4702a76 (diff) | |
download | cryptopp-dd6b53792ce52a8e10d85d4420f3946d87419d44.tar.gz |
fix compile on Sun CC
fix compile for non-x86 CPUs
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@511 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'bench.cpp')
-rw-r--r-- | bench.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -243,9 +243,11 @@ void BenchmarkAll(double t, double hertz) cout << "<THEAD><TR><TH>Algorithm<TH>MiB/Second" << cpb << "<TH>Microseconds to<br>Setup Key and IV" << cpk << endl; cout << "\n<TBODY style=\"background: yellow\">"; - if (CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE && HasCLMUL()) +#if CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE + if (HasCLMUL()) BenchMarkByName2<AuthenticatedSymmetricCipher, AuthenticatedSymmetricCipher>("AES/GCM", 0, "AES/GCM"); else +#endif { BenchMarkByName2<AuthenticatedSymmetricCipher, AuthenticatedSymmetricCipher>("AES/GCM", 0, "AES/GCM (2K tables)", MakeParameters(Name::TableSize(), 2048)); BenchMarkByName2<AuthenticatedSymmetricCipher, AuthenticatedSymmetricCipher>("AES/GCM", 0, "AES/GCM (64K tables)", MakeParameters(Name::TableSize(), 64*1024)); @@ -254,9 +256,11 @@ void BenchmarkAll(double t, double hertz) BenchMarkByName2<AuthenticatedSymmetricCipher, AuthenticatedSymmetricCipher>("AES/EAX"); cout << "\n<TBODY style=\"background: white\">"; - if (CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE && HasCLMUL()) +#if CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE + if (HasCLMUL()) BenchMarkByName2<AuthenticatedSymmetricCipher, MessageAuthenticationCode>("AES/GCM", 0, "GMAC(AES)"); else +#endif { BenchMarkByName2<AuthenticatedSymmetricCipher, MessageAuthenticationCode>("AES/GCM", 0, "GMAC(AES) (2K tables)", MakeParameters(Name::TableSize(), 2048)); BenchMarkByName2<AuthenticatedSymmetricCipher, MessageAuthenticationCode>("AES/GCM", 0, "GMAC(AES) (64K tables)", MakeParameters(Name::TableSize(), 64*1024)); |