aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/bswap.h
diff options
context:
space:
mode:
authorsimon <[email protected]>2015-05-31 19:54:54 +0000
committerlloyd <[email protected]>2015-05-31 19:54:54 +0000
commitc1d4458aa3c0af01a77a58997f8fdf8648d7ddef (patch)
tree303bb2f4e8cc5404427757fba1c35abe7bc257a3 /src/lib/utils/bswap.h
parentadb77e960969d0636349db251c2035689457d224 (diff)
Avoid 0-defining BOTAN_USE_GCC_INLINE_ASM
GH #103
Diffstat (limited to 'src/lib/utils/bswap.h')
-rw-r--r--src/lib/utils/bswap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/utils/bswap.h b/src/lib/utils/bswap.h
index 54f58a01d..6773b196d 100644
--- a/src/lib/utils/bswap.h
+++ b/src/lib/utils/bswap.h
@@ -41,13 +41,13 @@ inline u32bit reverse_bytes(u32bit val)
*/
return __builtin_bswap32(val);
-#elif BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
+#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
// GCC-style inline assembly for x86 or x86-64
asm("bswapl %0" : "=r" (val) : "0" (val));
return val;
-#elif BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY)
+#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY)
asm ("eor r3, %1, %1, ror #16\n\t"
"bic r3, r3, #0x00FF0000\n\t"
@@ -84,7 +84,7 @@ inline u64bit reverse_bytes(u64bit val)
// GCC intrinsic added in 4.3, works for a number of CPUs
return __builtin_bswap64(val);
-#elif BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_ARCH_IS_X86_64)
+#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_ARCH_IS_X86_64)
// GCC-style inline assembly for x86-64
asm("bswapq %0" : "=r" (val) : "0" (val));
return val;