diff options
Diffstat (limited to 'extra/yassl/taocrypt/include/misc.hpp')
-rw-r--r-- | extra/yassl/taocrypt/include/misc.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index ce9e3e371ad..cb4d26e70c6 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -124,29 +124,28 @@ void CleanUp(); // no gas on these systems ?, disable for now -#if defined(__sun__) || defined (__APPLE__) +#if defined(__sun__) + #undef TAOCRYPT_DISABLE_X86ASM #define TAOCRYPT_DISABLE_X86ASM #endif // icc problem with -03 and integer, disable for now #if defined(__INTEL_COMPILER) + #undef TAOCRYPT_DISABLE_X86ASM #define TAOCRYPT_DISABLE_X86ASM #endif -// a problem with gcc (newer versions only?) -#if defined(__GNUC__) +// indpedent of build system, unless ia32 asm is enabled disable it +#if !defined(TAOCRYPT_ENABLE_X86ASM) + #undef TAOCRYPT_DISABLE_X86ASM #define TAOCRYPT_DISABLE_X86ASM #endif // Turn on ia32 ASM for Big Integer // CodeWarrior defines _MSC_VER -// -// Do not use assembler with GCC, as the implementation for it is broken; -// it does not use proper GCC asm contraints and makes assumptions about -// frame pointers and so on, which breaks depending on GCC version and -// optimization level. #if !defined(TAOCRYPT_DISABLE_X86ASM) && ((defined(_MSC_VER) && \ - !defined(__MWERKS__) && defined(_M_IX86))) + !defined(__MWERKS__) && defined(_M_IX86)) || \ + (defined(__GNUC__) && defined(__i386__))) #define TAOCRYPT_X86ASM_AVAILABLE #endif @@ -751,7 +750,11 @@ private: byte *m_block; }; -template <class T, class B, bool A=true> +/* + XXX MYSQL: Setting A (assumeAligned) to false, + keeping it true might trigger segfault on SPARC. +*/ +template <class T, class B, bool A= false> struct BlockGetAndPut { // function needed because of C++ grammatical ambiguity between |