File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4907,13 +4907,13 @@ static bool mb_fast_check_utf8_default(zend_string *str)
4907
4907
if (len >= 16 ) {
4908
4908
for (; i <= len - 16 ; i += 16 ) {
4909
4909
int8x16_t current_bytes = vld1q_s8 ((int8_t * )(p + i ));
4910
- /* top bit is all 0 , it is ASCII */
4910
+ /* All bytes are lower than 0x7F , it is ASCII */
4911
4911
int8x16_t is_ascii = vreinterpretq_s8_u8 (vqsubq_u8 (vreinterpretq_u8_s8 (current_bytes ), vdupq_n_u8 (0x7F )));
4912
4912
if (vmaxvq_u8 (is_ascii ) == 0 ) {
4913
- int8x16_t bad = vceqq_s8 ( vandq_s8 ( previous .rawbytes , bad_mask_prev_not_ascii ), bad_mask_prev_not_ascii );
4914
- if ( vmaxvq_u8 ( vreinterpretq_u8_s8 ( bad )) != 0 ) {
4915
- return false ;
4916
- }
4913
+ previous .rawbytes = vdupq_n_s8 ( 0 );
4914
+ previous . high_nibbles = vdupq_n_s8 ( 0 );
4915
+ previous . carried_continuations = vdupq_n_s8 ( 0 ) ;
4916
+ continue ;
4917
4917
}
4918
4918
neon_check_utf8_bytes (current_bytes , & previous , & has_error );
4919
4919
}
You can’t perform that action at this time.
0 commit comments