Skip to content

Commit 8bcd6bb

Browse files
committed
fix native build
1 parent db54e3f commit 8bcd6bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/json/json_encoder.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,19 +447,19 @@ static zend_always_inline __m128i php_json_create_sse_escape_mask(int options)
447447
const char tag2 = (options & PHP_JSON_HEX_TAG) ? '>' : sentinel;
448448
return _mm_setr_epi8('"', amp, apos, slash, tag1, tag2, '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0);
449449
}
450-
#endif
451-
452-
#ifdef ZEND_INTRIN_SSE4_2_FUNC_PROTO
453-
static int php_json_sse42_compute_escape_intersection(const __m128i mask, const __m128i input) __attribute__((ifunc("resolve_json_escape_intersection")));
454-
455-
typedef int (*php_json_compute_escape_intersection_t)(const __m128i mask, const __m128i input);
456450

457451
ZEND_INTRIN_SSE4_2_FUNC_DECL(int php_json_sse42_compute_escape_intersection_real(const __m128i mask, const __m128i input));
458452
zend_always_inline int php_json_sse42_compute_escape_intersection_real(const __m128i mask, const __m128i input)
459453
{
460454
const __m128i result_individual_bytes = _mm_cmpistrm(mask, input, _SIDD_SBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_BIT_MASK);
461455
return _mm_cvtsi128_si32(result_individual_bytes);
462456
}
457+
#endif
458+
459+
#ifdef ZEND_INTRIN_SSE4_2_FUNC_PROTO
460+
static int php_json_sse42_compute_escape_intersection(const __m128i mask, const __m128i input) __attribute__((ifunc("resolve_json_escape_intersection")));
461+
462+
typedef int (*php_json_compute_escape_intersection_t)(const __m128i mask, const __m128i input);
463463

464464
ZEND_NO_SANITIZE_ADDRESS
465465
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */

0 commit comments

Comments
 (0)