diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2022-08-22 13:21:30 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-08-23 10:09:05 +0100 |
commit | 87e99142bf8273215f58e4770fd7247e4b6e401b (patch) | |
tree | 65a03bdeaaab1f5794acb3083847ade7d9182a75 /string | |
parent | 802438542e4dff98109027594be5603f13708ab2 (diff) | |
download | arm-optimized-routines-87e99142bf8273215f58e4770fd7247e4b6e401b.tar.gz |
string: Improve strchrnul-mte
Unroll the main loop, which gives a small gain.
Diffstat (limited to 'string')
-rw-r--r-- | string/aarch64/strchrnul-mte.S | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/string/aarch64/strchrnul-mte.S b/string/aarch64/strchrnul-mte.S index 9be5cbc..b1ac4db 100644 --- a/string/aarch64/strchrnul-mte.S +++ b/string/aarch64/strchrnul-mte.S @@ -57,14 +57,22 @@ ENTRY (__strchrnul_aarch64_mte) .p2align 4 L(loop): - ldr qdata, [src, 16]! + ldr qdata, [src, 16] + cmeq vhas_chr.16b, vdata.16b, vrepchr.16b + cmhs vhas_chr.16b, vhas_chr.16b, vdata.16b + umaxp vend.16b, vhas_chr.16b, vhas_chr.16b + fmov tmp1, dend + cbnz tmp1, L(end) + ldr qdata, [src, 32]! cmeq vhas_chr.16b, vdata.16b, vrepchr.16b cmhs vhas_chr.16b, vhas_chr.16b, vdata.16b umaxp vend.16b, vhas_chr.16b, vhas_chr.16b fmov tmp1, dend cbz tmp1, L(loop) - + sub src, src, 16 +L(end): shrn vend.8b, vhas_chr.8h, 4 /* 128->64 */ + add src, src, 16 fmov tmp1, dend #ifndef __AARCH64EB__ rbit tmp1, tmp1 |