File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ typedef int gid_t;
98
98
#include <immintrin.h>
99
99
#endif
100
100
101
+ #include "zend_simd.h"
102
+
101
103
ZEND_EXTENSION ();
102
104
103
105
#ifndef ZTS
@@ -171,16 +173,16 @@ static void bzero_aligned(void *mem, size_t size)
171
173
_mm256_store_si256 ((__m256i * )(p + 32 ), ymm0 );
172
174
p += 64 ;
173
175
}
174
- #elif defined(__SSE2__ )
176
+ #elif defined(ZEND_HAVE_VECTOR_128 )
175
177
char * p = (char * )mem ;
176
178
char * end = p + size ;
177
- __m128i xmm0 = _mm_setzero_si128 ();
179
+ zend_vec_8x16_t xmm0 = zend_vec_setzero_8x16 ();
178
180
179
181
while (p < end ) {
180
- _mm_store_si128 (( __m128i * ) p , xmm0 );
181
- _mm_store_si128 (( __m128i * ) (p + 16 ), xmm0 );
182
- _mm_store_si128 (( __m128i * ) (p + 32 ), xmm0 );
183
- _mm_store_si128 (( __m128i * ) (p + 48 ), xmm0 );
182
+ zend_vec_store_8x16 ( p , xmm0 );
183
+ zend_vec_store_8x16 ( (p + 16 ), xmm0 );
184
+ zend_vec_store_8x16 ( (p + 32 ), xmm0 );
185
+ zend_vec_store_8x16 ( (p + 48 ), xmm0 );
184
186
p += 64 ;
185
187
}
186
188
#else
You can’t perform that action at this time.
0 commit comments