xref: /linux/arch/loongarch/include/asm/xor_simd.h (revision a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
4  */
5 #ifndef _ASM_LOONGARCH_XOR_SIMD_H
6 #define _ASM_LOONGARCH_XOR_SIMD_H
7 
8 #ifdef CONFIG_CPU_HAS_LSX
9 void xor_lsx_2(unsigned long bytes, unsigned long * __restrict p1,
10 	       const unsigned long * __restrict p2);
11 void xor_lsx_3(unsigned long bytes, unsigned long * __restrict p1,
12 	       const unsigned long * __restrict p2, const unsigned long * __restrict p3);
13 void xor_lsx_4(unsigned long bytes, unsigned long * __restrict p1,
14 	       const unsigned long * __restrict p2, const unsigned long * __restrict p3,
15 	       const unsigned long * __restrict p4);
16 void xor_lsx_5(unsigned long bytes, unsigned long * __restrict p1,
17 	       const unsigned long * __restrict p2, const unsigned long * __restrict p3,
18 	       const unsigned long * __restrict p4, const unsigned long * __restrict p5);
19 #endif /* CONFIG_CPU_HAS_LSX */
20 
21 #ifdef CONFIG_CPU_HAS_LASX
22 void xor_lasx_2(unsigned long bytes, unsigned long * __restrict p1,
23 	        const unsigned long * __restrict p2);
24 void xor_lasx_3(unsigned long bytes, unsigned long * __restrict p1,
25 	        const unsigned long * __restrict p2, const unsigned long * __restrict p3);
26 void xor_lasx_4(unsigned long bytes, unsigned long * __restrict p1,
27 	        const unsigned long * __restrict p2, const unsigned long * __restrict p3,
28 	        const unsigned long * __restrict p4);
29 void xor_lasx_5(unsigned long bytes, unsigned long * __restrict p1,
30 	        const unsigned long * __restrict p2, const unsigned long * __restrict p3,
31 	        const unsigned long * __restrict p4, const unsigned long * __restrict p5);
32 #endif /* CONFIG_CPU_HAS_LASX */
33 
34 #endif /* _ASM_LOONGARCH_XOR_SIMD_H */
35