aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-31 12:01:27 -0500
committerJack Lloyd <[email protected]>2018-12-31 12:01:27 -0500
commit0218d580ca79cff22c6964007d18be3751c85bc8 (patch)
tree034173b6dc59ec9e9c13974aa34c1496dd5dab6f /src
parentefffd951c7794739e58c998379de3e6a8e27bdd4 (diff)
Clean up define for inline asm
Also fix xlc macro
Diffstat (limited to 'src')
-rw-r--r--src/lib/utils/compiler.h8
-rw-r--r--src/lib/utils/rotate.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h
index 0a2503513..4f736ae6c 100644
--- a/src/lib/utils/compiler.h
+++ b/src/lib/utils/compiler.h
@@ -13,8 +13,12 @@
#define BOTAN_UTIL_COMPILER_FLAGS_H_
/* Should we use GCC-style inline assembler? */
-#if !defined(BOTAN_USE_GCC_INLINE_ASM) && (defined(__GNUC__) || defined(__xlc__) || defined(__SUNPRO_CC))
- #define BOTAN_USE_GCC_INLINE_ASM 1
+#if defined(BOTAN_BUILD_COMPILER_IS_GCC) || \
+ defined(BOTAN_BUILD_COMPILER_IS_CLANG) || \
+ defined(BOTAN_BUILD_COMPILER_IS_XLC) || \
+ defined(BOTAN_BUILD_COMPILER_IS_SUN_STUDIO)
+
+ #define BOTAN_USE_GCC_INLINE_ASM
#endif
/**
diff --git a/src/lib/utils/rotate.h b/src/lib/utils/rotate.h
index d927b93b7..16a44c71e 100644
--- a/src/lib/utils/rotate.h
+++ b/src/lib/utils/rotate.h
@@ -60,7 +60,7 @@ inline T rotr_var(T input, size_t rot)
return rot ? static_cast<T>((input >> rot) | (input << (sizeof(T)*8 - rot))) : input;
}
-#if BOTAN_USE_GCC_INLINE_ASM
+#if defined(BOTAN_USE_GCC_INLINE_ASM)
#if defined(BOTAN_TARGET_ARCH_IS_X86_64) || defined(BOTAN_TARGET_ARCH_IS_X86_32)