Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bb07b59 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

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()

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
[mpe: Fix 64-bit build by adding build_32bit test]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 94675cce
Loading
Loading
Loading
Loading
+17 −3
Original line number Original line Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0
# The loops are all 64-bit code
# The loops are all 64-bit code
CFLAGS += -m64 -maltivec
CFLAGS += -I$(CURDIR)
CFLAGS += -I$(CURDIR)


TEST_GEN_PROGS := memcmp
EXTRA_SOURCES := ../harness.c
EXTRA_SOURCES := memcmp_64.S ../harness.c

build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi)

TEST_GEN_PROGS := memcmp_64

$(OUTPUT)/memcmp_64: memcmp.c
$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec

ifeq ($(build_32bit),1)
$(OUTPUT)/memcmp_32: memcmp.c
$(OUTPUT)/memcmp_32: CFLAGS += -m32

TEST_GEN_PROGS += memcmp_32
endif

ASFLAGS = $(CFLAGS)


include ../../lib.mk
include ../../lib.mk


+1 −0
Original line number Original line Diff line number Diff line
../../../../../arch/powerpc/lib/memcmp_32.S
 No newline at end of file