selftests/powerpc: Update strlen() test to test the new assembly function for PPC32
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 1 Aug 2018 09:01:16 +0000 (09:01 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Aug 2018 11:49:31 +0000 (21:49 +1000)
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>
tools/testing/selftests/powerpc/stringloops/Makefile
tools/testing/selftests/powerpc/stringloops/asm/cache.h [new file with mode: 0644]
tools/testing/selftests/powerpc/stringloops/strlen_32.S [new symlink]

index 3149958..10b35c8 100644 (file)
@@ -20,6 +20,13 @@ endif
 
 $(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)
 
 include ../../lib.mk
diff --git a/tools/testing/selftests/powerpc/stringloops/asm/cache.h b/tools/testing/selftests/powerpc/stringloops/asm/cache.h
new file mode 100644 (file)
index 0000000..8a28408
--- /dev/null
@@ -0,0 +1 @@
+#define        IFETCH_ALIGN_BYTES 4
diff --git a/tools/testing/selftests/powerpc/stringloops/strlen_32.S b/tools/testing/selftests/powerpc/stringloops/strlen_32.S
new file mode 120000 (symlink)
index 0000000..72b1373
--- /dev/null
@@ -0,0 +1 @@
+../../../../../arch/powerpc/lib/strlen_32.S
\ No newline at end of file