diff options
| author | Anatol Belski <ab@php.net> | 2018-02-03 17:15:18 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2018-02-03 17:18:41 +0100 |
| commit | a06cde8236e3fbc3cfb35d07b3b97c47d338f5ac (patch) | |
| tree | 3584986686091b95f84a71ee419e74292aa5fc37 /Zend/zend_portability.h | |
| parent | 1624b0a91ff05f5be77696eb674381f08dd94e95 (diff) | |
| download | php-git-a06cde8236e3fbc3cfb35d07b3b97c47d338f5ac.tar.gz | |
If the target attribute is available, attach it explicitly
The ifunc attribute might be not available as it is binary format
dependent.
Diffstat (limited to 'Zend/zend_portability.h')
| -rw-r--r-- | Zend/zend_portability.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 89f3020a31..bd3e23edfe 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -514,6 +514,8 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ # endif #endif +/* Intrinsics macros start. */ + #if defined(HAVE_FUNC_ATTRIBUTE_IFUNC) && defined(HAVE_FUNC_ATTRIBUTE_TARGET) # define ZEND_INTRIN_HAVE_IFUNC_TARGET 1 #endif @@ -532,6 +534,18 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ # define ZEND_INTRIN_SSE4_2_FUNC_PTR 1 #endif +#if ZEND_INTRIN_SSE4_2_RESOLVER +# if defined(HAVE_FUNC_ATTRIBUTE_TARGET) +# define ZEND_INTRIN_SSE4_2_FUNC_DECL(func) ZEND_API func __attribute__((target("sse4.2"))) +# else +# define ZEND_INTRIN_SSE4_2_FUNC_DECL(func) func +# endif +#else +# define ZEND_INTRIN_SSE4_2_FUNC_DECL(func) +#endif + +/* Intrinsics macros end. */ + #ifdef ZEND_WIN32 # define ZEND_SET_ALIGNED(alignment, decl) __declspec(align(alignment)) decl #elif HAVE_ATTRIBUTE_ALIGNED |
