[PATCH v4 1/4] selftests/powerpc: add test for 32 bits memcmp
From: Christophe Leroy
Date: Fri Jun 08 2018 - 06:21:33 EST
This patch renames memcmp test to memcmp_64 and adds
a memcmp_32 test for testing the 32 bits version of memcmp()
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx>
---
v4: new
tools/testing/selftests/powerpc/stringloops/Makefile | 14 +++++++++++---
tools/testing/selftests/powerpc/stringloops/memcmp_32 | Bin 0 -> 9092 bytes
tools/testing/selftests/powerpc/stringloops/memcmp_32.S | 1 +
3 files changed, 12 insertions(+), 3 deletions(-)
create mode 100755 tools/testing/selftests/powerpc/stringloops/memcmp_32
create mode 120000 tools/testing/selftests/powerpc/stringloops/memcmp_32.S
diff --git a/tools/testing/selftests/powerpc/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 1125e489055e..1e7301d4bac9 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -1,10 +1,18 @@
# SPDX-License-Identifier: GPL-2.0
# The loops are all 64-bit code
-CFLAGS += -m64
CFLAGS += -I$(CURDIR)
-TEST_GEN_PROGS := memcmp
-EXTRA_SOURCES := memcmp_64.S ../harness.c
+EXTRA_SOURCES := ../harness.c
+
+$(OUTPUT)/memcmp_64: memcmp.c
+$(OUTPUT)/memcmp_64: CFLAGS += -m64
+
+$(OUTPUT)/memcmp_32: memcmp.c
+$(OUTPUT)/memcmp_32: CFLAGS += -m32
+
+ASFLAGS = $(CFLAGS)
+
+TEST_GEN_PROGS := memcmp_32 memcmp_64
include ../../lib.mk
diff --git a/tools/testing/selftests/powerpc/stringloops/memcmp_32 b/tools/testing/selftests/powerpc/stringloops/memcmp_32
new file mode 100755
index 0000000000000000000000000000000000000000..413a02181daf59b0bdd7f0e2e05b74c4c702e7ad
GIT binary patch
literal 9092
zcmcIqeQZ?MmA`MsU_(su07D&M+h^I?n%0aBm@r@x#(bK@5E_gW+H{|XnXx^~d}Zc2
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jC+1T;=1rMxJfD
zuEB?|H&Pz@!TScmICc%bZ(il&Jw)C`v@WviGWS*5hkNbJ-#|2wK_$)iufR258{`4J
zdy|jvi5k8R@BwCYkyXn(Q^SXT%DYZC8C0S!rl$eCztO%p_yF>6EjYeRlt+8d0+f9`
zm&&v06lgl>KK&d7^3{9i6M05y(oD!HkB|qj4f&=a4<KV7B$>#=bPhm1*vIn~`DXnc
zgywq*bm~=OD)|-y*NJrm(l|d<`XpoOzchxNJWR|P|0*rM3^xq|;r!nSpk5QeyKIfT
NWdlI3fToj__kRhC;J5$)
literal 0
HcmV?d00001
diff --git a/tools/testing/selftests/powerpc/stringloops/memcmp_32.S b/tools/testing/selftests/powerpc/stringloops/memcmp_32.S
new file mode 120000
index 000000000000..056f2b3af789
--- /dev/null
+++ b/tools/testing/selftests/powerpc/stringloops/memcmp_32.S
@@ -0,0 +1 @@
+../../../../../arch/powerpc/lib/memcmp_32.S
\ No newline at end of file
--
2.13.3