From 9ebd961562537fc5743eb3fc497f3ff558892237 Mon Sep 17 00:00:00 2001 From: Branislav Rankov Date: Thu, 30 Apr 2020 14:47:07 +0100 Subject: string: ARMv8.5 MTE: Add MTE compatible version of strcmp. Reading outside the range of the string is only allowed within 16 byte aligned granules when MTE is enabled. This implementation is based on string/aarch64/strcmp.S Change the case when strings are are misaligned, align the pointers down, and ignore bytes before the start of the string. Carry the part that is not compared to the next comparison. Testing done: optimized-routines/string/test/strcmp.c on big and little endian. Booted nanodroid with MTE enabled. bionic string tests with MTE enabled. Benchmarks results: Run both bionic benchmarks and glibc benchmarks on Pixel4. Cores A76 and A55. --- string/test/strcmp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'string/test/strcmp.c') diff --git a/string/test/strcmp.c b/string/test/strcmp.c index 32f4c2a..078fb1b 100644 --- a/string/test/strcmp.c +++ b/string/test/strcmp.c @@ -21,6 +21,7 @@ static const struct fun F(strcmp) #if __aarch64__ F(__strcmp_aarch64) +F(__strcmp_aarch64_mte) # if __ARM_FEATURE_SVE F(__strcmp_aarch64_sve) # endif -- cgit v1.2.3