Browse Source

selftests/powerpc: Update strlen() test to test the new assembly function for PPC32

This patch adds a test for testing the new assembly strlen() for PPC32

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Fix 64-bit build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Christophe Leroy 7 years ago
parent
commit
396ab6ab28

+ 7 - 0
tools/testing/selftests/powerpc/stringloops/Makefile

@@ -20,6 +20,13 @@ endif
 
 
 $(OUTPUT)/strlen: strlen.c string.c
 $(OUTPUT)/strlen: strlen.c string.c
 
 
+ifeq ($(build_32bit),1)
+$(OUTPUT)/strlen_32: strlen.c
+$(OUTPUT)/strlen_32: CFLAGS += -m32
+
+TEST_GEN_PROGS += strlen_32
+endif
+
 ASFLAGS = $(CFLAGS)
 ASFLAGS = $(CFLAGS)
 
 
 include ../../lib.mk
 include ../../lib.mk

+ 1 - 0
tools/testing/selftests/powerpc/stringloops/asm/cache.h

@@ -0,0 +1 @@
+#define	IFETCH_ALIGN_BYTES 4

+ 1 - 0
tools/testing/selftests/powerpc/stringloops/strlen_32.S

@@ -0,0 +1 @@
+../../../../../arch/powerpc/lib/strlen_32.S