18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ciobj-$(CONFIG_RAID6_PQ) += raid6_pq.o 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciraid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \ 58c2ecf20Sopenharmony_ci int8.o int16.o int32.o 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciraid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o avx512.o recov_avx512.o 88c2ecf20Sopenharmony_ciraid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o \ 98c2ecf20Sopenharmony_ci vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o 108c2ecf20Sopenharmony_ciraid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o 118c2ecf20Sopenharmony_ciraid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o 128c2ecf20Sopenharmony_ciraid6_pq-$(CONFIG_LOONGARCH) += loongarch_simd.o recov_loongarch_simd.o 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cihostprogs += mktables 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciifeq ($(CONFIG_ALTIVEC),y) 178c2ecf20Sopenharmony_cialtivec_flags := -maltivec $(call cc-option,-mabi=altivec) 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciifdef CONFIG_CC_IS_CLANG 208c2ecf20Sopenharmony_ci# clang ppc port does not yet support -maltivec when -msoft-float is 218c2ecf20Sopenharmony_ci# enabled. A future release of clang will resolve this 228c2ecf20Sopenharmony_ci# https://bugs.llvm.org/show_bug.cgi?id=31177 238c2ecf20Sopenharmony_ciCFLAGS_REMOVE_altivec1.o += -msoft-float 248c2ecf20Sopenharmony_ciCFLAGS_REMOVE_altivec2.o += -msoft-float 258c2ecf20Sopenharmony_ciCFLAGS_REMOVE_altivec4.o += -msoft-float 268c2ecf20Sopenharmony_ciCFLAGS_REMOVE_altivec8.o += -msoft-float 278c2ecf20Sopenharmony_ciCFLAGS_REMOVE_vpermxor1.o += -msoft-float 288c2ecf20Sopenharmony_ciCFLAGS_REMOVE_vpermxor2.o += -msoft-float 298c2ecf20Sopenharmony_ciCFLAGS_REMOVE_vpermxor4.o += -msoft-float 308c2ecf20Sopenharmony_ciCFLAGS_REMOVE_vpermxor8.o += -msoft-float 318c2ecf20Sopenharmony_ciendif 328c2ecf20Sopenharmony_ciendif 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci# The GCC option -ffreestanding is required in order to compile code containing 358c2ecf20Sopenharmony_ci# ARM/NEON intrinsics in a non C99-compliant environment (such as the kernel) 368c2ecf20Sopenharmony_ciifeq ($(CONFIG_KERNEL_MODE_NEON),y) 378c2ecf20Sopenharmony_ciNEON_FLAGS := -ffreestanding 388c2ecf20Sopenharmony_ciifeq ($(ARCH),arm) 398c2ecf20Sopenharmony_ciNEON_FLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon 408c2ecf20Sopenharmony_ciendif 418c2ecf20Sopenharmony_ciCFLAGS_recov_neon_inner.o += $(NEON_FLAGS) 428c2ecf20Sopenharmony_ciifeq ($(ARCH),arm64) 438c2ecf20Sopenharmony_ciCFLAGS_REMOVE_recov_neon_inner.o += -mgeneral-regs-only 448c2ecf20Sopenharmony_ciCFLAGS_REMOVE_neon1.o += -mgeneral-regs-only 458c2ecf20Sopenharmony_ciCFLAGS_REMOVE_neon2.o += -mgeneral-regs-only 468c2ecf20Sopenharmony_ciCFLAGS_REMOVE_neon4.o += -mgeneral-regs-only 478c2ecf20Sopenharmony_ciCFLAGS_REMOVE_neon8.o += -mgeneral-regs-only 488c2ecf20Sopenharmony_ciendif 498c2ecf20Sopenharmony_ciendif 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciquiet_cmd_unroll = UNROLL $@ 528c2ecf20Sopenharmony_ci cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@ 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_citargets += int1.c int2.c int4.c int8.c int16.c int32.c 558c2ecf20Sopenharmony_ci$(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE 568c2ecf20Sopenharmony_ci $(call if_changed,unroll) 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciCFLAGS_altivec1.o += $(altivec_flags) 598c2ecf20Sopenharmony_ciCFLAGS_altivec2.o += $(altivec_flags) 608c2ecf20Sopenharmony_ciCFLAGS_altivec4.o += $(altivec_flags) 618c2ecf20Sopenharmony_ciCFLAGS_altivec8.o += $(altivec_flags) 628c2ecf20Sopenharmony_citargets += altivec1.c altivec2.c altivec4.c altivec8.c 638c2ecf20Sopenharmony_ci$(obj)/altivec%.c: $(src)/altivec.uc $(src)/unroll.awk FORCE 648c2ecf20Sopenharmony_ci $(call if_changed,unroll) 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciCFLAGS_vpermxor1.o += $(altivec_flags) 678c2ecf20Sopenharmony_ciCFLAGS_vpermxor2.o += $(altivec_flags) 688c2ecf20Sopenharmony_ciCFLAGS_vpermxor4.o += $(altivec_flags) 698c2ecf20Sopenharmony_ciCFLAGS_vpermxor8.o += $(altivec_flags) 708c2ecf20Sopenharmony_citargets += vpermxor1.c vpermxor2.c vpermxor4.c vpermxor8.c 718c2ecf20Sopenharmony_ci$(obj)/vpermxor%.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE 728c2ecf20Sopenharmony_ci $(call if_changed,unroll) 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ciCFLAGS_neon1.o += $(NEON_FLAGS) 758c2ecf20Sopenharmony_ciCFLAGS_neon2.o += $(NEON_FLAGS) 768c2ecf20Sopenharmony_ciCFLAGS_neon4.o += $(NEON_FLAGS) 778c2ecf20Sopenharmony_ciCFLAGS_neon8.o += $(NEON_FLAGS) 788c2ecf20Sopenharmony_citargets += neon1.c neon2.c neon4.c neon8.c 798c2ecf20Sopenharmony_ci$(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE 808c2ecf20Sopenharmony_ci $(call if_changed,unroll) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_citargets += s390vx8.c 838c2ecf20Sopenharmony_ci$(obj)/s390vx%.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE 848c2ecf20Sopenharmony_ci $(call if_changed,unroll) 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciquiet_cmd_mktable = TABLE $@ 878c2ecf20Sopenharmony_ci cmd_mktable = $(obj)/mktables > $@ 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_citargets += tables.c 908c2ecf20Sopenharmony_ci$(obj)/tables.c: $(obj)/mktables FORCE 918c2ecf20Sopenharmony_ci $(call if_changed,mktable) 92