Skip to content
Commit a365ac45 authored by Andrea Corallo's avatar Andrea Corallo Committed by Szabolcs Nagy
Browse files

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: default avatarWilco Dijkstra <wilco.dijkstra@arm.com>
parent 49beaaec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment