OSDN Git Service

libc: ARM64: fix memset for non-standard ZVA sizes
authorKevin Brodsky <kevin.brodsky@linaro.org>
Tue, 16 May 2017 10:29:49 +0000 (11:29 +0100)
committerKevin Brodsky <kevin.brodsky@linaro.org>
Tue, 16 May 2017 10:29:49 +0000 (11:29 +0100)
372f19e9e27c ("libc: ARM64: update memset/strlen/memcpy/memmove to
newlib/cortex-strings") introduced a bug in memset, only occurring
on the [set_long + zero + non-standard ZVA size] path, more
specifically when DCZID_EL0 reports a size different to 64 or 128.

On platforms with such sizes reported by DCZID_EL0, various string*
unit tests fail due to memset zeroing memory before and/or after the
area it is supposed to set.

Test: bionic-unit-tests --gtest_filter=string*
Change-Id: Idb80c0269226e40e343645a58608e3f324378468

libc/arch-arm64/generic/bionic/memset.S

index 3416cfb..12fc09d 100644 (file)
@@ -80,7 +80,7 @@
 #define tmp1w          w5
 #define tmp2           x6
 #define tmp2w          w6
-#define zva_len                x5
+#define zva_len                x7
 #define zva_lenw       w7
 
 #define L(l) .L ## l