@@ -539,7 +539,7 @@ typedef enum php_json_simd_result {
539
539
PHP_JSON_SLOW ,
540
540
PHP_JSON_NON_ASCII ,
541
541
} php_json_simd_result ;
542
-
542
+ php_json_compute_escape_intersection_t foo = php_json_sse42_compute_escape_intersection_real ;
543
543
#ifdef JSON_USE_SIMD
544
544
static zend_always_inline php_json_simd_result php_json_process_simd_block (
545
545
smart_str * buf ,
@@ -550,6 +550,7 @@ static zend_always_inline php_json_simd_result php_json_process_simd_block(
550
550
int options
551
551
)
552
552
{
553
+ const php_json_compute_escape_intersection_t dontchangeme = foo ;
553
554
while (* len >= sizeof (__m128i )) {
554
555
const __m128i input = _mm_loadu_si128 ((const __m128i * ) (* s + * pos ));
555
556
/* signed compare, so checks for unsigned bytes >= 0x80 as well */
@@ -566,13 +567,14 @@ static zend_always_inline php_json_simd_result php_json_process_simd_block(
566
567
max_shift = zend_ulong_ntz (input_range_mask );
567
568
}
568
569
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
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 );
576
578
if (mask != 0 ) {
577
579
if (UNEXPECTED (max_shift < sizeof (__m128i ))) {
578
580
int shift = zend_ulong_ntz (mask ); /* first offending character */
0 commit comments