diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-01-29 18:55:15 -0500 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-01-30 07:47:41 +0000 |
commit | 78755c775c800cf0b3413a0d1848240308d45fdd (patch) | |
tree | 3c61d5912720830d9947090b0b3d5734faebc691 /wsutil/ws_mempbrk.c | |
parent | 2bf7878e8a7455fe656bb07e9a7d42e6ac4d87fd (diff) | |
download | wireshark-78755c775c800cf0b3413a0d1848240308d45fdd.tar.gz |
Disable SSE4.2 _ws_mempbrk_sse42 only for older Apple compilers
This is a longer term fix to disable _ws_mempbrk_sse42 in older
Apple compilers, which the buildbots currently use. This fix
is the longer-term fix for the temprorary one introduced in
g9a366b04/I2e438ff29.
Bug: 10798
Change-Id: I051ca003610c07f7d75cc19b20ff823fe4c1ce05
Reviewed-on: https://code.wireshark.org/review/6851
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'wsutil/ws_mempbrk.c')
-rw-r--r-- | wsutil/ws_mempbrk.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/wsutil/ws_mempbrk.c b/wsutil/ws_mempbrk.c index 72cd99988f..8ad1a17e78 100644 --- a/wsutil/ws_mempbrk.c +++ b/wsutil/ws_mempbrk.c @@ -21,6 +21,19 @@ #include "config.h" +/* see bug 10798: there is a bug in the compiler the buildbots use for Mac OSX + and SSE4.2, so we're not going to use SSE4.2 with Mac OSX right now, for + older Mac OSX compilers. + */ +#ifdef __APPLE__ +#if defined(__clang__) && (__clang_major__ >= 6) +/* allow HAVE_SSE4_2 to be used for clang 6.0+ case because we know it works */ +#else +/* don't allow it otherwise, for Mac OSX */ +#undef HAVE_SSE4_2 +#endif +#endif + #include <glib.h> #include "ws_symbol_export.h" #ifdef HAVE_SSE4_2 @@ -60,11 +73,8 @@ ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles) if G_UNLIKELY(have_sse42 < 0) have_sse42 = ws_cpuid_sse42(); -/* -Commented out due to bug 10798 if (haystacklen >= 16 && have_sse42) return _ws_mempbrk_sse42(haystack, haystacklen, needles); -*/ #endif return _ws_mempbrk(haystack, haystacklen, needles); |