diff options
author | Lexi Shao <shaolexi@huawei.com> | 2020-05-15 18:48:59 +0800 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-05-15 12:15:56 +0100 |
commit | 59b64f9cbbf1e98c6d187873de6c363994aee19d (patch) | |
tree | 05ffddcb27240c8fcab594a2c5d97ccbb803229d /sysdeps/aarch64/nptl/pthreaddef.h | |
parent | 981e638d38947837fd36520c4cb051342348779d (diff) | |
download | glibc-59b64f9cbbf1e98c6d187873de6c363994aee19d.tar.gz glibc-59b64f9cbbf1e98c6d187873de6c363994aee19d.tar.xz glibc-59b64f9cbbf1e98c6d187873de6c363994aee19d.zip |
aarch64: fix strcpy and strnlen for big-endian [BZ #25824]
This patch fixes the optimized implementation of strcpy and strnlen on a big-endian arm64 machine. The optimized method uses neon, which can process 128bit with one instruction. On a big-endian machine, the bit order should be reversed for the whole 128-bits double word. But with instuction rev64 datav.16b, datav.16b it reverses 64bits in the two halves rather than reversing 128bits. There is no such instruction as rev128 to reverse the 128bits, but we can fix this by loading the data registers accordingly. Fixes 0237b61526e7("aarch64: Optimized implementation of strcpy") and 2911cb68ed3d("aarch64: Optimized implementation of strnlen"). Signed-off-by: Lexi Shao <shaolexi@huawei.com> Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diffstat (limited to 'sysdeps/aarch64/nptl/pthreaddef.h')
0 files changed, 0 insertions, 0 deletions