diff options
| author | Anatol Belski <ab@php.net> | 2018-01-24 10:14:28 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2018-01-24 10:14:28 +0100 |
| commit | 7e2a9936d380494724680db1a1595bf922bedcfb (patch) | |
| tree | 2030ed0cc717c55fd4ecbcedfd5fd5204f35bce3 /Zend/zend_portability.h | |
| parent | a6e86f7a3f954a5cc05508228572e9f1db5d2771 (diff) | |
| download | php-git-7e2a9936d380494724680db1a1595bf922bedcfb.tar.gz | |
Move useful macro into zend_portability.h
Diffstat (limited to 'Zend/zend_portability.h')
| -rw-r--r-- | Zend/zend_portability.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 92b9bb307e..f89258e0d6 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -521,7 +521,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ #if defined(__GNUC__) && defined(__SSE4_2__) /* Instructions compiled directly. */ # define ZEND_INTRIN_SSE4_2_NATIVE 1 -#elif (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_NMMINTRIN_H) || defined(PHP_WIN32) +#elif (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_NMMINTRIN_H) || defined(ZEND_WIN32) /* Function resolved by ifunc or MINIT. */ # define ZEND_INTRIN_SSE4_2_RESOLVER 1 #endif @@ -532,6 +532,14 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ # define ZEND_INTRIN_SSE4_2_FUNC_PTR 1 #endif +#ifdef ZEND_WIN32 +# define ZEND_SET_ALIGNED(alignment, decl) __declspec(align(alignment)) decl +#elif HAVE_ATTRIBUTE_ALIGNED +# define ZEND_SET_ALIGNED(alignment, decl) decl __attribute__ ((__aligned__ (alignment))) +#else +# define ZEND_SET_ALIGNED(alignment, decl) decl +#endif + #endif /* ZEND_PORTABILITY_H */ /* |
