aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py17
-rw-r--r--src/block/noekeon_simd/info.txt2
-rw-r--r--src/block/serpent_simd/info.txt2
-rw-r--r--src/block/xtea_simd/info.txt2
-rw-r--r--src/engine/simd_engine/info.txt2
-rw-r--r--src/simd/info.txt (renamed from src/utils/simd_32/info.txt)7
-rw-r--r--src/simd/simd_32.h (renamed from src/utils/simd_32/simd_32.h)17
-rw-r--r--src/simd/simd_altivec/info.txt9
-rw-r--r--src/simd/simd_altivec/simd_altivec.h (renamed from src/utils/simd_32/simd_altivec.h)0
-rw-r--r--src/simd/simd_scalar/info.txt7
-rw-r--r--src/simd/simd_scalar/simd_scalar.h (renamed from src/utils/simd_32/simd_scalar.h)0
-rw-r--r--src/simd/simd_sse2/info.txt9
-rw-r--r--src/simd/simd_sse2/simd_sse2.h (renamed from src/utils/simd_32/simd_sse.h)0
13 files changed, 49 insertions, 25 deletions
diff --git a/configure.py b/configure.py
index 1c2bd211b..8294b25fa 100755
--- a/configure.py
+++ b/configure.py
@@ -1249,15 +1249,16 @@ def choose_modules_to_use(modules, archinfo, options):
logging.info('Skipping, %s - %s' % (
reason, ' '.join(disabled_mods)))
- logging.info('Using MP module ' +
- ' '.join(filter(lambda m: m.startswith('mp_'), to_load)))
-
- logging.debug('Loading modules %s', ' '.join(sorted(to_load)))
-
- for mod in to_load:
+ for mod in sorted(to_load):
+ if mod.startswith('mp_'):
+ logging.info('Using MP module ' + mod)
+ if mod.startswith('simd_') and mod != 'simd_engine':
+ logging.info('Using SIMD module ' + mod)
if modules[mod].comment:
logging.info('%s: %s' % (mod, modules[mod].comment))
+ logging.debug('Loading modules %s', ' '.join(sorted(to_load)))
+
return [modules[mod] for mod in to_load]
"""
@@ -1644,9 +1645,7 @@ def main(argv = None):
if options.compiler is None:
if options.os == 'windows':
- if have_program('cl'):
- options.compiler = 'msvc'
- elif have_program('g++'):
+ if have_program('g++') and not have_program('cl'):
options.compiler = 'gcc'
else:
options.compiler = 'msvc'
diff --git a/src/block/noekeon_simd/info.txt b/src/block/noekeon_simd/info.txt
index b73954cff..deac80702 100644
--- a/src/block/noekeon_simd/info.txt
+++ b/src/block/noekeon_simd/info.txt
@@ -2,6 +2,6 @@ define NOEKEON_SIMD
<requires>
noekeon
-simd_32
+simd
simd_engine
</requires>
diff --git a/src/block/serpent_simd/info.txt b/src/block/serpent_simd/info.txt
index b3bf34972..b6628d1d4 100644
--- a/src/block/serpent_simd/info.txt
+++ b/src/block/serpent_simd/info.txt
@@ -2,7 +2,7 @@ define SERPENT_SIMD
<requires>
serpent
-simd_32
+simd
simd_engine
</requires>
diff --git a/src/block/xtea_simd/info.txt b/src/block/xtea_simd/info.txt
index 5a8445b35..c16bfa2fa 100644
--- a/src/block/xtea_simd/info.txt
+++ b/src/block/xtea_simd/info.txt
@@ -2,6 +2,6 @@ define XTEA_SIMD
<requires>
xtea
-simd_32
+simd
simd_engine
</requires>
diff --git a/src/engine/simd_engine/info.txt b/src/engine/simd_engine/info.txt
index aaf218561..229b1daaf 100644
--- a/src/engine/simd_engine/info.txt
+++ b/src/engine/simd_engine/info.txt
@@ -11,5 +11,5 @@ simd_engine.h
</header:internal>
<requires>
-simd_32
+simd
</requires>
diff --git a/src/utils/simd_32/info.txt b/src/simd/info.txt
index 362e90235..d0601b141 100644
--- a/src/utils/simd_32/info.txt
+++ b/src/simd/info.txt
@@ -2,7 +2,8 @@ define SIMD_32
<header:internal>
simd_32.h
-simd_sse.h
-simd_scalar.h
-simd_altivec.h
</header:internal>
+
+<requires>
+simd_sse2|simd_altivec|simd_scalar
+</requires>
diff --git a/src/utils/simd_32/simd_32.h b/src/simd/simd_32.h
index e172fa919..4ef0cea85 100644
--- a/src/utils/simd_32/simd_32.h
+++ b/src/simd/simd_32.h
@@ -1,6 +1,6 @@
/*
* Lightweight wrappers for SIMD operations
-* (C) 2009 Jack Lloyd
+* (C) 2009,2011 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -9,23 +9,22 @@
#define BOTAN_SIMD_32_H__
#include <botan/types.h>
-#include <botan/rotate.h>
-#if defined(BOTAN_TARGET_CPU_HAS_SSE2) && !defined(BOTAN_NO_SSE_INTRINSICS)
-
- #include <botan/internal/simd_sse.h>
+#if defined(BOTAN_HAS_SIMD_SSE2)
+ #include <botan/internal/simd_sse2.h>
namespace Botan { typedef SIMD_SSE2 SIMD_32; }
-#elif defined(BOTAN_TARGET_CPU_HAS_ALTIVEC)
-
+#elif defined(BOTAN_HAS_SIMD_ALTIVEC)
#include <botan/internal/simd_altivec.h>
namespace Botan { typedef SIMD_Altivec SIMD_32; }
-#else
-
+#elif defined(BOTAN_HAS_SIMD_SCALAR)
#include <botan/internal/simd_scalar.h>
namespace Botan { typedef SIMD_Scalar SIMD_32; }
+#else
+ #error "No SIMD module defined"
+
#endif
#endif
diff --git a/src/simd/simd_altivec/info.txt b/src/simd/simd_altivec/info.txt
new file mode 100644
index 000000000..aa2f01c2d
--- /dev/null
+++ b/src/simd/simd_altivec/info.txt
@@ -0,0 +1,9 @@
+define SIMD_ALTIVEC
+
+need_isa altivec
+
+load_on dep
+
+<header:internal>
+simd_altivec.h
+</header:internal>
diff --git a/src/utils/simd_32/simd_altivec.h b/src/simd/simd_altivec/simd_altivec.h
index 4c412ddec..4c412ddec 100644
--- a/src/utils/simd_32/simd_altivec.h
+++ b/src/simd/simd_altivec/simd_altivec.h
diff --git a/src/simd/simd_scalar/info.txt b/src/simd/simd_scalar/info.txt
new file mode 100644
index 000000000..6817eab80
--- /dev/null
+++ b/src/simd/simd_scalar/info.txt
@@ -0,0 +1,7 @@
+define SIMD_SCALAR
+
+load_on dep
+
+<header:internal>
+simd_scalar.h
+</header:internal>
diff --git a/src/utils/simd_32/simd_scalar.h b/src/simd/simd_scalar/simd_scalar.h
index 2c68622af..2c68622af 100644
--- a/src/utils/simd_32/simd_scalar.h
+++ b/src/simd/simd_scalar/simd_scalar.h
diff --git a/src/simd/simd_sse2/info.txt b/src/simd/simd_sse2/info.txt
new file mode 100644
index 000000000..e56792491
--- /dev/null
+++ b/src/simd/simd_sse2/info.txt
@@ -0,0 +1,9 @@
+define SIMD_SSE2
+
+need_isa sse2
+
+load_on dep
+
+<header:internal>
+simd_sse2.h
+</header:internal>
diff --git a/src/utils/simd_32/simd_sse.h b/src/simd/simd_sse2/simd_sse2.h
index 61fce99a9..61fce99a9 100644
--- a/src/utils/simd_32/simd_sse.h
+++ b/src/simd/simd_sse2/simd_sse2.h