aboutsummaryrefslogtreecommitdiffstats
path: root/lib/raid6/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/raid6/test/Makefile')
-rw-r--r--lib/raid6/test/Makefile26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile
index 087332dbf8aa..28afa1a06e03 100644
--- a/lib/raid6/test/Makefile
+++ b/lib/raid6/test/Makefile
@@ -22,11 +22,23 @@ ifeq ($(ARCH),x86_64)
22 IS_X86 = yes 22 IS_X86 = yes
23endif 23endif
24 24
25ifeq ($(ARCH),arm)
26 CFLAGS += -I../../../arch/arm/include -mfpu=neon
27 HAS_NEON = yes
28endif
29ifeq ($(ARCH),arm64)
30 CFLAGS += -I../../../arch/arm64/include
31 HAS_NEON = yes
32endif
33
25ifeq ($(IS_X86),yes) 34ifeq ($(IS_X86),yes)
26 OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o 35 OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o
27 CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ 36 CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \
28 gcc -c -x assembler - >&/dev/null && \ 37 gcc -c -x assembler - >&/dev/null && \
29 rm ./-.o && echo -DCONFIG_AS_AVX2=1) 38 rm ./-.o && echo -DCONFIG_AS_AVX2=1)
39else ifeq ($(HAS_NEON),yes)
40 OBJS += neon.o neon1.o neon2.o neon4.o neon8.o
41 CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1
30else 42else
31 HAS_ALTIVEC := $(shell echo -e '\#include <altivec.h>\nvector int a;' |\ 43 HAS_ALTIVEC := $(shell echo -e '\#include <altivec.h>\nvector int a;' |\
32 gcc -c -x c - >&/dev/null && \ 44 gcc -c -x c - >&/dev/null && \
@@ -55,6 +67,18 @@ raid6.a: $(OBJS)
55raid6test: test.c raid6.a 67raid6test: test.c raid6.a
56 $(CC) $(CFLAGS) -o raid6test $^ 68 $(CC) $(CFLAGS) -o raid6test $^
57 69
70neon1.c: neon.uc ../unroll.awk
71 $(AWK) ../unroll.awk -vN=1 < neon.uc > $@
72
73neon2.c: neon.uc ../unroll.awk
74 $(AWK) ../unroll.awk -vN=2 < neon.uc > $@
75
76neon4.c: neon.uc ../unroll.awk
77 $(AWK) ../unroll.awk -vN=4 < neon.uc > $@
78
79neon8.c: neon.uc ../unroll.awk
80 $(AWK) ../unroll.awk -vN=8 < neon.uc > $@
81
58altivec1.c: altivec.uc ../unroll.awk 82altivec1.c: altivec.uc ../unroll.awk
59 $(AWK) ../unroll.awk -vN=1 < altivec.uc > $@ 83 $(AWK) ../unroll.awk -vN=1 < altivec.uc > $@
60 84
@@ -89,7 +113,7 @@ tables.c: mktables
89 ./mktables > tables.c 113 ./mktables > tables.c
90 114
91clean: 115clean:
92 rm -f *.o *.a mktables mktables.c *.uc int*.c altivec*.c tables.c raid6test 116 rm -f *.o *.a mktables mktables.c *.uc int*.c altivec*.c neon*.c tables.c raid6test
93 117
94spotless: clean 118spotless: clean
95 rm -f *~ 119 rm -f *~