From: Xinchen Hui Date: Sun, 18 Feb 2018 11:47:41 +0000 (+0800) Subject: change layout X-Git-Tag: php-7.3.0alpha1~370 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22e7329d9a38a74b1699b16e1797063e0880d734;p=php change layout --- diff --git a/ext/standard/string.c b/ext/standard/string.c index fce878358a..1843844103 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3531,19 +3531,19 @@ PHP_FUNCTION(strrev) e = s + ZSTR_LEN(str); --e; #if ZEND_INTRIN_SSSE3_NATIVE - do { + if (e - s > 15) { const __m128i map = _mm_set_epi8( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - while (e - s > 15) { + do { const __m128i str = _mm_loadu_si128((__m128i *)(e - 15)); _mm_storeu_si128((__m128i *)p, _mm_shuffle_epi8(str, map)); p += 16; e -= 16; - } - } while(0); + } while (e - s > 15); + } #endif while (e >= s) { *p++ = *e--;