aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-21 11:39:32 -0400
committerJack Lloyd <[email protected]>2017-09-21 11:39:32 -0400
commita6420db31516405fb410a39830e29bfda3219ed6 (patch)
treea893e66d82d6af099d637fa5bc55716b9eebe57e /src/lib/utils
parentbbbc4c59ec85ec912b482afab1eccc0fd3b1f87a (diff)
Improve support for IBM XLC
A uint128 type is available but is apparently broken, causes problems with x25519
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/compiler.h2
-rw-r--r--src/lib/utils/mul128.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h
index 459cb737d..ff7f36571 100644
--- a/src/lib/utils/compiler.h
+++ b/src/lib/utils/compiler.h
@@ -9,7 +9,7 @@
#define BOTAN_UTIL_COMPILER_FLAGS_H_
/* Should we use GCC-style inline assembler? */
-#if !defined(BOTAN_USE_GCC_INLINE_ASM) && defined(__GNUC__)
+#if !defined(BOTAN_USE_GCC_INLINE_ASM) && (defined(__GNUC__) || defined(__xlc__))
#define BOTAN_USE_GCC_INLINE_ASM 1
#endif
diff --git a/src/lib/utils/mul128.h b/src/lib/utils/mul128.h
index ce1ef693b..1e2808254 100644
--- a/src/lib/utils/mul128.h
+++ b/src/lib/utils/mul128.h
@@ -12,7 +12,7 @@
namespace Botan {
-#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT)
+#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT) && !defined(__xlc__)
#define BOTAN_TARGET_HAS_NATIVE_UINT128
// Prefer TI mode over __int128 as GCC rejects the latter in pendantic mode