Skip to content
Commit 1de12a67 authored by Branislav Rankov's avatar Branislav Rankov Committed by Szabolcs Nagy
Browse files

string: ARMv8.5 MTE: Add MTE compatible version of strncmp.

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/strncmp.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:
string/test/strncmp.c on big endian, little endian and with MTE support.
Booted nanodroid with MTE enabled.

Bechmarked on Pixel4.
parent 9ebd9615
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment