Skip to content

Commit 49c4ab3

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 91a91c6 + 68a7578 commit 49c4ab3

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Zend/README.ZEND_MM

-10
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,3 @@ Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so
2525
that valgrind can correctly track the memory leaks in shared extensions. For
2626
this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
2727
DL_UNLOAD() is skipped during the shutdown of shared extensions.
28-
29-
30-
Tweaking:
31-
---------
32-
33-
The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
34-
variables. Default values are "malloc" and "256K". Dependent on target system you
35-
can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
36-
37-
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.

ext/standard/string.c

+15
Original file line numberDiff line numberDiff line change
@@ -3376,6 +3376,8 @@ PHP_FUNCTION(strtr)
33763376
Reverse a string */
33773377
#if ZEND_INTRIN_SSSE3_NATIVE
33783378
#include <tmmintrin.h>
3379+
#elif defined(__aarch64__)
3380+
#include <arm_neon.h>
33793381
#endif
33803382
PHP_FUNCTION(strrev)
33813383
{
@@ -3408,6 +3410,19 @@ PHP_FUNCTION(strrev)
34083410
e -= 16;
34093411
} while (e - s > 15);
34103412
}
3413+
#elif defined(__aarch64__)
3414+
if (e - s > 15) {
3415+
do {
3416+
const uint8x16_t str = vld1q_u8((uint8_t *)(e - 15));
3417+
/* Synthesize rev128 with a rev64 + ext. */
3418+
const uint8x16_t rev = vrev64q_u8(str);
3419+
const uint8x16_t ext = (uint8x16_t)
3420+
vextq_u64((uint64x2_t)rev, (uint64x2_t)rev, 1);
3421+
vst1q_u8((uint8_t *)p, ext);
3422+
p += 16;
3423+
e -= 16;
3424+
} while (e - s > 15);
3425+
}
34113426
#endif
34123427
while (e >= s) {
34133428
*p++ = *e--;

0 commit comments

Comments
 (0)