History

selftests/powerpc: Add test for 32 bits memcmp

This patch renames memcmp test to memcmp_64 and adds a memcmp_32 test for testing the 32 bits version of memcmp()

Christophe Leroy committed 8 years ago

Commit 1bb07b51 parent 94675cc2 files · +18 −3Browse files

Unified · Split

2 files
  1. tools/testing/selftests/powerpc/stringloops/Makefile +17 −3
  2. tools/testing/selftests/powerpc/stringloops/memcmp_32.S +1 −0
tools/testing/selftests/powerpc/stringloops/Makefile+17−3
@@ -1,10 +1,24 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2# The loops are all 64-bit code2# The loops are all 64-bit code
3CFLAGS += -m64 -maltivec
4CFLAGS += -I$(CURDIR)3CFLAGS += -I$(CURDIR)
5 4
6TEST_GEN_PROGS := memcmp5EXTRA_SOURCES := ../harness.c
7EXTRA_SOURCES := memcmp_64.S ../harness.c6
7build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi)
8
9TEST_GEN_PROGS := memcmp_64
10
11$(OUTPUT)/memcmp_64: memcmp.c
12$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec
13
14ifeq ($(build_32bit),1)
15$(OUTPUT)/memcmp_32: memcmp.c
16$(OUTPUT)/memcmp_32: CFLAGS += -m32
17
18TEST_GEN_PROGS += memcmp_32
19endif
20
21ASFLAGS = $(CFLAGS)
8 22
9include ../../lib.mk23include ../../lib.mk
10 24
tools/testing/selftests/powerpc/stringloops/memcmp_32.S+1−0
@@ -0,0 +1 @@
1../../../../../arch/powerpc/lib/memcmp_32.S