aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/libstate.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 04:55:51 +0000
committerlloyd <[email protected]>2008-11-11 04:55:51 +0000
commit1a3ab9bf2aba7910e0cfff760635b68589089888 (patch)
tree66ce9d822fe5f8163d60b86ffe252be639503645 /src/libstate/libstate.cpp
parent54f82a91844808eb1612080427fb64d44c486aad (diff)
Split asm_engine into three engines (ia32, amd64, sse2). This allows
them to be individually requested as providers on lookup.
Diffstat (limited to 'src/libstate/libstate.cpp')
-rw-r--r--src/libstate/libstate.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index 531ae7735..1e5f7aa8b 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -26,8 +26,16 @@
#include <botan/mmap_mem.h>
#endif
-#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
- #include <botan/asm_engine.h>
+#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER)
+ #include <botan/eng_ia32.h>
+#endif
+
+#if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER)
+ #include <botan/eng_amd64.h>
+#endif
+
+#if defined(BOTAN_HAS_ENGINE_SSE2_ASSEMBLER)
+ #include <botan/eng_sse2.h>
#endif
#if defined(BOTAN_HAS_ENGINE_GNU_MP)
@@ -269,19 +277,28 @@ void Library_State::initialize(bool thread_safe)
m_algorithm_factory = new Algorithm_Factory(*mutex_factory);
-#if defined(BOTAN_HAS_ENGINE_GNU_MP)
- m_algorithm_factory->add_engine(new GMP_Engine);
+ m_algorithm_factory->add_engine(new Default_Engine);
+
+#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER)
+ m_algorithm_factory->add_engine(new IA32_Assembler_Engine);
+#endif
+
+#if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER)
+ m_algorithm_factory->add_engine(new AMD64_Assembler_Engine);
+#endif
+
+#if defined(BOTAN_HAS_ENGINE_SSE2_ASSEMBLER)
+ m_algorithm_factory->add_engine(new SSE2_Assembler_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_OPENSSL)
m_algorithm_factory->add_engine(new OpenSSL_Engine);
#endif
-#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
- m_algorithm_factory->add_engine(new Assembler_Engine);
+#if defined(BOTAN_HAS_ENGINE_GNU_MP)
+ m_algorithm_factory->add_engine(new GMP_Engine);
#endif
- m_algorithm_factory->add_engine(new Default_Engine);
}
/**