summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/include/misc.hpp
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
commitd3e2e1243bb0dae95ce35b0380dd4f8f476b254d (patch)
tree8779ad6b2059f181770cc07e2437925d7d5d5d04 /extra/yassl/taocrypt/include/misc.hpp
parent229dad1f9b12f8e9f64b6a605bdf8e31c339d018 (diff)
parent124428a9e28e59f98b25d8ee07b57d264f63cbe4 (diff)
downloadmariadb-git-d3e2e1243bb0dae95ce35b0380dd4f8f476b254d.tar.gz
5.5 merge
Diffstat (limited to 'extra/yassl/taocrypt/include/misc.hpp')
-rw-r--r--extra/yassl/taocrypt/include/misc.hpp23
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