Work around issue on ARMEL in MultiplyTop and GCC. ARMHF is OK

pull/109/head
Jeffrey Walton 2016-01-08 15:43:09 -05:00
parent c299c4ba1a
commit 9fca0c2802
1 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,16 @@
# define CRYPTOPP_INTEGER_SSE2 (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86)
#endif
// Debian QEMU/ARMEL issue in MultiplyTop; see http://github.com/weidai11/cryptopp/issues/31.
#if __ARMEL__ && (CRYPTOPP_GCC_VERSION >= 50200) && (CRYPTOPP_GCC_VERSION < 50300) && __OPTIMIZE__
# define WORKAROUND_ARMEL_BUG 1
#endif
#if WORKAROUND_ARMEL_BUG
# pragma GCC push_options
# pragma GCC optimize("O1")
#endif
NAMESPACE_BEGIN(CryptoPP)
bool AssignIntToInteger(const std::type_info &valueType, void *pInteger, const void *pInt)
@ -4373,4 +4383,8 @@ std::string IntToString<unsigned long long>(unsigned long long value, unsigned i
NAMESPACE_END
#if WORKAROUND_ARMEL_BUG
# pragma GCC pop_options
#endif
#endif