diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-05-20 17:59:21 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-05-20 17:59:21 -0400 |
commit | bc0f943c6bfb3cf1dad50154953722d325d6b998 (patch) | |
tree | e370ffdbf275570a77f2e9178aeecdea83981c25 /cpu.h | |
parent | 8c02c6058440c23e7a860e0f56447f8e3bc580b9 (diff) | |
download | cryptopp-git-bc0f943c6bfb3cf1dad50154953722d325d6b998.tar.gz |
Add defines for GCC_INLINE and GCC_INLINE_ATTRIB (Issues 427 and 428)
Diffstat (limited to 'cpu.h')
-rw-r--r-- | cpu.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -32,6 +32,18 @@ # endif
#endif // ARM32 and ARM64 Headers
+// Used when supplying ASM due to missing intrinsics
+#if defined(__clang__)
+# define GCC_INLINE inline
+# define GCC_INLINE_ATTRIB __attribute__((__gnu_inline__, __always_inline__))
+#elif (CRYPTOPP_GCC_VERSION >= 30300) || defined(__INTEL_COMPILER)
+# define GCC_INLINE __inline
+# define GCC_INLINE_ATTRIB __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+#else
+# define GCC_INLINE inline
+# define GCC_INLINE_ATTRIB
+# endif
+
// X86/X64/X32 Headers
#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|