From 22e7329d9a38a74b1699b16e1797063e0880d734 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 18 Feb 2018 19:47:41 +0800 Subject: [PATCH] change layout --- ext/standard/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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--; -- 2.50.1