diff options
author | Jack Lloyd <[email protected]> | 2015-11-23 17:06:04 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-11-23 17:06:04 -0500 |
commit | 30d7e4df88a2ef6333fb6ee17bb0425ac3cba220 (patch) | |
tree | c3deb013d30b21c096d5050c727b52d981eb35f1 /src/lib | |
parent | befda7b4155f4b4889cff24fc1b664af3473130f (diff) |
Remove bogus code from generic mp_madd header, noticed on PPC build.
Also fix a few cast and zero-as-nullptr warnings in the AltiVec header
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/math/mp/mp_generic/mp_madd.h | 7 | ||||
-rw-r--r-- | src/lib/utils/simd/simd_altivec/simd_altivec.h | 4 |
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)); |