aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-31 08:52:14 -0400
committerJack Lloyd <[email protected]>2019-08-31 08:52:14 -0400
commit098b61c3a0ef4c594773ebf84533a81205115ddc (patch)
tree4b427bd350a051413d5bfea451011f52d4e67deb /src/lib/utils
parentbaac1a8497533c1f2f0e699cc6ddc5f8b263adfc (diff)
Add BOTAN_FORCE_INLINE and use it in BLAKE2b
Closes #2089
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/compiler.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h
index 5cf1f1f41..503cd3754 100644
--- a/src/lib/utils/compiler.h
+++ b/src/lib/utils/compiler.h
@@ -178,6 +178,23 @@
#endif
/*
+* Define BOTAN_FORCE_INLINE
+*/
+#if !defined(BOTAN_FORCE_INLINE)
+
+ #if defined (__clang__) || defined (__GNUC__)
+ #define BOTAN_FORCE_INLINE __attribute__ ((__always_inline__))
+
+ #elif defined (_MSC_VER)
+ #define BOTAN_FORCE_INLINE __forceinline
+
+ #else
+ #define BOTAN_FORCE_INLINE inline
+ #endif
+
+#endif
+
+/*
* Define BOTAN_PARALLEL_SIMD_FOR
*/
#if !defined(BOTAN_PARALLEL_SIMD_FOR)