forked from osmocom/wireshark
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>
This commit is contained in:
parent
2bf7878e8a
commit
78755c775c
|
@ -21,6 +21,19 @@
|
||||||
|
|
||||||
#include "config.h"
|
#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 <glib.h>
|
||||||
#include "ws_symbol_export.h"
|
#include "ws_symbol_export.h"
|
||||||
#ifdef HAVE_SSE4_2
|
#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)
|
if G_UNLIKELY(have_sse42 < 0)
|
||||||
have_sse42 = ws_cpuid_sse42();
|
have_sse42 = ws_cpuid_sse42();
|
||||||
|
|
||||||
/*
|
|
||||||
Commented out due to bug 10798
|
|
||||||
if (haystacklen >= 16 && have_sse42)
|
if (haystacklen >= 16 && have_sse42)
|
||||||
return _ws_mempbrk_sse42(haystack, haystacklen, needles);
|
return _ws_mempbrk_sse42(haystack, haystacklen, needles);
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return _ws_mempbrk(haystack, haystacklen, needles);
|
return _ws_mempbrk(haystack, haystacklen, needles);
|
||||||
|
|
Loading…
Reference in New Issue