@@ -539,7 +539,7 @@ typedef enum php_json_simd_result {
539539 PHP_JSON_SLOW ,
540540 PHP_JSON_NON_ASCII ,
541541} php_json_simd_result ;
542- php_json_compute_escape_intersection_t foo = php_json_sse42_compute_escape_intersection_real ;
542+
543543#ifdef JSON_USE_SIMD
544544static zend_always_inline php_json_simd_result php_json_process_simd_block (
545545 smart_str * buf ,
@@ -550,7 +550,6 @@ static zend_always_inline php_json_simd_result php_json_process_simd_block(
550550 int options
551551)
552552{
553- const php_json_compute_escape_intersection_t dontchangeme = foo ;
554553 while (* len >= sizeof (__m128i )) {
555554 const __m128i input = _mm_loadu_si128 ((const __m128i * ) (* s + * pos ));
556555 /* signed compare, so checks for unsigned bytes >= 0x80 as well */
@@ -567,14 +566,13 @@ static zend_always_inline php_json_simd_result php_json_process_simd_block(
567566 max_shift = zend_ulong_ntz (input_range_mask );
568567 }
569568
570- // #ifdef ZEND_INTRIN_SSE4_2_NATIVE
571- // int mask = php_json_sse42_compute_escape_intersection_real(sse_escape_mask, input);
572- // #elif defined(ZEND_INTRIN_SSE4_2_FUNC_PROTO)
573- // int mask = php_json_sse42_compute_escape_intersection(sse_escape_mask, input);
574- // #else
575- // int mask = php_json_sse2_compute_escape_intersection(_mm_setzero_si128(), input);
576- // #endif
577- int mask = dontchangeme (sse_escape_mask , input );
569+ #ifdef ZEND_INTRIN_SSE4_2_NATIVE
570+ int mask = php_json_sse42_compute_escape_intersection_real (sse_escape_mask , input );
571+ #elif defined(ZEND_INTRIN_SSE4_2_FUNC_PROTO )
572+ int mask = php_json_sse42_compute_escape_intersection (sse_escape_mask , input );
573+ #else
574+ int mask = php_json_sse2_compute_escape_intersection (_mm_setzero_si128 (), input );
575+ #endif
578576 if (mask != 0 ) {
579577 if (UNEXPECTED (max_shift < sizeof (__m128i ))) {
580578 int shift = zend_ulong_ntz (mask ); /* first offending character */
0 commit comments