aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-17 18:17:20 +0000
committerlloyd <[email protected]>2009-09-17 18:17:20 +0000
commit87e25c7e270a52fda8c39296be01918bb6aa75d6 (patch)
tree1d8086ed55110cfb21089fc4c1c7a7f2112f1921
parent63fb872cb36a44a852ec33133de7c242bd44427e (diff)
Fix macro generation + checks in configure.py and bswap.h. Had the effect
of preventing the bswap optimizations from being used. :(
-rwxr-xr-xconfigure.py4
-rw-r--r--src/utils/bswap.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/configure.py b/configure.py
index 6d7647812..676fa11f5 100755
--- a/configure.py
+++ b/configure.py
@@ -419,7 +419,7 @@ class ArchInfo(object):
elif self.endian != None:
macros.append('TARGET_CPU_IS_%s_ENDIAN' % (self.endian.upper()))
- macros.append('TARGET_UNALIGNED_LOADSTORE_OK %d' % (self.unaligned_ok))
+ macros.append('TARGET_UNALIGNED_LOADSTOR_OK %d' % (self.unaligned_ok))
return macros
@@ -1018,7 +1018,7 @@ def main(argv = None):
(modules, archinfo, ccinfo, osinfo) = load_info_files(options)
if options.compiler is None:
- if platform.system().lower() == 'windows':
+ if options.os == 'windows':
options.compiler = 'msvc'
else:
options.compiler = 'gcc'
diff --git a/src/utils/bswap.h b/src/utils/bswap.h
index 08095b319..ec1e81435 100644
--- a/src/utils/bswap.h
+++ b/src/utils/bswap.h
@@ -24,7 +24,7 @@ inline u16bit reverse_bytes(u16bit input)
inline u32bit reverse_bytes(u32bit input)
{
-#if BOTAN_COMPILER_HAS_GCC_INLINE_ASM && \
+#if BOTAN_USE_GCC_INLINE_ASM && \
(defined(BOTAN_TARGET_ARCH_IS_IA32) || defined(BOTAN_TARGET_ARCH_IS_AMD64))
/* GCC-style inline assembly for x86 or x86-64 */
@@ -45,7 +45,7 @@ inline u32bit reverse_bytes(u32bit input)
inline u64bit reverse_bytes(u64bit input)
{
-#if BOTAN_COMPILER_HAS_GCC_INLINE_ASM && defined(BOTAN_TARGET_ARCH_IS_AMD64)
+#if BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_ARCH_IS_AMD64)
asm("bswapq %0" : "=r" (input) : "0" (input));
return input;
#else