aarch64: MTE compatible strlen
commita365ac45b7b51dbd9dc65629203cc2a9603420bb
authorAndrea Corallo <andrea.corallo@arm.com>
Fri, 5 Jun 2020 15:22:26 +0000 (5 17:22 +0200)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 9 Jun 2020 08:21:11 +0000 (9 09:21 +0100)
tree97f095e4a8c12b00eaa7507bf3501c26a8f24464
parent49beaaec1bd333c543f7150576a0f9f6a28a4879
aarch64: MTE compatible strlen

Introduce an Arm MTE compatible strlen implementation.

The existing implementation assumes that any access to the pages in
which the string resides is safe.  This assumption is not true when
MTE is enabled.  This patch updates the algorithm to ensure that
accesses remain within the bounds of an MTE tag (16-byte chunks) and
improves overall performance on modern cores. On cores with less
efficient Advanced SIMD implementation such as Cortex-A53 it can
be slower.

Benchmarked on Cortex-A72, Cortex-A53, Neoverse N1.

Co-authored-by: Wilco Dijkstra <wilco.dijkstra@arm.com>
sysdeps/aarch64/strlen.S