aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/copyloops/Makefile
blob: 498d8d875ab86ab445a9aff6d95b119eee253539 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# SPDX-License-Identifier: GPL-2.0
# The loops are all 64-bit code
CFLAGS += -m64
CFLAGS += -I$(CURDIR)
CFLAGS += -D SELFTEST
CFLAGS += -maltivec
CFLAGS += -mcpu=power4

# Use our CFLAGS for the implicit .S rule & set the asm machine type
ASFLAGS = $(CFLAGS) -Wa,-mpower4

TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
		copyuser_p7_t0 copyuser_p7_t1 \
		memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \
		memcpy_p7_t0 memcpy_p7_t1

EXTRA_SOURCES := validate.c ../harness.c

include ../../lib.mk

$(OUTPUT)/copyuser_64_t%:	copyuser_64.S $(EXTRA_SOURCES)
	$(CC) $(CPPFLAGS) $(CFLAGS) \
		-D COPY_LOOP=test___copy_tofrom_user_base \
		-D SELFTEST_CASE=$(subst copyuser_64_t,,$(notdir $@)) \
		-o $@ $^

$(OUTPUT)/copyuser_p7_t%:	copyuser_power7.S $(EXTRA_SOURCES)
	$(CC) $(CPPFLAGS) $(CFLAGS) \
		-D COPY_LOOP=test___copy_tofrom_user_power7 \
		-D SELFTEST_CASE=$(subst copyuser_p7_t,,$(notdir $@)) \
		-o $@ $^

# Strictly speaking, we only need the memcpy_64 test cases for big-endian
$(OUTPUT)/memcpy_64_t%:	memcpy_64.S $(EXTRA_SOURCES)
	$(CC) $(CPPFLAGS) $(CFLAGS) \
		-D COPY_LOOP=test_memcpy \
		-D SELFTEST_CASE=$(subst memcpy_64_t,,$(notdir $@)) \
		-o $@ $^

$(OUTPUT)/memcpy_p7_t%:	memcpy_power7.S $(EXTRA_SOURCES)
	$(CC) $(CPPFLAGS) $(CFLAGS) \
		-D COPY_LOOP=test_memcpy_power7 \
		-D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \
		-o $@ $^