aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/math/mp/mp_generic/mp_madd.h7
-rw-r--r--src/lib/utils/simd/simd_altivec/simd_altivec.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/math/mp/mp_generic/mp_madd.h b/src/lib/math/mp/mp_generic/mp_madd.h
index 3b0487356..95a1069a4 100644
--- a/src/lib/math/mp/mp_generic/mp_madd.h
+++ b/src/lib/math/mp/mp_generic/mp_madd.h
@@ -10,6 +10,7 @@
#define BOTAN_MP_WORD_MULADD_H__
#include <botan/mp_types.h>
+#include <botan/mul128.h>
namespace Botan {
@@ -23,13 +24,13 @@ namespace Botan {
typedef u64bit dword;
#define BOTAN_HAS_MP_DWORD
#elif (BOTAN_MP_WORD_BITS == 64)
-
- #include <botan/mul128.h>
-
#if defined(BOTAN_TARGET_HAS_NATIVE_UINT128)
typedef uint128_t dword;
#define BOTAN_HAS_MP_DWORD
+ #else
+ // No native 128 bit integer type; use mul64x64_128 instead
#endif
+
#else
#error BOTAN_MP_WORD_BITS must be 8, 16, 32, or 64
#endif
diff --git a/src/lib/utils/simd/simd_altivec/simd_altivec.h b/src/lib/utils/simd/simd_altivec/simd_altivec.h
index 0a77d60fa..3963f2817 100644
--- a/src/lib/utils/simd/simd_altivec/simd_altivec.h
+++ b/src/lib/utils/simd/simd_altivec/simd_altivec.h
@@ -69,7 +69,7 @@ class SIMD_Altivec
void store_le(byte out[]) const
{
- __vector unsigned char perm = vec_lvsl(0, (u32bit*)0);
+ __vector unsigned char perm = vec_lvsl(0, static_cast<u32bit*>(nullptr));
perm = vec_xor(perm, vec_splat_u8(3));
@@ -179,7 +179,7 @@ class SIMD_Altivec
SIMD_Altivec bswap() const
{
- __vector unsigned char perm = vec_lvsl(0, (u32bit*)0);
+ __vector unsigned char perm = vec_lvsl(0, static_cast<u32bit*>(nullptr));
perm = vec_xor(perm, vec_splat_u8(3));