diff options
Diffstat (limited to 'lib/raid6/test/Makefile')
-rw-r--r-- | lib/raid6/test/Makefile | 26 |
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 |
23 | endif | 23 | endif |
24 | 24 | ||
25 | ifeq ($(ARCH),arm) | ||
26 | CFLAGS += -I../../../arch/arm/include -mfpu=neon | ||
27 | HAS_NEON = yes | ||
28 | endif | ||
29 | ifeq ($(ARCH),arm64) | ||
30 | CFLAGS += -I../../../arch/arm64/include | ||
31 | HAS_NEON = yes | ||
32 | endif | ||
33 | |||
25 | ifeq ($(IS_X86),yes) | 34 | ifeq ($(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) |
39 | else ifeq ($(HAS_NEON),yes) | ||
40 | OBJS += neon.o neon1.o neon2.o neon4.o neon8.o | ||
41 | CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 | ||
30 | else | 42 | else |
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) | |||
55 | raid6test: test.c raid6.a | 67 | raid6test: test.c raid6.a |
56 | $(CC) $(CFLAGS) -o raid6test $^ | 68 | $(CC) $(CFLAGS) -o raid6test $^ |
57 | 69 | ||
70 | neon1.c: neon.uc ../unroll.awk | ||
71 | $(AWK) ../unroll.awk -vN=1 < neon.uc > $@ | ||
72 | |||
73 | neon2.c: neon.uc ../unroll.awk | ||
74 | $(AWK) ../unroll.awk -vN=2 < neon.uc > $@ | ||
75 | |||
76 | neon4.c: neon.uc ../unroll.awk | ||
77 | $(AWK) ../unroll.awk -vN=4 < neon.uc > $@ | ||
78 | |||
79 | neon8.c: neon.uc ../unroll.awk | ||
80 | $(AWK) ../unroll.awk -vN=8 < neon.uc > $@ | ||
81 | |||
58 | altivec1.c: altivec.uc ../unroll.awk | 82 | altivec1.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 | ||
91 | clean: | 115 | clean: |
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 | ||
94 | spotless: clean | 118 | spotless: clean |
95 | rm -f *~ | 119 | rm -f *~ |