Skip to content

Commit 82d049a

Browse files
committed
Changed _mm_add_epi8 from a macro to an inline function
1 parent 74a2fd8 commit 82d049a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Zend/zend_simd.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ typedef int8x16_t __m128i;
5050
#define _mm_srli_si128(x, bytes) vreinterpretq_s8_u8(vextq_u8(vdupq_n_u8(0), vreinterpretq_u8_s8(x), bytes))
5151
#define _mm_slli_si128(x, bytes) vreinterpretq_s8_u8(vextq_u8(vreinterpretq_u8_s8(x), vdupq_n_u8(0), 16 - bytes))
5252

53-
#define _mm_add_epi8(a, b) vaddq_s8(a, b)
53+
__attribute__((no_sanitize("signed-integer-overflow")))
54+
static zend_always_inline __m128i _mm_add_epi8(__m128i a, __m128i b)
55+
{
56+
return vaddq_s8(a, b);
57+
}
5458

5559
#define _mm_cmpeq_epi8(a, b) (vreinterpretq_s8_u8(vceqq_s8(a, b)))
5660
#define _mm_cmplt_epi8(a, b) (vreinterpretq_s8_u8(vcltq_s8(a, b)))

0 commit comments

Comments
 (0)