aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/modules.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-10 20:32:26 +0000
committerlloyd <[email protected]>2008-11-10 20:32:26 +0000
commit3f7aed2d08446b59f9cab7efe25fcc746e4ef3a7 (patch)
treebf1ca9de63996c256193b066aca57c2c152ea1e7 /src/libstate/modules.cpp
parent9d529fb82a301f14b9cb0efb6c69c1fdb9c984e2 (diff)
Split the assembly implementations of the hash functions into asm_engine.
This still is not an ideal split, since for SHA-1 we have both SSE2 and x86/x86-64 asm. Currently we continue to punt to SSE2 if enabled, otherwise asm, since the SSE2 seems to be the fastest thing going in my tests so far.
Diffstat (limited to 'src/libstate/modules.cpp')
-rw-r--r--src/libstate/modules.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libstate/modules.cpp b/src/libstate/modules.cpp
index 8db202ddf..81508116d 100644
--- a/src/libstate/modules.cpp
+++ b/src/libstate/modules.cpp
@@ -5,7 +5,6 @@
#include <botan/modules.h>
#include <botan/defalloc.h>
-#include <botan/def_eng.h>
#include <botan/parsing.h>
#if defined(BOTAN_HAS_MUTEX_PTHREAD)
@@ -24,6 +23,13 @@
#include <botan/mmap_mem.h>
#endif
+// Default engine
+#include <botan/def_eng.h>
+
+#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
+ #include <botan/asm_engine.h>
+#endif
+
#if defined(BOTAN_HAS_ENGINE_GNU_MP)
#include <botan/eng_gmp.h>
#endif
@@ -107,6 +113,10 @@ std::vector<Engine*> Builtin_Modules::engines() const
#if defined(BOTAN_HAS_ENGINE_OPENSSL)
engines.push_back(new OpenSSL_Engine);
#endif
+
+#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
+ engines.push_back(new Assembler_Engine);
+#endif
}
engines.push_back(new Default_Engine);