diff options
author | Branislav Rankov <branislav.rankov@arm.com> | 2020-04-30 14:47:07 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-04-30 14:50:17 +0100 |
commit | 9ebd961562537fc5743eb3fc497f3ff558892237 (patch) | |
tree | 45653f897e8c647acfe30d317d5813c0cdcd4c64 /string/test/strcmp.c | |
parent | 232e3c08c9eb9aba822510bae57f920351b1eb40 (diff) | |
download | arm-optimized-routines-9ebd961562537fc5743eb3fc497f3ff558892237.tar.gz |
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.
Diffstat (limited to 'string/test/strcmp.c')
-rw-r--r-- | string/test/strcmp.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |